wayland: Implement drag/source side of selections

This has been made to work similarly to X11, requests for the data device
contents are notified through GDK_SELECTION_REQUEST events, the data stored
in the GDK_SELECTION property as a reaction to that event is then stored
into the wayland selection implementation, and written to the fd when
requested/available.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
This commit is contained in:
Carlos Garnacho
2014-08-21 18:49:44 +02:00
parent 3b953041a9
commit 7744799072
4 changed files with 362 additions and 1 deletions

View File

@ -147,6 +147,9 @@ uint32_t _gdk_wayland_device_get_implicit_grab_serial(GdkWaylandDevice *device,
const GdkEvent *event);
uint32_t _gdk_wayland_device_get_last_implicit_grab_serial (GdkWaylandDevice *device,
GdkEventSequence **seqence);
struct wl_data_device * gdk_wayland_device_get_data_device (GdkDevice *gdk_device);
void gdk_wayland_device_set_selection (GdkDevice *gdk_device,
struct wl_data_source *source);
void gdk_wayland_device_unset_touch_grab (GdkDevice *device,
GdkEventSequence *sequence);
@ -201,4 +204,14 @@ void gdk_wayland_selection_set_offer (struct wl_data_offer *offer);
struct wl_data_offer * gdk_wayland_selection_get_offer (void);
GList * gdk_wayland_selection_get_targets (void);
void gdk_wayland_selection_store (GdkWindow *window,
GdkAtom type,
GdkPropMode mode,
const guchar *data,
gint len);
struct wl_data_source * gdk_wayland_selection_get_data_source (GdkWindow *owner,
GdkAtom selection);
void gdk_wayland_selection_unset_data_source (GdkAtom selection);
#endif /* __GDK_PRIVATE_WAYLAND_H__ */