Mercurial > hg > xemacs-beta
comparison src/console-x-impl.h @ 5118:e0db3c197671 ben-lisp-object
merge up to latest default branch, doesn't compile yet
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 26 Dec 2009 21:18:49 -0600 |
parents | 56e67d42eb04 |
children | d1247f3cc363 |
comparison
equal
deleted
inserted
replaced
5117:3742ea8250b5 | 5118:e0db3c197671 |
---|---|
38 #include "console-impl.h" | 38 #include "console-impl.h" |
39 #include "console-x.h" | 39 #include "console-x.h" |
40 | 40 |
41 DECLARE_CONSOLE_TYPE (x); | 41 DECLARE_CONSOLE_TYPE (x); |
42 | 42 |
43 extern int wedge_metacity; | |
44 | |
43 struct x_device | 45 struct x_device |
44 { | 46 { |
47 #ifdef NEW_GC | |
48 struct lrecord_header header; | |
49 #endif /* NEW_GC */ | |
45 /* The X connection of this device. */ | 50 /* The X connection of this device. */ |
46 Display *display; | 51 Display *display; |
47 | 52 |
48 /* Set by x_IO_error_handler(). */ | 53 /* Set by x_IO_error_handler(). */ |
49 int being_deleted; | 54 int being_deleted; |
156 unsigned int need_to_add_mask, down_mask; | 161 unsigned int need_to_add_mask, down_mask; |
157 KeyCode last_downkey; | 162 KeyCode last_downkey; |
158 Time release_time; | 163 Time release_time; |
159 Time modifier_release_time; | 164 Time modifier_release_time; |
160 }; | 165 }; |
166 | |
167 #ifdef NEW_GC | |
168 typedef struct x_device Lisp_X_Device; | |
169 | |
170 DECLARE_LISP_OBJECT (x_device, Lisp_X_Device); | |
171 | |
172 #define XX_DEVICE(x) \ | |
173 XRECORD (x, x_device, Lisp_X_Device) | |
174 #define wrap_x_device(p) wrap_record (p, x_device) | |
175 #define X_DEVICE_P(x) RECORDP (x, x_device) | |
176 #endif /* NEW_GC */ | |
161 | 177 |
162 #define DEVICE_X_DATA(d) DEVICE_TYPE_DATA (d, x) | 178 #define DEVICE_X_DATA(d) DEVICE_TYPE_DATA (d, x) |
163 | 179 |
164 #define FRAME_X_DISPLAY(f) (DEVICE_X_DISPLAY (XDEVICE (f->device))) | 180 #define FRAME_X_DISPLAY(f) (DEVICE_X_DISPLAY (XDEVICE (f->device))) |
165 #define DEVICE_X_DISPLAY(d) (DEVICE_X_DATA (d)->display) | 181 #define DEVICE_X_DISPLAY(d) (DEVICE_X_DATA (d)->display) |
218 #define DEVICE_XATOM_CHARSET_REGISTRY(d) (DEVICE_X_DATA (d)->Xatom_CHARSET_REGISTRY) | 234 #define DEVICE_XATOM_CHARSET_REGISTRY(d) (DEVICE_X_DATA (d)->Xatom_CHARSET_REGISTRY) |
219 #define DEVICE_XATOM_CHARSET_ENCODING(d) (DEVICE_X_DATA (d)->Xatom_CHARSET_ENCODING) | 235 #define DEVICE_XATOM_CHARSET_ENCODING(d) (DEVICE_X_DATA (d)->Xatom_CHARSET_ENCODING) |
220 | 236 |
221 /* The maximum number of widgets that can be displayed above the text | 237 /* The maximum number of widgets that can be displayed above the text |
222 area at one time. Currently no more than 3 will ever actually be | 238 area at one time. Currently no more than 3 will ever actually be |
223 displayed (menubar, psheet, debugger panel). */ | 239 displayed (menubar, psheet, debugger panel). |
240 #### Are "psheet" and "debugger panel" relevant any more? */ | |
224 #define MAX_CONCURRENT_TOP_WIDGETS 8 | 241 #define MAX_CONCURRENT_TOP_WIDGETS 8 |
225 | 242 |
226 struct x_frame | 243 struct x_frame |
227 { | 244 { |
228 /* The widget of this frame. This is an EmacsShell or an | 245 #ifdef NEW_GC |
229 ExternalShell. */ | 246 struct lrecord_header header; |
247 #endif /* NEW_GC */ | |
248 | |
249 /* The widget of this frame. | |
250 This is an EmacsShell or an ExternalShell. | |
251 It negotiates with the window manager or containing app on behalf of | |
252 the container widget. Should be (but isn't) invisible to Emacs. */ | |
230 Widget widget; | 253 Widget widget; |
231 | 254 |
232 /* The parent of the EmacsFrame, the menubar, and the scrollbars. | 255 /* The parent of the EmacsFrame, the menubar, and the scrollbars. |
233 This is an EmacsManager. */ | 256 This is an EmacsManager. |
257 It is responsible for managing the geometry of the frame. This is what | |
258 Emacs mostly talks to. Anything that affects its geometry will be | |
259 reflected in the Shell widget, and thus cause WM interaction. */ | |
234 Widget container; | 260 Widget container; |
235 | 261 |
236 /* The widget of the menubar, of whatever widget class it happens to be. */ | 262 /* The widget of the menubar, of whatever widget class it happens to be. */ |
237 Widget menubar_widget; | 263 Widget menubar_widget; |
238 | 264 |
288 /* Could get these at any time by asking xic, but... */ | 314 /* Could get these at any time by asking xic, but... */ |
289 XIMStyle xic_style; /* XIM Style cache */ | 315 XIMStyle xic_style; /* XIM Style cache */ |
290 #endif /* XIM_XLIB */ | 316 #endif /* XIM_XLIB */ |
291 #endif /* HAVE_XIM */ | 317 #endif /* HAVE_XIM */ |
292 | 318 |
319 #ifdef USE_XFT | |
320 /* The Xft Drawable wrapper for this device. | |
321 #### Should this be per-device, or per-frame? */ | |
322 /* This is persistent to take advantage of the ability of Xft's glyph | |
323 cache in the server, and avoid rendering the font again and again... | |
324 | |
325 This is created the first time through redisplay, and destroyed when our | |
326 connection to the X display is destroyed. */ | |
327 XftDraw *xftDraw; | |
328 #endif | |
329 | |
293 /* 1 if the frame is completely visible on the display, 0 otherwise. | 330 /* 1 if the frame is completely visible on the display, 0 otherwise. |
294 if 0 the frame may have been iconified or may be totally | 331 if 0 the frame may have been iconified or may be totally |
295 or partially hidden by another X window */ | 332 or partially hidden by another X window */ |
296 unsigned int totally_visible_p :1; | 333 unsigned int totally_visible_p :1; |
297 | 334 |
298 /* NB: Both of the following flags are derivable from the 'shell' | 335 /* NB: Both of the following flags are derivable from the 'widget' |
299 field above, but it's easier if we also have them separately here. */ | 336 field above, but it's easier if we also have them separately here. */ |
300 | 337 |
301 /* Are we a top-level frame? This means that our shell is a | 338 /* Are we a top-level frame? This means that our shell is a |
302 TopLevelShell, and we should do certain things to interact with | 339 TopLevelShell, and we should do certain things to interact with |
303 the window manager. */ | 340 the window manager. */ |
309 `top_level_frame_p' will never be set. */ | 346 `top_level_frame_p' will never be set. */ |
310 unsigned int external_window_p :1; | 347 unsigned int external_window_p :1; |
311 #endif /* EXTERNAL_WIDGET */ | 348 #endif /* EXTERNAL_WIDGET */ |
312 }; | 349 }; |
313 | 350 |
351 #ifdef NEW_GC | |
352 typedef struct x_frame Lisp_X_Frame; | |
353 | |
354 DECLARE_LISP_OBJECT (x_frame, Lisp_X_Frame); | |
355 | |
356 #define XX_FRAME(x) \ | |
357 XRECORD (x, x_frame, Lisp_X_Frame) | |
358 #define wrap_x_frame(p) wrap_record (p, x_frame) | |
359 #define X_FRAME_P(x) RECORDP (x, x_frame) | |
360 #endif /* NEW_GC */ | |
314 #define FRAME_X_DATA(f) FRAME_TYPE_DATA (f, x) | 361 #define FRAME_X_DATA(f) FRAME_TYPE_DATA (f, x) |
315 | 362 |
316 #define FRAME_X_SHELL_WIDGET(f) (FRAME_X_DATA (f)->widget) | 363 #define FRAME_X_SHELL_WIDGET(f) (FRAME_X_DATA (f)->widget) |
317 #define FRAME_X_CONTAINER_WIDGET(f) (FRAME_X_DATA (f)->container) | 364 #define FRAME_X_CONTAINER_WIDGET(f) (FRAME_X_DATA (f)->container) |
318 #define FRAME_X_MENUBAR_WIDGET(f) (FRAME_X_DATA (f)->menubar_widget) | 365 #define FRAME_X_MENUBAR_WIDGET(f) (FRAME_X_DATA (f)->menubar_widget) |
336 #define FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC(f) (FRAME_X_DATA (f)->toolbar_blank_background_gc) | 383 #define FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC(f) (FRAME_X_DATA (f)->toolbar_blank_background_gc) |
337 #define FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC(f) (FRAME_X_DATA (f)->toolbar_pixmap_background_gc) | 384 #define FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC(f) (FRAME_X_DATA (f)->toolbar_pixmap_background_gc) |
338 #endif /* HAVE_TOOLBARS */ | 385 #endif /* HAVE_TOOLBARS */ |
339 | 386 |
340 #define FRAME_X_GEOM_FREE_ME_PLEASE(f) (FRAME_X_DATA (f)->geom_free_me_please) | 387 #define FRAME_X_GEOM_FREE_ME_PLEASE(f) (FRAME_X_DATA (f)->geom_free_me_please) |
388 | |
389 #ifdef USE_XFT | |
390 #define FRAME_X_XFTDRAW(f) (FRAME_X_DATA (f)->xftDraw) | |
391 #endif | |
341 | 392 |
342 #define FRAME_X_TOTALLY_VISIBLE_P(f) (FRAME_X_DATA (f)->totally_visible_p) | 393 #define FRAME_X_TOTALLY_VISIBLE_P(f) (FRAME_X_DATA (f)->totally_visible_p) |
343 #define FRAME_X_TOP_LEVEL_FRAME_P(f) (FRAME_X_DATA (f)->top_level_frame_p) | 394 #define FRAME_X_TOP_LEVEL_FRAME_P(f) (FRAME_X_DATA (f)->top_level_frame_p) |
344 | 395 |
345 #ifdef EXTERNAL_WIDGET | 396 #ifdef EXTERNAL_WIDGET |