Commit b0336136 authored by William Hua's avatar William Hua

gtkmenu: add gtk_menu_popup_at_* ()

Adds the following functions:

gtk_menu_popup_at_rect ()
gtk_menu_popup_at_widget ()
gtk_menu_popup_at_pointer ()

https://bugzilla.gnome.org/show_bug.cgi?id=756579
parent b3a530cb
......@@ -387,6 +387,9 @@ HTML_IMAGES = \
$(srcdir)/images/panes.png \
$(srcdir)/images/pagesetupdialog.png \
$(srcdir)/images/placessidebar.png \
$(srcdir)/images/popup-anchors.png \
$(srcdir)/images/popup-flip.png \
$(srcdir)/images/popup-slide.png \
$(srcdir)/images/printdialog.png \
$(srcdir)/images/progressbar.png \
$(srcdir)/images/radio-group.png \
......
......@@ -2246,6 +2246,9 @@ gtk_menu_new_from_model
gtk_menu_set_screen
gtk_menu_reorder_child
gtk_menu_attach
gtk_menu_popup_at_rect
gtk_menu_popup_at_widget
gtk_menu_popup_at_pointer
gtk_menu_popup_for_device
gtk_menu_popup
gtk_menu_set_accel_group
......
This diff is collapsed.
......@@ -106,6 +106,7 @@ VOID:POINTER
VOID:POINTER,INT
VOID:POINTER,BOOLEAN
VOID:POINTER,POINTER,BOOLEAN
VOID:POINTER,POINTER,BOOLEAN,BOOLEAN
VOID:POINTER,POINTER,POINTER
VOID:POINTER,UINT
VOID:STRING
......
This diff is collapsed.
......@@ -152,6 +152,22 @@ void gtk_menu_popup_for_device (GtkMenu *menu,
GDestroyNotify destroy,
guint button,
guint32 activate_time);
GDK_AVAILABLE_IN_3_22
void gtk_menu_popup_at_rect (GtkMenu *menu,
GdkWindow *rect_window,
const GdkRectangle *rect,
GdkGravity rect_anchor,
GdkGravity menu_anchor,
const GdkEvent *trigger_event);
GDK_AVAILABLE_IN_3_22
void gtk_menu_popup_at_widget (GtkMenu *menu,
GtkWidget *widget,
GdkGravity widget_anchor,
GdkGravity menu_anchor,
const GdkEvent *trigger_event);
GDK_AVAILABLE_IN_3_22
void gtk_menu_popup_at_pointer (GtkMenu *menu,
const GdkEvent *trigger_event);
/* Position the menu according to its position function. Called
* from gtkmenuitem.c when a menu-item changes its allocation
......
......@@ -53,6 +53,16 @@ struct _GtkMenuPrivate
gint position_x;
gint position_y;
GdkWindow *rect_window;
GdkRectangle rect;
GtkWidget *widget;
GdkGravity rect_anchor;
GdkGravity menu_anchor;
GdkAnchorHints anchor_hints;
gint rect_anchor_dx;
gint rect_anchor_dy;
GdkWindowTypeHint menu_type_hint;
guint toggle_size;
guint accel_size;
......@@ -130,6 +140,14 @@ struct _GtkMenuPrivate
gint initial_drag_offset;
};
G_GNUC_INTERNAL
void gtk_menu_update_scroll_offset (GtkMenu *menu,
const GdkRectangle *flipped_rect,
const GdkRectangle *final_rect,
gboolean flipped_x,
gboolean flipped_y,
gpointer user_data);
G_END_DECLS
#endif /* __GTK_MENU_PRIVATE_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment