[gtk+] contentformats: Rename GtkTargetList



commit 9a6ec4e9591df1a8ed72bbf8793091a1f325b5ff
Author: Benjamin Otte <otte redhat com>
Date:   Sat Nov 18 02:19:53 2017 +0100

    contentformats: Rename GtkTargetList
    
    It's now called GdkContentsFormat

 demos/icon-browser/iconbrowserwin.c  |   14 +-
 docs/reference/gdk/gdk4-sections.txt |   15 ++
 docs/reference/gtk/gtk4-sections.txt |   14 --
 gdk/gdk-autocleanup.h                |    2 +-
 gdk/gdkcontentformats.c              |  294 ++++++++++++++++------------------
 gdk/gdkcontentformats.h              |   67 +++-----
 gdk/gdkcontentformatsprivate.h       |    5 +-
 gdk/gdktypes.h                       |    1 +
 gtk/gtkcalendar.c                    |    6 +-
 gtk/gtkclipboard.c                   |  225 +++++++++++++-------------
 gtk/gtkclipboard.h                   |    6 +-
 gtk/gtkclipboardprivate.h            |   12 +-
 gtk/gtkcolorbutton.c                 |    6 +-
 gtk/gtkcolorswatch.c                 |    8 +-
 gtk/gtkdnd.c                         |   37 +++--
 gtk/gtkdnd.h                         |    2 +-
 gtk/gtkdndprivate.h                  |    4 +-
 gtk/gtkdragdest.c                    |   68 ++++----
 gtk/gtkdragdest.h                    |   16 +-
 gtk/gtkdragsource.c                  |   62 ++++----
 gtk/gtkdragsource.h                  |    8 +-
 gtk/gtkentry.c                       |   28 ++--
 gtk/gtkentry.h                       |    2 +-
 gtk/gtkfilechooserbutton.c           |   10 +-
 gtk/gtkfilechooserwidget.c           |   10 +-
 gtk/gtkiconview.c                    |   28 ++--
 gtk/gtkiconview.h                    |    4 +-
 gtk/gtklabel.c                       |   14 +-
 gtk/gtklinkbutton.c                  |    6 +-
 gtk/gtknotebook.c                    |   12 +-
 gtk/gtkplacessidebar.c               |   16 +-
 gtk/gtkselection.c                   |  102 ++++++------
 gtk/gtkselection.h                   |   16 +-
 gtk/gtkselectionprivate.h            |    3 -
 gtk/gtktextbuffer.c                  |   48 +++---
 gtk/gtktextbuffer.h                  |    4 +-
 gtk/gtktextview.c                    |    8 +-
 gtk/gtktoolpalette.c                 |   18 +-
 gtk/gtktreeview.c                    |   35 ++---
 gtk/gtktreeview.h                    |    4 +-
 gtk/gtkwindow.c                      |    6 +-
 tests/testdnd.c                      |   16 +-
 tests/testdnd2.c                     |   20 ++--
 tests/testentryicons.c               |    8 +-
 tests/testiconview.c                 |    6 +-
 tests/testkineticscrolling.c         |    6 +-
 tests/testlist3.c                    |    6 +-
 tests/testnotebookdnd.c              |    6 +-
 tests/testselection.c                |    6 +-
 tests/testtoolbar.c                  |    6 +-
 tests/testtreecolumns.c              |    6 +-
 tests/testtreednd.c                  |   12 +-
 tests/testtreeview.c                 |    6 +-
 testsuite/gtk/clipboard.c            |    6 +-
 54 files changed, 656 insertions(+), 700 deletions(-)
---
diff --git a/demos/icon-browser/iconbrowserwin.c b/demos/icon-browser/iconbrowserwin.c
index 1604239..9680048 100644
--- a/demos/icon-browser/iconbrowserwin.c
+++ b/demos/icon-browser/iconbrowserwin.c
@@ -439,14 +439,14 @@ static void
 setup_scalable_image_dnd (GtkWidget *image)
 {
   GtkWidget *parent;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
 
   parent = gtk_widget_get_parent (image);
-  targets = gtk_target_list_new (target_table, G_N_ELEMENTS (target_table));
+  targets = gdk_content_formats_new (target_table, G_N_ELEMENTS (target_table));
   gtk_drag_source_set (parent, GDK_BUTTON1_MASK,
                        targets,
                        GDK_ACTION_COPY);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   g_signal_connect (parent, "drag-data-get", G_CALLBACK (get_scalable_image_data), NULL);
 }
@@ -454,17 +454,17 @@ setup_scalable_image_dnd (GtkWidget *image)
 static void
 icon_browser_window_init (IconBrowserWindow *win)
 {
-  GtkTargetList *list;
+  GdkContentFormats *list;
 
   gtk_widget_init_template (GTK_WIDGET (win));
 
-  list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_text_targets (list);
+  list = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_text_targets (list);
   gtk_icon_view_enable_model_drag_source (GTK_ICON_VIEW (win->list),
                                           GDK_BUTTON1_MASK,
                                           list,
                                           GDK_ACTION_COPY);
-  gtk_target_list_unref (list);
+  gdk_content_formats_unref (list);
 
   setup_image_dnd (win->image1);
   setup_image_dnd (win->image2);
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index 424c283..2f55e16 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -368,6 +368,21 @@ gdk_fullscreen_mode_get_type
 </SECTION>
 
 <SECTION>
+<FILE>gdkcontentformats</FILE>
+<TITLE>Content Formats</TITLE>
+gdk_content_formats_new
+gdk_content_formats_ref
+gdk_content_formats_unref
+gdk_content_formats_add
+gdk_content_formats_union
+gdk_content_formats_intersects
+gdk_content_formats_remove
+gdk_content_formats_contains
+<SUBSECTION Private>
+gdk_content_formats_get_type
+</SECTION>
+
+<SECTION>
 <TITLE>Selections</TITLE>
 <FILE>selections</FILE>
 GDK_SELECTION_PRIMARY
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 36f22c9..5b5ff53 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -5213,19 +5213,6 @@ GtkSelectionData
 GtkTargetEntry
 GtkTargetList
 GtkTargetPair
-gtk_target_list_new
-gtk_target_list_ref
-gtk_target_list_unref
-gtk_target_list_add
-gtk_target_list_add_table
-gtk_target_list_merge
-gtk_target_list_intersects
-gtk_target_list_add_text_targets
-gtk_target_list_add_image_targets
-gtk_target_list_add_uri_targets
-gtk_target_list_add_rich_text_targets
-gtk_target_list_remove
-gtk_target_list_find
 gtk_selection_owner_set
 gtk_selection_owner_set_for_display
 gtk_selection_add_target
@@ -5266,7 +5253,6 @@ GTK_TYPE_SELECTION_DATA
 GTK_TYPE_TARGET_LIST
 <SUBSECTION Private>
 gtk_selection_data_get_type
-gtk_target_list_get_type
 </SECTION>
 
 <SECTION>
diff --git a/gdk/gdk-autocleanup.h b/gdk/gdk-autocleanup.h
index 76660c9..6d27549 100644
--- a/gdk/gdk-autocleanup.h
+++ b/gdk/gdk-autocleanup.h
@@ -33,7 +33,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkGLContext, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkKeymap, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkWindow, g_object_unref)
 
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTargetList, gtk_target_list_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkContentFormats, gdk_content_formats_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkEvent, gdk_event_free)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkFrameTimings, gdk_frame_timings_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkRGBA, gdk_rgba_free)
diff --git a/gdk/gdkcontentformats.c b/gdk/gdkcontentformats.c
index 00f87e4..78fab2e 100644
--- a/gdk/gdkcontentformats.c
+++ b/gdk/gdkcontentformats.c
@@ -1,5 +1,5 @@
 /* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ * Copyright (C) 2017 Benjamin Otte
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -8,71 +8,50 @@
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.          See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
-/* This file implements most of the work of the ICCCM selection protocol.
- * The code was written after an intensive study of the equivalent part
- * of John Ousterhout’s Tk toolkit, and does many things in much the 
- * same way.
+/**
+ * SECTION:gdkcontentformats
+ * @Title: Content Formats
+ * @Short_description: Advertising and negotiating of content
+ *     exchange formats
+   @See_also: #GdkDragContext, #GtkClipboard
  *
- * The one thing in the ICCCM that isn’t fully supported here (or in Tk)
- * is side effects targets. For these to be handled properly, MULTIPLE
- * targets need to be done in the order specified. This cannot be
- * guaranteed with the way we do things, since if we are doing INCR
- * transfers, the order will depend on the timing of the requestor.
+ * This section describes the #GdkContentFormats structure that is used to
+ * advertise and negotiate the format of content passed between different
+ * widgets, windows or applications using for example the clipboard or
+ * drag'n'drop.
  *
- * By Owen Taylor <owt1 cornell edu>         8/16/97
- */
-
-/* Terminology note: when not otherwise specified, the term "incr" below
- * refers to the _sending_ part of the INCR protocol. The receiving
- * portion is referred to just as “retrieval”. (Terminology borrowed
- * from Tk, because there is no good opposite to “retrieval” in English.
- * “send” can’t be made into a noun gracefully and we’re already using
- * “emission” for something else ....)
- */
-
-/* The MOTIF entry widget seems to ask for the TARGETS target, then
-   (regardless of the reply) ask for the TEXT target. It's slightly
-   possible though that it somehow thinks we are responding negatively
-   to the TARGETS request, though I don't really think so ... */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ * GDK supports content in 2 forms: #GType and mime type.
+ * Using #GTypes is meant only for in-process content transfers. Mime types
+ * are meant to be used for data passing both in-process and out-of-process.
+ * The details of how data is passed is described in the documentation of
+ * the actual implementations.
+ *
+ * A #GdkContentFormats describes a set of possible formats content can be
+ * exchanged in. It is assumed that this set is ordered. #GTypes are more
+ * important than mime types. Order between different #Gtypes or mime types
+ * is the order they were added in, most important first. Functions that
+ * care about order, such as gdk_content_formats_union() will describe in
+ * their documentation how they interpret that order, though in general the
+ * order of the first argument is considered the primary order of the result,
+ * followed by the order of further arguments.
+ *
+ * For debugging purposes, the function gdk_content_formats_to_string() exists.
+ * It will print a comma-seperated formats of formats from most important to least
+ * important.
  */
 
 /**
- * SECTION:gtkselection
- * @Title: Selections
- * @Short_description: Functions for handling inter-process communication
- *     via selections
- * @See_also: #GtkWidget - Much of the operation of selections happens via
- *     signals for #GtkWidget. In particular, if you are using the functions
- *     in this section, you may need to pay attention to
- *     #GtkWidget::selection-get, #GtkWidget::selection-received and
- *     #GtkWidget::selection-clear-event signals
- *
- * The selection mechanism provides the basis for different types
- * of communication between processes. In particular, drag and drop and
- * #GtkClipboard work via selections. You will very seldom or
- * never need to use most of the functions in this section directly;
- * #GtkClipboard provides a nicer interface to the same functionality.
+ * GdkContentFormats:
  *
- * Some of the datatypes defined this section are used in
- * the #GtkClipboard and drag-and-drop API’s as well. The
- * #GtkTargetList object represents
- * lists of data types that are supported when sending or
- * receiving data. The #GtkSelectionData object is used to
- * store a chunk of data along with the data type and other
- * associated information.
+ * A #GdkContentFormats struct is a reference counted struct
+ * and should be treated as opaque.
  */
 
 #include "config.h"
@@ -82,138 +61,156 @@
 
 #include "gdkproperty.h"
 
-struct _GtkTargetList
+struct _GdkContentFormats
 {
   /*< private >*/
-  GList *list;
+  GList *formats;
   guint ref_count;
 };
 
+G_DEFINE_BOXED_TYPE (GdkContentFormats, gdk_content_formats,
+                     gdk_content_formats_ref,
+                     gdk_content_formats_unref)
+
+
+static void
+gdk_content_formats_add_table (GdkContentFormats  *formats,
+                               const char        **mime_types,
+                               guint               n_mime_types)
+{
+  gint i;
+
+  for (i = n_mime_types - 1; i >= 0; i--)
+    {
+      formats->formats = g_list_prepend (formats->formats, (gpointer) gdk_atom_intern (mime_types[i], 
FALSE));
+    }
+}
 
 /**
- * gtk_target_list_new:
- * @targets: (array length=ntargets) (allow-none): Pointer to an array
- *   of char *
- * @ntargets: number of entries in @targets.
+ * gdk_content_formats_new:
+ * @mime_types: (array length=n_mime_types) (allow-none): Pointer to an
+ *   array of mime types
+ * @nmime_types: number of entries in @mime_types.
  * 
- * Creates a new #GtkTargetList from an array of mime types.
+ * Creates a new #GdkContentFormats from an array of mime types.
  * 
- * Returns: (transfer full): the new #GtkTargetList.
+ * Returns: (transfer full): the new #GdkContentFormats.
  **/
-GtkTargetList *
-gtk_target_list_new (const char **targets,
-                    guint        ntargets)
+GdkContentFormats *
+gdk_content_formats_new (const char **mime_types,
+                         guint        n_mime_types)
 {
-  GtkTargetList *result = g_slice_new (GtkTargetList);
-  result->list = NULL;
+  GdkContentFormats *result = g_slice_new (GdkContentFormats);
+  result->formats = NULL;
   result->ref_count = 1;
 
-  if (targets)
-    gtk_target_list_add_table (result, targets, ntargets);
+  if (mime_types)
+    gdk_content_formats_add_table (result, mime_types, n_mime_types);
   
   return result;
 }
 
 /**
- * gtk_target_list_ref:
- * @list:  a #GtkTargetList
+ * gdk_content_formats_ref:
+ * @formats:  a #GdkContentFormats
  * 
- * Increases the reference count of a #GtkTargetList by one.
+ * Increases the reference count of a #GdkContentFormats by one.
  *
- * Returns: the passed in #GtkTargetList.
+ * Returns: the passed in #GdkContentFormats.
  **/
-GtkTargetList *
-gtk_target_list_ref (GtkTargetList *list)
+GdkContentFormats *
+gdk_content_formats_ref (GdkContentFormats *formats)
 {
-  g_return_val_if_fail (list != NULL, NULL);
+  g_return_val_if_fail (formats != NULL, NULL);
 
-  list->ref_count++;
+  formats->ref_count++;
 
-  return list;
+  return formats;
 }
 
 /**
- * gtk_target_list_unref:
- * @list: a #GtkTargetList
+ * gdk_content_formats_unref:
+ * @formats: a #GdkContentFormats
  * 
- * Decreases the reference count of a #GtkTargetList by one.
- * If the resulting reference count is zero, frees the list.
+ * Decreases the reference count of a #GdkContentFormats by one.
+ * If the resulting reference count is zero, frees the formats.
  **/
 void               
-gtk_target_list_unref (GtkTargetList *list)
+gdk_content_formats_unref (GdkContentFormats *formats)
 {
-  g_return_if_fail (list != NULL);
-  g_return_if_fail (list->ref_count > 0);
+  g_return_if_fail (formats != NULL);
+  g_return_if_fail (formats->ref_count > 0);
 
-  list->ref_count--;
-  if (list->ref_count > 0)
+  formats->ref_count--;
+  if (formats->ref_count > 0)
     return;
 
-  g_list_free (list->list);
-  g_slice_free (GtkTargetList, list);
+  g_list_free (formats->formats);
+  g_slice_free (GdkContentFormats, formats);
 }
 
 /**
- * gtk_target_list_add:
- * @list:  a #GtkTargetList
- * @target: the mime type of the target
+ * gdk_content_formats_add:
+ * @formats:  a #GdkContentFormats
+ * @mime_type: the mime type to add
  * 
- * Appends another target to a #GtkTargetList.
+ * Appends another mime_type to a #GdkContentFormats.
  **/
 void 
-gtk_target_list_add (GtkTargetList *list,
-                    const char    *target)
+gdk_content_formats_add (GdkContentFormats *formats,
+                         const char    *mime_type)
 {
-  g_return_if_fail (list != NULL);
+  g_return_if_fail (formats != NULL);
   
-  list->list = g_list_append (list->list, (gpointer) gdk_atom_intern (target, FALSE));
+  formats->formats = g_list_append (formats->formats, (gpointer) gdk_atom_intern (mime_type, FALSE));
 }
 
 /**
- * gtk_target_list_merge:
- * @target: the #GtkTargetList to merge into
- * @source: the #GtkTargeList to merge from
+ * gdk_content_formats_union:
+ * @first: the #GdkContentFormats to merge into
+ * @second: the #GtkTargeList to merge from
  *
- * Merges all targets from @source into @target.
+ * Append all missing types from @second to @first, in the order
+ * they had in @second.
  */
 void
-gtk_target_list_merge (GtkTargetList       *target,
-                       const GtkTargetList *source)
+gdk_content_formats_union (GdkContentFormats       *first,
+                           const GdkContentFormats *second)
 {
   GList *l;
 
-  g_return_if_fail (target != NULL);
-  g_return_if_fail (source != NULL);
+  g_return_if_fail (first != NULL);
+  g_return_if_fail (second != NULL);
 
-  for (l = source->list; l; l = l->next)
+  for (l = second->formats; l; l = l->next)
     {
-      target->list = g_list_prepend (target->list, l->data);
+      first->formats = g_list_append (first->formats, l->data);
     }
 }
 
 /**
- * gtk_target_list_intersects:
- * @first: the primary #GtkTargetList to intersect
- * @second: the #GtkTargeList to intersect with
+ * gdk_content_formats_intersects:
+ * @first: the primary #GdkContentFormats to intersect
+ * @second: the #GdkContentFormats to intersect with
  *
  * Finds the first element from @first that is also contained
  * in @second.
  *
- * Returns: The first matching #GdkAtom or %NULL if the lists
+ * Returns: The first matching #GdkAtom or %NULL if the formatss
  *     do not intersect.
  */
 GdkAtom
