summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorTorsten Schönfeld <tsch@src.gnome.org>2008-10-01 18:53:49 +0000
committerTorsten Schönfeld <tsch@src.gnome.org>2008-10-01 18:53:49 +0000
commit0697bb7942fdfc23103dc35b1e3ff5a492931b72 (patch)
tree82bc4b7a2c68843e77ad64f475ddb8c75a930028 /gtk
parent0df29ef510350d135520bb6b64ec1c0cf8cddb0b (diff)
downloadgtk+-0697bb7942fdfc23103dc35b1e3ff5a492931b72.tar.gz
Add gtk_selection_data_get_selection to retrieve the sealed struct field
GtkSelectionData.selection. svn path=/trunk/; revision=21564
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtk.symbols1
-rw-r--r--gtk/gtkselection.c18
-rw-r--r--gtk/gtkselection.h1
3 files changed, 20 insertions, 0 deletions
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 483453aca7..f2fd15e76a 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -3460,6 +3460,7 @@ gtk_selection_clear_targets
gtk_selection_convert
gtk_selection_data_copy
gtk_selection_data_free
+gtk_selection_data_get_selection
gtk_selection_data_get_target
gtk_selection_data_get_data_type
gtk_selection_data_get_display
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index b3013aa0c6..8ea2a3c93a 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -1112,6 +1112,24 @@ gtk_selection_convert (GtkWidget *widget,
}
/**
+ * gtk_selection_data_get_selection:
+ * @selection_data: a pointer to a #GtkSelectionData structure.
+ *
+ * Retrieves the selection #GdkAtom of the selection data.
+ *
+ * Returns: the selection #GdkAtom of the selection data.
+ *
+ * Since: 2.16
+ **/
+GdkAtom
+gtk_selection_data_get_selection (GtkSelectionData *selection_data)
+{
+ g_return_val_if_fail (selection_data != NULL, 0);
+
+ return selection_data->selection;
+}
+
+/**
* gtk_selection_data_get_target:
* @selection_data: a pointer to a #GtkSelectionData structure.
*
diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h
index 0cd474c79c..0106a9eb83 100644
--- a/gtk/gtkselection.h
+++ b/gtk/gtkselection.h
@@ -147,6 +147,7 @@ gboolean gtk_selection_convert (GtkWidget *widget,
GdkAtom target,
guint32 time_);
+GdkAtom gtk_selection_data_get_selection (GtkSelectionData *selection_data);
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);