]> Pileus Git - ~andy/gtk/blob - gtk/gtkplugprivate.h
tooltip: Don't use deprecated APIs
[~andy/gtk] / gtk / gtkplugprivate.h
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 Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18
19 /*
20  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
21  * file for a list of people on the GTK+ Team.  See the ChangeLog
22  * files for a list of changes.  These files are distributed with
23  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
24  */
25
26 #ifndef __GTK_PLUG_PRIVATE_H__
27 #define __GTK_PLUG_PRIVATE_H__
28
29 struct _GtkPlugPrivate
30 {
31   GtkWidget      *modality_window;
32   GtkWindowGroup *modality_group;
33
34   GdkWindow      *socket_window;
35
36   GHashTable     *grabbed_keys;
37
38   guint  same_app : 1;
39 };
40
41 /* In gtkplug.c: */
42 void _gtk_plug_send_delete_event      (GtkWidget        *widget);
43 void _gtk_plug_add_all_grabbed_keys   (GtkPlug          *plug);
44 void _gtk_plug_focus_first_last       (GtkPlug          *plug,
45                                        GtkDirectionType  direction);
46 void _gtk_plug_handle_modality_on     (GtkPlug          *plug);
47 void _gtk_plug_handle_modality_off    (GtkPlug          *plug);
48
49 /* In backend-specific file: */
50
51 /*
52  * _gtk_plug_windowing_get_id:
53  *
54  * @plug: a #GtkPlug
55  *
56  * Returns the native window system identifier for the plug's window.
57  */
58 GdkNativeWindow _gtk_plug_windowing_get_id (GtkPlug *plug);
59
60 /*
61  * _gtk_plug_windowing_realize_toplevel:
62  *
63  * @plug_window: a #GtkPlug's #GdkWindow
64  *
65  * Called from GtkPlug's realize method. Should tell the corresponding
66  * socket that the plug has been realized.
67  */
68 void _gtk_plug_windowing_realize_toplevel (GtkPlug *plug);
69
70 /*
71  * _gtk_plug_windowing_map_toplevel:
72  *
73  * @plug: a #GtkPlug
74  *
75  * Called from GtkPlug's map method. Should tell the corresponding
76  * #GtkSocket that the plug has been mapped.
77  */
78 void _gtk_plug_windowing_map_toplevel (GtkPlug *plug);
79
80 /*
81  * _gtk_plug_windowing_map_toplevel:
82  *
83  * @plug: a #GtkPlug
84  *
85  * Called from GtkPlug's unmap method. Should tell the corresponding
86  * #GtkSocket that the plug has been unmapped.
87  */
88 void _gtk_plug_windowing_unmap_toplevel (GtkPlug *plug);
89
90 /*
91  * _gtk_plug_windowing_set_focus:
92  *
93  * @plug: a #GtkPlug
94  *
95  * Called from GtkPlug's set_focus method. Should tell the corresponding
96  * #GtkSocket to request focus.
97  */
98 void _gtk_plug_windowing_set_focus (GtkPlug *plug);
99
100 /*
101  * _gtk_plug_windowing_add_grabbed_key:
102  *
103  * @plug: a #GtkPlug
104  * @accelerator_key: a key
105  * @accelerator_mods: modifiers for it
106  *
107  * Called from GtkPlug's keys_changed method. Should tell the
108  * corresponding #GtkSocket to grab the key.
109  */
110 void _gtk_plug_windowing_add_grabbed_key (GtkPlug         *plug,
111                                           guint            accelerator_key,
112                                           GdkModifierType  accelerator_mods);
113
114 /*
115  * _gtk_plug_windowing_remove_grabbed_key:
116  *
117  * @plug: a #GtkPlug
118  * @accelerator_key: a key
119  * @accelerator_mods: modifiers for it
120  *
121  * Called from GtkPlug's keys_changed method. Should tell the
122  * corresponding #GtkSocket to remove the key grab.
123  */
124 void _gtk_plug_windowing_remove_grabbed_key (GtkPlug         *plug,
125                                              guint            accelerator_key,
126                                              GdkModifierType  accelerator_mods);
127
128 /*
129  * _gtk_plug_windowing_focus_to_parent:
130  *
131  * @plug: a #GtkPlug
132  * @direction: a direction
133  *
134  * Called from GtkPlug's focus method. Should tell the corresponding
135  * #GtkSocket to move the focus.
136  */
137 void _gtk_plug_windowing_focus_to_parent (GtkPlug         *plug,
138                                           GtkDirectionType direction);
139
140 /*
141  * _gtk_plug_windowing_filter_func:
142  *
143  * @gdk_xevent: a windowing system native event
144  * @event: a pre-allocated empty GdkEvent
145  * @data: the #GtkPlug
146  *
147  * Event filter function installed on plug windows.
148  */
149 GdkFilterReturn _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
150                                                  GdkEvent  *event,
151                                                  gpointer   data);
152
153 #endif /* __GTK_PLUG_PRIVATE_H__ */