diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-12-10 01:27:10 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-12-21 12:06:56 -0500 |
commit | c53ec081ceeb84ee2b3088e1c3ec986c89e954af (patch) | |
tree | 47a2f3b95d4a7f050ebad8e690f3d30906c8dc49 /gdk/gdkinternals.h | |
parent | 3c47c8467cc7067e6aae93a99c6710667c05d4bb (diff) | |
download | gtk+-c53ec081ceeb84ee2b3088e1c3ec986c89e954af.tar.gz |
Add vtables for DND
This commit hides GdkDragContext and GdkDragContextClass, adds
vfuncs for most drag context functionality, and turns the X11 DND
implementation into GdkDragContextX11. We also add vfuncs to
GdkDisplay for gdk_drag_get_protocol and to GdkWindow for
gdk_drag_begin, and implemenet them for X11.
Other backends need similar treatment and are broken now.
Diffstat (limited to 'gdk/gdkinternals.h')
-rw-r--r-- | gdk/gdkinternals.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index 604ed64aa9..b50ee9e24d 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -305,6 +305,10 @@ struct _GdkDisplayClass GdkFilterFunc func, gpointer data); GdkAppLaunchContext * (*get_app_launch_context) (GdkDisplay *display); + GdkNativeWindow (*get_drag_protocol) (GdkDisplay *display, + GdkNativeWindow winid, + GdkDragProtocol *protocol, + guint *version); /* Signals */ @@ -409,6 +413,59 @@ struct _GdkScreenClass void (*monitors_changed) (GdkScreen *screen); }; +struct _GdkDragContextClass { + GObjectClass parent_class; + + GdkWindow * (*find_window) (GdkDragContext *context, + GdkWindow *drag_window, + GdkScreen *screen, + gint x_root, + gint y_root, + GdkDragProtocol *protocol); + GdkAtom (*get_selection) (GdkDragContext *context); + gboolean (*drag_motion) (GdkDragContext *context, + GdkWindow *dest_window, + GdkDragProtocol protocol, + gint root_x, + gint root_y, + GdkDragAction suggested_action, + GdkDragAction possible_actions, + guint32 time_); + void (*drag_status) (GdkDragContext *context, + GdkDragAction action, + guint32 time_); + void (*drag_abort) (GdkDragContext *context, + guint32 time_); + void (*drag_drop) (GdkDragContext *context, + guint32 time_); + void (*drop_reply) (GdkDragContext *context, + gboolean accept, + guint32 time_); + void (*drop_finish) (GdkDragContext *context, + gboolean success, + guint32 time_); + gboolean (*drop_status) (GdkDragContext *context); +}; + +struct _GdkDragContext { + GObject parent_instance; + + GdkDragProtocol protocol; + + gboolean is_source; + GdkWindow *source_window; + GdkWindow *dest_window; + + GList *targets; + GdkDragAction actions; + GdkDragAction suggested_action; + GdkDragAction action; + + guint32 start_time; + + GdkDevice *device; +}; + extern GSList *_gdk_displays; extern gchar *_gdk_display_name; extern gint _gdk_screen_number; |