Ardour  9.0-pre0-582-g084a23a80d
gtkclipboard.h
Go to the documentation of this file.
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 2000 Red Hat, Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  *
19  * Global clipboard abstraction.
20  */
21 
22 #ifndef __GTK_CLIPBOARD_H__
23 #define __GTK_CLIPBOARD_H__
24 
25 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
26 #error "Only <gtk/gtk.h> can be included directly."
27 #endif
28 
29 #include <gtk/gtkselection.h>
30 
31 G_BEGIN_DECLS
32 
33 #define GTK_TYPE_CLIPBOARD (gtk_clipboard_get_type ())
34 #define GTK_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CLIPBOARD, GtkClipboard))
35 #define GTK_IS_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CLIPBOARD))
36 
37 typedef void (* GtkClipboardReceivedFunc) (GtkClipboard *clipboard,
38  GtkSelectionData *selection_data,
39  gpointer data);
40 typedef void (* GtkClipboardTextReceivedFunc) (GtkClipboard *clipboard,
41  const gchar *text,
42  gpointer data);
43 typedef void (* GtkClipboardRichTextReceivedFunc) (GtkClipboard *clipboard,
44  GdkAtom format,
45  const guint8 *text,
46  gsize length,
47  gpointer data);
48 typedef void (* GtkClipboardImageReceivedFunc) (GtkClipboard *clipboard,
49  GdkPixbuf *pixbuf,
50  gpointer data);
51 typedef void (* GtkClipboardURIReceivedFunc) (GtkClipboard *clipboard,
52  gchar **uris,
53  gpointer data);
54 typedef void (* GtkClipboardTargetsReceivedFunc) (GtkClipboard *clipboard,
55  GdkAtom *atoms,
56  gint n_atoms,
57  gpointer data);
58 
59 /* Should these functions have GtkClipboard *clipboard as the first argument?
60  * right now for ClearFunc, you may have trouble determining _which_ clipboard
61  * was cleared, if you reuse your ClearFunc for multiple clipboards.
62  */
63 typedef void (* GtkClipboardGetFunc) (GtkClipboard *clipboard,
64  GtkSelectionData *selection_data,
65  guint info,
66  gpointer user_data_or_owner);
67 typedef void (* GtkClipboardClearFunc) (GtkClipboard *clipboard,
68  gpointer user_data_or_owner);
69 
70 GType gtk_clipboard_get_type (void) G_GNUC_CONST;
71 
74 #ifndef GDK_MULTIHEAD_SAFE
76 #endif
77 
79 
80 
82  const GtkTargetEntry *targets,
83  guint n_targets,
84  GtkClipboardGetFunc get_func,
85  GtkClipboardClearFunc clear_func,
86  gpointer user_data);
88  const GtkTargetEntry *targets,
89  guint n_targets,
90  GtkClipboardGetFunc get_func,
91  GtkClipboardClearFunc clear_func,
92  GObject *owner);
93 GObject *gtk_clipboard_get_owner (GtkClipboard *clipboard);
96  const gchar *text,
97  gint len);
99  GdkPixbuf *pixbuf);
100 
102  GdkAtom target,
103  GtkClipboardReceivedFunc callback,
104  gpointer user_data);
107  gpointer user_data);
109  GtkTextBuffer *buffer,
111  gpointer user_data);
114  gpointer user_data);
117  gpointer user_data);
120  gpointer user_data);
121 
123  GdkAtom target);
126  GtkTextBuffer *buffer,
127  GdkAtom *format,
128  gsize *length);
132  GdkAtom **targets,
133  gint *n_targets);
134 
137  GtkTextBuffer *buffer);
141  GdkAtom target);
142 
143 
145  const GtkTargetEntry *targets,
146  gint n_targets);
147 
149 
150 /* private */
152 
154 
155 G_END_DECLS
156 
157 #endif /* __GTK_CLIPBOARD_H__ */
struct _GdkAtom * GdkAtom
Definition: gdktypes.h:80
void gtk_clipboard_request_rich_text(GtkClipboard *clipboard, GtkTextBuffer *buffer, GtkClipboardRichTextReceivedFunc callback, gpointer user_data)
void(* GtkClipboardGetFunc)(GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gpointer user_data_or_owner)
Definition: gtkclipboard.h:63
gboolean gtk_clipboard_set_with_data(GtkClipboard *clipboard, const GtkTargetEntry *targets, guint n_targets, GtkClipboardGetFunc get_func, GtkClipboardClearFunc clear_func, gpointer user_data)
void gtk_clipboard_request_text(GtkClipboard *clipboard, GtkClipboardTextReceivedFunc callback, gpointer user_data)
void(* GtkClipboardURIReceivedFunc)(GtkClipboard *clipboard, gchar **uris, gpointer data)
Definition: gtkclipboard.h:51
void gtk_clipboard_request_contents(GtkClipboard *clipboard, GdkAtom target, GtkClipboardReceivedFunc callback, gpointer user_data)
void(* GtkClipboardTextReceivedFunc)(GtkClipboard *clipboard, const gchar *text, gpointer data)
Definition: gtkclipboard.h:40
GtkClipboard * gtk_clipboard_get(GdkAtom selection)
GdkDisplay * gtk_clipboard_get_display(GtkClipboard *clipboard)
gboolean gtk_clipboard_wait_is_rich_text_available(GtkClipboard *clipboard, GtkTextBuffer *buffer)
void(* GtkClipboardImageReceivedFunc)(GtkClipboard *clipboard, GdkPixbuf *pixbuf, gpointer data)
Definition: gtkclipboard.h:48
gboolean gtk_clipboard_wait_is_uris_available(GtkClipboard *clipboard)
GdkPixbuf * gtk_clipboard_wait_for_image(GtkClipboard *clipboard)
guint8 * gtk_clipboard_wait_for_rich_text(GtkClipboard *clipboard, GtkTextBuffer *buffer, GdkAtom *format, gsize *length)
void(* GtkClipboardTargetsReceivedFunc)(GtkClipboard *clipboard, GdkAtom *atoms, gint n_atoms, gpointer data)
Definition: gtkclipboard.h:54
gboolean gtk_clipboard_wait_for_targets(GtkClipboard *clipboard, GdkAtom **targets, gint *n_targets)
void gtk_clipboard_set_can_store(GtkClipboard *clipboard, const GtkTargetEntry *targets, gint n_targets)
gboolean gtk_clipboard_wait_is_target_available(GtkClipboard *clipboard, GdkAtom target)
gboolean gtk_clipboard_wait_is_text_available(GtkClipboard *clipboard)
GObject * gtk_clipboard_get_owner(GtkClipboard *clipboard)
void gtk_clipboard_clear(GtkClipboard *clipboard)
GtkSelectionData * gtk_clipboard_wait_for_contents(GtkClipboard *clipboard, GdkAtom target)
void gtk_clipboard_store(GtkClipboard *clipboard)
gchar ** gtk_clipboard_wait_for_uris(GtkClipboard *clipboard)
void _gtk_clipboard_handle_event(GdkEventOwnerChange *event)
void gtk_clipboard_set_text(GtkClipboard *clipboard, const gchar *text, gint len)
void(* GtkClipboardClearFunc)(GtkClipboard *clipboard, gpointer user_data_or_owner)
Definition: gtkclipboard.h:67
GtkClipboard * gtk_clipboard_get_for_display(GdkDisplay *display, GdkAtom selection)
void gtk_clipboard_set_image(GtkClipboard *clipboard, GdkPixbuf *pixbuf)
void gtk_clipboard_request_image(GtkClipboard *clipboard, GtkClipboardImageReceivedFunc callback, gpointer user_data)
gboolean gtk_clipboard_wait_is_image_available(GtkClipboard *clipboard)
void _gtk_clipboard_store_all(void)
void(* GtkClipboardRichTextReceivedFunc)(GtkClipboard *clipboard, GdkAtom format, const guint8 *text, gsize length, gpointer data)
Definition: gtkclipboard.h:43
gboolean gtk_clipboard_set_with_owner(GtkClipboard *clipboard, const GtkTargetEntry *targets, guint n_targets, GtkClipboardGetFunc get_func, GtkClipboardClearFunc clear_func, GObject *owner)
void gtk_clipboard_request_uris(GtkClipboard *clipboard, GtkClipboardURIReceivedFunc callback, gpointer user_data)
void gtk_clipboard_request_targets(GtkClipboard *clipboard, GtkClipboardTargetsReceivedFunc callback, gpointer user_data)
void(* GtkClipboardReceivedFunc)(GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data)
Definition: gtkclipboard.h:37
gchar * gtk_clipboard_wait_for_text(GtkClipboard *clipboard)
GType gtk_clipboard_get_type(void) G_GNUC_CONST
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
struct _GtkClipboard GtkClipboard
Definition: gtkwidget.h:483
PBD::PropertyDescriptor< timecnt_t > length
Transmitter info
link region and track selection