diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 1b4596bcba..03f0186da0 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -5225,8 +5225,6 @@ gtk_target_list_add_uri_targets gtk_target_list_add_rich_text_targets gtk_target_list_remove gtk_target_list_find -gtk_target_table_free -gtk_target_table_new_from_list gtk_selection_owner_set gtk_selection_owner_set_for_display gtk_selection_add_target diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index 9795ecf474..368af81e09 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -643,70 +643,6 @@ gtk_target_list_get_atoms (GtkTargetList *list, return atoms; } -/** - * gtk_target_table_new_from_list: - * @list: a #GtkTargetList - * @n_targets: (out): return location for the number ot targets in the table - * - * This function creates an #GtkTargetEntry array that contains the - * same targets as the passed %list. The returned table is newly - * allocated and should be freed using gtk_target_table_free() when no - * longer needed. - * - * Returns: (array length=n_targets) (transfer full): the new table. - * - * Since: 2.10 - **/ -GtkTargetEntry * -gtk_target_table_new_from_list (GtkTargetList *list, - gint *n_targets) -{ - GtkTargetEntry *targets; - GList *tmp_list; - gint i; - - g_return_val_if_fail (list != NULL, NULL); - g_return_val_if_fail (n_targets != NULL, NULL); - - *n_targets = g_list_length (list->list); - targets = g_new0 (GtkTargetEntry, *n_targets); - - for (tmp_list = list->list, i = 0; tmp_list; tmp_list = tmp_list->next, i++) - { - GtkTargetPair *pair = tmp_list->data; - - targets[i].target = gdk_atom_name (pair->target); - targets[i].flags = pair->flags; - targets[i].info = pair->info; - } - - return targets; -} - -/** - * gtk_target_table_free: - * @targets: (array length=n_targets): a #GtkTargetEntry array - * @n_targets: the number of entries in the array - * - * This function frees a target table as returned by - * gtk_target_table_new_from_list() - * - * Since: 2.10 - **/ -void -gtk_target_table_free (GtkTargetEntry *targets, - gint n_targets) -{ - gint i; - - g_return_if_fail (targets == NULL || n_targets > 0); - - for (i = 0; i < n_targets; i++) - g_free (targets[i].target); - - g_free (targets); -} - /** * gtk_selection_owner_set_for_display: * @display: the #GdkDisplay where the selection is set diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h index 4d96d860d7..11680fad74 100644 --- a/gtk/gtkselection.h +++ b/gtk/gtkselection.h @@ -154,13 +154,6 @@ gboolean gtk_target_list_find (GtkTargetList *list, GdkAtom target, guint *info); -GDK_AVAILABLE_IN_ALL -GtkTargetEntry * gtk_target_table_new_from_list (GtkTargetList *list, - gint *n_targets); -GDK_AVAILABLE_IN_ALL -void gtk_target_table_free (GtkTargetEntry *targets, - gint n_targets); - GDK_AVAILABLE_IN_ALL gboolean gtk_selection_owner_set (GtkWidget *widget, GdkAtom selection,