[gtk+/gtk-3-22] Copy gtk_clipboard_get_default implementation to gtkclipboard-quartz.c
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] Copy gtk_clipboard_get_default implementation to gtkclipboard-quartz.c
- Date: Tue, 18 Jul 2017 18:17:37 +0000 (UTC)
commit 7e362638ac21e56eda3bafdde2a71dc47bb1dc9f
Author: John Ralls <jralls ceridwen us>
Date: Tue Jul 18 11:15:12 2017 -0700
Copy gtk_clipboard_get_default implementation to gtkclipboard-quartz.c
Fixes bug 784323.
gtk/gtkclipboard-quartz.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkclipboard-quartz.c b/gtk/gtkclipboard-quartz.c
index fec31f5..8429c3c 100644
--- a/gtk/gtkclipboard-quartz.c
+++ b/gtk/gtkclipboard-quartz.c
@@ -286,6 +286,26 @@ gtk_clipboard_get (GdkAtom selection)
return gtk_clipboard_get_for_display (gdk_display_get_default (), selection);
}
+/**
+ * gtk_clipboard_get_default:
+ * @display: the #GdkDisplay for which the clipboard is to be retrieved.
+ *
+ * Returns the default clipboard object for use with cut/copy/paste menu items
+ * and keyboard shortcuts.
+ *
+ * Return value: (transfer none): the default clipboard object.
+ *
+ * Since: 3.16
+ **/
+GtkClipboard *
+gtk_clipboard_get_default (GdkDisplay *display)
+{
+ g_return_val_if_fail (display != NULL, NULL);
+ g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
+
+ return gtk_clipboard_get_for_display (display, GDK_SELECTION_CLIPBOARD);
+}
+
static void
clipboard_owner_destroyed (gpointer data)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]