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
This commit is contained in:
William Hua
2016-06-14 15:42:13 -04:00
parent b3a530cb72
commit b03361366a
10 changed files with 1521 additions and 74 deletions

View File

@ -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__ */