summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2020-02-22 23:15:25 +0100
committerBenjamin Otte <otte@redhat.com>2020-02-23 01:59:26 +0100
commit28dced597f4b5d6893288fe45e7f9ab60ed37047 (patch)
tree48131fcc182be9a7988131bd914f8861508a3a36
parent6c61c7bf0bd70f16293d843f7820e5f7013c9ad9 (diff)
downloadgtk+-28dced597f4b5d6893288fe45e7f9ab60ed37047.tar.gz
gdk: Remove gdk_text_property_to_utf8_list_for_display()
A lot of files became empty now, so they have been removed, which makes this commit seem larger than it is.
-rw-r--r--docs/reference/gdk/gdk4-docs.xml1
-rw-r--r--docs/reference/gdk/gdk4-sections.txt7
-rw-r--r--gdk/broadway/gdkdisplay-broadway.c1
-rw-r--r--gdk/broadway/gdkdnd-broadway.c1
-rw-r--r--gdk/broadway/gdkprivate-broadway.h6
-rw-r--r--gdk/broadway/gdkselection-broadway.c137
-rw-r--r--gdk/broadway/meson.build1
-rw-r--r--gdk/gdk.h1
-rw-r--r--gdk/gdkdisplayprivate.h7
-rw-r--r--gdk/gdkproperty.c57
-rw-r--r--gdk/gdkproperty.h48
-rw-r--r--gdk/gdkselection.c63
-rw-r--r--gdk/meson.build3
-rw-r--r--gdk/quartz/gdkdisplay-quartz.c1
-rw-r--r--gdk/quartz/gdkdisplay-quartz.h6
-rw-r--r--gdk/quartz/gdkselection-quartz.c98
-rw-r--r--gdk/wayland/gdkdisplay-wayland.c1
-rw-r--r--gdk/wayland/gdkdrag-wayland.c1
-rw-r--r--gdk/wayland/gdkdrop-wayland.c1
-rw-r--r--gdk/wayland/gdkprivate-wayland.h7
-rw-r--r--gdk/wayland/gdkselection-wayland.c75
-rw-r--r--gdk/wayland/meson.build1
-rw-r--r--gdk/win32/gdkclipdrop-win32.c102
-rw-r--r--gdk/win32/gdkdisplay-win32.c1
-rw-r--r--gdk/win32/gdkdrag-win32.c1
-rw-r--r--gdk/win32/gdkdrop-win32.c1
-rw-r--r--gdk/win32/gdkprivate-win32.h6
-rw-r--r--gdk/win32/gdkproperty-win32.c1
-rw-r--r--gdk/x11/gdkdisplay-x11.c1
-rw-r--r--gdk/x11/gdkdrag-x11.c1
-rw-r--r--gdk/x11/gdkdrop-x11.c1
-rw-r--r--gdk/x11/gdkproperty-x11.c1
-rw-r--r--gdk/x11/gdkselection-x11.c1
33 files changed, 0 insertions, 641 deletions
diff --git a/docs/reference/gdk/gdk4-docs.xml b/docs/reference/gdk/gdk4-docs.xml
index 31dd72f96c..74fe5df718 100644
--- a/docs/reference/gdk/gdk4-docs.xml
+++ b/docs/reference/gdk/gdk4-docs.xml
@@ -44,7 +44,6 @@
<xi:include href="xml/gdkcontentprovider.xml" />
<xi:include href="xml/gdkcontentserializer.xml" />
<xi:include href="xml/gdkcontentdeserializer.xml" />
- <xi:include href="xml/properties.xml" />
<xi:include href="xml/gdkapplaunchcontext.xml" />
<xi:include href="xml/pixbufs.xml" />
<xi:include href="xml/pango_interaction.xml" />
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index c2702348f4..c6814e2c7c 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -348,13 +348,6 @@ gdk_content_formats_builder_get_type
</SECTION>
<SECTION>
-<TITLE>Properties and Atoms</TITLE>
-<FILE>properties</FILE>
-GdkAtom
-gdk_text_property_to_utf8_list_for_display
-</SECTION>
-
-<SECTION>
<TITLE>Pango Interaction</TITLE>
<FILE>pango_interaction</FILE>
gdk_pango_layout_get_clip_region
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c
index f35d3f56ef..f5b3d4145b 100644
--- a/gdk/broadway/gdkdisplay-broadway.c
+++ b/gdk/broadway/gdkdisplay-broadway.c
@@ -428,7 +428,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete;
display_class->create_surface = _gdk_broadway_display_create_surface;
display_class->get_keymap = _gdk_broadway_display_get_keymap;
- display_class->text_property_to_utf8_list = _gdk_broadway_display_text_property_to_utf8_list;
display_class->get_n_monitors = gdk_broadway_display_get_n_monitors;
display_class->get_monitor = gdk_broadway_display_get_monitor;
diff --git a/gdk/broadway/gdkdnd-broadway.c b/gdk/broadway/gdkdnd-broadway.c
index f672d26ed8..04db887b26 100644
--- a/gdk/broadway/gdkdnd-broadway.c
+++ b/gdk/broadway/gdkdnd-broadway.c
@@ -27,7 +27,6 @@
#include "gdkdragprivate.h"
#include "gdksurfaceprivate.h"
-#include "gdkproperty.h"
#include "gdkprivate-broadway.h"
#include "gdkinternals.h"
#include "gdkdisplay-broadway.h"
diff --git a/gdk/broadway/gdkprivate-broadway.h b/gdk/broadway/gdkprivate-broadway.h
index 8e8d781333..f4f19cd534 100644
--- a/gdk/broadway/gdkprivate-broadway.h
+++ b/gdk/broadway/gdkprivate-broadway.h
@@ -113,12 +113,6 @@ GdkSurface * _gdk_broadway_display_create_surface (GdkDisplay *display,
int y,
int width,
int height);
-gint _gdk_broadway_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
GdkKeymap* _gdk_broadway_display_get_keymap (GdkDisplay *display);
void _gdk_broadway_display_consume_all_input (GdkDisplay *display);
BroadwayInputMsg * _gdk_broadway_display_block_for_input (GdkDisplay *display,
diff --git a/gdk/broadway/gdkselection-broadway.c b/gdk/broadway/gdkselection-broadway.c
deleted file mode 100644
index 6eb82f1e5c..0000000000
--- a/gdk/broadway/gdkselection-broadway.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * 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
- * 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/>.
- */
-
-/*
- * 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/.
- */
-
-#include "config.h"
-
-#include "gdkproperty.h"
-#include "gdkprivate-broadway.h"
-#include "gdkdisplay-broadway.h"
-
-#include <string.h>
-
-
-static gint
-make_list (const gchar *text,
- gint length,
- gboolean latin1,
- gchar ***list)
-{
- GSList *strings = NULL;
- gint n_strings = 0;
- gint i;
- const gchar *p = text;
- const gchar *q;
- GSList *tmp_list;
- GError *error = NULL;
-
- while (p < text + length)
- {
- gchar *str;
-
- q = p;
- while (*q && q < text + length)
- q++;
-
- if (latin1)
- {
- str = g_convert (p, q - p,
- "UTF-8", "ISO-8859-1",
- NULL, NULL, &error);
-
- if (!str)
- {
- g_warning ("Error converting selection from STRING: %s",
- error->message);
- g_error_free (error);
- }
- }
- else
- {
- str = g_strndup (p, q - p);
- if (!g_utf8_validate (str, -1, NULL))
- {
- g_warning ("Error converting selection from UTF8_STRING");
- g_free (str);
- str = NULL;
- }
- }
-
- if (str)
- {
- strings = g_slist_prepend (strings, str);
- n_strings++;
- }
-
- p = q + 1;
- }
-
- if (list)
- {
- *list = g_new (gchar *, n_strings + 1);
- (*list)[n_strings] = NULL;
- }
-
- i = n_strings;
- tmp_list = strings;
- while (tmp_list)
- {
- if (list)
- (*list)[--i] = tmp_list->data;
- else
- g_free (tmp_list->data);
-
- tmp_list = tmp_list->next;
- }
-
- g_slist_free (strings);
-
- return n_strings;
-}
-
-gint
-_gdk_broadway_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list)
-{
- g_return_val_if_fail (text != NULL, 0);
- g_return_val_if_fail (length >= 0, 0);
- g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
-
- if (encoding == g_intern_static_string ("STRING"))
- {
- return make_list ((gchar *)text, length, TRUE, list);
- }
- else if (encoding == g_intern_static_string ("UTF8_STRING"))
- {
- return make_list ((gchar *)text, length, FALSE, list);
- }
-
- if (list)
- *list = NULL;
- return 0;
-}
-
diff --git a/gdk/broadway/meson.build b/gdk/broadway/meson.build
index c9aa9314f0..57bff27cae 100644
--- a/gdk/broadway/meson.build
+++ b/gdk/broadway/meson.build
@@ -13,7 +13,6 @@ gdk_broadway_sources = files([
'gdkglobals-broadway.c',
'gdkkeys-broadway.c',
'gdkmonitor-broadway.c',
- 'gdkselection-broadway.c',
'gdksurface-broadway.c',
])
diff --git a/gdk/gdk.h b/gdk/gdk.h
index a537ed341f..bba82173f3 100644
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -60,7 +60,6 @@
#include <gdk/gdkpaintable.h>
#include <gdk/gdkpango.h>
#include <gdk/gdkpixbuf.h>
-#include <gdk/gdkproperty.h>
#include <gdk/gdkrectangle.h>
#include <gdk/gdkrgba.h>
#include <gdk/gdkseat.h>
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index f20f79855e..433f699f40 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -150,13 +150,6 @@ struct _GdkDisplayClass
GdkKeymap * (*get_keymap) (GdkDisplay *display);
- gint (*text_property_to_utf8_list) (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
-
gboolean (*make_gl_context_current) (GdkDisplay *display,
GdkGLContext *context);
diff --git a/gdk/gdkproperty.c b/gdk/gdkproperty.c
deleted file mode 100644
index c43f13e590..0000000000
--- a/gdk/gdkproperty.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 2000 Red Hat, Inc.
- * 2005 Imendio AB
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * 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
- * 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/>.
- */
-
-#include "config.h"
-
-#include "gdkproperty.h"
-
-#include "gdkinternals.h"
-
-/**
- * SECTION:properties
- * @Short_description: Functions to manipulate properties on windows
- * @Title: Properties and Atoms
- *
- * Each window under X can have any number of associated
- * “properties” attached to it.
- * Properties are arbitrary chunks of data identified by
- * “atom”s. (An “atom”
- * is a numeric index into a string table on the X server. They are used
- * to transfer strings efficiently between clients without
- * having to transfer the entire string.) A property
- * has an associated type, which is also identified
- * using an atom.
- *
- * A property has an associated “format”,
- * an integer describing how many bits are in each unit
- * of data inside the property. It must be 8, 16, or 32.
- * When data is transferred between the server and client,
- * if they are of different endianesses it will be byteswapped
- * as necessary according to the format of the property.
- * Note that on the client side, properties of format 32
- * will be stored with one unit per long,
- * even if a long integer has more than 32 bits on the platform.
- * (This decision was apparently made for Xlib to maintain
- * compatibility with programs that assumed longs were 32
- * bits, at the expense of programs that knew better.)
- *
- * The functions in this section are used to add, remove
- * and change properties on windows, to convert atoms
- * to and from strings and to manipulate some types of
- * data commonly stored in X window properties.
- */
diff --git a/gdk/gdkproperty.h b/gdk/gdkproperty.h
deleted file mode 100644
index 0ff5139a03..0000000000
--- a/gdk/gdkproperty.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * 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
- * 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/>.
- */
-
-/*
- * 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 __GDK_PROPERTY_H__
-#define __GDK_PROPERTY_H__
-
-#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
-#error "Only <gdk/gdk.h> can be included directly."
-#endif
-
-#include <gdk/gdktypes.h>
-#include <gdk/gdkversionmacros.h>
-
-G_BEGIN_DECLS
-
-
-GDK_AVAILABLE_IN_ALL
-gint gdk_text_property_to_utf8_list_for_display (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
-
-G_END_DECLS
-
-#endif /* __GDK_PROPERTY_H__ */
diff --git a/gdk/gdkselection.c b/gdk/gdkselection.c
deleted file mode 100644
index 6905110e69..0000000000
--- a/gdk/gdkselection.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * 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
- * 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/>.
- */
-
-/*
- * 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/.
- */
-
-#include "config.h"
-
-#include "gdkproperty.h"
-
-#include "gdkdisplayprivate.h"
-
-
-/**
- * gdk_text_property_to_utf8_list_for_display:
- * @display: a #GdkDisplay
- * @encoding: an atom representing the encoding of the text
- * @format: the format of the property
- * @text: (array length=length): the text to convert
- * @length: the length of @text, in bytes
- * @list: (out) (array zero-terminated=1): location to store the list
- * of strings or %NULL. The list should be freed with
- * g_strfreev().
- *
- * Converts a text property in the given encoding to
- * a list of UTF-8 strings.
- *
- * Returns: the number of strings in the resulting list
- */
-gint
-gdk_text_property_to_utf8_list_for_display (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list)
-{
- g_return_val_if_fail (text != NULL, 0);
- g_return_val_if_fail (length >= 0, 0);
- g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
-
- return GDK_DISPLAY_GET_CLASS (display)
- ->text_property_to_utf8_list (display, encoding, format, text, length, list);
-}
-
diff --git a/gdk/meson.build b/gdk/meson.build
index af04354d88..1df3b60e74 100644
--- a/gdk/meson.build
+++ b/gdk/meson.build
@@ -35,12 +35,10 @@ gdk_public_sources = files([
'gdkpango.c',
'gdkpixbuf-drawable.c',
'gdkpipeiostream.c',
- 'gdkproperty.c',
'gdkrectangle.c',
'gdkrgba.c',
'gdkseat.c',
'gdkseatdefault.c',
- 'gdkselection.c',
'gdksnapshot.c',
'gdktexture.c',
'gdkvulkancontext.c',
@@ -82,7 +80,6 @@ gdk_public_headers = files([
'gdkpaintable.h',
'gdkpango.h',
'gdkpixbuf.h',
- 'gdkproperty.h',
'gdkrectangle.h',
'gdkrgba.h',
'gdkseat.h',
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index bf165e252c..300d9d8481 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -230,7 +230,6 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
display_class->event_data_free = _gdk_quartz_display_event_data_free;
display_class->create_surface_impl = _gdk_quartz_display_create_surface_impl;
display_class->get_keymap = _gdk_quartz_display_get_keymap;
- display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list;
display_class->get_n_monitors = gdk_quartz_display_get_n_monitors;
display_class->get_monitor = gdk_quartz_display_get_monitor;
display_class->get_setting = gdk_quartz_display_get_setting;
diff --git a/gdk/quartz/gdkdisplay-quartz.h b/gdk/quartz/gdkdisplay-quartz.h
index 8e5543be4c..7d6923738b 100644
--- a/gdk/quartz/gdkdisplay-quartz.h
+++ b/gdk/quartz/gdkdisplay-quartz.h
@@ -70,12 +70,6 @@ void _gdk_quartz_display_create_surface_impl (GdkDisplay *display,
/* Display methods - keymap */
GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
-gint _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
G_END_DECLS
diff --git a/gdk/quartz/gdkselection-quartz.c b/gdk/quartz/gdkselection-quartz.c
index e79ca91e45..3f69d03100 100644
--- a/gdk/quartz/gdkselection-quartz.c
+++ b/gdk/quartz/gdkselection-quartz.c
@@ -20,106 +20,8 @@
#include "config.h"
-#include "gdkproperty.h"
#include "gdkquartz.h"
-static gint
-make_list (const gchar *text,
- gint length,
- gboolean latin1,
- gchar ***list)
-{
- GSList *strings = NULL;
- gint n_strings = 0;
- gint i;
- const gchar *p = text;
- const gchar *q;
- GSList *tmp_list;
- GError *error = NULL;
-
- while (p < text + length)
- {
- gchar *str;
-
- q = p;
- while (*q && q < text + length)
- q++;
-
- if (latin1)
- {
- str = g_convert (p, q - p,
- "UTF-8", "ISO-8859-1",
- NULL, NULL, &error);
-
- if (!str)
- {
- g_warning ("Error converting selection from STRING: %s",
- error->message);
- g_error_free (error);
- }
- }
- else
- str = g_strndup (p, q - p);
-
- if (str)
- {
- strings = g_slist_prepend (strings, str);
- n_strings++;
- }
-
- p = q + 1;
- }
-
- if (list)
- *list = g_new0 (gchar *, n_strings + 1);
-
- i = n_strings;
- tmp_list = strings;
- while (tmp_list)
- {
- if (list)
- (*list)[--i] = tmp_list->data;
- else
- g_free (tmp_list->data);
-
- tmp_list = tmp_list->next;
- }
-
- g_slist_free (strings);
-
- return n_strings;
-}
-
-gint
-_gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list)
-{
- g_return_val_if_fail (text != NULL, 0);
- g_return_val_if_fail (length >= 0, 0);
-
- if (encoding == g_intern_static_string ("STRING"))
- {
- return make_list ((gchar *)text, length, TRUE, list);
- }
- else if (encoding == g_intern_static_string ("UTF8_STRING"))
- {
- return make_list ((gchar *)text, length, FALSE, list);
- }
- else
- {
- g_warning ("gdk_text_property_to_utf8_list_for_display: encoding %s not handled", (const char *)encoding);
-
- if (list)
- *list = NULL;
-
- return 0;
- }
-}
-
GdkAtom
gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type)
{
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 199468e03e..ef7b32b95e 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -1030,7 +1030,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class)
display_class->notify_startup_complete = gdk_wayland_display_notify_startup_complete;
display_class->create_surface = _gdk_wayland_display_create_surface;
display_class->get_keymap = _gdk_wayland_display_get_keymap;
- display_class->text_property_to_utf8_list = _gdk_wayland_display_text_property_to_utf8_list;
display_class->make_gl_context_current = gdk_wayland_display_make_gl_context_current;
diff --git a/gdk/wayland/gdkdrag-wayland.c b/gdk/wayland/gdkdrag-wayland.c
index 833309048a..b0430b025d 100644
--- a/gdk/wayland/gdkdrag-wayland.c
+++ b/gdk/wayland/gdkdrag-wayland.c
@@ -20,7 +20,6 @@
#include "gdkdragprivate.h"
#include "gdkinternals.h"
-#include "gdkproperty.h"
#include "gdkprivate-wayland.h"
#include "gdkcontentformats.h"
#include "gdkdisplay-wayland.h"
diff --git a/gdk/wayland/gdkdrop-wayland.c b/gdk/wayland/gdkdrop-wayland.c
index f9ed7de123..2af4379077 100644
--- a/gdk/wayland/gdkdrop-wayland.c
+++ b/gdk/wayland/gdkdrop-wayland.c
@@ -20,7 +20,6 @@
#include "gdkdropprivate.h"
#include "gdkinternals.h"
-#include "gdkproperty.h"
#include "gdkprivate-wayland.h"
#include "gdkcontentformats.h"
#include "gdkdisplay-wayland.h"
diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h
index 830e185029..f472bf7759 100644
--- a/gdk/wayland/gdkprivate-wayland.h
+++ b/gdk/wayland/gdkprivate-wayland.h
@@ -127,13 +127,6 @@ GdkSurface * _gdk_wayland_display_create_surface (GdkDisplay *display,
int width,
int height);
-gint _gdk_wayland_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
-
void _gdk_wayland_display_create_seat (GdkWaylandDisplay *display,
guint32 id,
struct wl_seat *seat);
diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c
deleted file mode 100644
index 8f02cdd123..0000000000
--- a/gdk/wayland/gdkselection-wayland.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <gio/gunixinputstream.h>
-#include <gio/gunixoutputstream.h>
-#include <glib-unix.h>
-
-#include "gdkwayland.h"
-#include "gdkprivate-wayland.h"
-#include "gdkdisplay-wayland.h"
-#include "gdkcontentformatsprivate.h"
-#include "gdkproperty.h"
-
-#include <string.h>
-
-gint
-_gdk_wayland_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list)
-{
- GPtrArray *array;
- const gchar *ptr;
- gsize chunk_len;
- gchar *copy;
- guint nitems;
-
- ptr = (const gchar *) text;
- array = g_ptr_array_new ();
-
- while (ptr < (const gchar *) &text[length])
- {
- chunk_len = strlen (ptr);
-
- if (g_utf8_validate (ptr, chunk_len, NULL))
- {
- copy = g_strndup (ptr, chunk_len);
- g_ptr_array_add (array, copy);
- }
-
- ptr = &ptr[chunk_len + 1];
- }
-
- nitems = array->len;
- g_ptr_array_add (array, NULL);
-
- if (list)
- *list = (gchar **) g_ptr_array_free (array, FALSE);
- else
- g_ptr_array_free (array, TRUE);
-
- return nitems;
-}
-
diff --git a/gdk/wayland/meson.build b/gdk/wayland/meson.build
index a6fe2a88c5..b6592064fb 100644
--- a/gdk/wayland/meson.build
+++ b/gdk/wayland/meson.build
@@ -14,7 +14,6 @@ gdk_wayland_sources = files([
'gdkkeys-wayland.c',
'gdkmonitor-wayland.c',
'gdkprimary-wayland.c',
- 'gdkselection-wayland.c',
'gdkvulkancontext-wayland.c',
'gdksurface-wayland.c',
'wm-button-layout-translation.c',
diff --git a/gdk/win32/gdkclipdrop-win32.c b/gdk/win32/gdkclipdrop-win32.c
index cd40dedaf3..53ebd916b8 100644
--- a/gdk/win32/gdkclipdrop-win32.c
+++ b/gdk/win32/gdkclipdrop-win32.c
@@ -273,7 +273,6 @@ Otherwise it's similar to how the clipboard works. Only the DnD server
/* for CIDA */
#include <shlobj.h>
-#include "gdkproperty.h"
#include "gdkdisplay.h"
#include "gdkprivate-win32.h"
#include "gdkclipboardprivate.h"
@@ -2681,107 +2680,6 @@ _gdk_win32_transmute_contentformat (const gchar *from_contentformat,
return TRUE;
}
-static gint
-make_list (const gchar *text,
- gint length,
- gboolean latin1,
- gchar ***list)
-{
- GSList *strings = NULL;
- gint n_strings = 0;
- gint i;
- const gchar *p = text;
- const gchar *q;
- GSList *tmp_list;
- GError *error = NULL;
-
- while (p < text + length)
- {
- gchar *str;
-
- q = p;
- while (*q && q < text + length)
- q++;
-
- if (latin1)
- {
- str = g_convert (p, q - p,
- "UTF-8", "ISO-8859-1",
- NULL, NULL, &error);
-
- if (!str)
- {
- g_warning ("Error converting selection from STRING: %s",
- error->message);
- g_error_free (error);
- }
- }
- else
- str = g_strndup (p, q - p);
-
- if (str)
- {
- strings = g_slist_prepend (strings, str);
- n_strings++;
- }
-
- p = q + 1;
- }
-
- if (list)
- *list = g_new (gchar *, n_strings + 1);
-
- (*list)[n_strings] = NULL;
-
- i = n_strings;
- tmp_list = strings;
- while (tmp_list)
- {
- if (list)
- (*list)[--i] = tmp_list->data;
- else
- g_free (tmp_list->data);
-
- tmp_list = tmp_list->next;
- }
-
- g_slist_free (strings);
-
- return n_strings;
-}
-
-gint
-_gdk_win32_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list)
-{
- g_return_val_if_fail (text != NULL, 0);
- g_return_val_if_fail (length >= 0, 0);
-
- if (encoding == g_intern_static_string ("STRING"))
- {
- return make_list ((gchar *)text, length, TRUE, list);
- }
- else if (encoding == _gdk_win32_clipdrop_atom (GDK_WIN32_ATOM_INDEX_TEXT_PLAIN_UTF8))
- {
- return make_list ((gchar *)text, length, FALSE, list);
- }
- else
- {
- const char *enc_name = (const char *)encoding;
-
- g_warning ("gdk_text_property_to_utf8_list_for_display: encoding %s not handled\n", enc_name);
-
- if (list)
- *list = NULL;
-
- return 0;
- }
-}
-
gint
_gdk_win32_add_contentformat_to_pairs (const gchar *contentformat,
GArray *array)
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 7f9785b239..ffda794ec7 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -1118,7 +1118,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
display_class->create_surface = _gdk_win32_display_create_surface;
display_class->get_keymap = _gdk_win32_display_get_keymap;
- display_class->text_property_to_utf8_list = _gdk_win32_display_text_property_to_utf8_list;
display_class->make_gl_context_current = _gdk_win32_display_make_gl_context_current;
display_class->get_n_monitors = gdk_win32_display_get_n_monitors;
diff --git a/gdk/win32/gdkdrag-win32.c b/gdk/win32/gdkdrag-win32.c
index 24df191d05..619beaca33 100644
--- a/gdk/win32/gdkdrag-win32.c
+++ b/gdk/win32/gdkdrag-win32.c
@@ -197,7 +197,6 @@
#define COBJMACROS
#include "gdkdrag.h"
-#include "gdkproperty.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
#include "gdkwin32.h"
diff --git a/gdk/win32/gdkdrop-win32.c b/gdk/win32/gdkdrop-win32.c
index 3bcb92b89b..f7244f8f2e 100644
--- a/gdk/win32/gdkdrop-win32.c
+++ b/gdk/win32/gdkdrop-win32.c
@@ -42,7 +42,6 @@
#include "gdkdropprivate.h"
#include "gdkdrag.h"
-#include "gdkproperty.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
#include "gdkwin32.h"
diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h
index e4821d71b1..c6377fbc24 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -395,12 +395,6 @@ void _gdk_win32_display_convert_selection (GdkDisplay *display,
GdkAtom selection,
GdkAtom target,
guint32 time);
-gint _gdk_win32_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
gboolean _gdk_win32_keymap_has_altgr (GdkWin32Keymap *keymap);
guint8 _gdk_win32_keymap_get_active_group (GdkWin32Keymap *keymap);
diff --git a/gdk/win32/gdkproperty-win32.c b/gdk/win32/gdkproperty-win32.c
index d0bc65ff59..7fbf644b5e 100644
--- a/gdk/win32/gdkproperty-win32.c
+++ b/gdk/win32/gdkproperty-win32.c
@@ -29,7 +29,6 @@
#include <glib/gprintf.h>
#include <pango/pangowin32.h>
-#include "gdkproperty.h"
#include "gdkdisplayprivate.h"
#include "gdkprivate-win32.h"
#include "gdkwin32.h"
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 7147ad6a23..1502666081 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -3052,7 +3052,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
display_class->notify_startup_complete = gdk_x11_display_notify_startup_complete;
display_class->create_surface = _gdk_x11_display_create_surface;
display_class->get_keymap = gdk_x11_display_get_keymap;
- display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current;
diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c
index 8445a7340c..a6c70ef224 100644
--- a/gdk/x11/gdkdrag-x11.c
+++ b/gdk/x11/gdkdrag-x11.c
@@ -36,7 +36,6 @@
#include "gdksurfaceprivate.h"
#include "gdkinternals.h"
#include "gdkintl.h"
-#include "gdkproperty.h"
#include "gdkprivate-x11.h"
#include "gdkscreen-x11.h"
#include "gdkselectioninputstream-x11.h"
diff --git a/gdk/x11/gdkdrop-x11.c b/gdk/x11/gdkdrop-x11.c
index fa4ca6b45a..d5cce6a6e1 100644
--- a/gdk/x11/gdkdrop-x11.c
+++ b/gdk/x11/gdkdrop-x11.c
@@ -35,7 +35,6 @@
#include "gdkdragprivate.h"
#include "gdkinternals.h"
#include "gdkintl.h"
-#include "gdkproperty.h"
#include "gdkprivate-x11.h"
#include "gdkscreen-x11.h"
#include "gdkselectioninputstream-x11.h"
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index 5579e6a4b4..63c6015393 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -24,7 +24,6 @@
#include "config.h"
-#include "gdkproperty.h"
#include "gdkinternals.h"
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"
diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c
index 169ba661fa..7bb016aa86 100644
--- a/gdk/x11/gdkselection-x11.c
+++ b/gdk/x11/gdkselection-x11.c
@@ -24,7 +24,6 @@
#include "config.h"
-#include "gdkproperty.h"
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"