]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkselection.c
Include "config.h" instead of <config.h> Command used: find -name
[~andy/gtk] / gtk / gtkselection.c
index 8adffcb6136059163b8a8c6f4cbd145164a8ac8d..56c14473fcb66d489e3148cf60b9b3c22ca8b912 100644 (file)
@@ -51,7 +51,7 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
-#include <config.h>
+#include "config.h"
 #include <stdarg.h>
 #include <string.h>
 #include "gdk.h"
@@ -1109,31 +1109,13 @@ gtk_selection_convert (GtkWidget *widget,
   return TRUE;
 }
 
-/**
- * gtk_selection_data_set_target:
- * @selection_data: a pointer to a #GtkSelectionData structure.
- * @target: target of the selection
- *
- * Sets the target of the selection.
- *
- * Since: GSEAL-branch
- **/
-void
-gtk_selection_data_set_target (GtkSelectionData *selection_data,
-                              GdkAtom           target)
-{
-  g_return_if_fail (selection_data != NULL);
-
-  selection_data->target = target;
-}
-
 /**
  * gtk_selection_data_get_target:
  * @selection_data: a pointer to a #GtkSelectionData structure.
  *
  * Retrieves the target of the selection.
  *
- * Since: GSEAL-branch
+ * Since: 2.14
  **/
 GdkAtom
 gtk_selection_data_get_target (GtkSelectionData *selection_data)
@@ -1143,31 +1125,13 @@ gtk_selection_data_get_target (GtkSelectionData *selection_data)
   return selection_data->target;
 }
 
-/**
- * gtk_selection_data_set_data_type:
- * @selection_data: a pointer to a #GtkSelectionData structure.
- * @data_type: data type of the selection
- *
- * Sets the data type of the selection.
- *
- * Since: GSEAL-branch
- **/
-void
-gtk_selection_data_set_data_type (GtkSelectionData *selection_data,
-                                 GdkAtom           data_type)
-{
-  g_return_if_fail (selection_data != NULL);
-
-  selection_data->type = data_type;
-}
-
 /**
  * gtk_selection_data_get_data_type:
  * @selection_data: a pointer to a #GtkSelectionData structure.
  *
  * Retrieves the data type of the selection.
  *
- * Since: GSEAL-branch
+ * Since: 2.14
  **/
 GdkAtom
 gtk_selection_data_get_data_type (GtkSelectionData *selection_data)
@@ -1177,31 +1141,13 @@ gtk_selection_data_get_data_type (GtkSelectionData *selection_data)
   return selection_data->type;
 }
 
-/**
- * gtk_selection_data_set_format:
- * @selection_data: a pointer to a #GtkSelectionData structure.
- * @format: format of the selection
- *
- * Sets the format of the selection.
- *
- * Since: GSEAL-branch
- **/
-void
-gtk_selection_data_set_format (GtkSelectionData *selection_data,
-                              gint              format)
-{
-  g_return_if_fail (selection_data != NULL);
-
-  selection_data->format = format;
-}
-
 /**
  * gtk_selection_data_get_format:
  * @selection_data: a pointer to a #GtkSelectionData structure.
  *
  * Retrieves the format of the selection.
  *
- * Since: GSEAL-branch
+ * Since: 2.14
  **/
 gint
 gtk_selection_data_get_format (GtkSelectionData *selection_data)
@@ -1211,73 +1157,27 @@ gtk_selection_data_get_format (GtkSelectionData *selection_data)
   return selection_data->format;
 }
 
-/**
- * gtk_selection_data_set_data:
- * @selection_data: a pointer to a #GtkSelectionData structure.
- * @data: data of the selection
- *
- * Sets the raw data of the selection.
- *
- * Since: GSEAL-branch
- **/
-void
-gtk_selection_data_set_data (GtkSelectionData *selection_data,
-                            const guchar     *data)
-{
-  g_return_if_fail (selection_data != NULL);
-
-  g_free (selection_data->data);
-  selection_data->data = (guchar*) g_strdup (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.
  *
- * Since: GSEAL-branch
+ * If @length is not %NULL it is filled with the length of data.
+ *
+ * Since: 2.14
  **/
 const guchar*
-gtk_selection_data_get_data (GtkSelectionData *selection_data)
+gtk_selection_data_get_data (GtkSelectionData *selection_data,
+                             guint           *length)
 {
   g_return_val_if_fail (selection_data != NULL, NULL);
 
-  return selection_data->data;
-}
+  if (length)
+      *length = selection_data->length;
 
-/**
- * gtk_selection_data_set_target:
- * @selection_data: a pointer to a #GtkSelectionData structure.
- * @length: length of the selection
- *
- * Sets the length of the selection.
- *
- * Since: GSEAL-branch
- **/
-void
-gtk_selection_data_set_length (GtkSelectionData *selection_data,
-                              gint             length)
-{
-  g_return_if_fail (selection_data != NULL);
-
-  selection_data->length = length;
-}
-
-/**
- * gtk_selection_data_get_length:
- * @selection_data: a pointer to a #GtkSelectionData structure.
- *
- * Retrieves the length of the selection.
- *
- * Since: GSEAL-branch
- **/
-gint
-gtk_selection_data_get_length (GtkSelectionData *selection_data)
-{
-  g_return_val_if_fail (selection_data != NULL, 0);
-
-  return selection_data->length;
+  return selection_data->data;
 }
 
 /**
@@ -1286,7 +1186,7 @@ gtk_selection_data_get_length (GtkSelectionData *selection_data)
  *
  * Retrieves the display of the selection.
  *
- * Since: GSEAL-branch
+ * Since: 2.14
  **/
 GdkDisplay *
 gtk_selection_data_get_display (GtkSelectionData *selection_data)