Commit 625b8305 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Add a vfunc for gdk_selection_send_notify_for_display

parent 7e22cf7e
......@@ -203,6 +203,12 @@ struct _GdkDisplayClass
GdkAtom selection,
guint32 time,
gboolean send_event);
void (*send_selection_notify) (GdkDisplay *dispay,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time_);
/* Signals */
void (*closed) (GdkDisplay *display,
......
......@@ -306,3 +306,31 @@ gdk_selection_owner_get_for_display (GdkDisplay *display,
return GDK_DISPLAY_GET_CLASS (display)->get_selection_owner (display, selection);
}
/**
* gdk_selection_send_notify_for_display:
* @display: the #GdkDisplay where @requestor is realized
* @requestor: window to which to deliver response
* @selection: selection that was requested
* @target: target that was selected
* @property: property in which the selection owner stored the data,
* or %GDK_NONE to indicate that the request was rejected
* @time_: timestamp
*
* Send a response to SelectionRequest event.
*
* Since: 2.2
*/
void
gdk_selection_send_notify_for_display (GdkDisplay *display,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time_)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
GDK_DISPLAY_GET_CLASS (display)
->send_selection_notify (display, requestor, selection,target, property, time_);
}
......@@ -2762,4 +2762,5 @@ _gdk_display_x11_class_init (GdkDisplayX11Class * class)
display_class->pop_error_trap = pop_error_trap;
display_class->get_selection_owner = _gdk_x11_display_get_selection_owner;
display_class->set_selection_owner = _gdk_x11_display_set_selection_owner;
display_class->send_selection_notify = _gdk_x11_display_send_selection_notify;
}
......@@ -189,13 +189,19 @@ void _gdk_x11_display_update_grab_info_ungrab (GdkDisplay *display,
void _gdk_x11_display_queue_events (GdkDisplay *display);
gboolean _gdk_x11_display_set_selection_owner (GdkDisplay *display,
GdkWindow *owner,
GdkAtom selection,
guint32 time,
gboolean send_event);
GdkWindow * _gdk_x11_display_get_selection_owner (GdkDisplay *display,
GdkAtom selection);
gboolean _gdk_x11_display_set_selection_owner (GdkDisplay *display,
GdkWindow *owner,
GdkAtom selection,
guint32 time,
gboolean send_event);
GdkWindow * _gdk_x11_display_get_selection_owner (GdkDisplay *display,
GdkAtom selection);
void _gdk_x11_display_send_selection_notify (GdkDisplay *display,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time);
void _gdk_x11_device_check_extension_events (GdkDevice *device);
......
......@@ -334,32 +334,16 @@ gdk_selection_property_get (GdkWindow *requestor,
return 0;
}
/**
* gdk_selection_send_notify_for_display:
* @display: the #GdkDisplay where @requestor is realized
* @requestor: window to which to deliver response.
* @selection: selection that was requested.
* @target: target that was selected.
* @property: property in which the selection owner stored the data,
* or %GDK_NONE to indicate that the request was rejected.
* @time_: timestamp.
*
* Send a response to SelectionRequest event.
*
* Since: 2.2
**/
void
gdk_selection_send_notify_for_display (GdkDisplay *display,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time)
_gdk_x11_display_send_selection_notify (GdkDisplay *display,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time)
{
XSelectionEvent xevent;
g_return_if_fail (GDK_IS_DISPLAY (display));
xevent.type = SelectionNotify;
xevent.serial = 0;
xevent.send_event = True;
......
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