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 Library 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 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library 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.
19 #ifndef __GTK_SELECTION_H__
20 #define __GTK_SELECTION_H__
24 #include <gtk/gtkenums.h>
25 #include <gtk/gtkwidget.h>
29 #endif /* __cplusplus */
31 typedef struct _GtkSelectionData GtkSelectioData;
32 typedef struct _GtkTargetList GtkTargetList;
33 typedef struct _GtkTargetEntry GtkTargetEntry;
35 struct _GtkTargetEntry {
41 /* These structures not public, and are here only for the convenience of
45 typedef struct _GtkTargetPair GtkTargetPair;
47 /* This structure is a list of destinations, and associated guint id's */
48 struct _GtkTargetList {
53 struct _GtkTargetPair {
59 GtkTargetList *gtk_target_list_new (const GtkTargetEntry *targets,
61 void gtk_target_list_ref (GtkTargetList *list);
62 void gtk_target_list_unref (GtkTargetList *list);
63 void gtk_target_list_add (GtkTargetList *list,
67 void gtk_target_list_add_table (GtkTargetList *list,
68 const GtkTargetEntry *targets,
70 void gtk_target_list_remove (GtkTargetList *list,
72 gboolean gtk_target_list_find (GtkTargetList *list,
76 /* Public interface */
78 gint gtk_selection_owner_set (GtkWidget *widget,
81 void gtk_selection_add_target (GtkWidget *widget,
85 void gtk_selection_add_targets (GtkWidget *widget,
87 const GtkTargetEntry *targets,
89 gint gtk_selection_convert (GtkWidget *widget,
95 void gtk_selection_data_set (GtkSelectionData *selection_data,
101 /* Called when a widget is destroyed */
103 void gtk_selection_remove_all (GtkWidget *widget);
107 gint gtk_selection_clear (GtkWidget *widget,
108 GdkEventSelection *event);
109 gint gtk_selection_request (GtkWidget *widget,
110 GdkEventSelection *event);
111 gint gtk_selection_incr_event (GdkWindow *window,
112 GdkEventProperty *event);
113 gint gtk_selection_notify (GtkWidget *widget,
114 GdkEventSelection *event);
115 gint gtk_selection_property_notify (GtkWidget *widget,
116 GdkEventProperty *event);
117 GtkSelectioData *gtk_selection_data_copy (GtkSelectionData *data);
118 void gtk_selection_data_free (GtkSelectionData *data);
124 #endif /* __cplusplus */
127 #endif /* __GTK_SELECTION_H__ */