1/* GDK - The GIMP Drawing Kit
2 *
3 * Copyright (C) 2017 Benjamin Otte <otte@gnome.org>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __GDK_CLIPBOARD_H__
20#define __GDK_CLIPBOARD_H__
21
22#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
23#error "Only <gdk/gdk.h> can be included directly."
24#endif
25
26#include <gdk/gdkversionmacros.h>
27#include <gdk/gdktypes.h>
28#include <gio/gio.h>
29
30
31G_BEGIN_DECLS
32
33#define GDK_TYPE_CLIPBOARD (gdk_clipboard_get_type ())
34#define GDK_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_CLIPBOARD, GdkClipboard))
35#define GDK_IS_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_CLIPBOARD))
36
37GDK_AVAILABLE_IN_ALL
38GType gdk_clipboard_get_type (void) G_GNUC_CONST;
39
40GDK_AVAILABLE_IN_ALL
41GdkDisplay * gdk_clipboard_get_display (GdkClipboard *clipboard);
42GDK_AVAILABLE_IN_ALL
43GdkContentFormats * gdk_clipboard_get_formats (GdkClipboard *clipboard);
44GDK_AVAILABLE_IN_ALL
45gboolean gdk_clipboard_is_local (GdkClipboard *clipboard);
46GDK_AVAILABLE_IN_ALL
47GdkContentProvider * gdk_clipboard_get_content (GdkClipboard *clipboard);
48
49GDK_AVAILABLE_IN_ALL
50void gdk_clipboard_store_async (GdkClipboard *clipboard,
51 int io_priority,
52 GCancellable *cancellable,
53 GAsyncReadyCallback callback,
54 gpointer user_data);
55GDK_AVAILABLE_IN_ALL
56gboolean gdk_clipboard_store_finish (GdkClipboard *clipboard,
57 GAsyncResult *result,
58 GError **error);
59
60GDK_AVAILABLE_IN_ALL
61void gdk_clipboard_read_async (GdkClipboard *clipboard,
62 const char **mime_types,
63 int io_priority,
64 GCancellable *cancellable,
65 GAsyncReadyCallback callback,
66 gpointer user_data);
67GDK_AVAILABLE_IN_ALL
68GInputStream * gdk_clipboard_read_finish (GdkClipboard *clipboard,
69 GAsyncResult *result,
70 const char **out_mime_type,
71 GError **error);
72GDK_AVAILABLE_IN_ALL
73void gdk_clipboard_read_value_async (GdkClipboard *clipboard,
74 GType type,
75 int io_priority,
76 GCancellable *cancellable,
77 GAsyncReadyCallback callback,
78 gpointer user_data);
79GDK_AVAILABLE_IN_ALL
80const GValue * gdk_clipboard_read_value_finish (GdkClipboard *clipboard,
81 GAsyncResult *result,
82 GError **error);
83GDK_AVAILABLE_IN_ALL
84void gdk_clipboard_read_texture_async (GdkClipboard *clipboard,
85 GCancellable *cancellable,
86 GAsyncReadyCallback callback,
87 gpointer user_data);
88GDK_AVAILABLE_IN_ALL
89GdkTexture * gdk_clipboard_read_texture_finish (GdkClipboard *clipboard,
90 GAsyncResult *result,
91 GError **error);
92GDK_AVAILABLE_IN_ALL
93void gdk_clipboard_read_text_async (GdkClipboard *clipboard,
94 GCancellable *cancellable,
95 GAsyncReadyCallback callback,
96 gpointer user_data);
97GDK_AVAILABLE_IN_ALL
98char * gdk_clipboard_read_text_finish (GdkClipboard *clipboard,
99 GAsyncResult *result,
100 GError **error);
101
102GDK_AVAILABLE_IN_ALL
103gboolean gdk_clipboard_set_content (GdkClipboard *clipboard,
104 GdkContentProvider *provider);
105GDK_AVAILABLE_IN_ALL
106void gdk_clipboard_set (GdkClipboard *clipboard,
107 GType type,
108 ...);
109GDK_AVAILABLE_IN_ALL
110void gdk_clipboard_set_valist (GdkClipboard *clipboard,
111 GType type,
112 va_list args);
113GDK_AVAILABLE_IN_ALL
114void gdk_clipboard_set_value (GdkClipboard *clipboard,
115 const GValue *value);
116GDK_AVAILABLE_IN_ALL
117void gdk_clipboard_set_text (GdkClipboard *clipboard,
118 const char *text);
119GDK_AVAILABLE_IN_ALL
120void gdk_clipboard_set_texture (GdkClipboard *clipboard,
121 GdkTexture *texture);
122
123G_END_DECLS
124
125#endif /* __GDK_CLIPBOARD_H__ */
126

source code of gtk/gdk/gdkclipboard.h