diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-12-16 20:10:11 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-12-21 12:07:03 -0500 |
commit | 95868ef00bdce3f3e659e57fb4e1f81ab88adb97 (patch) | |
tree | e5841b58bc4d45eb14e7cd25d57443a6c6a998fc /gdk/gdkselection.c | |
parent | 625b8305e9111ddf22394a35cdae1b4a4ba978b1 (diff) | |
download | gtk+-95868ef00bdce3f3e659e57fb4e1f81ab88adb97.tar.gz |
Add a vfunc for gdk_selection_property_get
Diffstat (limited to 'gdk/gdkselection.c')
-rw-r--r-- | gdk/gdkselection.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gdk/gdkselection.c b/gdk/gdkselection.c index 188e64f07e..80131889c3 100644 --- a/gdk/gdkselection.c +++ b/gdk/gdkselection.c @@ -334,3 +334,39 @@ gdk_selection_send_notify_for_display (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); +} |