diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-01-03 12:11:41 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-01-03 12:13:30 -0500 |
commit | c7f39eb07ecaba5cb0b9538be8a7d64e5b862f57 (patch) | |
tree | f2c21ed7248a15a61d8264c38312df6d68d7144a /gtk/gtkselection.c | |
parent | d211c8af6bab2f99aeebb83707d29649f0108364 (diff) | |
download | gtk+-c7f39eb07ecaba5cb0b9538be8a7d64e5b862f57.tar.gz |
add gtk_selection_data_get_data_with_length API which can be bound
* gtk_selection_data_get_data can't be bound because we need to know the length
of data inorder to marshal it
https://bugzilla.gnome.org/show_bug.cgi?id=635299
Diffstat (limited to 'gtk/gtkselection.c')
-rw-r--r-- | gtk/gtkselection.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index 5ee7b2541d..06aa14678a 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -1223,6 +1223,29 @@ gtk_selection_data_get_length (const GtkSelectionData *selection_data) } /** + * gtk_selection_data_get_data_with_length: + * @selection_data: a pointer to a #GtkSelectionData structure + * @length: return location for length of the data segment + * + * Retrieves the raw data of the selection along with its length. + * + * Returns: (array length=length): the raw data of the selection + * + * Rename to: gtk_selection_data_get_data + * Since: 3.0 + */ +const guchar* +gtk_selection_data_get_data_with_length (const GtkSelectionData *selection_data, + gint *length) +{ + g_return_val_if_fail (selection_data != NULL, NULL); + + *length = selection_data->length; + + return selection_data->data; +} + +/** * gtk_selection_data_get_display: * @selection_data: a pointer to a #GtkSelectionData structure. * |