diff options
author | Benjamin Otte <otte@redhat.com> | 2017-12-02 21:54:36 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2017-12-03 05:46:49 +0100 |
commit | 00192266a1d97e1c1e16152236aa9f1e8c33c5d9 (patch) | |
tree | 3a449f413d8a4ef36a033533d72a358f0a00289e /gdk/wayland/gdkclipboard-wayland.c | |
parent | 437d70f56919916e884a81d3bff0170322ab2906 (diff) | |
download | gtk+-00192266a1d97e1c1e16152236aa9f1e8c33c5d9.tar.gz |
wayland: Add skeleton for a GdkClipboardWayland
Creates the source file and a custom subclass and makes sure it's used
by GDK.
Diffstat (limited to 'gdk/wayland/gdkclipboard-wayland.c')
-rw-r--r-- | gdk/wayland/gdkclipboard-wayland.c | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/gdk/wayland/gdkclipboard-wayland.c b/gdk/wayland/gdkclipboard-wayland.c new file mode 100644 index 0000000000..cddc37b74c --- /dev/null +++ b/gdk/wayland/gdkclipboard-wayland.c @@ -0,0 +1,78 @@ +/* GDK - The GIMP Drawing Kit + * Copyright (C) 2017 Red Hat, Inc. + * + * 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 "gdkclipboardprivate.h" +#include "gdkclipboard-wayland.h" + + +typedef struct _GdkWaylandClipboardClass GdkWaylandClipboardClass; + +struct _GdkWaylandClipboard +{ + GdkClipboard parent; +}; + +struct _GdkWaylandClipboardClass +{ + GdkClipboardClass parent_class; +}; + +G_DEFINE_TYPE (GdkWaylandClipboard, gdk_wayland_clipboard, GDK_TYPE_CLIPBOARD) + +static void +gdk_wayland_clipboard_finalize (GObject *object) +{ + //GdkWaylandClipboard *cb = GDK_WAYLAND_CLIPBOARD (object); + + G_OBJECT_CLASS (gdk_wayland_clipboard_parent_class)->finalize (object); +} + +static void +gdk_wayland_clipboard_class_init (GdkWaylandClipboardClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + //GdkClipboardClass *clipboard_class = GDK_CLIPBOARD_CLASS (class); + + object_class->finalize = gdk_wayland_clipboard_finalize; + +#if 0 + clipboard_class->claim = gdk_wayland_clipboard_claim; + clipboard_class->store_async = gdk_wayland_clipboard_store_async; + clipboard_class->store_finish = gdk_wayland_clipboard_store_finish; + clipboard_class->read_async = gdk_wayland_clipboard_read_async; + clipboard_class->read_finish = gdk_wayland_clipboard_read_finish; +#endif +} + +static void +gdk_wayland_clipboard_init (GdkWaylandClipboard *cb) +{ +} + +GdkClipboard * +gdk_wayland_clipboard_new (GdkDisplay *display) +{ + GdkWaylandClipboard *cb; + + cb = g_object_new (GDK_TYPE_WAYLAND_CLIPBOARD, + "display", display, + NULL); + + return GDK_CLIPBOARD (cb); +} |