-gtk_target_list_intersects (const GtkTargetList *first,
-                            const GtkTargetList *second)
+gdk_content_formats_intersects (const GdkContentFormats *first,
+                                const GdkContentFormats *second)
 {
   GList *l;
 
   g_return_val_if_fail (first != NULL, NULL);
   g_return_val_if_fail (second != NULL, NULL);
 
-  for (l = first->list; l; l = l->next)
+  for (l = first->formats; l; l = l->next)
     {
-      if (g_list_find (second->list, l->data))
+      if (g_list_find (second->formats, l->data))
         return l->data;
     }
 
@@ -221,74 +218,55 @@ gtk_target_list_intersects (const GtkTargetList *first,
 }
 
 /**
- * gtk_target_list_add_table:
- * @list: a #GtkTargetList
- * @targets: (array length=ntargets): the table of #GtkTargetEntry
- * @ntargets: number of targets in the table
- * 
- * Prepends a table of #GtkTargetEntry to a target list.
- **/
-void               
-gtk_target_list_add_table (GtkTargetList  *list,
-                          const char    **targets,
-                          guint           ntargets)
-{
-  gint i;
-
-  for (i=ntargets-1; i >= 0; i--)
-    {
-      list->list = g_list_prepend (list->list, (gpointer) gdk_atom_intern (targets[i], FALSE));
-    }
-}
-
-/**
- * gtk_target_list_remove:
- * @list: a #GtkTargetList
- * @target: the interned atom representing the target
+ * gdk_content_formats_remove:
+ * @formats: a #GdkContentFormats
+ * @mime_type: the mime type
  * 
- * Removes a target from a target list.
+ * Removes a mime type. If the mime type was not part of @formats, nothing
+ * happens.
  **/
 void 
-gtk_target_list_remove (GtkTargetList *list,
-                       GdkAtom        target)
+gdk_content_formats_remove (GdkContentFormats *formats,
+                            const char        *mime_type)
 {
-  g_return_if_fail (list != NULL);
+  g_return_if_fail (formats != NULL);
+  g_return_if_fail (mime_type != NULL);
 
-  list->list = g_list_remove (list->list, (gpointer) target);
+  formats->formats = g_list_remove (formats->formats, (gpointer) gdk_atom_intern (mime_type, FALSE));
 }
 
 /**
- * gtk_target_list_find:
- * @list: a #GtkTargetList
- * @target: a string representing the target to search for
+ * gdk_content_formats_contains:
+ * @formats: a #GdkContentFormats
+ * @mime_type: the mime type to search for
  *
- * Looks up a given target in a #GtkTargetList.
+ * Checks if a given mime type is part of the given @formats.
  *
- * Returns: %TRUE if the target was found, otherwise %FALSE
+ * Returns: %TRUE if the mime_type was found, otherwise %FALSE
  **/
 gboolean
-gtk_target_list_find (GtkTargetList *list,
-                     const char    *target)
+gdk_content_formats_contains (const GdkContentFormats *formats,
+                              const char              *mime_type)
 {
-  g_return_val_if_fail (list != NULL, FALSE);
-  g_return_val_if_fail (target != NULL, FALSE);
+  g_return_val_if_fail (formats != NULL, FALSE);
+  g_return_val_if_fail (mime_type != NULL, FALSE);
 
-  return g_list_find (list->list, (gpointer) gdk_atom_intern (target, FALSE)) != NULL;
+  return g_list_find (formats->formats, (gpointer) gdk_atom_intern (mime_type, FALSE)) != NULL;
 }
 
 GdkAtom *
-gtk_target_list_get_atoms (GtkTargetList *list,
-                           guint         *n_atoms)
+gdk_content_formats_get_atoms (GdkContentFormats *formats,
+                               guint             *n_atoms)
 {
   GdkAtom *atoms;
   GList *l;
   guint i, n;
 
-  n = g_list_length (list->list);
+  n = g_list_length (formats->formats);
   atoms = g_new (GdkAtom, n);
 
   i = 0;
-  for (l = list->list; l; l = l->next)
+  for (l = formats->formats; l; l = l->next)
     atoms[i++] = l->data;
 
   if (n_atoms)
diff --git a/gdk/gdkcontentformats.h b/gdk/gdkcontentformats.h
index 39c7240..8859658 100644
--- a/gdk/gdkcontentformats.h
+++ b/gdk/gdkcontentformats.h
@@ -1,5 +1,5 @@
 /* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ * Copyright (C) 2017 Benjamin Otte
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -15,13 +15,6 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
 #ifndef __GTK_CONTENT_FORMATS_H__
 #define __GTK_CONTENT_FORMATS_H__
 
@@ -35,45 +28,33 @@
 
 G_BEGIN_DECLS
 
-/**
- * GtkTargetList:
- *
- * A #GtkTargetList-struct is a reference counted list
- * of #GtkTargetPair and should be treated as
- * opaque.
- */
-typedef struct _GtkTargetList  GtkTargetList;
+#define GDK_TYPE_CONTENT_FORMATS    (gdk_content_formats_get_type ())
 
-#define GTK_TYPE_TARGET_LIST    (gtk_target_list_get_type ())
+GDK_AVAILABLE_IN_3_94
+GType                   gdk_content_formats_get_type            (void) G_GNUC_CONST;
+GDK_AVAILABLE_IN_3_94
+GdkContentFormats *     gdk_content_formats_new                 (const char                    **mime_types,
+                                                                 guint                           
n_mime_types);
+GDK_AVAILABLE_IN_3_94
+GdkContentFormats *     gdk_content_formats_ref                 (GdkContentFormats              *formats);
+GDK_AVAILABLE_IN_3_94
+void                    gdk_content_formats_unref               (GdkContentFormats              *formats);
 
-GDK_AVAILABLE_IN_ALL
-GType          gtk_target_list_get_type  (void) G_GNUC_CONST;
-GDK_AVAILABLE_IN_ALL
-GtkTargetList *gtk_target_list_new       (const char          **targets,
-                                          guint                 ntargets);
-GDK_AVAILABLE_IN_ALL
-GtkTargetList *gtk_target_list_ref       (GtkTargetList  *list);
-GDK_AVAILABLE_IN_ALL
-void           gtk_target_list_unref     (GtkTargetList  *list);
 GDK_AVAILABLE_IN_3_94
-void           gtk_target_list_merge     (GtkTargetList         *target,
-                                          const GtkTargetList   *source);
+void                    gdk_content_formats_union               (GdkContentFormats              *first,
+                                                                 const GdkContentFormats        *second);
+GDK_AVAILABLE_IN_3_94
+GdkAtom                 gdk_content_formats_intersects          (const GdkContentFormats        *first,
+                                                                 const GdkContentFormats        *second);
+GDK_AVAILABLE_IN_3_94
+void                    gdk_content_formats_add                 (GdkContentFormats              *formats,
+                                                                 const char                     *mime_type);
+GDK_AVAILABLE_IN_3_94
+void                    gdk_content_formats_remove              (GdkContentFormats              *formats,
+                                                                 const char                     *mime_type);
 GDK_AVAILABLE_IN_3_94
-GdkAtom        gtk_target_list_intersects(const GtkTargetList   *first,
-                                          const GtkTargetList   *second);
-GDK_AVAILABLE_IN_ALL
-void           gtk_target_list_add       (GtkTargetList  *list,
-                                          const char     *target);
-GDK_AVAILABLE_IN_ALL
-void           gtk_target_list_add_table (GtkTargetList        *list,
-                                          const char          **targets,
-                                          guint                 ntargets);
-GDK_AVAILABLE_IN_ALL
-void           gtk_target_list_remove    (GtkTargetList  *list,
-                                          const char     *target);
-GDK_AVAILABLE_IN_ALL
-gboolean       gtk_target_list_find      (GtkTargetList  *list,
-                                          const char     *target);
+gboolean                gdk_content_formats_contains            (const GdkContentFormats        *formats,
+                                                                 const char                     *mime_type);
 
 G_END_DECLS
 
diff --git a/gdk/gdkcontentformatsprivate.h b/gdk/gdkcontentformatsprivate.h
index b8f0a87..21e993c 100644
--- a/gdk/gdkcontentformatsprivate.h
+++ b/gdk/gdkcontentformatsprivate.h
@@ -24,8 +24,9 @@
 
 G_BEGIN_DECLS
 
-GdkAtom *gtk_target_list_get_atoms      (GtkTargetList     *targets,
-                                         guint             *n_atoms);
+
+GdkAtom *               gdk_content_formats_get_atoms   (GdkContentFormats              *formats,
+                                                         guint                          *n_atoms);
 
 
 G_END_DECLS
diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h
index 923cc50..2105df5 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -120,6 +120,7 @@ typedef const char                   *GdkAtom;
 
 /* Forward declarations of commonly used types */
 typedef struct _GdkRGBA               GdkRGBA;
+typedef struct _GdkContentFormats     GdkContentFormats;
 typedef struct _GdkCursor             GdkCursor;
 typedef struct _GdkTexture            GdkTexture;
 typedef struct _GdkDevice             GdkDevice;
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index eaaf17d..08fd646 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -2647,14 +2647,14 @@ gtk_calendar_motion_notify (GtkWidget      *widget,
                                     x, y))
         {
           GdkDragContext *context;
-          GtkTargetList *target_list = gtk_target_list_new (NULL, 0);
-          gtk_target_list_add_text_targets (target_list);
+          GdkContentFormats *target_list = gdk_content_formats_new (NULL, 0);
+          gtk_content_formats_add_text_targets (target_list);
           context = gtk_drag_begin_with_coordinates (widget, target_list, GDK_ACTION_COPY,
                                                      1, (GdkEvent *)event,
                                                      priv->drag_start_x, priv->drag_start_y);
 
           priv->in_drag = 0;
-          gtk_target_list_unref (target_list);
+          gdk_content_formats_unref (target_list);
           gtk_drag_set_icon_default (context);
         }
     }
diff --git a/gtk/gtkclipboard.c b/gtk/gtkclipboard.c
index 2e77764..03151e3 100644
--- a/gtk/gtkclipboard.c
+++ b/gtk/gtkclipboard.c
@@ -31,6 +31,7 @@
 #include "gtkintl.h"
 
 #include "gdk/gdk-private.h"
