forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
d211c8af6b
commit
c7f39eb07e
@ -5824,6 +5824,7 @@ gtk_selection_data_targets_include_rich_text
|
||||
gtk_selection_data_get_selection
|
||||
gtk_selection_data_get_data
|
||||
gtk_selection_data_get_length
|
||||
gtk_selection_data_get_data_with_length
|
||||
gtk_selection_data_get_data_type
|
||||
gtk_selection_data_get_display
|
||||
gtk_selection_data_get_format
|
||||
|
@ -2292,6 +2292,7 @@ gtk_selection_data_get_data_type
|
||||
gtk_selection_data_get_display
|
||||
gtk_selection_data_get_format
|
||||
gtk_selection_data_get_length
|
||||
gtk_selection_data_get_data_with_length
|
||||
gtk_selection_data_get_pixbuf
|
||||
gtk_selection_data_get_selection
|
||||
gtk_selection_data_get_target
|
||||
|
@ -1222,6 +1222,29 @@ gtk_selection_data_get_length (const GtkSelectionData *selection_data)
|
||||
return selection_data->length;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
@ -133,6 +133,10 @@ GdkAtom gtk_selection_data_get_data_type (const GtkSelectionData *selectio
|
||||
gint gtk_selection_data_get_format (const GtkSelectionData *selection_data);
|
||||
const guchar *gtk_selection_data_get_data (const GtkSelectionData *selection_data);
|
||||
gint gtk_selection_data_get_length (const GtkSelectionData *selection_data);
|
||||
const guchar *gtk_selection_data_get_data_with_length
|
||||
(const GtkSelectionData *selection_data,
|
||||
gint *length);
|
||||
|
||||
GdkDisplay *gtk_selection_data_get_display (const GtkSelectionData *selection_data);
|
||||
|
||||
void gtk_selection_data_set (GtkSelectionData *selection_data,
|
||||
|
Loading…
Reference in New Issue
Block a user