[gtk+] selection: Remove gtk_target_table_*() functions



commit 5da3059175a79b8b4e501ae05886f9b54f42489d
Author: Benjamin Otte <otte redhat com>
Date:   Thu Nov 16 00:51:06 2017 +0100

    selection: Remove gtk_target_table_*() functions

 docs/reference/gtk/gtk4-sections.txt |    2 -
 gtk/gtkselection.c                   |   64 ----------------------------------
 gtk/gtkselection.h                   |    7 ----
 3 files changed, 0 insertions(+), 73 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 1b4596b..03f0186 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 9795ecf..368af81 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -644,70 +644,6 @@ gtk_target_list_get_atoms (GtkTargetList *list,
 }
 
 /**
- * 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
  * @widget: (allow-none): new selection owner (a #GtkWidget), or %NULL.
diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h
index 4d96d86..11680fa 100644
--- a/gtk/gtkselection.h
+++ b/gtk/gtkselection.h
@@ -155,13 +155,6 @@ gboolean       gtk_target_list_find      (GtkTargetList  *list,
                                           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,
                                               guint32     time_);


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