+#include "gdk/gdkcontentformatsprivate.h"
 
 /**
  * SECTION:gtkclipboard
@@ -153,7 +154,7 @@ static void gtk_clipboard_finalize     (GObject             *object);
 static void gtk_clipboard_owner_change (GtkClipboard        *clipboard,
                                        GdkEventOwnerChange *event);
 static gboolean gtk_clipboard_set_contents      (GtkClipboard                   *clipboard,
-                                                 GtkTargetList                  *targets,
+                                                 GdkContentFormats              *formats,
                                                  GtkClipboardGetFunc             get_func,
                                                  GtkClipboardClearFunc           clear_func,
                                                  gpointer                        user_data,
@@ -164,7 +165,7 @@ static void gtk_clipboard_real_request_contents (GtkClipboard
                                                  GtkClipboardReceivedFunc        callback,
                                                  gpointer                        user_data);
 static void gtk_clipboard_real_set_can_store    (GtkClipboard                   *clipboard,
-                                                 GtkTargetList                  *targets);
+                                                 GdkContentFormats              *formats);
 static void gtk_clipboard_real_store            (GtkClipboard                   *clipboard);
 
 
@@ -268,8 +269,8 @@ gtk_clipboard_finalize (GObject *object)
   if (clipboard_widget != NULL && clipboard->notify_signal_id != 0)
     g_signal_handler_disconnect (clipboard_widget, clipboard->notify_signal_id);
 
-  g_free (clipboard->storable_targets);
-  g_free (clipboard->cached_targets);
+  g_free (clipboard->storable_formats);
+  g_free (clipboard->cached_formats);
 
   G_OBJECT_CLASS (gtk_clipboard_parent_class)->finalize (object);
 }
@@ -546,7 +547,7 @@ clipboard_remove_owner_notify (GtkClipboard *clipboard)
          
 static gboolean
 gtk_clipboard_set_contents (GtkClipboard         *clipboard,
-                           GtkTargetList        *targets,
+                           GdkContentFormats    *formats,
                            GtkClipboardGetFunc   get_func,
                            GtkClipboardClearFunc clear_func,
                            gpointer              user_data,
@@ -561,11 +562,11 @@ gtk_clipboard_set_contents (GtkClipboard         *clipboard,
     {
       clipboard->have_selection = TRUE;
 
-      if (clipboard->n_cached_targets != -1)
+      if (clipboard->n_cached_formats != -1)
         {
-          g_free (clipboard->cached_targets);
-         clipboard->cached_targets = NULL;
-          clipboard->n_cached_targets = -1;
+          g_free (clipboard->cached_formats);
+         clipboard->cached_formats = NULL;
+          clipboard->n_cached_formats = -1;
         }
 
       if (!(clipboard->have_owner && have_owner) ||
@@ -583,7 +584,7 @@ gtk_clipboard_set_contents (GtkClipboard         *clipboard,
       clipboard->clear_func = clear_func;
 
       gtk_selection_clear_targets (clipboard_widget, clipboard->selection);
-      gtk_selection_add_targets (clipboard_widget, clipboard->selection, targets);
+      gtk_selection_add_targets (clipboard_widget, clipboard->selection, formats);
 
       return TRUE;
     }
@@ -594,7 +595,7 @@ gtk_clipboard_set_contents (GtkClipboard         *clipboard,
 /**
  * gtk_clipboard_set_with_data: (skip)
  * @clipboard: a #GtkClipboard
- * @targets: The targets (data formats) in which the
+ * @formats: The targets (data formats) in which the
  *    functions can provide the data
  * @get_func: (scope async): function to call to get the actual clipboard data
  * @clear_func: (scope async): when the clipboard contents are set again,
@@ -612,17 +613,17 @@ gtk_clipboard_set_contents (GtkClipboard         *clipboard,
  **/
 gboolean
 gtk_clipboard_set_with_data (GtkClipboard          *clipboard,
-                            GtkTargetList         *targets,
+                            GdkContentFormats     *formats,
                             GtkClipboardGetFunc    get_func,
                             GtkClipboardClearFunc  clear_func,
                             gpointer               user_data)
 {
   g_return_val_if_fail (clipboard != NULL, FALSE);
-  g_return_val_if_fail (targets != NULL, FALSE);
+  g_return_val_if_fail (formats != NULL, FALSE);
   g_return_val_if_fail (get_func != NULL, FALSE);
 
   return GTK_CLIPBOARD_GET_CLASS (clipboard)->set_contents (clipboard,
-                                                            targets,
+                                                            formats,
                                                            get_func,
                                                             clear_func,
                                                             user_data,
@@ -632,7 +633,7 @@ gtk_clipboard_set_with_data (GtkClipboard          *clipboard,
 /**
  * gtk_clipboard_set_with_owner: (skip)
  * @clipboard: a #GtkClipboard
- * @targets: The targets (data formats) in which the
+ * @formats: The targets (data formats) in which the
  *    functions can provide the data
  * @get_func: (scope async): function to call to get the actual clipboard data
  * @clear_func: (scope async): when the clipboard contents are set again,
@@ -655,18 +656,18 @@ gtk_clipboard_set_with_data (GtkClipboard          *clipboard,
  **/
 gboolean
 gtk_clipboard_set_with_owner (GtkClipboard          *clipboard,
-                             GtkTargetList         *targets,
+                             GdkContentFormats     *formats,
                              GtkClipboardGetFunc    get_func,
                              GtkClipboardClearFunc  clear_func,
                              GObject               *owner)
 {
   g_return_val_if_fail (clipboard != NULL, FALSE);
-  g_return_val_if_fail (targets != NULL, FALSE);
+  g_return_val_if_fail (formats != NULL, FALSE);
   g_return_val_if_fail (get_func != NULL, FALSE);
   g_return_val_if_fail (G_IS_OBJECT (owner), FALSE);
 
   return GTK_CLIPBOARD_GET_CLASS (clipboard)->set_contents (clipboard,
-                                                            targets,
+                                                            formats,
                                                            get_func,
                                                             clear_func,
                                                             owner,
@@ -702,12 +703,12 @@ clipboard_unset (GtkClipboard *clipboard)
   GtkClipboardClearFunc old_clear_func;
   gpointer old_data;
   gboolean old_have_owner;
-  gint old_n_storable_targets;
+  gint old_n_storable_formats;
   
   old_clear_func = clipboard->clear_func;
   old_data = clipboard->user_data;
   old_have_owner = clipboard->have_owner;
-  old_n_storable_targets = clipboard->n_storable_targets;
+  old_n_storable_formats = clipboard->n_storable_formats;
   
   if (old_have_owner)
     {
@@ -715,9 +716,9 @@ clipboard_unset (GtkClipboard *clipboard)
       clipboard->have_owner = FALSE;
     }
 
-  clipboard->n_storable_targets = -1;
-  g_free (clipboard->storable_targets);
-  clipboard->storable_targets = NULL;
+  clipboard->n_storable_formats = -1;
+  g_free (clipboard->storable_formats);
+  clipboard->storable_formats = NULL;
       
   clipboard->get_func = NULL;
   clipboard->clear_func = NULL;
@@ -730,7 +731,7 @@ clipboard_unset (GtkClipboard *clipboard)
    * unref the owner
    */
   if (old_have_owner &&
-      old_n_storable_targets != -1)
+      old_n_storable_formats != -1)
     g_object_unref (old_data);
 }
 
@@ -795,24 +796,24 @@ gtk_clipboard_set_text (GtkClipboard *clipboard,
                        const gchar  *text,
                        gint          len)
 {
-  GtkTargetList *targets;
+  GdkContentFormats *formats;
 
   g_return_if_fail (clipboard != NULL);
   g_return_if_fail (text != NULL);
 
-  targets = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_text_targets (targets);
+  formats = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_text_targets (formats);
 
   if (len < 0)
     len = strlen (text);
   
   gtk_clipboard_set_with_data (clipboard, 
-                              targets,
+                              formats,
                               text_get_func, text_clear_func,
                               g_strndup (text, len));
   gtk_clipboard_set_can_store (clipboard, NULL);
 
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (formats);
 }
 
 static void 
@@ -846,21 +847,21 @@ void
 gtk_clipboard_set_image (GtkClipboard *clipboard,
                          GdkPixbuf    *pixbuf)
 {
-  GtkTargetList *targets;
+  GdkContentFormats *formats;
 
   g_return_if_fail (clipboard != NULL);
   g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
 
-  targets = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_image_targets (targets, TRUE);
+  formats = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_image_targets (formats, TRUE);
 
   gtk_clipboard_set_with_data (clipboard, 
-                              targets,
+                              formats,
                               pixbuf_get_func, pixbuf_clear_func,
                               g_object_ref (pixbuf));
   gtk_clipboard_set_can_store (clipboard, NULL);
 
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (formats);
 }
 
 /**
@@ -1278,34 +1279,34 @@ gtk_clipboard_request_uris (GtkClipboard                *clipboard,
 }
 
 static void 
-request_targets_received_func (GtkClipboard     *clipboard,
+request_formats_received_func (GtkClipboard     *clipboard,
                               GtkSelectionData *selection_data,
                               gpointer          data)
 {
   RequestTargetsInfo *info = data;
-  GdkAtom *targets = NULL;
-  gint n_targets = 0;
+  GdkAtom *formats = NULL;
+  gint n_formats = 0;
 
-  gtk_selection_data_get_targets (selection_data, &targets, &n_targets);
+  gtk_selection_data_get_targets (selection_data, &formats, &n_formats);
 
-  info->callback (clipboard, targets, n_targets, info->user_data);
+  info->callback (clipboard, formats, n_formats, info->user_data);
 
   g_free (info);
-  g_free (targets);
+  g_free (formats);
 }
 
 /**
- * gtk_clipboard_request_targets:
+ * gtk_clipboard_request_formats:
  * @clipboard: a #GtkClipboard
- * @callback: (scope async): a function to call when the targets are
+ * @callback: (scope async): a function to call when the formats are
  *     received, or the retrieval fails. (It will always be called
  *     one way or the other.)
  * @user_data: user data to pass to @callback.
  *
- * Requests the contents of the clipboard as list of supported targets.
+ * Requests the contents of the clipboard as list of supported formats.
  * When the list is later received, @callback will be called.
  *
- * The @targets parameter to @callback will contain the resulting targets if
+ * The @formats parameter to @callback will contain the resulting formats if
  * the request succeeded, or %NULL if it failed.
  *
  * Since: 2.4
@@ -1320,11 +1321,11 @@ gtk_clipboard_request_targets (GtkClipboard                *clipboard,
   g_return_if_fail (clipboard != NULL);
   g_return_if_fail (callback != NULL);
 
-  /* If the display supports change notification we cache targets */
+  /* If the display supports change notification we cache formats */
   if (gdk_display_supports_selection_notification (gtk_clipboard_get_display (clipboard)) &&
-      clipboard->n_cached_targets != -1)
+      clipboard->n_cached_formats != -1)
     {
-      (* callback) (clipboard, clipboard->cached_targets, clipboard->n_cached_targets, user_data);
+      (* callback) (clipboard, clipboard->cached_formats, clipboard->n_cached_formats, user_data);
       return;
     }
   
@@ -1333,7 +1334,7 @@ gtk_clipboard_request_targets (GtkClipboard                *clipboard,
   info->user_data = user_data;
 
   gtk_clipboard_request_contents (clipboard, gdk_atom_intern_static_string ("TARGETS"),
-                                 request_targets_received_func,
+                                 request_formats_received_func,
                                  info);
 }
 
@@ -1717,7 +1718,7 @@ gtk_clipboard_get_display (GtkClipboard *clipboard)
  * 
  * Test to see if there is text available to be pasted
  * This is done by requesting the TARGETS atom and checking
- * if it contains any of the supported text targets. This function 
+ * if it contains any of the supported text formats. This function 
  * waits for the data to be received using the main loop, so events, 
  * timeouts, etc, may be dispatched during the wait.
  *
@@ -1750,7 +1751,7 @@ gtk_clipboard_wait_is_text_available (GtkClipboard *clipboard)
  *
  * Test to see if there is rich text available to be pasted
  * This is done by requesting the TARGETS atom and checking
- * if it contains any of the supported rich text targets. This function
+ * if it contains any of the supported rich text formats. This function
  * waits for the data to be received using the main loop, so events,
  * timeouts, etc, may be dispatched during the wait.
  *
@@ -1788,7 +1789,7 @@ gtk_clipboard_wait_is_rich_text_available (GtkClipboard  *clipboard,
  * 
  * Test to see if there is an image available to be pasted
  * This is done by requesting the TARGETS atom and checking
- * if it contains any of the supported image targets. This function 
+ * if it contains any of the supported image formats. This function 
  * waits for the data to be received using the main loop, so events, 
  * timeouts, etc, may be dispatched during the wait.
  *
@@ -1823,7 +1824,7 @@ gtk_clipboard_wait_is_image_available (GtkClipboard *clipboard)
  * 
  * Test to see if there is a list of URIs available to be pasted
  * This is done by requesting the TARGETS atom and checking
- * if it contains the URI targets. This function
+ * if it contains the URI formats. This function
  * waits for the data to be received using the main loop, so events, 
  * timeouts, etc, may be dispatched during the wait.
  *
@@ -1853,77 +1854,77 @@ gtk_clipboard_wait_is_uris_available (GtkClipboard *clipboard)
 }
 
 /**
- * gtk_clipboard_wait_for_targets:
+ * gtk_clipboard_wait_for_formats:
  * @clipboard: a #GtkClipboard
- * @targets: (out) (array length=n_targets) (transfer container): location
- *           to store an array of targets. The result stored here must
+ * @formats: (out) (array length=n_formats) (transfer container): location
+ *           to store an array of formats. The result stored here must
  *           be freed with g_free().
- * @n_targets: (out): location to store number of items in @targets.
+ * @n_formats: (out): location to store number of items in @formats.
  *
- * Returns a list of targets that are present on the clipboard, or %NULL
- * if there aren’t any targets available. The returned list must be
+ * Returns a list of formats that are present on the clipboard, or %NULL
+ * if there aren’t any formats available. The returned list must be
  * freed with g_free().
  * This function waits for the data to be received using the main
  * loop, so events, timeouts, etc, may be dispatched during the wait.
  *
- * Returns: %TRUE if any targets are present on the clipboard,
+ * Returns: %TRUE if any formats are present on the clipboard,
  *               otherwise %FALSE.
  *
  * Since: 2.4
  */
 gboolean
 gtk_clipboard_wait_for_targets (GtkClipboard  *clipboard, 
-                               GdkAtom      **targets,
-                               gint          *n_targets)
+                               GdkAtom      **formats,
+                               gint          *n_formats)
 {
   GtkSelectionData *data;
   gboolean result = FALSE;
   
   g_return_val_if_fail (clipboard != NULL, FALSE);
 
-  /* If the display supports change notification we cache targets */
+  /* If the display supports change notification we cache formats */
   if (gdk_display_supports_selection_notification (gtk_clipboard_get_display (clipboard)) &&
-      clipboard->n_cached_targets != -1)
+      clipboard->n_cached_formats != -1)
     {
-      if (n_targets)
-       *n_targets = clipboard->n_cached_targets;
+      if (n_formats)
+       *n_formats = clipboard->n_cached_formats;
  
-      if (targets)
-       *targets = g_memdup (clipboard->cached_targets,
-                            clipboard->n_cached_targets * sizeof (GdkAtom));
+      if (formats)
+       *formats = g_memdup (clipboard->cached_formats,
+                            clipboard->n_cached_formats * sizeof (GdkAtom));
 
        return TRUE;
     }
   
-  if (n_targets)
-    *n_targets = 0;
+  if (n_formats)
+    *n_formats = 0;
       
-  if (targets)
-    *targets = NULL;      
+  if (formats)
+    *formats = NULL;      
 
   data = gtk_clipboard_wait_for_contents (clipboard, gdk_atom_intern_static_string ("TARGETS"));
 
   if (data)
     {
-      GdkAtom *tmp_targets;
-      gint tmp_n_targets;
+      GdkAtom *tmp_formats;
+      gint tmp_n_formats;
        
-      result = gtk_selection_data_get_targets (data, &tmp_targets, &tmp_n_targets);
+      result = gtk_selection_data_get_targets (data, &tmp_formats, &tmp_n_formats);
  
       if (gdk_display_supports_selection_notification (gtk_clipboard_get_display (clipboard)))
        {
-         clipboard->n_cached_targets = tmp_n_targets;
-         clipboard->cached_targets = g_memdup (tmp_targets,
-                                               tmp_n_targets * sizeof (GdkAtom));
+         clipboard->n_cached_formats = tmp_n_formats;
+         clipboard->cached_formats = g_memdup (tmp_formats,
+                                               tmp_n_formats * sizeof (GdkAtom));
        }
  
-      if (n_targets)
-       *n_targets = tmp_n_targets;
+      if (n_formats)
+       *n_formats = tmp_n_formats;
  
-      if (targets)
-       *targets = tmp_targets;
+      if (formats)
+       *formats = tmp_formats;
       else
-       g_free (tmp_targets);
+       g_free (tmp_formats);
       
       gtk_selection_data_free (data);
     }
@@ -1961,8 +1962,8 @@ clipboard_peek (GdkDisplay *display,
 
       clipboard->selection = selection;
       clipboard->display = display;
-      clipboard->n_cached_targets = -1;
-      clipboard->n_storable_targets = -1;
+      clipboard->n_cached_formats = -1;
+      clipboard->n_storable_formats = -1;
       clipboards = g_slist_prepend (clipboards, clipboard);
       g_object_set_data (G_OBJECT (display), I_("gtk-clipboard-list"), clipboards);
       g_signal_connect (display, "closed",
@@ -1977,11 +1978,11 @@ static void
 gtk_clipboard_owner_change (GtkClipboard        *clipboard,
                            GdkEventOwnerChange *event)
 {
-  if (clipboard->n_cached_targets != -1)
+  if (clipboard->n_cached_formats != -1)
     {
-      g_free (clipboard->cached_targets);
-      clipboard->cached_targets = NULL;
-      clipboard->n_cached_targets = -1;
+      g_free (clipboard->cached_formats);
+      clipboard->cached_formats = NULL;
+      clipboard->n_cached_formats = -1;
     }
 }
 
@@ -2005,23 +2006,23 @@ gboolean
 gtk_clipboard_wait_is_target_available (GtkClipboard *clipboard,
                                        GdkAtom       target)
 {
-  GdkAtom *targets;
-  gint i, n_targets;
+  GdkAtom *formats;
+  gint i, n_formats;
   gboolean retval = FALSE;
     
-  if (!gtk_clipboard_wait_for_targets (clipboard, &targets, &n_targets))
+  if (!gtk_clipboard_wait_for_targets (clipboard, &formats, &n_formats))
     return FALSE;
 
-  for (i = 0; i < n_targets; i++)
+  for (i = 0; i < n_formats; i++)
     {
-      if (targets[i] == target)
+      if (formats[i] == target)
        {
          retval = TRUE;
          break;
        }
     }
 
-  g_free (targets);
+  g_free (formats);
   
   return retval;
 }
@@ -2061,10 +2062,10 @@ gtk_clipboard_store_timeout (GtkClipboard *clipboard)
 /**
  * gtk_clipboard_set_can_store:
  * @clipboard: a #GtkClipboard
- * @targets: (allow-none): The targets (data formats) in which the
+ * @formats: (allow-none): The targets (data formats) in which the
  *    functions can provide the data or %NULL
  *    to indicate that all forms should be stored.
- * @n_targets: number of elements in @targets
+ * @n_formats: number of elements in @formats
  *
  * Hints that the clipboard data should be stored somewhere when the
  * application exits or when gtk_clipboard_store () is called.
@@ -2077,16 +2078,16 @@ gtk_clipboard_store_timeout (GtkClipboard *clipboard)
  */
 void
 gtk_clipboard_set_can_store (GtkClipboard  *clipboard,
-                            GtkTargetList *targets)
+                            GdkContentFormats *formats)
 {
   g_return_if_fail (GTK_IS_CLIPBOARD (clipboard));
 
-  GTK_CLIPBOARD_GET_CLASS (clipboard)->set_can_store (clipboard, targets);
+  GTK_CLIPBOARD_GET_CLASS (clipboard)->set_can_store (clipboard, formats);
 }
 
 static void
-gtk_clipboard_real_set_can_store (GtkClipboard  *clipboard,
-                                 GtkTargetList *targets)
+gtk_clipboard_real_set_can_store (GtkClipboard      *clipboard,
+                                 GdkContentFormats *formats)
 {
   GtkWidget *clipboard_widget;
   guint n_atoms;
@@ -2094,16 +2095,16 @@ gtk_clipboard_real_set_can_store (GtkClipboard  *clipboard,
   if (clipboard->selection != GDK_SELECTION_CLIPBOARD)
     return;
   
-  g_free (clipboard->storable_targets);
+  g_free (clipboard->storable_formats);
   
   clipboard_widget = get_clipboard_widget (clipboard->display);
 
-  /* n_storable_targets being -1 means that
+  /* n_storable_formats being -1 means that
    * gtk_clipboard_set_can_store hasn't been called since the
    * clipboard owner changed. We only want to add SAVE_TARGETS and 
    * ref the owner once , so we do that here
    */  
-  if (clipboard->n_storable_targets == -1)
+  if (clipboard->n_storable_formats == -1)
     {
       gtk_selection_add_target (clipboard_widget,
                                 clipboard->selection,
@@ -2114,15 +2115,15 @@ gtk_clipboard_real_set_can_store (GtkClipboard  *clipboard,
        g_object_ref (clipboard->user_data);
     }
   
-  if (targets)
+  if (formats)
     {
-      clipboard->storable_targets = gtk_target_list_get_atoms (targets, &n_atoms);
-      clipboard->n_storable_targets = n_atoms;
+      clipboard->storable_formats = gdk_content_formats_get_atoms (formats, &n_atoms);
+      clipboard->n_storable_formats = n_atoms;
     }
   else
     {
-      clipboard->storable_targets = NULL;
-      clipboard->n_storable_targets = 0;
+      clipboard->storable_formats = NULL;
+      clipboard->n_storable_formats = 0;
     }
 }
 
@@ -2163,7 +2164,7 @@ gtk_clipboard_real_store (GtkClipboard *clipboard)
 {
   GtkWidget *clipboard_widget;
 
-  if (clipboard->n_storable_targets < 0)
+  if (clipboard->n_storable_formats < 0)
     return;
   
   if (!gdk_display_supports_clipboard_persistence (clipboard->display))
@@ -2180,8 +2181,8 @@ gtk_clipboard_real_store (GtkClipboard *clipboard)
   gdk_display_store_clipboard (clipboard->display,
                                gtk_widget_get_window (clipboard_widget),
                               clipboard_get_timestamp (clipboard),
-                              clipboard->storable_targets,
-                              clipboard->n_storable_targets);
+                              clipboard->storable_formats,
+                              clipboard->n_storable_formats);
 
   clipboard->storing_selection = TRUE;
 
diff --git a/gtk/gtkclipboard.h b/gtk/gtkclipboard.h
index e80a20b..ecc49be 100644
--- a/gtk/gtkclipboard.h
+++ b/gtk/gtkclipboard.h
@@ -194,13 +194,13 @@ GdkDisplay   *gtk_clipboard_get_display     (GtkClipboard *clipboard);
 
 GDK_AVAILABLE_IN_ALL
 gboolean gtk_clipboard_set_with_data  (GtkClipboard          *clipboard,
-                                       GtkTargetList         *targets,
+                                       GdkContentFormats     *formats,
                                       GtkClipboardGetFunc    get_func,
                                       GtkClipboardClearFunc  clear_func,
                                       gpointer               user_data);
 GDK_AVAILABLE_IN_ALL
 gboolean gtk_clipboard_set_with_owner (GtkClipboard          *clipboard,
-                                       GtkTargetList         *targets,
+                                       GdkContentFormats     *formats,
                                       GtkClipboardGetFunc    get_func,
                                       GtkClipboardClearFunc  clear_func,
                                       GObject               *owner);
@@ -283,7 +283,7 @@ gboolean gtk_clipboard_wait_is_target_available    (GtkClipboard  *clipboard,
 
 GDK_AVAILABLE_IN_ALL
 void gtk_clipboard_set_can_store (GtkClipboard         *clipboard,
-                                  GtkTargetList        *targets);
+                                  GdkContentFormats    *targets);
 
 GDK_AVAILABLE_IN_ALL
 void gtk_clipboard_store         (GtkClipboard   *clipboard);
diff --git a/gtk/gtkclipboardprivate.h b/gtk/gtkclipboardprivate.h
index d4c0b18..c001866 100644
--- a/gtk/gtkclipboardprivate.h
+++ b/gtk/gtkclipboardprivate.h
@@ -46,15 +46,15 @@ struct _GtkClipboard
   gboolean have_selection;
   GdkDisplay *display;
 
-  GdkAtom *cached_targets;
-  gint     n_cached_targets;
+  GdkAtom *cached_formats;
+  gint     n_cached_formats;
 
   gulong     notify_signal_id;
   gboolean   storing_selection;
   GMainLoop *store_loop;
   guint      store_timeout;
-  gint       n_storable_targets;
-  GdkAtom   *storable_targets;
+  gint       n_storable_formats;
+  GdkAtom   *storable_formats;
 };
 
 struct _GtkClipboardClass
@@ -63,7 +63,7 @@ struct _GtkClipboardClass
 
   /* vfuncs */
   gboolean      (* set_contents)                (GtkClipboard                   *clipboard,
-                                                 GtkTargetList                  *targets,
+                                                 GdkContentFormats              *formats,
                                                  GtkClipboardGetFunc             get_func,
                                                  GtkClipboardClearFunc           clear_func,
                                                  gpointer                        user_data,
@@ -74,7 +74,7 @@ struct _GtkClipboardClass
                                                  GtkClipboardReceivedFunc        callback,
                                                  gpointer                        user_data);
   void          (* set_can_store)               (GtkClipboard                   *clipboard,
-                                                 GtkTargetList                  *targets);
+                                                 GdkContentFormats              *formats);
   void          (* store)                       (GtkClipboard                   *clipboard);
 
   /* signals */
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index 9e042ee..3f2de51 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -384,7 +384,7 @@ gtk_color_button_init (GtkColorButton *button)
   PangoLayout *layout;
   PangoRectangle rect;
   GtkStyleContext *context;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
 
   gtk_widget_set_has_window (GTK_WIDGET (button), FALSE);
 
@@ -413,7 +413,7 @@ gtk_color_button_init (GtkColorButton *button)
   priv->rgba.alpha = 1;
   priv->use_alpha = FALSE;
 
-  targets = gtk_target_list_new (drop_types, G_N_ELEMENTS (drop_types));
+  targets = gdk_content_formats_new (drop_types, G_N_ELEMENTS (drop_types));
   gtk_drag_dest_set (priv->button,
                      GTK_DEST_DEFAULT_MOTION |
                      GTK_DEST_DEFAULT_HIGHLIGHT |
@@ -424,7 +424,7 @@ gtk_color_button_init (GtkColorButton *button)
                        GDK_BUTTON1_MASK|GDK_BUTTON3_MASK,
                        targets,
                        GDK_ACTION_COPY);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
   g_signal_connect (priv->button, "drag-begin",
                     G_CALLBACK (gtk_color_button_drag_begin), button);
   g_signal_connect (priv->button, "drag-data-received",
diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c
index e9f023d..f12eb1a 100644
--- a/gtk/gtkcolorswatch.c
+++ b/gtk/gtkcolorswatch.c
@@ -618,12 +618,12 @@ gtk_color_swatch_set_rgba (GtkColorSwatch *swatch,
 
   if (!swatch->priv->has_color)
     {
-      GtkTargetList *targets = gtk_target_list_new (dnd_targets, G_N_ELEMENTS (dnd_targets));
+      GdkContentFormats *targets = gdk_content_formats_new (dnd_targets, G_N_ELEMENTS (dnd_targets));
       gtk_drag_source_set (GTK_WIDGET (swatch),
                            GDK_BUTTON1_MASK | GDK_BUTTON3_MASK,
                            targets,
                            GDK_ACTION_COPY | GDK_ACTION_MOVE);
-      gtk_target_list_unref (targets);
+      gdk_content_formats_unref (targets);
     }
 
   swatch->priv->has_color = TRUE;
@@ -681,14 +681,14 @@ gtk_color_swatch_set_can_drop (GtkColorSwatch *swatch,
 {
   if (can_drop)
     {
-      GtkTargetList *targets = gtk_target_list_new (dnd_targets, G_N_ELEMENTS (dnd_targets));
+      GdkContentFormats *targets = gdk_content_formats_new (dnd_targets, G_N_ELEMENTS (dnd_targets));
       gtk_drag_dest_set (GTK_WIDGET (swatch),
                          GTK_DEST_DEFAULT_HIGHLIGHT |
                          GTK_DEST_DEFAULT_MOTION |
                          GTK_DEST_DEFAULT_DROP,
                          targets,
                          GDK_ACTION_COPY);
-      gtk_target_list_unref (targets);
+      gdk_content_formats_unref (targets);
     }
   else
     {
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 11f4cb3..45e6932 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -34,6 +34,8 @@
 
 #include "gdk/gdk.h"
 
+#include "gdk/gdkcontentformatsprivate.h"
+
 #ifdef GDK_WINDOWING_X11
 #include <X11/Xlib.h>
 #include <X11/keysym.h>
@@ -93,7 +95,7 @@ typedef enum
 struct _GtkDragSourceInfo 
 {
   GtkWidget         *widget;
-  GtkTargetList     *target_list; /* Targets for drag data */
+  GdkContentFormats *target_list; /* Targets for drag data */
   GdkDragAction      possible_actions; /* Actions allowed by source */
   GdkDragContext    *context;     /* drag context */
   GtkWidget         *icon_window; /* Window for drag */
@@ -816,8 +818,7 @@ gtk_drag_selection_received (GtkWidget        *widget,
 
       if (site && site->target_list)
         {
-          if (gtk_target_list_find (site->target_list, 
-                                    target))
+          if (gdk_content_formats_contains (site->target_list, target))
             {
               if (!(site->flags & GTK_DEST_DEFAULT_DROP) ||
                   gtk_selection_data_get_length (selection_data) >= 0)
@@ -1171,7 +1172,7 @@ gtk_drag_is_managed (GtkWidget *source_widget)
 GdkDragContext *
 gtk_drag_begin_internal (GtkWidget          *widget,
                          GtkImageDefinition *icon,
-                         GtkTargetList      *target_list,
+                         GdkContentFormats  *target_list,
                          GdkDragAction       actions,
                          gint                button,
                          const GdkEvent     *event,
@@ -1262,7 +1263,7 @@ gtk_drag_begin_internal (GtkWidget          *widget,
       gtk_device_grab_add (ipc_widget, pointer, FALSE);
     }
 
-  atoms = gtk_target_list_get_atoms (target_list, &n_atoms);
+  atoms = gdk_content_formats_get_atoms (target_list, &n_atoms);
   for (i = 0; i < n_atoms; i++)
     {
       targets = g_list_prepend (targets, (gpointer) atoms[i]);
@@ -1313,7 +1314,7 @@ gtk_drag_begin_internal (GtkWidget          *widget,
   info->button = button;
   info->cursor = cursor;
   info->target_list = target_list;
-  gtk_target_list_ref (target_list);
+  gdk_content_formats_ref (target_list);
 
   info->possible_actions = actions;
 
@@ -1440,13 +1441,13 @@ gtk_drag_begin_internal (GtkWidget          *widget,
  * Since: 3.10
  */
 GdkDragContext *
-gtk_drag_begin_with_coordinates (GtkWidget     *widget,
-                                 GtkTargetList *targets,
-                                 GdkDragAction  actions,
-                                 gint           button,
-                                 GdkEvent      *event,
-                                 gint           x,
-                                 gint           y)
+gtk_drag_begin_with_coordinates (GtkWidget         *widget,
+                                 GdkContentFormats *targets,
+                                 GdkDragAction      actions,
+                                 gint               button,
+                                 GdkEvent          *event,
+                                 gint               x,
+                                 gint               y)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
   g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
@@ -1852,9 +1853,9 @@ gtk_drag_drop (GtkDragSourceInfo *info,
       /* GTK+ traditionally has used application/x-rootwin-drop, but the
        * XDND spec specifies x-rootwindow-drop.
        */
-      if (gtk_target_list_find (info->target_list, "application/x-rootwindow-drop"))
+      if (gdk_content_formats_contains (info->target_list, "application/x-rootwindow-drop"))
         found = gdk_atom_intern ("application/x-rootwindow-drop", FALSE);
-      if (gtk_target_list_find (info->target_list, "application/x-rootwin-drop"))
+      if (gdk_content_formats_contains (info->target_list, "application/x-rootwin-drop"))
         found = gdk_atom_intern ("application/x-rootwin-drop", FALSE);
       else found = NULL;
       
@@ -1913,8 +1914,8 @@ gtk_drag_selection_get (GtkWidget        *widget,
                              info->context);
       gtk_selection_data_set (selection_data, null_atom, 8, NULL, 0);
     }
-  else if (gtk_target_list_find (info->target_list, 
-                                 gtk_selection_data_get_target (selection_data)))
+  else if (gdk_content_formats_contains (info->target_list, 
+                                         gtk_selection_data_get_target (selection_data)))
     {
       g_signal_emit_by_name (info->widget, "drag-data-get",
                              info->context,
@@ -1993,7 +1994,7 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
   source_widgets = g_slist_remove (source_widgets, info->ipc_widget);
   gtk_drag_release_ipc_widget (info->ipc_widget);
 
-  gtk_target_list_unref (info->target_list);
+  gdk_content_formats_unref (info->target_list);
 
   if (info->drop_timeout)
     g_source_remove (info->drop_timeout);
diff --git a/gtk/gtkdnd.h b/gtk/gtkdnd.h
index 53fb73a..b08a8a8 100644
--- a/gtk/gtkdnd.h
+++ b/gtk/gtkdnd.h
@@ -62,7 +62,7 @@ void gtk_drag_unhighlight (GtkWidget  *widget);
 
 GDK_AVAILABLE_IN_3_10
 GdkDragContext *gtk_drag_begin_with_coordinates (GtkWidget         *widget,
-                                                 GtkTargetList     *targets,
+                                                 GdkContentFormats *formats,
                                                  GdkDragAction      actions,
                                                  gint               button,
                                                  GdkEvent          *event,
diff --git a/gtk/gtkdndprivate.h b/gtk/gtkdndprivate.h
index 86e1c23..69d49d3 100644
--- a/gtk/gtkdndprivate.h
+++ b/gtk/gtkdndprivate.h
@@ -30,7 +30,7 @@ typedef struct _GtkDragDestSite GtkDragDestSite;
 struct _GtkDragDestSite
 {
   GtkDestDefaults    flags;
-  GtkTargetList     *target_list;
+  GdkContentFormats *target_list;
   GdkDragAction      actions;
   guint              do_proxy     : 1;
   guint              proxy_coords : 1;
@@ -42,7 +42,7 @@ G_BEGIN_DECLS
 
 GdkDragContext *        gtk_drag_begin_internal         (GtkWidget              *widget,
                                                          GtkImageDefinition     *icon,
-                                                         GtkTargetList          *target_list,
+                                                         GdkContentFormats      *target_list,
                                                          GdkDragAction           actions,
                                                          gint                    button,
                                                          const GdkEvent         *event,
diff --git a/gtk/gtkdragdest.c b/gtk/gtkdragdest.c
index 482a5d2..cd9ee3c 100644
--- a/gtk/gtkdragdest.c
+++ b/gtk/gtkdragdest.c
@@ -57,7 +57,7 @@ gtk_drag_dest_site_destroy (gpointer data)
   GtkDragDestSite *site = data;
 
   if (site->target_list)
-    gtk_target_list_unref (site->target_list);
+    gdk_content_formats_unref (site->target_list);
 
   g_slice_free (GtkDragDestSite, site);
 }
@@ -143,10 +143,10 @@ gtk_drag_dest_set_internal (GtkWidget       *widget,
  * ]|
  */
 void
-gtk_drag_dest_set (GtkWidget       *widget,
-                   GtkDestDefaults  flags,
-                   GtkTargetList   *targets,
-                   GdkDragAction    actions)
+gtk_drag_dest_set (GtkWidget         *widget,
+                   GtkDestDefaults    flags,
+                   GdkContentFormats *targets,
+                   GdkDragAction      actions)
 {
   GtkDragDestSite *site;
 
@@ -157,7 +157,7 @@ gtk_drag_dest_set (GtkWidget       *widget,
   site->flags = flags;
   site->have_drag = FALSE;
   if (targets)
-    site->target_list = gtk_target_list_ref (targets);
+    site->target_list = gdk_content_formats_ref (targets);
   else
     site->target_list = NULL;
   site->actions = actions;
@@ -202,9 +202,9 @@ gtk_drag_dest_unset (GtkWidget *widget)
  * Returns the list of targets this widget can accept from
  * drag-and-drop.
  *
- * Returns: (nullable) (transfer none): the #GtkTargetList, or %NULL if none
+ * Returns: (nullable) (transfer none): the #GdkContentFormats, or %NULL if none
  */
-GtkTargetList *
+GdkContentFormats *
 gtk_drag_dest_get_target_list (GtkWidget *widget)
 {
   GtkDragDestSite *site;
@@ -227,7 +227,7 @@ gtk_drag_dest_get_target_list (GtkWidget *widget)
  */
 void
 gtk_drag_dest_set_target_list (GtkWidget     *widget,
-                               GtkTargetList *target_list)
+                               GdkContentFormats *target_list)
 {
   GtkDragDestSite *site;
 
@@ -243,10 +243,10 @@ gtk_drag_dest_set_target_list (GtkWidget     *widget,
     }
 
   if (target_list)
-    gtk_target_list_ref (target_list);
+    gdk_content_formats_ref (target_list);
 
   if (site->target_list)
-    gtk_target_list_unref (site->target_list);
+    gdk_content_formats_unref (site->target_list);
 
   site->target_list = target_list;
 }
@@ -266,16 +266,16 @@ gtk_drag_dest_set_target_list (GtkWidget     *widget,
 void
 gtk_drag_dest_add_text_targets (GtkWidget *widget)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
   target_list = gtk_drag_dest_get_target_list (widget);
   if (target_list)
-    gtk_target_list_ref (target_list);
+    gdk_content_formats_ref (target_list);
   else
-    target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_text_targets (target_list);
+    target_list = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_text_targets (target_list);
   gtk_drag_dest_set_target_list (widget, target_list);
-  gtk_target_list_unref (target_list);
+  gdk_content_formats_unref (target_list);
 }
 
 /**
@@ -293,16 +293,16 @@ gtk_drag_dest_add_text_targets (GtkWidget *widget)
 void
 gtk_drag_dest_add_image_targets (GtkWidget *widget)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
   target_list = gtk_drag_dest_get_target_list (widget);
   if (target_list)
-    gtk_target_list_ref (target_list);
+    gdk_content_formats_ref (target_list);
   else
-    target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_image_targets (target_list, FALSE);
+    target_list = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_image_targets (target_list, FALSE);
   gtk_drag_dest_set_target_list (widget, target_list);
-  gtk_target_list_unref (target_list);
+  gdk_content_formats_unref (target_list);
 }
 
 /**
@@ -320,16 +320,16 @@ gtk_drag_dest_add_image_targets (GtkWidget *widget)
 void
 gtk_drag_dest_add_uri_targets (GtkWidget *widget)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
   target_list = gtk_drag_dest_get_target_list (widget);
   if (target_list)
-    gtk_target_list_ref (target_list);
+    gdk_content_formats_ref (target_list);
   else
-    target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_uri_targets (target_list);
+    target_list = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_uri_targets (target_list);
   gtk_drag_dest_set_target_list (widget, target_list);
-  gtk_target_list_unref (target_list);
+  gdk_content_formats_unref (target_list);
 }
 
 /**
@@ -407,11 +407,11 @@ gtk_drag_dest_get_track_motion (GtkWidget *widget)
  *     and the dest can accept, or %NULL
  */
 GdkAtom
-gtk_drag_dest_find_target (GtkWidget      *widget,
-                           GdkDragContext *context,
-                           GtkTargetList  *target_list)
+gtk_drag_dest_find_target (GtkWidget         *widget,
+                           GdkDragContext    *context,
+                           GdkContentFormats *target_list)
 {
-  GtkTargetList *source_list;
+  GdkContentFormats *source_list;
   GList *tmp_source;
   GdkAtom result;
 
@@ -424,17 +424,17 @@ gtk_drag_dest_find_target (GtkWidget      *widget,
   if (target_list == NULL)
     return NULL;
 
-  source_list = gtk_target_list_new (NULL, 0);
+  source_list = gdk_content_formats_new (NULL, 0);
   for (tmp_source = gdk_drag_context_list_targets (context);
        tmp_source != NULL;
        tmp_source = tmp_source->next)
     {
-      gtk_target_list_add (source_list, tmp_source->data);
+      gdk_content_formats_add (source_list, tmp_source->data);
     }
        
-  result = gtk_target_list_intersects (target_list, source_list);
+  result = gdk_content_formats_intersects (target_list, source_list);
 
-  gtk_target_list_unref (source_list);
+  gdk_content_formats_unref (source_list);
 
   return result;
 }
diff --git a/gtk/gtkdragdest.h b/gtk/gtkdragdest.h
index 609a32e..84a65a5 100644
--- a/gtk/gtkdragdest.h
+++ b/gtk/gtkdragdest.h
@@ -40,14 +40,14 @@ G_BEGIN_DECLS
 /**
  * GtkDestDefaults:
  * @GTK_DEST_DEFAULT_MOTION: If set for a widget, GTK+, during a drag over this
- *   widget will check if the drag matches this widget’s list of possible targets
+ *   widget will check if the drag matches this widget’s list of possible formats
  *   and actions.
  *   GTK+ will then call gdk_drag_status() as appropriate.
  * @GTK_DEST_DEFAULT_HIGHLIGHT: If set for a widget, GTK+ will draw a highlight on
  *   this widget as long as a drag is over this widget and the widget drag format
  *   and action are acceptable.
  * @GTK_DEST_DEFAULT_DROP: If set for a widget, when a drop occurs, GTK+ will
- *   will check if the drag matches this widget’s list of possible targets and
+ *   will check if the drag matches this widget’s list of possible formats and
  *   actions. If so, GTK+ will call gtk_drag_get_data() on behalf of the widget.
  *   Whether or not the drop is successful, GTK+ will call gtk_drag_finish(). If
  *   the action was a move, then if the drag was successful, then %TRUE will be
@@ -69,21 +69,21 @@ typedef enum {
 GDK_AVAILABLE_IN_ALL
 void gtk_drag_dest_set   (GtkWidget            *widget,
                           GtkDestDefaults       flags,
-                          GtkTargetList        *targets,
+                          GdkContentFormats    *formats,
                           GdkDragAction         actions);
 
 GDK_AVAILABLE_IN_ALL
 void gtk_drag_dest_unset (GtkWidget          *widget);
 
 GDK_AVAILABLE_IN_ALL
-GdkAtom        gtk_drag_dest_find_target     (GtkWidget      *widget,
-                                              GdkDragContext *context,
-                                              GtkTargetList  *target_list);
+GdkAtom                 gtk_drag_dest_find_target       (GtkWidget              *widget,
+                                                         GdkDragContext         *context,
+                                                         GdkContentFormats      *target_list);
 GDK_AVAILABLE_IN_ALL
-GtkTargetList* gtk_drag_dest_get_target_list (GtkWidget      *widget);
+GdkContentFormats*      gtk_drag_dest_get_target_list   (GtkWidget              *widget);
 GDK_AVAILABLE_IN_ALL
 void           gtk_drag_dest_set_target_list (GtkWidget      *widget,
-                                              GtkTargetList  *target_list);
+                                              GdkContentFormats  *target_list);
 GDK_AVAILABLE_IN_ALL
 void           gtk_drag_dest_add_text_targets  (GtkWidget    *widget);
 GDK_AVAILABLE_IN_ALL
diff --git a/gtk/gtkdragsource.c b/gtk/gtkdragsource.c
index 6a22db6..cab952c 100644
--- a/gtk/gtkdragsource.c
+++ b/gtk/gtkdragsource.c
@@ -38,7 +38,7 @@ typedef struct _GtkDragSourceSite GtkDragSourceSite;
 struct _GtkDragSourceSite 
 {
   GdkModifierType    start_button_mask;
-  GtkTargetList     *target_list;        /* Targets for drag data */
+  GdkContentFormats *target_list;        /* Targets for drag data */
   GdkDragAction      actions;            /* Possible actions */
 
   GtkImageDefinition *image_def;
@@ -114,7 +114,7 @@ gtk_drag_source_site_destroy (gpointer data)
   GtkDragSourceSite *site = data;
 
   if (site->target_list)
-    gtk_target_list_unref (site->target_list);
+    gdk_content_formats_unref (site->target_list);
 
   gtk_image_definition_unref (site->image_def);
   g_clear_object (&site->drag_gesture);
@@ -133,10 +133,10 @@ gtk_drag_source_site_destroy (gpointer data)
  * clicks and drags on the widget. The widget must have a window.
  */
 void
-gtk_drag_source_set (GtkWidget       *widget,
-                     GdkModifierType  start_button_mask,
-                     GtkTargetList   *targets,
-                     GdkDragAction    actions)
+gtk_drag_source_set (GtkWidget         *widget,
+                     GdkModifierType    start_button_mask,
+                     GdkContentFormats *targets,
+                     GdkDragAction      actions)
 {
   GtkDragSourceSite *site;
 
@@ -147,7 +147,7 @@ gtk_drag_source_set (GtkWidget       *widget,
   if (site)
     {
       if (site->target_list)
-        gtk_target_list_unref (site->target_list);
+        gdk_content_formats_unref (site->target_list);
     }
   else
     {
@@ -178,7 +178,7 @@ gtk_drag_source_set (GtkWidget       *widget,
   site->start_button_mask = start_button_mask;
 
   if (targets)
-    site->target_list = gtk_target_list_ref (targets);
+    site->target_list = gdk_content_formats_ref (targets);
   else
     site->target_list = NULL;
 
@@ -216,11 +216,11 @@ gtk_drag_source_unset (GtkWidget *widget)
  * Gets the list of targets this widget can provide for
  * drag-and-drop.
  *
- * Returns: (nullable) (transfer none): the #GtkTargetList, or %NULL if none
+ * Returns: (nullable) (transfer none): the #GdkContentFormats, or %NULL if none
  *
  * Since: 2.4
  */
-GtkTargetList *
+GdkContentFormats *
 gtk_drag_source_get_target_list (GtkWidget *widget)
 {
   GtkDragSourceSite *site;
@@ -244,8 +244,8 @@ gtk_drag_source_get_target_list (GtkWidget *widget)
  * Since: 2.4
  */
 void
-gtk_drag_source_set_target_list (GtkWidget     *widget,
-                                 GtkTargetList *target_list)
+gtk_drag_source_set_target_list (GtkWidget         *widget,
+                                 GdkContentFormats *target_list)
 {
   GtkDragSourceSite *site;
 
@@ -260,10 +260,10 @@ gtk_drag_source_set_target_list (GtkWidget     *widget,
     }
 
   if (target_list)
-    gtk_target_list_ref (target_list);
+    gdk_content_formats_ref (target_list);
 
   if (site->target_list)
-    gtk_target_list_unref (site->target_list);
+    gdk_content_formats_unref (site->target_list);
 
   site->target_list = target_list;
 }
@@ -275,7 +275,7 @@ gtk_drag_source_set_target_list (GtkWidget     *widget,
  * Add the text targets supported by #GtkSelectionData to
  * the target list of the drag source.  The targets
  * are added with @info = 0. If you need another value, 
- * use gtk_target_list_add_text_targets() and
+ * use gtk_content_formats_add_text_targets() and
  * gtk_drag_source_set_target_list().
  * 
  * Since: 2.6
@@ -283,16 +283,16 @@ gtk_drag_source_set_target_list (GtkWidget     *widget,
 void
 gtk_drag_source_add_text_targets (GtkWidget *widget)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
   target_list = gtk_drag_source_get_target_list (widget);
   if (target_list)
-    gtk_target_list_ref (target_list);
+    gdk_content_formats_ref (target_list);
   else
-    target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_text_targets (target_list);
+    target_list = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_text_targets (target_list);
   gtk_drag_source_set_target_list (widget, target_list);
-  gtk_target_list_unref (target_list);
+  gdk_content_formats_unref (target_list);
 }
 
 /**
@@ -310,16 +310,16 @@ gtk_drag_source_add_text_targets (GtkWidget *widget)
 void
 gtk_drag_source_add_image_targets (GtkWidget *widget)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
   target_list = gtk_drag_source_get_target_list (widget);
   if (target_list)
-    gtk_target_list_ref (target_list);
+    gdk_content_formats_ref (target_list);
   else
-    target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_image_targets (target_list, TRUE);
+    target_list = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_image_targets (target_list, TRUE);
   gtk_drag_source_set_target_list (widget, target_list);
-  gtk_target_list_unref (target_list);
+  gdk_content_formats_unref (target_list);
 }
 
 /**
@@ -329,7 +329,7 @@ gtk_drag_source_add_image_targets (GtkWidget *widget)
  * Add the URI targets supported by #GtkSelectionData to
  * the target list of the drag source.  The targets
  * are added with @info = 0. If you need another value, 
- * use gtk_target_list_add_uri_targets() and
+ * use gtk_content_formats_add_uri_targets() and
  * gtk_drag_source_set_target_list().
  * 
  * Since: 2.6
@@ -337,16 +337,16 @@ gtk_drag_source_add_image_targets (GtkWidget *widget)
 void
 gtk_drag_source_add_uri_targets (GtkWidget *widget)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
   target_list = gtk_drag_source_get_target_list (widget);
   if (target_list)
-    gtk_target_list_ref (target_list);
+    gdk_content_formats_ref (target_list);
   else
-    target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_uri_targets (target_list);
+    target_list = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_uri_targets (target_list);
   gtk_drag_source_set_target_list (widget, target_list);
-  gtk_target_list_unref (target_list);
+  gdk_content_formats_unref (target_list);
 }
 
 /**
diff --git a/gtk/gtkdragsource.h b/gtk/gtkdragsource.h
index 8c1c6a2..513d794 100644
--- a/gtk/gtkdragsource.h
+++ b/gtk/gtkdragsource.h
@@ -40,17 +40,17 @@ G_BEGIN_DECLS
 GDK_AVAILABLE_IN_ALL
 void gtk_drag_source_set  (GtkWidget            *widget,
                           GdkModifierType       start_button_mask,
-                          GtkTargetList        *targets,
+                          GdkContentFormats    *formats,
                           GdkDragAction         actions);
 
 GDK_AVAILABLE_IN_ALL
 void gtk_drag_source_unset (GtkWidget        *widget);
 
 GDK_AVAILABLE_IN_ALL
-GtkTargetList* gtk_drag_source_get_target_list (GtkWidget     *widget);
+GdkContentFormats *     gtk_drag_source_get_target_list (GtkWidget         *widget);
 GDK_AVAILABLE_IN_ALL
-void           gtk_drag_source_set_target_list (GtkWidget     *widget,
-                                                GtkTargetList *target_list);
+void                    gtk_drag_source_set_target_list (GtkWidget         *widget,
+                                                         GdkContentFormats *target_list);
 GDK_AVAILABLE_IN_ALL
 void           gtk_drag_source_add_text_targets  (GtkWidget     *widget);
 GDK_AVAILABLE_IN_ALL
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index bb1209a..d1dd654 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -281,7 +281,7 @@ struct _EntryIconInfo
   guint pressed        : 1;
 
   GdkDragAction actions;
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
   GdkEventSequence *current_sequence;
   GdkDevice *device;
 };
@@ -2703,7 +2703,7 @@ gtk_entry_finalize (GObject *object)
         continue;
 
       if (icon_info->target_list != NULL)
-        gtk_target_list_unref (icon_info->target_list);
+        gdk_content_formats_unref (icon_info->target_list);
 
       gtk_widget_unparent (icon_info->widget);
 
@@ -3904,11 +3904,11 @@ gtk_entry_drag_gesture_update (GtkGestureDrag *gesture,
         {
           gint *ranges;
           gint n_ranges;
-          GtkTargetList  *target_list = gtk_target_list_new (NULL, 0);
+          GdkContentFormats  *target_list = gdk_content_formats_new (NULL, 0);
           guint actions = priv->editable ? GDK_ACTION_COPY | GDK_ACTION_MOVE : GDK_ACTION_COPY;
           guint button;
 
-          gtk_target_list_add_text_targets (target_list);
+          gtk_content_formats_add_text_targets (target_list);
 
           gtk_entry_get_pixel_ranges (entry, &ranges, &n_ranges);
 
@@ -3921,7 +3921,7 @@ gtk_entry_drag_gesture_update (GtkGestureDrag *gesture,
 
           priv->in_drag = FALSE;
 
-          gtk_target_list_unref (target_list);
+          gdk_content_formats_unref (target_list);
         }
     }
   else
@@ -6581,15 +6581,15 @@ primary_clear_cb (GtkClipboard *clipboard,
 static void
 gtk_entry_update_primary_selection (GtkEntry *entry)
 {
-  GtkTargetList *list;
+  GdkContentFormats *list;
   GtkClipboard *clipboard;
   gint start, end;
 
   if (!gtk_widget_get_realized (GTK_WIDGET (entry)))
     return;
 
-  list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_text_targets (list);
+  list = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_text_targets (list);
 
   clipboard = gtk_widget_get_clipboard (GTK_WIDGET (entry), GDK_SELECTION_PRIMARY);
   
@@ -6604,7 +6604,7 @@ gtk_entry_update_primary_selection (GtkEntry *entry)
        gtk_clipboard_clear (clipboard);
     }
 
-  gtk_target_list_unref (list);
+  gdk_content_formats_unref (list);
 }
 
 static void
@@ -8013,7 +8013,7 @@ gtk_entry_get_icon_at_pos (GtkEntry *entry,
  * gtk_entry_set_icon_drag_source:
  * @entry: a #GtkEntry
  * @icon_pos: icon position
- * @target_list: the targets (data formats) in which the data can be provided
+ * @formats: the targets (data formats) in which the data can be provided
  * @actions: a bitmask of the allowed drag actions
  *
  * Sets up the icon at the given position so that GTK+ will start a drag
@@ -8035,7 +8035,7 @@ gtk_entry_get_icon_at_pos (GtkEntry *entry,
 void
 gtk_entry_set_icon_drag_source (GtkEntry             *entry,
                                 GtkEntryIconPosition  icon_pos,
-                                GtkTargetList        *target_list,
+                                GdkContentFormats    *formats,
                                 GdkDragAction         actions)
 {
   GtkEntryPrivate *priv;
@@ -8050,10 +8050,10 @@ gtk_entry_set_icon_drag_source (GtkEntry             *entry,
     icon_info = construct_icon_info (GTK_WIDGET (entry), icon_pos);
 
   if (icon_info->target_list)
-    gtk_target_list_unref (icon_info->target_list);
-  icon_info->target_list = target_list;
+    gdk_content_formats_unref (icon_info->target_list);
+  icon_info->target_list = formats;
   if (icon_info->target_list)
-    gtk_target_list_ref (icon_info->target_list);
+    gdk_content_formats_ref (icon_info->target_list);
 
   icon_info->actions = actions;
 }
diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h
index ac37bc5..256140d 100644
--- a/gtk/gtkentry.h
+++ b/gtk/gtkentry.h
@@ -342,7 +342,7 @@ gchar *      gtk_entry_get_icon_tooltip_markup           (GtkEntry             *
 GDK_AVAILABLE_IN_ALL
 void         gtk_entry_set_icon_drag_source              (GtkEntry             *entry,
                                                          GtkEntryIconPosition  icon_pos,
-                                                         GtkTargetList        *target_list,
+                                                         GdkContentFormats    *formats,
                                                          GdkDragAction         actions);
 GDK_AVAILABLE_IN_ALL
 gint         gtk_entry_get_current_icon_drag_source      (GtkEntry             *entry);
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index ab7e041..095352a 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -477,7 +477,7 @@ gtk_file_chooser_button_init (GtkFileChooserButton *button)
   GtkFileChooserButtonPrivate *priv;
   GtkWidget *box;
   GtkWidget *icon;
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
   gtk_widget_set_has_window (GTK_WIDGET (button), FALSE);
 
@@ -538,14 +538,14 @@ gtk_file_chooser_button_init (GtkFileChooserButton *button)
                                      NULL, NULL);
 
   /* DnD */
-  target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_uri_targets (target_list);
-  gtk_target_list_add_text_targets (target_list);
+  target_list = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_uri_targets (target_list);
+  gtk_content_formats_add_text_targets (target_list);
   gtk_drag_dest_set (GTK_WIDGET (button),
                      (GTK_DEST_DEFAULT_ALL),
                     target_list,
                     GDK_ACTION_COPY);
-  gtk_target_list_unref (target_list);
+  gdk_content_formats_unref (target_list);
 }
 
 
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index b29fe3d..6b0da2a 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -1724,20 +1724,20 @@ copy_file_location_cb (GSimpleAction *action,
   if (selected_files)
     {
       GtkClipboard *clipboard;
-      GtkTargetList *target_list;
+      GdkContentFormats *target_list;
 
       clipboard = gtk_widget_get_clipboard (GTK_WIDGET (impl), GDK_SELECTION_CLIPBOARD);
 
-      target_list = gtk_target_list_new (NULL, 0);
-      gtk_target_list_add_text_targets (target_list);
-      gtk_target_list_add_uri_targets (target_list);
+      target_list = gdk_content_formats_new (NULL, 0);
+      gtk_content_formats_add_text_targets (target_list);
+      gtk_content_formats_add_uri_targets (target_list);
 
       gtk_clipboard_set_with_data (clipboard, target_list,
                                    copy_file_get_cb,
                                    copy_file_clear_cb,
                                    selected_files);
 
-      gtk_target_list_unref (target_list);
+      gdk_content_formats_unref (target_list);
     }
 }
 
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index fa8d55f..8a7b259 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -6276,7 +6276,7 @@ gtk_icon_view_drag_data_get (GtkWidget        *widget,
     return;
 
   /* We can implement the GTK_TREE_MODEL_ROW target generically for
-   * any model; for DragSource models there are some other targets
+   * any model; for DragSource models there are some other formats
    * we also support.
    */
 
@@ -6551,7 +6551,7 @@ gtk_icon_view_drag_data_received (GtkWidget        *widget,
  * gtk_icon_view_enable_model_drag_source:
  * @icon_view: a #GtkIconView
  * @start_button_mask: Mask of allowed buttons to start drag
- * @targets: the targets that the drag will support
+ * @formats: the formats that the drag will support
  * @actions: the bitmask of possible actions for a drag from this
  *    widget
  *
@@ -6563,12 +6563,12 @@ gtk_icon_view_drag_data_received (GtkWidget        *widget,
 void
 gtk_icon_view_enable_model_drag_source (GtkIconView              *icon_view,
                                        GdkModifierType           start_button_mask,
-                                        GtkTargetList            *targets,
+                                        GdkContentFormats        *formats,
                                        GdkDragAction             actions)
 {
   g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
 
-  gtk_drag_source_set (GTK_WIDGET (icon_view), 0, targets, actions);
+  gtk_drag_source_set (GTK_WIDGET (icon_view), 0, formats, actions);
 
   icon_view->priv->start_button_mask = start_button_mask;
   icon_view->priv->source_actions = actions;
@@ -6581,7 +6581,7 @@ gtk_icon_view_enable_model_drag_source (GtkIconView              *icon_view,
 /**
  * gtk_icon_view_enable_model_drag_dest:
  * @icon_view: a #GtkIconView
- * @targets: the targets that the drag will support
+ * @formats: the formats that the drag will support
  * @actions: the bitmask of possible actions for a drag to this
  *    widget
  *
@@ -6591,13 +6591,13 @@ gtk_icon_view_enable_model_drag_source (GtkIconView              *icon_view,
  * Since: 2.8
  **/
 void 
-gtk_icon_view_enable_model_drag_dest (GtkIconView   *icon_view,
-                                      GtkTargetList *targets,
-                                     GdkDragAction  actions)
+gtk_icon_view_enable_model_drag_dest (GtkIconView       *icon_view,
+                                      GdkContentFormats *formats,
+                                     GdkDragAction      actions)
 {
   g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
 
-  gtk_drag_dest_set (GTK_WIDGET (icon_view), 0, targets, actions);
+  gtk_drag_dest_set (GTK_WIDGET (icon_view), 0, formats, actions);
 
   icon_view->priv->dest_actions = actions;
 
@@ -6895,7 +6895,7 @@ gtk_icon_view_get_reorderable (GtkIconView *icon_view)
   return icon_view->priv->reorderable;
 }
 
-static const char *item_targets[] = {
+static const char *item_formats[] = {
   "GTK_TREE_MODEL_ROW" 
 };
 
@@ -6933,15 +6933,15 @@ gtk_icon_view_set_reorderable (GtkIconView *icon_view,
 
   if (reorderable)
     {
-      GtkTargetList *targets = gtk_target_list_new (item_targets, G_N_ELEMENTS (item_targets));
+      GdkContentFormats *formats = gdk_content_formats_new (item_formats, G_N_ELEMENTS (item_formats));
       gtk_icon_view_enable_model_drag_source (icon_view,
                                              GDK_BUTTON1_MASK,
-                                             targets,
+                                             formats,
                                              GDK_ACTION_MOVE);
       gtk_icon_view_enable_model_drag_dest (icon_view,
-                                           targets,
+                                           formats,
                                            GDK_ACTION_MOVE);
-      gtk_target_list_unref (targets);
+      gdk_content_formats_unref (formats);
     }
   else
     {
diff --git a/gtk/gtkiconview.h b/gtk/gtkiconview.h
index fc402c2..fb5ae66 100644
--- a/gtk/gtkiconview.h
+++ b/gtk/gtkiconview.h
@@ -253,11 +253,11 @@ void             gtk_icon_view_scroll_to_path     (GtkIconView            *icon_
 GDK_AVAILABLE_IN_ALL
 void                   gtk_icon_view_enable_model_drag_source (GtkIconView              *icon_view,
                                                               GdkModifierType           start_button_mask,
-                                                              GtkTargetList            *targets,
+                                                              GdkContentFormats        *formats,
                                                               GdkDragAction             actions);
 GDK_AVAILABLE_IN_ALL
 void                   gtk_icon_view_enable_model_drag_dest   (GtkIconView              *icon_view,
-                                                              GtkTargetList            *targets,
+                                                              GdkContentFormats        *formats,
                                                               GdkDragAction             actions);
 GDK_AVAILABLE_IN_ALL
 void                   gtk_icon_view_unset_model_drag_source  (GtkIconView              *icon_view);
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index ea73ded..af3a08b 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -4774,11 +4774,11 @@ gtk_label_drag_gesture_update (GtkGestureDrag *gesture,
                                    info->drag_start_y,
                                    x, y))
        {
-         GtkTargetList *target_list = gtk_target_list_new (NULL, 0);
+         GdkContentFormats *target_list = gdk_content_formats_new (NULL, 0);
           const GdkEvent *event;
 
           event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
-         gtk_target_list_add_text_targets (target_list);
+         gtk_content_formats_add_text_targets (target_list);
 
           g_signal_connect (widget, "drag-begin",
                             G_CALLBACK (drag_begin_cb), NULL);
@@ -4790,7 +4790,7 @@ gtk_label_drag_gesture_update (GtkGestureDrag *gesture,
 
          info->in_drag = FALSE;
 
-         gtk_target_list_unref (target_list);
+         gdk_content_formats_unref (target_list);
        }
     }
   else
@@ -5226,10 +5226,10 @@ gtk_label_select_region_index (GtkLabel *label,
 
       if (anchor_index != end_index)
         {
-          GtkTargetList *list;
+          GdkContentFormats *list;
 
-          list = gtk_target_list_new (NULL, 0);
-          gtk_target_list_add_text_targets (list);
+          list = gdk_content_formats_new (NULL, 0);
+          gtk_content_formats_add_text_targets (list);
 
           if (clipboard)
             gtk_clipboard_set_with_owner (clipboard,
@@ -5238,7 +5238,7 @@ gtk_label_select_region_index (GtkLabel *label,
                                           clear_text_callback,
                                           G_OBJECT (label));
 
-          gtk_target_list_unref (list);
+          gdk_content_formats_unref (list);
 
           if (!priv->select_info->selection_node)
             {
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index ee52cb1..d4cb05a 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -217,7 +217,7 @@ gtk_link_button_init (GtkLinkButton *link_button)
 {
   GtkLinkButtonPrivate *priv = gtk_link_button_get_instance_private (link_button);
   GtkStyleContext *context;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
 
   link_button->priv = priv;
 
@@ -232,12 +232,12 @@ gtk_link_button_init (GtkLinkButton *link_button)
                     G_CALLBACK (gtk_link_button_query_tooltip_cb), NULL);
 
   /* enable drag source */
-  targets = gtk_target_list_new (link_drop_types, G_N_ELEMENTS (link_drop_types));
+  targets = gdk_content_formats_new (link_drop_types, G_N_ELEMENTS (link_drop_types));
   gtk_drag_source_set (GTK_WIDGET (link_button),
                       GDK_BUTTON1_MASK,
                       targets,
                       GDK_ACTION_COPY);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   priv->click_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (link_button));
   gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->click_gesture), FALSE);
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 4adb599..1901ed5 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -169,7 +169,7 @@ struct _GtkNotebookPrivate
   GtkNotebookDragOperation   operation;
   GtkNotebookPage           *cur_page;
   GtkNotebookPage           *detached_tab;
-  GtkTargetList             *source_targets;
+  GdkContentFormats             *source_targets;
   GtkWidget                 *action_widget[N_ACTION_WIDGETS];
   GtkWidget                 *dnd_child;
   GtkWidget                 *menu;
@@ -1048,7 +1048,7 @@ static void
 gtk_notebook_init (GtkNotebook *notebook)
 {
   GtkNotebookPrivate *priv;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
 
   gtk_widget_set_can_focus (GTK_WIDGET (notebook), TRUE);
   gtk_widget_set_has_window (GTK_WIDGET (notebook), FALSE);
@@ -1075,7 +1075,7 @@ gtk_notebook_init (GtkNotebook *notebook)
   priv->pressed_button = 0;
   priv->dnd_timer = 0;
   priv->switch_tab_timer = 0;
-  priv->source_targets = gtk_target_list_new (src_notebook_targets,
+  priv->source_targets = gdk_content_formats_new (src_notebook_targets,
                                               G_N_ELEMENTS (src_notebook_targets));
   priv->operation = DRAG_OPERATION_NONE;
   priv->detached_tab = NULL;
@@ -1086,11 +1086,11 @@ gtk_notebook_init (GtkNotebook *notebook)
   else
     priv->tabs_reversed = FALSE;
 
-  targets = gtk_target_list_new (dst_notebook_targets, G_N_ELEMENTS (dst_notebook_targets));
+  targets = gdk_content_formats_new (dst_notebook_targets, G_N_ELEMENTS (dst_notebook_targets));
   gtk_drag_dest_set (GTK_WIDGET (notebook), 0,
                      targets,
                      GDK_ACTION_MOVE);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   gtk_drag_dest_set_track_motion (GTK_WIDGET (notebook), TRUE);
 
@@ -1591,7 +1591,7 @@ gtk_notebook_destroy (GtkWidget *widget)
 
   if (priv->source_targets)
     {
-      gtk_target_list_unref (priv->source_targets);
+      gdk_content_formats_unref (priv->source_targets);
       priv->source_targets = NULL;
     }
 
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index c37f870..2faf2f0 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -151,7 +151,7 @@ struct _GtkPlacesSidebar {
   GList     *drag_list; /* list of GFile */
   gint       drag_data_info;
   gboolean   dragging_over;
-  GtkTargetList *source_targets;
+  GdkContentFormats *source_targets;
   GtkWidget *drag_row;
   gint drag_row_height;
   gint drag_row_x;
@@ -4020,7 +4020,7 @@ shell_shows_desktop_changed (GtkSettings *settings,
 static void
 gtk_places_sidebar_init (GtkPlacesSidebar *sidebar)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
   gboolean show_desktop;
   GtkStyleContext *context;
 
@@ -4073,12 +4073,12 @@ gtk_places_sidebar_init (GtkPlacesSidebar *sidebar)
                      0,
                      NULL,
                      GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK);
-  target_list = gtk_target_list_new  (dnd_drop_targets, G_N_ELEMENTS (dnd_drop_targets));
-  gtk_target_list_add_uri_targets (target_list);
+  target_list = gdk_content_formats_new  (dnd_drop_targets, G_N_ELEMENTS (dnd_drop_targets));
+  gtk_content_formats_add_uri_targets (target_list);
   gtk_drag_dest_set_target_list (sidebar->list_box, target_list);
-  gtk_target_list_unref (target_list);
-  sidebar->source_targets = gtk_target_list_new (dnd_source_targets, G_N_ELEMENTS (dnd_source_targets));
-  gtk_target_list_add_text_targets (sidebar->source_targets);
+  gdk_content_formats_unref (target_list);
+  sidebar->source_targets = gdk_content_formats_new (dnd_source_targets, G_N_ELEMENTS (dnd_source_targets));
+  gtk_content_formats_add_text_targets (sidebar->source_targets);
 
   g_signal_connect (sidebar->list_box, "motion-notify-event",
                     G_CALLBACK (on_motion_notify_event), sidebar);
@@ -4339,7 +4339,7 @@ gtk_places_sidebar_dispose (GObject *object)
 
   if (sidebar->source_targets)
     {
-      gtk_target_list_unref (sidebar->source_targets);
+      gdk_content_formats_unref (sidebar->source_targets);
       sidebar->source_targets = NULL;
     }
 
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index 8f107cc..159c4dc 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -68,7 +68,7 @@
  *
  * Some of the datatypes defined this section are used in
  * the #GtkClipboard and drag-and-drop API’s as well. The
- * #GtkTargetList object represents
+ * #GdkContentFormats object represents
  * lists of data types that are supported when sending or
  * receiving data. The #GtkSelectionData object is used to
  * store a chunk of data along with the data type and other
@@ -90,6 +90,8 @@
 #include "gtkintl.h"
 #include "gdk-pixbuf/gdk-pixbuf.h"
 
+#include "gdk/gdkcontentformatsprivate.h"
+
 #ifdef GDK_WINDOWING_X11
 #include "x11/gdkx.h"
 #endif
@@ -249,8 +251,8 @@ init_atoms (void)
 }
 
 /**
- * gtk_target_list_add_text_targets:
- * @list: a #GtkTargetList
+ * gtk_content_formats_add_text_targets:
+ * @list: a #GdkContentFormats
  * 
  * Appends the text targets supported by #GtkSelectionData to
  * the target list. All targets are added with the same @info.
@@ -258,7 +260,7 @@ init_atoms (void)
  * Since: 2.6
  **/
 void 
-gtk_target_list_add_text_targets (GtkTargetList *list)
+gtk_content_formats_add_text_targets (GdkContentFormats *list)
 {
   g_return_if_fail (list != NULL);
   
@@ -266,19 +268,19 @@ gtk_target_list_add_text_targets (GtkTargetList *list)
 
   /* Keep in sync with gtk_selection_data_targets_include_text()
    */
-  gtk_target_list_add (list, utf8_atom);  
-  gtk_target_list_add (list, ctext_atom);  
-  gtk_target_list_add (list, text_atom);  
-  gtk_target_list_add (list, GDK_TARGET_STRING);  
-  gtk_target_list_add (list, text_plain_utf8_atom);  
+  gdk_content_formats_add (list, utf8_atom);  
+  gdk_content_formats_add (list, ctext_atom);  
+  gdk_content_formats_add (list, text_atom);  
+  gdk_content_formats_add (list, GDK_TARGET_STRING);  
+  gdk_content_formats_add (list, text_plain_utf8_atom);  
   if (!g_get_charset (NULL))
-    gtk_target_list_add (list, text_plain_locale_atom);  
-  gtk_target_list_add (list, text_plain_atom);  
+    gdk_content_formats_add (list, text_plain_locale_atom);  
+  gdk_content_formats_add (list, text_plain_atom);  
 }
 
 /**
- * gtk_target_list_add_rich_text_targets:
- * @list: a #GtkTargetList
+ * gtk_content_formats_add_rich_text_targets:
+ * @list: a #GdkContentFormats
  * @deserializable: if %TRUE, then deserializable rich text formats
  *                  will be added, serializable formats otherwise.
  * @buffer: a #GtkTextBuffer.
@@ -291,9 +293,9 @@ gtk_target_list_add_text_targets (GtkTargetList *list)
  * Since: 2.10
  **/
 void
-gtk_target_list_add_rich_text_targets (GtkTargetList  *list,
-                                       gboolean        deserializable,
-                                       GtkTextBuffer  *buffer)
+gtk_content_formats_add_rich_text_targets (GdkContentFormats *list,
+                                           gboolean           deserializable,
+                                           GtkTextBuffer     *buffer)
 {
   GdkAtom *atoms;
   gint     n_atoms;
@@ -308,14 +310,14 @@ gtk_target_list_add_rich_text_targets (GtkTargetList  *list,
     atoms = gtk_text_buffer_get_serialize_formats (buffer, &n_atoms);
 
   for (i = 0; i < n_atoms; i++)
-    gtk_target_list_add (list, atoms[i]);
+    gdk_content_formats_add (list, atoms[i]);
 
   g_free (atoms);
 }
 
 /**
- * gtk_target_list_add_image_targets:
- * @list: a #GtkTargetList
+ * gtk_content_formats_add_image_targets:
+ * @list: a #GdkContentFormats
  * @writable: whether to add only targets for which GTK+ knows
  *   how to convert a pixbuf into the format
  * 
@@ -325,8 +327,8 @@ gtk_target_list_add_rich_text_targets (GtkTargetList  *list,
  * Since: 2.6
  **/
 void 
-gtk_target_list_add_image_targets (GtkTargetList *list,
-                                  gboolean       writable)
+gtk_content_formats_add_image_targets (GdkContentFormats *list,
+                                      gboolean           writable)
 {
   GSList *formats, *f;
   gchar **mimes, **m;
@@ -365,7 +367,7 @@ gtk_target_list_add_image_targets (GtkTargetList *list,
       mimes = gdk_pixbuf_format_get_mime_types (fmt);
       for (m = mimes; *m; m++)
        {
-         gtk_target_list_add (list, *m);  
+         gdk_content_formats_add (list, *m);  
        }
       g_strfreev (mimes);
     }
@@ -374,8 +376,8 @@ gtk_target_list_add_image_targets (GtkTargetList *list,
 }
 
 /**
- * gtk_target_list_add_uri_targets:
- * @list: a #GtkTargetList
+ * gtk_content_formats_add_uri_targets:
+ * @list: a #GdkContentFormats
  * @info: an ID that will be passed back to the application
  * 
  * Appends the URI targets supported by #GtkSelectionData to
@@ -384,13 +386,13 @@ gtk_target_list_add_image_targets (GtkTargetList *list,
  * Since: 2.6
  **/
 void 
-gtk_target_list_add_uri_targets (GtkTargetList *list)
+gtk_content_formats_add_uri_targets (GdkContentFormats *list)
 {
   g_return_if_fail (list != NULL);
   
   init_atoms ();
 
-  gtk_target_list_add (list, text_uri_list_atom);  
+  gdk_content_formats_add (list, text_uri_list_atom);  
 }
 
 /**
@@ -532,10 +534,10 @@ typedef struct _GtkSelectionTargetList GtkSelectionTargetList;
 
 struct _GtkSelectionTargetList {
   GdkAtom selection;
-  GtkTargetList *list;
+  GdkContentFormats *list;
 };
 
-static GtkTargetList *
+static GdkContentFormats *
 gtk_selection_target_list_get (GtkWidget    *widget,
                               GdkAtom       selection)
 {
@@ -556,7 +558,7 @@ gtk_selection_target_list_get (GtkWidget    *widget,
 
   sellist = g_slice_new (GtkSelectionTargetList);
   sellist->selection = selection;
-  sellist->list = gtk_target_list_new (NULL, 0);
+  sellist->list = gdk_content_formats_new (NULL, 0);
 
   lists = g_list_prepend (lists, sellist);
   g_object_set_data (G_OBJECT (widget), I_(gtk_selection_handler_key), lists);
@@ -578,7 +580,7 @@ gtk_selection_target_list_remove (GtkWidget    *widget)
     {
       sellist = tmp_list->data;
 
-      gtk_target_list_unref (sellist->list);
+      gdk_content_formats_unref (sellist->list);
 
       g_slice_free (GtkSelectionTargetList, sellist);
       tmp_list = tmp_list->next;
@@ -618,7 +620,7 @@ gtk_selection_clear_targets (GtkWidget *widget,
       if (sellist->selection == selection)
        {
          lists = g_list_delete_link (lists, tmp_list);
-         gtk_target_list_unref (sellist->list);
+         gdk_content_formats_unref (sellist->list);
          g_slice_free (GtkSelectionTargetList, sellist);
 
          break;
@@ -644,13 +646,13 @@ gtk_selection_add_target (GtkWidget           *widget,
                          GdkAtom            selection,
                          GdkAtom            target)
 {
-  GtkTargetList *list;
+  GdkContentFormats *list;
 
   g_return_if_fail (GTK_IS_WIDGET (widget));
   g_return_if_fail (selection != NULL);
 
   list = gtk_selection_target_list_get (widget, selection);
-  gtk_target_list_add (list, target);
+  gdk_content_formats_add (list, target);
   gdk_selection_add_targets (gtk_widget_get_window (widget), selection, &target, 1);
 }
 
@@ -666,9 +668,9 @@ gtk_selection_add_target (GtkWidget     *widget,
 void 
 gtk_selection_add_targets (GtkWidget     *widget, 
                           GdkAtom        selection,
-                          GtkTargetList *targets)
+                          GdkContentFormats *targets)
 {
-  GtkTargetList *list;
+  GdkContentFormats *list;
   GdkAtom *atoms;
   guint n_targets;
 
@@ -677,9 +679,9 @@ gtk_selection_add_targets (GtkWidget     *widget,
   g_return_if_fail (targets != NULL);
   
   list = gtk_selection_target_list_get (widget, selection);
-  gtk_target_list_merge (list, targets);
+  gdk_content_formats_union (list, targets);
 
-  atoms = gtk_target_list_get_atoms (targets, &n_targets);
+  atoms = gdk_content_formats_get_atoms (targets, &n_targets);
   gdk_selection_add_targets (gtk_widget_get_window (widget), selection, atoms, n_targets);
   g_free (atoms);
 }
@@ -1697,7 +1699,7 @@ gtk_targets_include_text (GdkAtom *targets,
 
   g_return_val_if_fail (targets != NULL || n_targets == 0, FALSE);
 
-  /* Keep in sync with gtk_target_list_add_text_targets()
+  /* Keep in sync with gdk_content_formats_add_text_targets()
    */
  
   init_atoms ();
@@ -1858,23 +1860,23 @@ gtk_targets_include_image (GdkAtom *targets,
                           gint     n_targets,
                           gboolean writable)
 {
-  GtkTargetList *list;
+  GdkContentFormats *list;
   gint i;
   gboolean result = FALSE;
 
   g_return_val_if_fail (targets != NULL || n_targets == 0, FALSE);
 
-  list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_image_targets (list, writable);
+  list = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_image_targets (list, writable);
   for (i = 0; i < n_targets && !result; i++)
     {
-      if (gtk_target_list_find (list, targets[i]))
+      if (gdk_content_formats_contains (list, targets[i]))
         {
           result = TRUE;
           break;
        }
     }
-  gtk_target_list_unref (list);
+  gdk_content_formats_unref (list);
 
   return result;
 }
@@ -1937,7 +1939,7 @@ gtk_targets_include_uri (GdkAtom *targets,
 
   g_return_val_if_fail (targets != NULL || n_targets == 0, FALSE);
 
-  /* Keep in sync with gtk_target_list_add_uri_targets()
+  /* Keep in sync with gdk_content_formats_add_uri_targets()
    */
 
   init_atoms ();
@@ -2837,14 +2839,14 @@ gtk_selection_invoke_handler (GtkWidget        *widget,
                              GtkSelectionData *data,
                              guint             time)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
   g_return_if_fail (widget != NULL);
 
   target_list = gtk_selection_target_list_get (widget, data->selection);
   if (data->target != gtk_selection_atoms[SAVE_TARGETS] &&
       target_list &&
-      gtk_target_list_find (target_list, data->target))
+      gdk_content_formats_contains (target_list, data->target))
     {
       g_signal_emit_by_name (widget,
                             "selection-get",
@@ -2905,11 +2907,11 @@ gtk_selection_default_handler (GtkWidget        *widget,
       /* List of all targets supported for this widget/selection pair */
       GdkAtom *p, *atoms;
       guint count, i;
-      GtkTargetList *target_list;
+      GdkContentFormats *target_list;
       
       target_list = gtk_selection_target_list_get (widget,
                                                   data->selection);
-      atoms = gtk_target_list_get_atoms (target_list, &count);
+      atoms = gdk_content_formats_get_atoms (target_list, &count);
       
       data->type = GDK_SELECTION_TYPE_ATOM;
       data->format = 32;
@@ -2991,10 +2993,6 @@ G_DEFINE_BOXED_TYPE (GtkSelectionData, gtk_selection_data,
                      gtk_selection_data_copy,
                      gtk_selection_data_free)
 
-G_DEFINE_BOXED_TYPE (GtkTargetList, gtk_target_list,
-                     gtk_target_list_ref,
-                     gtk_target_list_unref)
-
 static int
 gtk_selection_bytes_per_item (gint format)
 {
diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h
index bc93e9c..3d24f01 100644
--- a/gtk/gtkselection.h
+++ b/gtk/gtkselection.h
@@ -37,16 +37,16 @@ G_BEGIN_DECLS
 #define GTK_TYPE_SELECTION_DATA (gtk_selection_data_get_type ())
 
 GDK_AVAILABLE_IN_ALL
-void           gtk_target_list_add_text_targets      (GtkTargetList  *list);
+void           gtk_content_formats_add_text_targets      (GdkContentFormats *list);
 GDK_AVAILABLE_IN_ALL
-void           gtk_target_list_add_rich_text_targets (GtkTargetList  *list,
-                                                      gboolean        deserializable,
-                                                      GtkTextBuffer  *buffer);
+void           gtk_content_formats_add_rich_text_targets (GdkContentFormats *list,
+                                                          gboolean           deserializable,
+                                                          GtkTextBuffer     *buffer);
 GDK_AVAILABLE_IN_ALL
-void           gtk_target_list_add_image_targets     (GtkTargetList  *list,
-                                                      gboolean        writable);
+void           gtk_content_formats_add_image_targets     (GdkContentFormats *list,
+                                                          gboolean           writable);
 GDK_AVAILABLE_IN_ALL
-void           gtk_target_list_add_uri_targets       (GtkTargetList  *list);
+void           gtk_content_formats_add_uri_targets       (GdkContentFormats *list);
 
 GDK_AVAILABLE_IN_ALL
 gboolean gtk_selection_owner_set             (GtkWidget  *widget,
@@ -65,7 +65,7 @@ void     gtk_selection_add_target    (GtkWidget            *widget,
 GDK_AVAILABLE_IN_ALL
 void     gtk_selection_add_targets   (GtkWidget            *widget,
                                       GdkAtom               selection,
-                                      GtkTargetList        *targets);
+                                      GdkContentFormats    *targets);
 GDK_AVAILABLE_IN_ALL
 void     gtk_selection_clear_targets (GtkWidget            *widget,
                                       GdkAtom               selection);
diff --git a/gtk/gtkselectionprivate.h b/gtk/gtkselectionprivate.h
index 9ada28f..72f748c 100644
--- a/gtk/gtkselectionprivate.h
+++ b/gtk/gtkselectionprivate.h
@@ -47,9 +47,6 @@ struct _GtkSelectionData
   GdkDisplay   *display;
 };
 
-GdkAtom *gtk_target_list_get_atoms      (GtkTargetList     *targets,
-                                         guint             *n_atoms);
-
 gboolean _gtk_selection_clear           (GtkWidget         *widget,
                                          GdkEventSelection *event);
 gboolean _gtk_selection_request         (GtkWidget         *widget,
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index c141c59..67d7c0e 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -56,8 +56,8 @@ typedef struct _GtkTextLogAttrCache GtkTextLogAttrCache;
 
 struct _GtkTextBufferPrivate
 {
-  GtkTargetList  *copy_target_list;
-  GtkTargetList  *paste_target_list;
+  GdkContentFormats  *copy_target_list;
+  GdkContentFormats  *paste_target_list;
 
   GtkTextTagTable *tag_table;
   GtkTextBTree *btree;
@@ -257,7 +257,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
       g_param_spec_boxed ("copy-target-list",
                           P_("Copy target list"),
                           P_("The list of targets this buffer supports for clipboard copying and DND 
source"),
-                          GTK_TYPE_TARGET_LIST,
+                          GDK_TYPE_CONTENT_FORMATS,
                           GTK_PARAM_READABLE);
 
   /**
@@ -272,7 +272,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
       g_param_spec_boxed ("paste-target-list",
                           P_("Paste target list"),
                           P_("The list of targets this buffer supports for clipboard pasting and DND 
destination"),
-                          GTK_TYPE_TARGET_LIST,
+                          GDK_TYPE_CONTENT_FORMATS,
                           GTK_PARAM_READABLE);
 
   g_object_class_install_properties (object_class, LAST_PROP, text_buffer_props);
@@ -3996,28 +3996,28 @@ gtk_text_buffer_free_target_lists (GtkTextBuffer *buffer)
 {
   GtkTextBufferPrivate *priv = buffer->priv;
 
-  g_clear_pointer (&priv->copy_target_list, gtk_target_list_unref);
-  g_clear_pointer (&priv->paste_target_list, gtk_target_list_unref);
+  g_clear_pointer (&priv->copy_target_list, gdk_content_formats_unref);
+  g_clear_pointer (&priv->paste_target_list, gdk_content_formats_unref);
 }
 
-static GtkTargetList *
+static GdkContentFormats *
 gtk_text_buffer_get_target_list (GtkTextBuffer   *buffer,
                                  gboolean         deserializable,
                                  gboolean         include_local)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
-  target_list = gtk_target_list_new (NULL, 0);
+  target_list = gdk_content_formats_new (NULL, 0);
 
   if (include_local)
-    gtk_target_list_add (target_list,
+    gdk_content_formats_add (target_list,
                          gdk_atom_intern_static_string ("GTK_TEXT_BUFFER_CONTENTS"));
 
-  gtk_target_list_add_rich_text_targets (target_list,
-                                         deserializable,
-                                         buffer);
+  gtk_content_formats_add_rich_text_targets (target_list,
+                                             deserializable,
+                                             buffer);
 
-  gtk_target_list_add_text_targets (target_list);
+  gtk_content_formats_add_text_targets (target_list);
 
   return target_list;
 }
@@ -4080,11 +4080,11 @@ cut_or_copy (GtkTextBuffer *buffer,
         }
       else
         {
-          GtkTargetList *list;
+          GdkContentFormats *list;
           
           list = gtk_text_buffer_get_target_list (buffer, FALSE, FALSE);
           gtk_clipboard_set_can_store (clipboard, list);
-          gtk_target_list_unref (list);
+          gdk_content_formats_unref (list);
         }
 
       if (delete_region_after)
@@ -4221,14 +4221,14 @@ gtk_text_buffer_end_user_action (GtkTextBuffer *buffer)
  * This function returns the list of targets this text buffer can
  * provide for copying and as DND source. The targets in the list are
  * added with @info values from the #GtkTextBufferTargetInfo enum,
- * using gtk_target_list_add_rich_text_targets() and
- * gtk_target_list_add_text_targets().
+ * using gdk_content_formats_add_rich_text_targets() and
+ * gdk_content_formats_add_text_targets().
  *
- * Returns: (transfer none): the #GtkTargetList
+ * Returns: (transfer none): the #GdkContentFormats
  *
  * Since: 2.10
  **/
-GtkTargetList *
+GdkContentFormats *
 gtk_text_buffer_get_copy_target_list (GtkTextBuffer *buffer)
 {
   GtkTextBufferPrivate *priv;
@@ -4251,14 +4251,14 @@ gtk_text_buffer_get_copy_target_list (GtkTextBuffer *buffer)
  * This function returns the list of targets this text buffer supports
  * for pasting and as DND destination. The targets in the list are
  * added with @info values from the #GtkTextBufferTargetInfo enum,
- * using gtk_target_list_add_rich_text_targets() and
- * gtk_target_list_add_text_targets().
+ * using gtk_content_formats_add_rich_text_targets() and
+ * gtk_content_formats_add_text_targets().
  *
- * Returns: (transfer none): the #GtkTargetList
+ * Returns: (transfer none): the #GdkContentFormats
  *
  * Since: 2.10
  **/
-GtkTargetList *
+GdkContentFormats *
 gtk_text_buffer_get_paste_target_list (GtkTextBuffer *buffer)
 {
   GtkTextBufferPrivate *priv;
diff --git a/gtk/gtktextbuffer.h b/gtk/gtktextbuffer.h
index 3183d3c..eab07b5 100644
--- a/gtk/gtktextbuffer.h
+++ b/gtk/gtktextbuffer.h
@@ -464,9 +464,9 @@ GDK_AVAILABLE_IN_ALL
 void            gtk_text_buffer_end_user_action         (GtkTextBuffer *buffer);
 
 GDK_AVAILABLE_IN_ALL
-GtkTargetList * gtk_text_buffer_get_copy_target_list    (GtkTextBuffer *buffer);
+GdkContentFormats * gtk_text_buffer_get_copy_target_list    (GtkTextBuffer *buffer);
 GDK_AVAILABLE_IN_ALL
-GtkTargetList * gtk_text_buffer_get_paste_target_list   (GtkTextBuffer *buffer);
+GdkContentFormats * gtk_text_buffer_get_paste_target_list   (GtkTextBuffer *buffer);
 
 
 G_END_DECLS
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 6e625b6..e6c5df7 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -1630,7 +1630,7 @@ static void
 gtk_text_view_init (GtkTextView *text_view)
 {
   GtkWidget *widget = GTK_WIDGET (text_view);
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
   GtkTextViewPrivate *priv;
   GtkStyleContext *context;
 
@@ -1660,9 +1660,9 @@ gtk_text_view_init (GtkTextView *text_view)
   gtk_drag_dest_set (widget, 0, NULL,
                      GDK_ACTION_COPY | GDK_ACTION_MOVE);
 
-  target_list = gtk_target_list_new (NULL, 0);
+  target_list = gdk_content_formats_new (NULL, 0);
   gtk_drag_dest_set_target_list (widget, target_list);
-  gtk_target_list_unref (target_list);
+  gdk_content_formats_unref (target_list);
 
   priv->virtual_cursor_x = -1;
   priv->virtual_cursor_y = -1;
@@ -7806,7 +7806,7 @@ gtk_text_view_start_selection_dnd (GtkTextView       *text_view,
                                    gint               x,
                                    gint               y)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
   target_list = gtk_text_buffer_get_copy_target_list (get_buffer (text_view));
 
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
index d5427b9..242397e 100644
--- a/gtk/gtktoolpalette.c
+++ b/gtk/gtktoolpalette.c
@@ -1458,7 +1458,7 @@ gtk_tool_palette_add_drag_dest (GtkToolPalette            *palette,
 {
   const char *entries[G_N_ELEMENTS (dnd_targets)];
   gint n_entries = 0;
-  GtkTargetList *list;
+  GdkContentFormats *list;
 
   g_return_if_fail (GTK_IS_TOOL_PALETTE (palette));
   g_return_if_fail (GTK_IS_WIDGET (widget));
@@ -1471,9 +1471,9 @@ gtk_tool_palette_add_drag_dest (GtkToolPalette            *palette,
   if (targets & GTK_TOOL_PALETTE_DRAG_GROUPS)
     entries[n_entries++] = dnd_targets[1];
 
-  list = gtk_target_list_new (entries, n_entries);
+  list = gdk_content_formats_new (entries, n_entries);
   gtk_drag_dest_set (widget, flags, list, actions);
-  gtk_target_list_unref (list);
+  gdk_content_formats_unref (list);
 }
 
 void
@@ -1571,7 +1571,7 @@ _gtk_tool_palette_child_set_drag_source (GtkWidget *child,
   if (GTK_IS_TOOL_ITEM (child) &&
       (palette->priv->drag_source & GTK_TOOL_PALETTE_DRAG_ITEMS))
     {
-      GtkTargetList *targets;
+      GdkContentFormats *targets;
 
       /* Connect to child instead of the item itself,
        * to work arround bug 510377.
@@ -1582,10 +1582,10 @@ _gtk_tool_palette_child_set_drag_source (GtkWidget *child,
       if (!child)
         return;
 
-      targets = gtk_target_list_new (&dnd_targets[0], 1);
+      targets = gdk_content_formats_new (&dnd_targets[0], 1);
       gtk_drag_source_set (child, GDK_BUTTON1_MASK | GDK_BUTTON3_MASK,
                            targets, GDK_ACTION_COPY | GDK_ACTION_MOVE);
-      gtk_target_list_unref (targets);
+      gdk_content_formats_unref (targets);
 
       g_signal_connect (child, "drag-data-get",
                         G_CALLBACK (gtk_tool_palette_item_drag_data_get),
@@ -1594,12 +1594,12 @@ _gtk_tool_palette_child_set_drag_source (GtkWidget *child,
   else if (GTK_IS_BUTTON (child) &&
            (palette->priv->drag_source & GTK_TOOL_PALETTE_DRAG_GROUPS))
     {
-      GtkTargetList *targets;
+      GdkContentFormats *targets;
 
-      targets = gtk_target_list_new (&dnd_targets[1], 1);
+      targets = gdk_content_formats_new (&dnd_targets[1], 1);
       gtk_drag_source_set (child, GDK_BUTTON1_MASK | GDK_BUTTON3_MASK,
                            targets, GDK_ACTION_COPY | GDK_ACTION_MOVE);
-      gtk_target_list_unref (targets);
+      gdk_content_formats_unref (targets);
 
       g_signal_connect (child, "drag-data-get",
                         G_CALLBACK (gtk_tool_palette_child_drag_data_get),
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 1606abe..31da0d8 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -292,11 +292,8 @@ typedef struct _TreeViewDragInfo TreeViewDragInfo;
 struct _TreeViewDragInfo
 {
   GdkModifierType start_button_mask;
-  GtkTargetList *_unused_source_target_list;
   GdkDragAction source_actions;
 
-  GtkTargetList *_unused_dest_target_list;
-
   guint source_set : 1;
   guint dest_set : 1;
 };
@@ -12545,17 +12542,18 @@ gtk_tree_view_set_reorderable (GtkTreeView *tree_view,
       const char *row_targets[] = {
         "GTK_TREE_MODEL_ROW"
       };
-      GtkTargetList *targets;
+      GdkContentFormats *formats;
 
-      targets = gtk_target_list_new (row_targets, G_N_ELEMENTS (row_targets));
+      formats = gdk_content_formats_new (row_targets, G_N_ELEMENTS (row_targets));
 
       gtk_tree_view_enable_model_drag_source (tree_view,
                                              GDK_BUTTON1_MASK,
-                                             targets,
+                                             formats,
                                              GDK_ACTION_MOVE);
       gtk_tree_view_enable_model_drag_dest (tree_view,
-                                           targets,
+                                           formats,
                                            GDK_ACTION_MOVE);
+      gdk_content_formats_unref (formats);
     }
   else
     {
@@ -13531,7 +13529,7 @@ unset_reorderable (GtkTreeView *tree_view)
  * gtk_tree_view_enable_model_drag_source:
  * @tree_view: a #GtkTreeView
  * @start_button_mask: Mask of allowed buttons to start drag
- * @targets: the targets that the drag will support
+ * @formats: the target formats that the drag will support
  * @actions: the bitmask of possible actions for a drag from this
  *    widget
  *
@@ -13539,10 +13537,10 @@ unset_reorderable (GtkTreeView *tree_view)
  * method sets #GtkTreeView:reorderable to %FALSE.
  **/
 void
-gtk_tree_view_enable_model_drag_source (GtkTreeView     *tree_view,
-                                       GdkModifierType  start_button_mask,
-                                       GtkTargetList   *targets,
-                                       GdkDragAction    actions)
+gtk_tree_view_enable_model_drag_source (GtkTreeView       *tree_view,
+                                       GdkModifierType    start_button_mask,
+                                       GdkContentFormats *formats,
+                                       GdkDragAction      actions)
 {
   TreeViewDragInfo *di;
 
@@ -13550,7 +13548,7 @@ gtk_tree_view_enable_model_drag_source (GtkTreeView     *tree_view,
 
   gtk_drag_source_set (GTK_WIDGET (tree_view),
                       0,
-                      targets,
+                      formats,
                       actions);
 
   di = ensure_info (tree_view);
@@ -13565,8 +13563,7 @@ gtk_tree_view_enable_model_drag_source (GtkTreeView     *tree_view,
 /**
  * gtk_tree_view_enable_model_drag_dest:
  * @tree_view: a #GtkTreeView
- * @targets: the targets that the drag will support
- * @n_targets: the number of items in @targets
+ * @formats: the target formats that the drag will support
  * @actions: the bitmask of possible actions for a drag from this
  *    widget
  * 
@@ -13574,9 +13571,9 @@ gtk_tree_view_enable_model_drag_source (GtkTreeView     *tree_view,
  * this method sets #GtkTreeView:reorderable to %FALSE.
  **/
 void
-gtk_tree_view_enable_model_drag_dest (GtkTreeView   *tree_view,
-                                     GtkTargetList *targets,
-                                     GdkDragAction  actions)
+gtk_tree_view_enable_model_drag_dest (GtkTreeView       *tree_view,
+                                     GdkContentFormats *formats,
+                                     GdkDragAction      actions)
 {
   TreeViewDragInfo *di;
 
@@ -13584,7 +13581,7 @@ gtk_tree_view_enable_model_drag_dest (GtkTreeView   *tree_view,
 
   gtk_drag_dest_set (GTK_WIDGET (tree_view),
                      0,
-                     targets,
+                     formats,
                      actions);
 
   di = ensure_info (tree_view);
diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h
index 147e568..c4c0879 100644
--- a/gtk/gtktreeview.h
+++ b/gtk/gtktreeview.h
@@ -382,11 +382,11 @@ gboolean               gtk_tree_view_is_blank_at_pos               (GtkTreeView
 GDK_AVAILABLE_IN_ALL
 void                   gtk_tree_view_enable_model_drag_source      (GtkTreeView               *tree_view,
                                                                    GdkModifierType            
start_button_mask,
-                                                                   GtkTargetList             *targets,
+                                                                   GdkContentFormats         *formats,
                                                                    GdkDragAction              actions);
 GDK_AVAILABLE_IN_ALL
 void                   gtk_tree_view_enable_model_drag_dest        (GtkTreeView               *tree_view,
-                                                                   GtkTargetList             *targets,
+                                                                   GdkContentFormats         *formats,
                                                                    GdkDragAction              actions);
 GDK_AVAILABLE_IN_ALL
 void                   gtk_tree_view_unset_rows_drag_source        (GtkTreeView               *tree_view);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 5021607..9144ce6 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1844,7 +1844,7 @@ gtk_window_init (GtkWindow *window)
   GtkWidget *widget;
   GtkCssNode *widget_node;
   GdkSeat *seat;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
 
   widget = GTK_WIDGET (window);
 
@@ -1906,12 +1906,12 @@ gtk_window_init (GtkWindow *window)
 
   priv->scale = gtk_widget_get_scale_factor (widget);
 
-  targets = gtk_target_list_new (dnd_dest_targets, G_N_ELEMENTS (dnd_dest_targets));
+  targets = gdk_content_formats_new (dnd_dest_targets, G_N_ELEMENTS (dnd_dest_targets));
   gtk_drag_dest_set (GTK_WIDGET (window),
                      GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
                      targets,
                      GDK_ACTION_MOVE);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   seat = gdk_display_get_default_seat (gtk_widget_get_display (widget));
   g_signal_connect (seat, "device-removed",
diff --git a/tests/testdnd.c b/tests/testdnd.c
index 0f2d541..d405fd8 100644
--- a/tests/testdnd.c
+++ b/tests/testdnd.c
@@ -490,13 +490,13 @@ popup_cb (gpointer data)
          GtkWidget *button;
          GtkWidget *grid;
          int i, j;
-          GtkTargetList *targets;
+          GdkContentFormats *targets;
          
          popup_window = gtk_window_new (GTK_WINDOW_POPUP);
          gtk_window_set_position (GTK_WINDOW (popup_window), GTK_WIN_POS_MOUSE);
 
          grid = gtk_grid_new ();
-          targets = gtk_target_list_new (target_table, n_targets - 1); /* no rootwin */
+          targets = gdk_content_formats_new (target_table, n_targets - 1); /* no rootwin */
 
          for (i=0; i<3; i++)
            for (j=0; j<3; j++)
@@ -518,7 +518,7 @@ popup_cb (gpointer data)
                                  G_CALLBACK (popup_leave), NULL);
              }
          gtk_container_add (GTK_CONTAINER (popup_window), grid);
-          gtk_target_list_unref (targets);
+          gdk_content_formats_unref (targets);
 
        }
       gtk_widget_show (popup_window);
@@ -582,7 +582,7 @@ main (int argc, char **argv)
   GtkWidget *pixmap;
   GtkWidget *button;
   GdkPixbuf *drag_icon;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
 
   test_init ();
   
@@ -602,7 +602,7 @@ main (int argc, char **argv)
   
   label = gtk_label_new ("Drop Here\n");
 
-  targets = gtk_target_list_new (target_table, n_targets - 1); /* no rootwin */
+  targets = gdk_content_formats_new (target_table, n_targets - 1); /* no rootwin */
   gtk_drag_dest_set (label,
                     GTK_DEST_DEFAULT_ALL,
                      targets,
@@ -630,7 +630,7 @@ main (int argc, char **argv)
                    G_CALLBACK (popsite_motion), NULL);
   g_signal_connect (label, "drag_leave",
                    G_CALLBACK (popsite_leave), NULL);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
   
   pixmap = gtk_image_new_from_pixbuf (trashcan_closed);
   gtk_drag_dest_set (pixmap, 0, NULL, 0);
@@ -654,12 +654,12 @@ main (int argc, char **argv)
 
   button = gtk_button_new_with_label ("Drag Here\n");
 
-  targets = gtk_target_list_new (target_table, n_targets);
+  targets = gdk_content_formats_new (target_table, n_targets);
   gtk_drag_source_set (button, GDK_BUTTON1_MASK | GDK_BUTTON3_MASK,
                        targets,
                       GDK_ACTION_COPY | GDK_ACTION_MOVE);
   gtk_drag_source_set_icon_pixbuf (button, drag_icon);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   g_object_unref (drag_icon);
 
diff --git a/tests/testdnd2.c b/tests/testdnd2.c
index 2d06f9d..489ade0 100644
--- a/tests/testdnd2.c
+++ b/tests/testdnd2.c
@@ -120,32 +120,32 @@ window_drag_begin (GtkWidget      *widget,
 static void
 update_source_target_list (GtkWidget *image)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
-  target_list = gtk_target_list_new (NULL, 0);
+  target_list = gdk_content_formats_new (NULL, 0);
 
-  gtk_target_list_add_image_targets (target_list, FALSE);
+  gtk_content_formats_add_image_targets (target_list, FALSE);
   if (gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_ICON_NAME)
-    gtk_target_list_add_text_targets (target_list);
+    gtk_content_formats_add_text_targets (target_list);
 
   gtk_drag_source_set_target_list (image, target_list);
 
-  gtk_target_list_unref (target_list);
+  gdk_content_formats_unref (target_list);
 }
 
 static void
 update_dest_target_list (GtkWidget *image)
 {
-  GtkTargetList *target_list;
+  GdkContentFormats *target_list;
 
-  target_list = gtk_target_list_new (NULL, 0);
+  target_list = gdk_content_formats_new (NULL, 0);
 
-  gtk_target_list_add_image_targets (target_list, FALSE);
-  gtk_target_list_add_text_targets (target_list);
+  gtk_content_formats_add_image_targets (target_list, FALSE);
+  gtk_content_formats_add_text_targets (target_list);
 
   gtk_drag_dest_set_target_list (image, target_list);
 
-  gtk_target_list_unref (target_list);
+  gdk_content_formats_unref (target_list);
 }
 
 void
diff --git a/tests/testentryicons.c b/tests/testentryicons.c
index d907c99..a3667c0 100644
--- a/tests/testentryicons.c
+++ b/tests/testentryicons.c
@@ -105,7 +105,7 @@ main (int argc, char **argv)
   GtkWidget *button3;
   GtkWidget *button4;
   GIcon *icon;
-  GtkTargetList *tlist;
+  GdkContentFormats *tlist;
 
   gtk_init ();
 
@@ -166,8 +166,8 @@ main (int argc, char **argv)
   gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry),
                                   GTK_ENTRY_ICON_PRIMARY,
                                   "Save a file");
-  tlist = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_text_targets (tlist);
+  tlist = gdk_content_formats_new (NULL, 0);
+  gtk_content_formats_add_text_targets (tlist);
   gtk_entry_set_icon_drag_source (GTK_ENTRY (entry),
                                   GTK_ENTRY_ICON_PRIMARY,
                                   tlist, GDK_ACTION_COPY); 
@@ -175,7 +175,7 @@ main (int argc, char **argv)
                           G_CALLBACK (drag_begin_cb), NULL);
   g_signal_connect (entry, "drag-data-get", 
                     G_CALLBACK (drag_data_get_cb), NULL);
-  gtk_target_list_unref (tlist);
+  gdk_content_formats_unref (tlist);
 
   /*
    * Search - Uses a helper function
diff --git a/tests/testiconview.c b/tests/testiconview.c
index d2caf6e..2265c0b 100644
--- a/tests/testiconview.c
+++ b/tests/testiconview.c
@@ -425,7 +425,7 @@ main (gint argc, gchar **argv)
   GtkTreeModel *model;
   GtkCellRenderer *cell;
   GtkTreeViewColumn *tvc;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
   
 #ifdef GTK_SRCDIR
   g_chdir (GTK_SRCDIR);
@@ -528,7 +528,7 @@ main (gint argc, gchar **argv)
 #endif
   /* Allow DND between the icon view and the tree view */
   
-  targets = gtk_target_list_new (item_targets, G_N_ELEMENTS (item_targets));
+  targets = gdk_content_formats_new (item_targets, G_N_ELEMENTS (item_targets));
   gtk_icon_view_enable_model_drag_source (GTK_ICON_VIEW (icon_list),
                                          GDK_BUTTON1_MASK,
                                           targets,
@@ -544,7 +544,7 @@ main (gint argc, gchar **argv)
   gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (tv),
                                         targets,
                                        GDK_ACTION_MOVE);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
                              
   scrolled_window = gtk_scrolled_window_new (NULL, NULL);
   gtk_container_add (GTK_CONTAINER (scrolled_window), icon_list);
diff --git a/tests/testkineticscrolling.c b/tests/testkineticscrolling.c
index e946e8d..d6e9dde 100644
--- a/tests/testkineticscrolling.c
+++ b/tests/testkineticscrolling.c
@@ -21,7 +21,7 @@ kinetic_scrolling (void)
   GtkCellRenderer *renderer;
   GtkListStore *store;
   GtkWidget *textview;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
   gint i;
 
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -71,7 +71,7 @@ kinetic_scrolling (void)
   gtk_widget_show (swindow);
 
   treeview = gtk_tree_view_new ();
-  targets = gtk_target_list_new (row_targets, G_N_ELEMENTS (row_targets));
+  targets = gdk_content_formats_new (row_targets, G_N_ELEMENTS (row_targets));
   gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (treeview),
                                           GDK_BUTTON1_MASK,
                                           targets,
@@ -79,7 +79,7 @@ kinetic_scrolling (void)
   gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (treeview),
                                         targets,
                                         GDK_ACTION_MOVE | GDK_ACTION_COPY);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   renderer = gtk_cell_renderer_text_new ();
   g_object_set (renderer, "editable", TRUE, NULL);
diff --git a/tests/testlist3.c b/tests/testlist3.c
index 9683b96..d4ef538 100644
--- a/tests/testlist3.c
+++ b/tests/testlist3.c
@@ -81,7 +81,7 @@ static GtkWidget *
 create_row (const gchar *text)
 {
   GtkWidget *row, *box, *label, *image;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
 
   row = gtk_list_box_row_new (); 
   image = gtk_image_new_from_icon_name ("open-menu-symbolic");
@@ -93,7 +93,7 @@ create_row (const gchar *text)
   gtk_container_add (GTK_CONTAINER (box), label);
   gtk_container_add (GTK_CONTAINER (box), image);
 
-  targets = gtk_target_list_new (entries, 1);
+  targets = gdk_content_formats_new (entries, 1);
 
   gtk_drag_source_set (image, GDK_BUTTON1_MASK, targets, GDK_ACTION_MOVE);
   g_signal_connect (image, "drag-begin", G_CALLBACK (drag_begin), NULL);
@@ -102,7 +102,7 @@ create_row (const gchar *text)
   gtk_drag_dest_set (row, GTK_DEST_DEFAULT_ALL, targets, GDK_ACTION_MOVE);
   g_signal_connect (row, "drag-data-received", G_CALLBACK (drag_data_received), NULL);
 
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   return row;
 }
diff --git a/tests/testnotebookdnd.c b/tests/testnotebookdnd.c
index 72f1dd9..6c4c2ad 100644
--- a/tests/testnotebookdnd.c
+++ b/tests/testnotebookdnd.c
@@ -286,17 +286,17 @@ create_notebook_with_notebooks (gchar           **labels,
 static GtkWidget*
 create_trash_button (void)
 {
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
   GtkWidget *button;
 
   button = gtk_button_new_with_mnemonic ("_Delete");
 
-  targets = gtk_target_list_new (button_targets, G_N_ELEMENTS (button_targets));
+  targets = gdk_content_formats_new (button_targets, G_N_ELEMENTS (button_targets));
   gtk_drag_dest_set (button,
                      GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
                      targets,
                      GDK_ACTION_MOVE);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   g_signal_connect_after (G_OBJECT (button), "drag-data-received",
                           G_CALLBACK (on_button_drag_data_received), NULL);
diff --git a/tests/testselection.c b/tests/testselection.c
index 0634ab2..f77f490 100644
--- a/tests/testselection.c
+++ b/tests/testselection.c
@@ -390,7 +390,7 @@ main (int argc, char *argv[])
     "COMPOUND_TEXT"
   };
   static gint ntargets = sizeof(targetlist) / sizeof(targetlist[0]);
-  GtkTargetList *list;
+  GdkContentFormats *list;
   
   gtk_init ();
 
@@ -422,9 +422,9 @@ main (int argc, char *argv[])
   g_signal_connect (selection_widget, "selection_received",
                    G_CALLBACK (selection_received), NULL);
 
-  list = gtk_target_list_new (targetlist, ntargets);
+  list = gdk_content_formats_new (targetlist, ntargets);
   gtk_selection_add_targets (selection_widget, GDK_SELECTION_PRIMARY, list);
-  gtk_target_list_unref (list);
+  gdk_content_formats_unref (list);
 
   g_signal_connect (selection_widget, "selection_get",
                    G_CALLBACK (selection_get), NULL);
diff --git a/tests/testtoolbar.c b/tests/testtoolbar.c
index 6de5a20..9eb3b61 100644
--- a/tests/testtoolbar.c
+++ b/tests/testtoolbar.c
@@ -441,7 +441,7 @@ main (gint argc, gchar **argv)
   GtkWidget *window, *toolbar, *grid, *treeview, *scrolled_window;
   GtkWidget *hbox, *hbox1, *hbox2, *checkbox, *option_menu, *menu;
   gint i;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
   static const gchar *toolbar_styles[] = { "icons", "text", "both (vertical)",
                                           "both (horizontal)" };
   GtkToolItem *item;
@@ -662,14 +662,14 @@ main (gint argc, gchar **argv)
 
   gtk_box_pack_end (GTK_BOX (hbox), checkbox);
 
-  targets = gtk_target_list_new (target_table, G_N_ELEMENTS (target_table));
+  targets = gdk_content_formats_new (target_table, G_N_ELEMENTS (target_table));
   gtk_drag_source_set (button, GDK_BUTTON1_MASK,
                        targets,
                       GDK_ACTION_MOVE);
   gtk_drag_dest_set (toolbar, GTK_DEST_DEFAULT_DROP,
                      targets,
                     GDK_ACTION_MOVE);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
   g_signal_connect (toolbar, "drag_motion",
                    G_CALLBACK (toolbar_drag_motion), NULL);
   g_signal_connect (toolbar, "drag_leave",
diff --git a/tests/testtreecolumns.c b/tests/testtreecolumns.c
index 4c5bb2d..148752b 100644
--- a/tests/testtreecolumns.c
+++ b/tests/testtreecolumns.c
@@ -718,7 +718,7 @@ main (int argc, char *argv[])
   GtkCellRenderer *cell;
   GtkWidget *swindow;
   GtkTreeModel *sample_model;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
   gint i;
 
   gtk_init ();
@@ -864,7 +864,7 @@ main (int argc, char *argv[])
 
 
   /* Drag and Drop */
-  targets = gtk_target_list_new (row_targets, G_N_ELEMENTS (row_targets));
+  targets = gdk_content_formats_new (row_targets, G_N_ELEMENTS (row_targets));
   gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (left_tree_view),
                                          GDK_BUTTON1_MASK,
                                           targets,
@@ -888,7 +888,7 @@ main (int argc, char *argv[])
   gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (bottom_right_tree_view),
                                        targets,
                                        GDK_ACTION_MOVE);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
 
diff --git a/tests/testtreednd.c b/tests/testtreednd.c
index 25bf233..4f7c322 100644
--- a/tests/testtreednd.c
+++ b/tests/testtreednd.c
@@ -73,7 +73,7 @@ get_dragsource (void)
   GtkTreeView *tv;
   GtkCellRenderer *renderer;
   GtkTreeViewColumn *column;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
 
   tv = (GtkTreeView*) gtk_tree_view_new ();
   renderer = gtk_cell_renderer_text_new ();
@@ -81,9 +81,9 @@ get_dragsource (void)
   gtk_tree_view_append_column (tv, column);
 
   gtk_tree_view_set_model (tv, get_model ());
-  targets = gtk_target_list_new (entries, G_N_ELEMENTS (entries));
+  targets = gdk_content_formats_new (entries, G_N_ELEMENTS (entries));
   gtk_tree_view_enable_model_drag_source (tv, GDK_BUTTON1_MASK, targets, GDK_ACTION_COPY);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   return GTK_WIDGET (tv);
 }
@@ -107,13 +107,13 @@ static GtkWidget *
 get_droptarget (void)
 {
   GtkWidget *label;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
 
   label = gtk_label_new ("Drop here");
-  targets = gtk_target_list_new (entries, G_N_ELEMENTS (entries));
+  targets = gdk_content_formats_new (entries, G_N_ELEMENTS (entries));
   gtk_drag_dest_set (label, GTK_DEST_DEFAULT_ALL, targets, GDK_ACTION_COPY);
   g_signal_connect (label, "drag-data-received", G_CALLBACK (drag_data_received), NULL);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
 
   return label;
 }
diff --git a/tests/testtreeview.c b/tests/testtreeview.c
index 7215dfa..37735cd 100644
--- a/tests/testtreeview.c
+++ b/tests/testtreeview.c
@@ -655,7 +655,7 @@ main (int    argc,
   GtkWidget *box;
   GtkWidget *combo_box;
   GtkTreeModel *model;
-  GtkTargetList *targets;
+  GdkContentFormats *targets;
   gint i;
   
   gtk_init ();
@@ -697,7 +697,7 @@ main (int    argc,
   tv = gtk_tree_view_new_with_model (models[0]);
   g_signal_connect (tv, "row-activated", G_CALLBACK (on_row_activated), NULL);
 
-  targets = gtk_target_list_new (row_targets, G_N_ELEMENTS (row_targets));
+  targets = gdk_content_formats_new (row_targets, G_N_ELEMENTS (row_targets));
   gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (tv),
                                          GDK_BUTTON1_MASK,
                                           targets,
@@ -706,7 +706,7 @@ main (int    argc,
   gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (tv),
                                         targets,
                                        GDK_ACTION_MOVE | GDK_ACTION_COPY);
-  gtk_target_list_unref (targets);
+  gdk_content_formats_unref (targets);
   
   /* Model menu */
   combo_box = gtk_combo_box_text_new ();
diff --git a/testsuite/gtk/clipboard.c b/testsuite/gtk/clipboard.c
index 8e0f412..4f4d240 100644
--- a/testsuite/gtk/clipboard.c
+++ b/testsuite/gtk/clipboard.c
@@ -67,11 +67,11 @@ test_with_data (void)
 {
     GtkClipboard *clipboard = gtk_clipboard_get_for_display (gdk_display_get_default (), 
GDK_SELECTION_CLIPBOARD);
     const char *entries[] = { TARGET_TEXT };
-    GtkTargetList *targets;
+    GdkContentFormats *targets;
 
-    targets = gtk_target_list_new (entries, G_N_ELEMENTS(entries));
+    targets = gdk_content_formats_new (entries, G_N_ELEMENTS(entries));
     gtk_clipboard_set_with_data (clipboard, targets, test_with_data_get, NULL, NULL);
-    gtk_target_list_unref (targets);
+    gdk_content_formats_unref (targets);
     gtk_clipboard_request_contents (clipboard, gdk_atom_intern (TARGET_TEXT, FALSE), test_with_data_got, 
NULL);
 }
 



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