Commit 9eae7a1d authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Split gtk_selection_data_get_data into gtk_selection_data_get_data and

2008-08-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkselection.[hc]: Split gtk_selection_data_get_data into
        gtk_selection_data_get_data and gtk_selection_data_get_length.
        Proposed by Owen Taylor.


svn path=/trunk/; revision=21232
parent 70b0a69e
2008-08-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkselection.[hc]: Split gtk_selection_data_get_data into
gtk_selection_data_get_data and gtk_selection_data_get_length.
Proposed by Owen Taylor.
2008-08-28 Christian Dywan <christian@imendio.com>
Bug 549734 – gtk_selection_data_get_data prototype is wrong
......
2008-08-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add gtk_selection_data_get_length
2008-08-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add some forgotten apis.
2008-08-19 Torsten Schoenfeld <kaffeetisch@gmx.de>
* gtk/gtk-sections.txt: Move gtk_menu_set_monitor next to
......
......@@ -5848,6 +5848,7 @@ gtk_selection_data_targets_include_text
gtk_selection_data_targets_include_uri
gtk_selection_data_targets_include_rich_text
gtk_selection_data_get_data
gtk_selection_data_get_length
gtk_selection_data_get_data_type
gtk_selection_data_get_display
gtk_selection_data_get_format
......
......@@ -3452,6 +3452,7 @@ gtk_selection_data_get_data_type
gtk_selection_data_get_display
gtk_selection_data_get_format
gtk_selection_data_get_data
gtk_selection_data_get_length
gtk_selection_data_get_pixbuf
gtk_selection_data_get_targets
gtk_selection_data_get_text
......
......@@ -260,12 +260,13 @@ _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard,
GdkDisplay *display;
gint format;
const guchar *data;
guint length;
gint length;
target = gdk_atom_name (gtk_selection_data_get_target (selection_data));
display = gtk_selection_data_get_display (selection_data);
format = gtk_selection_data_get_format (selection_data);
data = gtk_selection_data_get_data (selection_data, &length);
data = gtk_selection_data_get_data (selection_data);
length = gtk_selection_data_get_length (selection_data);
type = target_to_pasteboard_type (target);
g_free (target);
......
......@@ -1168,7 +1168,6 @@ gtk_selection_data_get_format (GtkSelectionData *selection_data)
/**
* gtk_selection_data_get_data:
* @selection_data: a pointer to a #GtkSelectionData structure.
* @length: an integer to be filled in, or %NULL
*
* Retrieves the raw data of the selection.
*
......@@ -1179,17 +1178,31 @@ gtk_selection_data_get_format (GtkSelectionData *selection_data)
* Since: 2.14
**/
const guchar*
gtk_selection_data_get_data (GtkSelectionData *selection_data,
gint *length)
gtk_selection_data_get_data (GtkSelectionData *selection_data)
{
g_return_val_if_fail (selection_data != NULL, NULL);
if (length)
*length = selection_data->length;
return selection_data->data;
}
/**
* gtk_selection_data_get_length:
* @selection_data: a pointer to a #GtkSelectionData structure.
*
* Retrieves the length of the raw data of the selection.
*
* Returns: the length of the data of the selection.
*
* Since: 2.14
*/
gint
gtk_selection_data_get_length (GtkSelectionData *selection_data)
{
g_return_val_if_fail (selection_data != NULL, -1);
return selection_data->length;
}
/**
* gtk_selection_data_get_display:
* @selection_data: a pointer to a #GtkSelectionData structure.
......
......@@ -150,8 +150,8 @@ gboolean gtk_selection_convert (GtkWidget *widget,
GdkAtom gtk_selection_data_get_target (GtkSelectionData *selection_data);
GdkAtom gtk_selection_data_get_data_type (GtkSelectionData *selection_data);
gint gtk_selection_data_get_format (GtkSelectionData *selection_data);
const guchar *gtk_selection_data_get_data (GtkSelectionData *selection_data,
gint *length);
const guchar *gtk_selection_data_get_data (GtkSelectionData *selection_data);
gint gtk_selection_data_get_length (GtkSelectionData *selection_data);
GdkDisplay *gtk_selection_data_get_display (GtkSelectionData *selection_data);
void gtk_selection_data_set (GtkSelectionData *selection_data,
......
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