gtk+ r21232 - in trunk: . docs/reference docs/reference/gtk gtk



Author: matthiasc
Date: Fri Aug 29 04:16:56 2008
New Revision: 21232
URL: http://svn.gnome.org/viewvc/gtk+?rev=21232&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/docs/reference/ChangeLog
   trunk/docs/reference/gtk/gtk-sections.txt
   trunk/gtk/gtk.symbols
   trunk/gtk/gtkquartz.c
   trunk/gtk/gtkselection.c
   trunk/gtk/gtkselection.h

Modified: trunk/docs/reference/gtk/gtk-sections.txt
==============================================================================
--- trunk/docs/reference/gtk/gtk-sections.txt	(original)
+++ trunk/docs/reference/gtk/gtk-sections.txt	Fri Aug 29 04:16:56 2008
@@ -5848,6 +5848,7 @@
 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

Modified: trunk/gtk/gtk.symbols
==============================================================================
--- trunk/gtk/gtk.symbols	(original)
+++ trunk/gtk/gtk.symbols	Fri Aug 29 04:16:56 2008
@@ -3452,6 +3452,7 @@
 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

Modified: trunk/gtk/gtkquartz.c
==============================================================================
--- trunk/gtk/gtkquartz.c	(original)
+++ trunk/gtk/gtkquartz.c	Fri Aug 29 04:16:56 2008
@@ -260,12 +260,13 @@
   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);

Modified: trunk/gtk/gtkselection.c
==============================================================================
--- trunk/gtk/gtkselection.c	(original)
+++ trunk/gtk/gtkselection.c	Fri Aug 29 04:16:56 2008
@@ -1168,7 +1168,6 @@
 /**
  * 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,18 +1178,32 @@
  * 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.
  *

Modified: trunk/gtk/gtkselection.h
==============================================================================
--- trunk/gtk/gtkselection.h	(original)
+++ trunk/gtk/gtkselection.h	Fri Aug 29 04:16:56 2008
@@ -150,8 +150,8 @@
 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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]