[gtk+] display: Remove leftover old clipboard APIs
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] display: Remove leftover old clipboard APIs
- Date: Thu, 14 Dec 2017 12:42:10 +0000 (UTC)
commit 5d70bbf4c414cffff33fc63ea64516fd25cbd55c
Author: Benjamin Otte <otte redhat com>
Date: Thu Dec 14 13:34:40 2017 +0100
display: Remove leftover old clipboard APIs
docs/reference/gdk/gdk4-sections.txt | 2 -
gdk/broadway/gdkdisplay-broadway.c | 17 ----------
gdk/gdkdisplay.c | 50 ----------------------------
gdk/gdkdisplay.h | 8 ----
gdk/gdkdisplayprivate.h | 7 ----
gdk/mir/gdkmirdisplay.c | 17 ----------
gdk/quartz/gdkdisplay-quartz.c | 19 -----------
gdk/wayland/gdkdisplay-wayland.c | 17 ----------
gdk/win32/gdkdisplay-win32.c | 31 ------------------
gdk/x11/gdkdisplay-x11.c | 59 ----------------------------------
10 files changed, 0 insertions(+), 227 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index 7475598..43ea8c3 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -88,8 +88,6 @@ gdk_display_supports_cursor_alpha
gdk_display_get_default_cursor_size
gdk_display_get_maximal_cursor_size
gdk_display_get_default_group
-gdk_display_supports_clipboard_persistence
-gdk_display_store_clipboard
gdk_display_supports_shapes
gdk_display_supports_input_shapes
gdk_display_get_app_launch_context
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c
index e8f47da..834d5e2 100644
--- a/gdk/broadway/gdkdisplay-broadway.c
+++ b/gdk/broadway/gdkdisplay-broadway.c
@@ -359,21 +359,6 @@ gdk_broadway_display_notify_startup_complete (GdkDisplay *display,
}
static gboolean
-gdk_broadway_display_supports_clipboard_persistence (GdkDisplay *display)
-{
- return FALSE;
-}
-
-static void
-gdk_broadway_display_store_clipboard (GdkDisplay *display,
- GdkWindow *clipboard_window,
- guint32 time_,
- const GdkAtom *targets,
- gint n_targets)
-{
-}
-
-static gboolean
gdk_broadway_display_supports_shapes (GdkDisplay *display)
{
return FALSE;
@@ -544,8 +529,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
display_class->has_pending = gdk_broadway_display_has_pending;
display_class->queue_events = _gdk_broadway_display_queue_events;
display_class->get_default_group = gdk_broadway_display_get_default_group;
- display_class->supports_clipboard_persistence = gdk_broadway_display_supports_clipboard_persistence;
- display_class->store_clipboard = gdk_broadway_display_store_clipboard;
display_class->supports_shapes = gdk_broadway_display_supports_shapes;
display_class->supports_input_shapes = gdk_broadway_display_supports_input_shapes;
display_class->get_default_cursor_size = _gdk_broadway_display_get_default_cursor_size;
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 23c1c8b..b285541 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -1184,56 +1184,6 @@ gdk_display_get_primary_clipboard (GdkDisplay *display)
}
/**
- * gdk_display_supports_clipboard_persistence:
- * @display: a #GdkDisplay
- *
- * Returns whether the speicifed display supports clipboard
- * persistance; i.e. if it’s possible to store the clipboard data after an
- * application has quit. On X11 this checks if a clipboard daemon is
- * running.
- *
- * Returns: %TRUE if the display supports clipboard persistance.
- *
- * Since: 2.6
- */
-gboolean
-gdk_display_supports_clipboard_persistence (GdkDisplay *display)
-{
- g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
-
- return GDK_DISPLAY_GET_CLASS (display)->supports_clipboard_persistence (display);
-}
-
-/**
- * gdk_display_store_clipboard:
- * @display: a #GdkDisplay
- * @clipboard_window: a #GdkWindow belonging to the clipboard owner
- * @time_: a timestamp
- * @targets: (array length=n_targets) (nullable): an array of targets
- * that should be saved, or %NULL
- * if all available targets should be saved.
- * @n_targets: length of the @targets array
- *
- * Issues a request to the clipboard manager to store the
- * clipboard data. On X11, this is a special program that works
- * according to the
- * [FreeDesktop Clipboard Specification](http://www.freedesktop.org/Standards/clipboard-manager-spec).
- *
- * Since: 2.6
- */
-void
-gdk_display_store_clipboard (GdkDisplay *display,
- GdkWindow *clipboard_window,
- guint32 time_,
- const GdkAtom *targets,
- gint n_targets)
-{
- g_return_if_fail (GDK_IS_DISPLAY (display));
-
- GDK_DISPLAY_GET_CLASS (display)->store_clipboard (display, clipboard_window, time_, targets, n_targets);
-}
-
-/**
* gdk_display_supports_shapes:
* @display: a #GdkDisplay
*
diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h
index 1c370c9..4ef3660 100644
--- a/gdk/gdkdisplay.h
+++ b/gdk/gdkdisplay.h
@@ -97,14 +97,6 @@ GDK_AVAILABLE_IN_3_94
GdkClipboard * gdk_display_get_clipboard (GdkDisplay *display);
GDK_AVAILABLE_IN_3_94
GdkClipboard * gdk_display_get_primary_clipboard (GdkDisplay *display);
-GDK_AVAILABLE_IN_ALL
-gboolean gdk_display_supports_clipboard_persistence (GdkDisplay *display);
-GDK_AVAILABLE_IN_ALL
-void gdk_display_store_clipboard (GdkDisplay *display,
- GdkWindow *clipboard_window,
- guint32 time_,
- const GdkAtom *targets,
- gint n_targets);
GDK_AVAILABLE_IN_ALL
gboolean gdk_display_supports_shapes (GdkDisplay *display);
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index 29e7a95..0214346 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -131,13 +131,6 @@ struct _GdkDisplayClass
gboolean (*supports_cursor_alpha) (GdkDisplay *display);
gboolean (*supports_cursor_color) (GdkDisplay *display);
- gboolean (*supports_clipboard_persistence) (GdkDisplay *display);
- void (*store_clipboard) (GdkDisplay *display,
- GdkWindow *clipboard_window,
- guint32 time_,
- const GdkAtom *targets,
- gint n_targets);
-
void (*get_default_cursor_size) (GdkDisplay *display,
guint *width,
guint *height);
diff --git a/gdk/mir/gdkmirdisplay.c b/gdk/mir/gdkmirdisplay.c
index 6e14013..650aee2 100644
--- a/gdk/mir/gdkmirdisplay.c
+++ b/gdk/mir/gdkmirdisplay.c
@@ -383,12 +383,6 @@ gdk_mir_display_supports_input_shapes (GdkDisplay *display)
}
static gboolean
-gdk_mir_display_supports_clipboard_persistence (GdkDisplay *display)
-{
- return FALSE;
-}
-
-static gboolean
gdk_mir_display_supports_cursor_alpha (GdkDisplay *display)
{
return FALSE;
@@ -401,15 +395,6 @@ gdk_mir_display_supports_cursor_color (GdkDisplay *display)
}
static void
-gdk_mir_display_store_clipboard (GdkDisplay *display,
- GdkWindow *clipboard_window,
- guint32 time_,
- const GdkAtom *targets,
- gint n_targets)
-{
-}
-
-static void
gdk_mir_display_get_default_cursor_size (GdkDisplay *display,
guint *width,
guint *height)
@@ -827,10 +812,8 @@ gdk_mir_display_class_init (GdkMirDisplayClass *klass)
display_class->get_default_group = gdk_mir_display_get_default_group;
display_class->supports_shapes = gdk_mir_display_supports_shapes;
display_class->supports_input_shapes = gdk_mir_display_supports_input_shapes;
- display_class->supports_clipboard_persistence = gdk_mir_display_supports_clipboard_persistence;
display_class->supports_cursor_alpha = gdk_mir_display_supports_cursor_alpha;
display_class->supports_cursor_color = gdk_mir_display_supports_cursor_color;
- display_class->store_clipboard = gdk_mir_display_store_clipboard;
display_class->get_default_cursor_size = gdk_mir_display_get_default_cursor_size;
display_class->get_maximal_cursor_size = gdk_mir_display_get_maximal_cursor_size;
display_class->get_app_launch_context = gdk_mir_display_get_app_launch_context;
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index b925d18..2f96ab2 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -112,13 +112,6 @@ gdk_quartz_display_flush (GdkDisplay *display)
}
static gboolean
-gdk_quartz_display_supports_clipboard_persistence (GdkDisplay *display)
-{
- /* FIXME: Implement */
- return FALSE;
-}
-
-static gboolean
gdk_quartz_display_supports_shapes (GdkDisplay *display)
{
/* FIXME: Implement */
@@ -132,16 +125,6 @@ gdk_quartz_display_supports_input_shapes (GdkDisplay *display)
return FALSE;
}
-static void
-gdk_quartz_display_store_clipboard (GdkDisplay *display,
- GdkWindow *clipboard_window,
- guint32 time_,
- const GdkAtom *targets,
- gint n_targets)
-{
- /* FIXME: Implement */
-}
-
static gulong
gdk_quartz_display_get_next_serial (GdkDisplay *display)
{
@@ -241,8 +224,6 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
display_class->queue_events = _gdk_quartz_display_queue_events;
display_class->has_pending = _gdk_quartz_display_has_pending;
display_class->get_default_group = gdk_quartz_display_get_default_group;
- display_class->supports_clipboard_persistence = gdk_quartz_display_supports_clipboard_persistence;
- display_class->store_clipboard = gdk_quartz_display_store_clipboard;
display_class->supports_shapes = gdk_quartz_display_supports_shapes;
display_class->supports_input_shapes = gdk_quartz_display_supports_input_shapes;
display_class->get_default_cursor_size = _gdk_quartz_display_get_default_cursor_size;
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index b7158af..f02d9c6 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -811,21 +811,6 @@ gdk_wayland_display_get_default_group (GdkDisplay *display)
}
static gboolean
-gdk_wayland_display_supports_clipboard_persistence (GdkDisplay *display)
-{
- return FALSE;
-}
-
-static void
-gdk_wayland_display_store_clipboard (GdkDisplay *display,
- GdkWindow *clipboard_window,
- guint32 time_,
- const GdkAtom *targets,
- gint n_targets)
-{
-}
-
-static gboolean
gdk_wayland_display_supports_shapes (GdkDisplay *display)
{
return FALSE;
@@ -989,8 +974,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class)
display_class->has_pending = gdk_wayland_display_has_pending;
display_class->queue_events = _gdk_wayland_display_queue_events;
display_class->get_default_group = gdk_wayland_display_get_default_group;
- display_class->supports_clipboard_persistence = gdk_wayland_display_supports_clipboard_persistence;
- display_class->store_clipboard = gdk_wayland_display_store_clipboard;
display_class->supports_shapes = gdk_wayland_display_supports_shapes;
display_class->supports_input_shapes = gdk_wayland_display_supports_input_shapes;
display_class->get_app_launch_context = _gdk_wayland_display_get_app_launch_context;
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 93c4bdc..48ae7c7 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -679,35 +679,6 @@ failed:
}
static gboolean
-gdk_win32_display_supports_clipboard_persistence (GdkDisplay *display)
-{
- return TRUE;
-}
-
-static void
-gdk_win32_display_store_clipboard (GdkDisplay *display,
- GdkWindow *clipboard_window,
- guint32 time_,
- const GdkAtom *targets,
- gint n_targets)
-{
- GdkEvent tmp_event;
- SendMessage (GDK_WINDOW_HWND (clipboard_window), WM_RENDERALLFORMATS, 0, 0);
-
- memset (&tmp_event, 0, sizeof (tmp_event));
- tmp_event.selection.type = GDK_SELECTION_NOTIFY;
- tmp_event.selection.window = clipboard_window;
- tmp_event.selection.send_event = FALSE;
- tmp_event.selection.selection = _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_CLIPBOARD_MANAGER);
- tmp_event.selection.target = 0;
- tmp_event.selection.property = NULL;
- tmp_event.selection.requestor = 0;
- tmp_event.selection.time = GDK_CURRENT_TIME;
-
- gdk_event_put (&tmp_event);
-}
-
-static gboolean
gdk_win32_display_supports_shapes (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
@@ -1181,8 +1152,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
display_class->queue_events = _gdk_win32_display_queue_events;
display_class->get_default_group = gdk_win32_display_get_default_group;
- display_class->supports_clipboard_persistence = gdk_win32_display_supports_clipboard_persistence;
- display_class->store_clipboard = gdk_win32_display_store_clipboard;
display_class->supports_shapes = gdk_win32_display_supports_shapes;
display_class->supports_input_shapes = gdk_win32_display_supports_input_shapes;
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 673731c..976b0a5 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -2381,63 +2381,6 @@ gdk_x11_display_request_selection_notification (GdkDisplay *display,
return FALSE;
}
-static gboolean
-gdk_x11_display_supports_clipboard_persistence (GdkDisplay *display)
-{
- Atom clipboard_manager;
-
- /* It might make sense to cache this */
- clipboard_manager = gdk_x11_get_xatom_by_name_for_display (display, "CLIPBOARD_MANAGER");
- return XGetSelectionOwner (GDK_X11_DISPLAY (display)->xdisplay, clipboard_manager) != None;
-}
-
-static void
-gdk_x11_display_store_clipboard (GdkDisplay *display,
- GdkWindow *clipboard_window,
- guint32 time_,
- const GdkAtom *targets,
- gint n_targets)
-{
- GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
- Atom clipboard_manager, save_targets;
-
- g_return_if_fail (GDK_WINDOW_IS_X11 (clipboard_window));
-
- clipboard_manager = gdk_x11_get_xatom_by_name_for_display (display, "CLIPBOARD_MANAGER");
- save_targets = gdk_x11_get_xatom_by_name_for_display (display, "SAVE_TARGETS");
-
- gdk_x11_display_error_trap_push (display);
-
- if (XGetSelectionOwner (display_x11->xdisplay, clipboard_manager) != None)
- {
- Atom property_name = None;
- Atom *xatoms;
- int i;
-
- if (n_targets > 0)
- {
- property_name = gdk_x11_get_xatom_by_name_for_display (display, "GDK_SELECTION");
-
- xatoms = g_new (Atom, n_targets);
- for (i = 0; i < n_targets; i++)
- xatoms[i] = gdk_x11_atom_to_xatom_for_display (display, targets[i]);
-
- XChangeProperty (display_x11->xdisplay, GDK_WINDOW_XID (clipboard_window),
- property_name, XA_ATOM,
- 32, PropModeReplace, (guchar *)xatoms, n_targets);
- g_free (xatoms);
-
- }
-
- XConvertSelection (display_x11->xdisplay,
- clipboard_manager, save_targets, property_name,
- GDK_WINDOW_XID (clipboard_window), time_);
-
- }
- gdk_x11_display_error_trap_pop_ignored (display);
-
-}
-
/**
* gdk_x11_display_get_user_time:
* @display: (type GdkX11Display): a #GdkDisplay
@@ -3127,8 +3070,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
display_class->has_pending = gdk_x11_display_has_pending;
display_class->queue_events = _gdk_x11_display_queue_events;
display_class->get_default_group = gdk_x11_display_get_default_group;
- display_class->supports_clipboard_persistence = gdk_x11_display_supports_clipboard_persistence;
- display_class->store_clipboard = gdk_x11_display_store_clipboard;
display_class->supports_shapes = gdk_x11_display_supports_shapes;
display_class->supports_input_shapes = gdk_x11_display_supports_input_shapes;
display_class->get_app_launch_context = _gdk_x11_display_get_app_launch_context;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]