]> Pileus Git - ~andy/gtk/blob - gtk/gtksocketprivate.h
Rename GdkQuartzWindow.h and .c to GdkQuartzNSWindow.h and .c
[~andy/gtk] / gtk / gtksocketprivate.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_SOCKET_PRIVATE_H__
27 #define __GTK_SOCKET_PRIVATE_H__
28
29 #include "gtksocket.h"
30
31 struct _GtkSocketPrivate
32 {
33   gint resize_count;
34
35   guint16 request_width;
36   guint16 request_height;
37   guint16 current_width;
38   guint16 current_height;
39
40   GdkWindow *plug_window;
41   GtkWidget *plug_widget;
42
43   gshort xembed_version; /* -1 == not xembed */
44   guint same_app  : 1;
45   guint focus_in  : 1;
46   guint have_size : 1;
47   guint need_map  : 1;
48   guint is_mapped : 1;
49   guint active    : 1;
50
51   GtkAccelGroup *accel_group;
52   GtkWidget *toplevel;
53 };
54
55 /* In gtksocket.c: */
56 void _gtk_socket_add_grabbed_key  (GtkSocket        *socket,
57                                    guint             keyval,
58                                    GdkModifierType   modifiers);
59 void _gtk_socket_remove_grabbed_key (GtkSocket      *socket,
60                                      guint           keyval,
61                                      GdkModifierType modifiers);
62 void _gtk_socket_claim_focus      (GtkSocket        *socket,
63                                    gboolean          send_event);
64 void _gtk_socket_add_window       (GtkSocket        *socket,
65                                    GdkNativeWindow   xid,
66                                    gboolean          need_reparent);
67 void _gtk_socket_end_embedding    (GtkSocket        *socket);
68
69 void _gtk_socket_handle_map_request     (GtkSocket        *socket);
70 void _gtk_socket_unmap_notify           (GtkSocket        *socket);
71 void _gtk_socket_advance_toplevel_focus (GtkSocket        *socket,
72                                          GtkDirectionType  direction);
73
74 /* In backend-specific file: */
75
76 /*
77  * _gtk_socket_windowing_get_id:
78  *
79  * @socket: a #GtkSocket
80  *
81  * Returns the native windowing system identifier for the plug's window.
82  */
83 GdkNativeWindow _gtk_socket_windowing_get_id (GtkSocket *socket);
84
85 /*
86  * _gtk_socket_windowing_realize_window:
87  *
88  */
89 void _gtk_socket_windowing_realize_window (GtkSocket *socket);
90
91 /*
92  * _gtk_socket_windowing_end_embedding_toplevel:
93  *
94  */
95 void _gtk_socket_windowing_end_embedding_toplevel (GtkSocket *socket);
96
97 /*
98  * _gtk_socket_windowing_size_request:
99  *
100  */
101 void _gtk_socket_windowing_size_request (GtkSocket *socket);
102
103 /*
104  * _gtk_socket_windowing_send_key_event:
105  *
106  */
107 void _gtk_socket_windowing_send_key_event (GtkSocket *socket,
108                                            GdkEvent  *gdk_event,
109                                            gboolean   mask_key_presses);
110
111 /*
112  * _gtk_socket_windowing_focus_change:
113  *
114  */
115 void _gtk_socket_windowing_focus_change (GtkSocket *socket,
116                                          gboolean   focus_in);
117
118 /*
119  * _gtk_socket_windowing_update_active:
120  *
121  */
122 void _gtk_socket_windowing_update_active (GtkSocket *socket,
123                                           gboolean   active);
124
125 /*
126  * _gtk_socket_windowing_update_modality:
127  *
128  */
129 void _gtk_socket_windowing_update_modality (GtkSocket *socket,
130                                             gboolean   modality);
131
132 /*
133  * _gtk_socket_windowing_focus:
134  *
135  */
136 void _gtk_socket_windowing_focus (GtkSocket *socket,
137                                   GtkDirectionType direction);
138
139 /*
140  * _gtk_socket_windowing_send_configure_event:
141  *
142  */
143 void _gtk_socket_windowing_send_configure_event (GtkSocket *socket);
144
145 /*
146  * _gtk_socket_windowing_select_plug_window_input:
147  *
148  * Asks the windowing system to send necessary events related to the
149  * plug window to the socket window. Called only for out-of-process
150  * embedding.
151  */
152 void _gtk_socket_windowing_select_plug_window_input (GtkSocket *socket);
153
154 /*
155  * _gtk_socket_windowing_embed_get_info:
156  *
157  * Gets whatever information necessary about an out-of-process plug
158  * window.
159  */
160 void _gtk_socket_windowing_embed_get_info (GtkSocket *socket);
161
162 /*
163  * _gtk_socket_windowing_embed_notify:
164  *
165  */
166 void _gtk_socket_windowing_embed_notify (GtkSocket *socket);
167
168 /*
169  * _gtk_socket_windowing_embed_get_focus_wrapped:
170  *
171  */
172 gboolean _gtk_socket_windowing_embed_get_focus_wrapped (void);
173
174 /*
175  * _gtk_socket_windowing_embed_set_focus_wrapped:
176  *
177  */
178 void _gtk_socket_windowing_embed_set_focus_wrapped (void);
179
180 /*
181  * _gtk_socket_windowing_filter_func:
182  *
183  */
184 GdkFilterReturn _gtk_socket_windowing_filter_func (GdkXEvent *gdk_xevent,
185                                                    GdkEvent  *event,
186                                                    gpointer   data);
187
188 #endif /* __GTK_SOCKET_PRIVATE_H__ */