GdkAtom target,
GdkAtom property,
guint32 time_);
+ gint (*get_selection_property) (GdkDisplay *display,
+ GdkWindow *requestor,
+ guchar **data,
+ GdkAtom *type,
+ gint *format);
/* Signals */
void (*closed) (GdkDisplay *display,
GDK_DISPLAY_GET_CLASS (display)
->send_selection_notify (display, requestor, selection,target, property, time_);
}
+
+/**
+ * gdk_selection_property_get:
+ * @requestor: the window on which the data is stored
+ * @data: location to store a pointer to the retrieved data.
+ If the retrieval failed, %NULL we be stored here, otherwise, it
+ will be non-%NULL and the returned data should be freed with g_free()
+ when you are finished using it. The length of the
+ allocated memory is one more than the length
+ of the returned data, and the final byte will always
+ be zero, to ensure nul-termination of strings
+ * @prop_type: location to store the type of the property
+ * @prop_format: location to store the format of the property
+ *
+ * Retrieves selection data that was stored by the selection
+ * data in response to a call to gdk_selection_convert(). This function
+ * will not be used by applications, who should use the #GtkClipboard
+ * API instead.
+ *
+ * Return value: the length of the retrieved data.
+ */
+gint
+gdk_selection_property_get (GdkWindow *requestor,
+ guchar **data,
+ GdkAtom *ret_type,
+ gint *ret_format)
+{
+ GdkDisplay *display;
+
+ g_return_val_if_fail (GDK_IS_WINDOW (requestor), 0);
+
+ display = gdk_window_get_display (requestor);
+
+ return GDK_DISPLAY_GET_CLASS (display)
+ ->get_selection_property (display, requestor, data, ret_type, ret_format);
+}
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;
+ display_class->get_selection_property = _gdk_x11_display_get_selection_property;
}
GdkAtom target,
GdkAtom property,
guint32 time);
+gint _gdk_x11_display_get_selection_property (GdkDisplay *display,
+ GdkWindow *requestor,
+ guchar **data,
+ GdkAtom *ret_type,
+ gint *ret_format);
void _gdk_x11_device_check_extension_events (GdkDevice *device);
GDK_WINDOW_XID (requestor), time);
}
-/**
- * gdk_selection_property_get:
- * @requestor: the window on which the data is stored
- * @data: location to store a pointer to the retrieved data.
- If the retrieval failed, %NULL we be stored here, otherwise, it
- will be non-%NULL and the returned data should be freed with g_free()
- when you are finished using it. The length of the
- allocated memory is one more than the length
- of the returned data, and the final byte will always
- be zero, to ensure nul-termination of strings.
- * @prop_type: location to store the type of the property.
- * @prop_format: location to store the format of the property.
- *
- * Retrieves selection data that was stored by the selection
- * data in response to a call to gdk_selection_convert(). This function
- * will not be used by applications, who should use the #GtkClipboard
- * API instead.
- *
- * Return value: the length of the retrieved data.
- **/
gint
-gdk_selection_property_get (GdkWindow *requestor,
- guchar **data,
- GdkAtom *ret_type,
- gint *ret_format)
+_gdk_x11_display_get_selection_property (GdkDisplay *display,
+ GdkWindow *requestor,
+ guchar **data,
+ GdkAtom *ret_type,
+ gint *ret_format)
{
gulong nitems;
gulong nbytes;
- gulong length = 0; /* Quiet GCC */
+ gulong length = 0;
Atom prop_type;
gint prop_format;
guchar *t = NULL;
- GdkDisplay *display;
-
- g_return_val_if_fail (requestor != NULL, 0);
- g_return_val_if_fail (GDK_IS_WINDOW (requestor), 0);
- g_return_val_if_fail (GDK_WINDOW_IS_X11 (requestor), 0);
-
- display = GDK_WINDOW_DISPLAY (requestor);
if (GDK_WINDOW_DESTROYED (requestor) || !GDK_WINDOW_IS_X11 (requestor))
goto err;