Copy gtk_clipboard_get_default implementation to gtkclipboard-quartz.c

Fixes bug 784323.
This commit is contained in:
John Ralls 2017-07-18 11:15:12 -07:00
parent 4b6c68b51e
commit 7e362638ac

View File

@ -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)
{