Ardour  9.0-pre0-384-ga76afae0e9
gtkselection.h
Go to the documentation of this file.
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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 
20 /*
21  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22  * file for a list of people on the GTK+ Team. See the ChangeLog
23  * files for a list of changes. These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26 
27 #ifndef __GTK_SELECTION_H__
28 #define __GTK_SELECTION_H__
29 
30 
31 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
32 #error "Only <gtk/gtk.h> can be included directly."
33 #endif
34 
35 #include <gtk/gtkwidget.h>
36 #include <gtk/gtktextiter.h>
37 
38 
39 G_BEGIN_DECLS
40 
41 typedef struct _GtkTargetList GtkTargetList;
42 typedef struct _GtkTargetEntry GtkTargetEntry;
43 
44 #define GTK_TYPE_SELECTION_DATA (gtk_selection_data_get_type ())
45 #define GTK_TYPE_TARGET_LIST (gtk_target_list_get_type ())
46 
47 /* The contents of a selection are returned in a GtkSelectionData
48  * structure. selection/target identify the request. type specifies
49  * the type of the return; if length < 0, and the data should be
50  * ignored. This structure has object semantics - no fields should be
51  * modified directly, they should not be created directly, and
52  * pointers to them should not be stored beyond the duration of a
53  * callback. (If the last is changed, we'll need to add reference
54  * counting.) The time field gives the timestamp at which the data was
55  * sent.
56  */
57 
59 {
61  GdkAtom GSEAL (target);
62  GdkAtom GSEAL (type);
63  gint GSEAL (format);
64  guchar *GSEAL (data);
65  gint GSEAL (length);
66  GdkDisplay *GSEAL (display);
67 };
68 
70  gchar *target;
71  guint flags;
72  guint info;
73 };
74 
75 /* These structures not public, and are here only for the convenience of
76  * gtkdnd.c
77  */
78 
79 typedef struct _GtkTargetPair GtkTargetPair;
80 
81 /* This structure is a list of destinations, and associated guint id's */
83  GList *list;
84  guint ref_count;
85 };
86 
89  guint flags;
90  guint info;
91 };
92 
94  guint ntargets);
98  GdkAtom target,
99  guint flags,
100  guint info);
102  guint info);
104  guint info,
105  gboolean deserializable,
106  GtkTextBuffer *buffer);
108  guint info,
109  gboolean writable);
111  guint info);
113  const GtkTargetEntry *targets,
114  guint ntargets);
116  GdkAtom target);
118  GdkAtom target,
119  guint *info);
120 
122  gint *n_targets);
124  gint n_targets);
125 
126 /* Public interface */
127 
130  guint32 time_);
132  GtkWidget *widget,
134  guint32 time_);
135 
138  GdkAtom target,
139  guint info);
142  const GtkTargetEntry *targets,
143  guint ntargets);
148  GdkAtom target,
149  guint32 time_);
150 
155 const guchar *gtk_selection_data_get_data (GtkSelectionData *selection_data);
158 
160  GdkAtom type,
161  gint format,
162  const guchar *data,
163  gint length);
165  const gchar *str,
166  gint len);
169  GdkPixbuf *pixbuf);
170 GdkPixbuf *gtk_selection_data_get_pixbuf (GtkSelectionData *selection_data);
172  gchar **uris);
174 
176  GdkAtom **targets,
177  gint *n_atoms);
180  GtkTextBuffer *buffer);
182  gboolean writable);
185  gint n_targets);
187  gint n_targets,
188  GtkTextBuffer *buffer);
190  gint n_targets,
191  gboolean writable);
192 gboolean gtk_targets_include_uri (GdkAtom *targets,
193  gint n_targets);
194 
195 /* Called when a widget is destroyed */
196 
198 
199 /* Event handlers */
200 #if !defined(GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
201 gboolean gtk_selection_clear (GtkWidget *widget,
202  GdkEventSelection *event);
203 #endif
205  GdkEventSelection *event);
207  GdkEventProperty *event);
209  GdkEventSelection *event);
211  GdkEventProperty *event);
212 
213 GType gtk_selection_data_get_type (void) G_GNUC_CONST;
216 
217 GType gtk_target_list_get_type (void) G_GNUC_CONST;
218 
219 G_END_DECLS
220 
221 #endif /* __GTK_SELECTION_H__ */
struct _GdkAtom * GdkAtom
Definition: gdktypes.h:80
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
gboolean gtk_targets_include_rich_text(GdkAtom *targets, gint n_targets, GtkTextBuffer *buffer)
const guchar * gtk_selection_data_get_data(GtkSelectionData *selection_data)
void gtk_target_list_add_table(GtkTargetList *list, const GtkTargetEntry *targets, guint ntargets)
void gtk_target_list_unref(GtkTargetList *list)
gboolean gtk_selection_data_targets_include_text(GtkSelectionData *selection_data)
void gtk_selection_remove_all(GtkWidget *widget)
void gtk_selection_add_target(GtkWidget *widget, GdkAtom selection, GdkAtom target, guint info)
GtkTargetList * gtk_target_list_new(const GtkTargetEntry *targets, guint ntargets)
void gtk_target_list_add_rich_text_targets(GtkTargetList *list, guint info, gboolean deserializable, GtkTextBuffer *buffer)
void gtk_target_list_add_image_targets(GtkTargetList *list, guint info, gboolean writable)
GtkSelectionData * gtk_selection_data_copy(GtkSelectionData *data)
gboolean gtk_selection_owner_set(GtkWidget *widget, GdkAtom selection, guint32 time_)
gboolean gtk_selection_data_targets_include_rich_text(GtkSelectionData *selection_data, GtkTextBuffer *buffer)
void gtk_target_table_free(GtkTargetEntry *targets, gint n_targets)
void gtk_target_list_add(GtkTargetList *list, GdkAtom target, guint flags, guint info)
gboolean gtk_selection_data_set_pixbuf(GtkSelectionData *selection_data, GdkPixbuf *pixbuf)
gint gtk_selection_data_get_length(GtkSelectionData *selection_data)
guchar * gtk_selection_data_get_text(GtkSelectionData *selection_data)
GType gtk_selection_data_get_type(void) G_GNUC_CONST
gboolean gtk_selection_data_targets_include_uri(GtkSelectionData *selection_data)
GdkAtom gtk_selection_data_get_selection(GtkSelectionData *selection_data)
gboolean gtk_selection_owner_set_for_display(GdkDisplay *display, GtkWidget *widget, GdkAtom selection, guint32 time_)
gboolean gtk_selection_data_get_targets(GtkSelectionData *selection_data, GdkAtom **targets, gint *n_atoms)
gint gtk_selection_data_get_format(GtkSelectionData *selection_data)
void gtk_selection_clear_targets(GtkWidget *widget, GdkAtom selection)
gboolean gtk_selection_data_targets_include_image(GtkSelectionData *selection_data, gboolean writable)
void gtk_target_list_add_uri_targets(GtkTargetList *list, guint info)
gboolean gtk_targets_include_uri(GdkAtom *targets, gint n_targets)
gboolean _gtk_selection_incr_event(GdkWindow *window, GdkEventProperty *event)
void gtk_selection_add_targets(GtkWidget *widget, GdkAtom selection, const GtkTargetEntry *targets, guint ntargets)
gboolean gtk_selection_clear(GtkWidget *widget, GdkEventSelection *event)
void gtk_selection_data_set(GtkSelectionData *selection_data, GdkAtom type, gint format, const guchar *data, gint length)
GdkDisplay * gtk_selection_data_get_display(GtkSelectionData *selection_data)
void gtk_selection_data_free(GtkSelectionData *data)
GdkAtom gtk_selection_data_get_data_type(GtkSelectionData *selection_data)
gboolean gtk_selection_data_set_uris(GtkSelectionData *selection_data, gchar **uris)
gboolean _gtk_selection_request(GtkWidget *widget, GdkEventSelection *event)
GdkAtom gtk_selection_data_get_target(GtkSelectionData *selection_data)
gboolean _gtk_selection_notify(GtkWidget *widget, GdkEventSelection *event)
void gtk_target_list_add_text_targets(GtkTargetList *list, guint info)
GtkTargetList * gtk_target_list_ref(GtkTargetList *list)
GtkTargetEntry * gtk_target_table_new_from_list(GtkTargetList *list, gint *n_targets)
gboolean _gtk_selection_property_notify(GtkWidget *widget, GdkEventProperty *event)
gboolean gtk_selection_convert(GtkWidget *widget, GdkAtom selection, GdkAtom target, guint32 time_)
typedefG_BEGIN_DECLS struct _GtkTargetList GtkTargetList
Definition: gtkselection.h:41
gboolean gtk_targets_include_image(GdkAtom *targets, gint n_targets, gboolean writable)
void gtk_target_list_remove(GtkTargetList *list, GdkAtom target)
gboolean gtk_target_list_find(GtkTargetList *list, GdkAtom target, guint *info)
gboolean gtk_selection_data_set_text(GtkSelectionData *selection_data, const gchar *str, gint len)
gboolean gtk_targets_include_text(GdkAtom *targets, gint n_targets)
GdkPixbuf * gtk_selection_data_get_pixbuf(GtkSelectionData *selection_data)
gchar ** gtk_selection_data_get_uris(GtkSelectionData *selection_data)
GType gtk_target_list_get_type(void) G_GNUC_CONST
PBD::PropertyDescriptor< timecnt_t > length
Transmitter info
GdkDisplay * GSEAL(display)
GdkAtom GSEAL(type)
GdkAtom GSEAL(target)
GdkAtom GSEAL(selection)
gint GSEAL(format)
gint GSEAL(length)
guchar * GSEAL(data)
GdkAtom target
Definition: gtkselection.h:88
link region and track selection