1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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.
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.
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.
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/.
27 #ifndef __GTK_SELECTION_H__
28 #define __GTK_SELECTION_H__
32 #include <gtk/gtkenums.h>
33 #include <gtk/gtkwidget.h>
37 #endif /* __cplusplus */
39 typedef struct _GtkSelectionData GtkSelectioData;
40 typedef struct _GtkTargetList GtkTargetList;
41 typedef struct _GtkTargetEntry GtkTargetEntry;
43 struct _GtkTargetEntry {
49 /* These structures not public, and are here only for the convenience of
53 typedef struct _GtkTargetPair GtkTargetPair;
55 /* This structure is a list of destinations, and associated guint id's */
56 struct _GtkTargetList {
61 struct _GtkTargetPair {
67 GtkTargetList *gtk_target_list_new (const GtkTargetEntry *targets,
69 void gtk_target_list_ref (GtkTargetList *list);
70 void gtk_target_list_unref (GtkTargetList *list);
71 void gtk_target_list_add (GtkTargetList *list,
75 void gtk_target_list_add_table (GtkTargetList *list,
76 const GtkTargetEntry *targets,
78 void gtk_target_list_remove (GtkTargetList *list,
80 gboolean gtk_target_list_find (GtkTargetList *list,
84 /* Public interface */
86 gint gtk_selection_owner_set (GtkWidget *widget,
89 void gtk_selection_add_target (GtkWidget *widget,
93 void gtk_selection_add_targets (GtkWidget *widget,
95 const GtkTargetEntry *targets,
97 gint gtk_selection_convert (GtkWidget *widget,
103 void gtk_selection_data_set (GtkSelectionData *selection_data,
109 /* Called when a widget is destroyed */
111 void gtk_selection_remove_all (GtkWidget *widget);
115 gint gtk_selection_clear (GtkWidget *widget,
116 GdkEventSelection *event);
117 gint gtk_selection_request (GtkWidget *widget,
118 GdkEventSelection *event);
119 gint gtk_selection_incr_event (GdkWindow *window,
120 GdkEventProperty *event);
121 gint gtk_selection_notify (GtkWidget *widget,
122 GdkEventSelection *event);
123 gint gtk_selection_property_notify (GtkWidget *widget,
124 GdkEventProperty *event);
125 GtkSelectioData *gtk_selection_data_copy (GtkSelectionData *data);
126 void gtk_selection_data_free (GtkSelectionData *data);
132 #endif /* __cplusplus */
135 #endif /* __GTK_SELECTION_H__ */