diff options
author | Benjamin Otte <otte@redhat.com> | 2010-12-17 15:41:59 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-12-17 16:47:57 +0100 |
commit | d50c582961a8b2fc3d5fb0480a3ad8fda2caeb1e (patch) | |
tree | 223054c6cf583fa5b21dd833ec24d632d44bb62b | |
parent | 2c8c1c6df49b38b525b51a4773758b08a648f81e (diff) | |
download | gtk+-d50c582961a8b2fc3d5fb0480a3ad8fda2caeb1e.tar.gz |
selection: constify GtkSelectionData getters
-rw-r--r-- | gtk/gtkselection.c | 42 | ||||
-rw-r--r-- | gtk/gtkselection.h | 32 |
2 files changed, 37 insertions, 37 deletions
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index 4148f37b23..fd8058d3bf 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -1122,7 +1122,7 @@ gtk_selection_convert (GtkWidget *widget, * Since: 2.16 **/ GdkAtom -gtk_selection_data_get_selection (GtkSelectionData *selection_data) +gtk_selection_data_get_selection (const GtkSelectionData *selection_data) { g_return_val_if_fail (selection_data != NULL, 0); @@ -1140,7 +1140,7 @@ gtk_selection_data_get_selection (GtkSelectionData *selection_data) * Since: 2.14 **/ GdkAtom -gtk_selection_data_get_target (GtkSelectionData *selection_data) +gtk_selection_data_get_target (const GtkSelectionData *selection_data) { g_return_val_if_fail (selection_data != NULL, 0); @@ -1158,7 +1158,7 @@ gtk_selection_data_get_target (GtkSelectionData *selection_data) * Since: 2.14 **/ GdkAtom -gtk_selection_data_get_data_type (GtkSelectionData *selection_data) +gtk_selection_data_get_data_type (const GtkSelectionData *selection_data) { g_return_val_if_fail (selection_data != NULL, 0); @@ -1176,7 +1176,7 @@ gtk_selection_data_get_data_type (GtkSelectionData *selection_data) * Since: 2.14 **/ gint -gtk_selection_data_get_format (GtkSelectionData *selection_data) +gtk_selection_data_get_format (const GtkSelectionData *selection_data) { g_return_val_if_fail (selection_data != NULL, 0); @@ -1194,7 +1194,7 @@ gtk_selection_data_get_format (GtkSelectionData *selection_data) * Since: 2.14 **/ const guchar* -gtk_selection_data_get_data (GtkSelectionData *selection_data) +gtk_selection_data_get_data (const GtkSelectionData *selection_data) { g_return_val_if_fail (selection_data != NULL, NULL); @@ -1212,7 +1212,7 @@ gtk_selection_data_get_data (GtkSelectionData *selection_data) * Since: 2.14 */ gint -gtk_selection_data_get_length (GtkSelectionData *selection_data) +gtk_selection_data_get_length (const GtkSelectionData *selection_data) { g_return_val_if_fail (selection_data != NULL, -1); @@ -1230,7 +1230,7 @@ gtk_selection_data_get_length (GtkSelectionData *selection_data) * Since: 2.14 **/ GdkDisplay * -gtk_selection_data_get_display (GtkSelectionData *selection_data) +gtk_selection_data_get_display (const GtkSelectionData *selection_data) { g_return_val_if_fail (selection_data != NULL, NULL); @@ -1433,7 +1433,7 @@ selection_set_text_plain (GtkSelectionData *selection_data, } static guchar * -selection_get_text_plain (GtkSelectionData *selection_data) +selection_get_text_plain (const GtkSelectionData *selection_data) { const gchar *charset = NULL; gchar *str, *result; @@ -1546,7 +1546,7 @@ gtk_selection_data_set_text (GtkSelectionData *selection_data, * If the result is non-%NULL it must be freed with g_free(). **/ guchar * -gtk_selection_data_get_text (GtkSelectionData *selection_data) +gtk_selection_data_get_text (const GtkSelectionData *selection_data) { guchar *result = NULL; @@ -1666,7 +1666,7 @@ gtk_selection_data_set_pixbuf (GtkSelectionData *selection_data, * Since: 2.6 **/ GdkPixbuf * -gtk_selection_data_get_pixbuf (GtkSelectionData *selection_data) +gtk_selection_data_get_pixbuf (const GtkSelectionData *selection_data) { GdkPixbufLoader *loader; GdkPixbuf *result = NULL; @@ -1765,7 +1765,7 @@ gtk_selection_data_set_uris (GtkSelectionData *selection_data, * Since: 2.6 **/ gchar ** -gtk_selection_data_get_uris (GtkSelectionData *selection_data) +gtk_selection_data_get_uris (const GtkSelectionData *selection_data) { gchar **result = NULL; @@ -1809,9 +1809,9 @@ gtk_selection_data_get_uris (GtkSelectionData *selection_data) * array of targets, otherwise %FALSE. **/ gboolean -gtk_selection_data_get_targets (GtkSelectionData *selection_data, - GdkAtom **targets, - gint *n_atoms) +gtk_selection_data_get_targets (const GtkSelectionData *selection_data, + GdkAtom **targets, + gint *n_atoms) { g_return_val_if_fail (selection_data != NULL, FALSE); @@ -1944,7 +1944,7 @@ gtk_targets_include_rich_text (GdkAtom *targets, * and a suitable target for text is included, otherwise %FALSE. **/ gboolean -gtk_selection_data_targets_include_text (GtkSelectionData *selection_data) +gtk_selection_data_targets_include_text (const GtkSelectionData *selection_data) { GdkAtom *targets; gint n_targets; @@ -1979,8 +1979,8 @@ gtk_selection_data_targets_include_text (GtkSelectionData *selection_data) * Since: 2.10 **/ gboolean -gtk_selection_data_targets_include_rich_text (GtkSelectionData *selection_data, - GtkTextBuffer *buffer) +gtk_selection_data_targets_include_rich_text (const GtkSelectionData *selection_data, + GtkTextBuffer *buffer) { GdkAtom *targets; gint n_targets; @@ -2062,8 +2062,8 @@ gtk_targets_include_image (GdkAtom *targets, * Since: 2.6 **/ gboolean -gtk_selection_data_targets_include_image (GtkSelectionData *selection_data, - gboolean writable) +gtk_selection_data_targets_include_image (const GtkSelectionData *selection_data, + gboolean writable) { GdkAtom *targets; gint n_targets; @@ -2135,7 +2135,7 @@ gtk_targets_include_uri (GdkAtom *targets, * Since: 2.10 **/ gboolean -gtk_selection_data_targets_include_uri (GtkSelectionData *selection_data) +gtk_selection_data_targets_include_uri (const GtkSelectionData *selection_data) { GdkAtom *targets; gint n_targets; @@ -3081,7 +3081,7 @@ gtk_selection_default_handler (GtkWidget *widget, * Return value: a pointer to a copy of @data. **/ GtkSelectionData* -gtk_selection_data_copy (GtkSelectionData *data) +gtk_selection_data_copy (const GtkSelectionData *data) { GtkSelectionData *new_data; diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h index eddab0f4ad..bdb1312e1f 100644 --- a/gtk/gtkselection.h +++ b/gtk/gtkselection.h @@ -149,13 +149,13 @@ 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); -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); +GdkAtom gtk_selection_data_get_selection (const GtkSelectionData *selection_data); +GdkAtom gtk_selection_data_get_target (const GtkSelectionData *selection_data); +GdkAtom gtk_selection_data_get_data_type (const GtkSelectionData *selection_data); +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); +GdkDisplay *gtk_selection_data_get_display (const GtkSelectionData *selection_data); void gtk_selection_data_set (GtkSelectionData *selection_data, GdkAtom type, @@ -165,23 +165,23 @@ void gtk_selection_data_set (GtkSelectionData *selection_data, gboolean gtk_selection_data_set_text (GtkSelectionData *selection_data, const gchar *str, gint len); -guchar * gtk_selection_data_get_text (GtkSelectionData *selection_data); +guchar * gtk_selection_data_get_text (const GtkSelectionData *selection_data); gboolean gtk_selection_data_set_pixbuf (GtkSelectionData *selection_data, GdkPixbuf *pixbuf); -GdkPixbuf *gtk_selection_data_get_pixbuf (GtkSelectionData *selection_data); +GdkPixbuf *gtk_selection_data_get_pixbuf (const GtkSelectionData *selection_data); gboolean gtk_selection_data_set_uris (GtkSelectionData *selection_data, gchar **uris); -gchar **gtk_selection_data_get_uris (GtkSelectionData *selection_data); +gchar **gtk_selection_data_get_uris (const GtkSelectionData *selection_data); -gboolean gtk_selection_data_get_targets (GtkSelectionData *selection_data, +gboolean gtk_selection_data_get_targets (const GtkSelectionData *selection_data, GdkAtom **targets, gint *n_atoms); -gboolean gtk_selection_data_targets_include_text (GtkSelectionData *selection_data); -gboolean gtk_selection_data_targets_include_rich_text (GtkSelectionData *selection_data, +gboolean gtk_selection_data_targets_include_text (const GtkSelectionData *selection_data); +gboolean gtk_selection_data_targets_include_rich_text (const GtkSelectionData *selection_data, GtkTextBuffer *buffer); -gboolean gtk_selection_data_targets_include_image (GtkSelectionData *selection_data, +gboolean gtk_selection_data_targets_include_image (const GtkSelectionData *selection_data, gboolean writable); -gboolean gtk_selection_data_targets_include_uri (GtkSelectionData *selection_data); +gboolean gtk_selection_data_targets_include_uri (const GtkSelectionData *selection_data); gboolean gtk_targets_include_text (GdkAtom *targets, gint n_targets); gboolean gtk_targets_include_rich_text (GdkAtom *targets, @@ -210,7 +210,7 @@ gboolean _gtk_selection_property_notify (GtkWidget *widget, GdkEventProperty *event); GType gtk_selection_data_get_type (void) G_GNUC_CONST; -GtkSelectionData *gtk_selection_data_copy (GtkSelectionData *data); +GtkSelectionData *gtk_selection_data_copy (const GtkSelectionData *data); void gtk_selection_data_free (GtkSelectionData *data); GType gtk_target_entry_get_type (void) G_GNUC_CONST; |