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