428
|
1 /* Define X specific console, device, and frame object for XEmacs.
|
|
2 Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
|
3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
|
793
|
4 Copyright (C) 1996, 2002 Ben Wing.
|
428
|
5
|
|
6 This file is part of XEmacs.
|
|
7
|
|
8 XEmacs is free software; you can redistribute it and/or modify it
|
|
9 under the terms of the GNU General Public License as published by the
|
|
10 Free Software Foundation; either version 2, or (at your option) any
|
|
11 later version.
|
|
12
|
|
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
16 for more details.
|
|
17
|
|
18 You should have received a copy of the GNU General Public License
|
|
19 along with XEmacs; see the file COPYING. If not, write to
|
|
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
21 Boston, MA 02111-1307, USA. */
|
|
22
|
|
23 /* Synched up with: Not in FSF. */
|
|
24
|
|
25
|
|
26 /* Authorship:
|
|
27
|
|
28 Ultimately based on FSF, then later on JWZ work for Lemacs.
|
|
29 Rewritten over time by Ben Wing and Chuck Thompson (original
|
|
30 multi-device work by Chuck Thompson).
|
|
31 */
|
|
32
|
440
|
33 #ifndef INCLUDED_console_x_h_
|
|
34 #define INCLUDED_console_x_h_
|
428
|
35
|
|
36 #ifdef HAVE_X_WINDOWS
|
|
37
|
|
38 #include "console.h"
|
|
39 #include "xintrinsic.h"
|
|
40
|
|
41 #include <X11/cursorfont.h>
|
|
42 #include <X11/keysym.h>
|
|
43 #include <X11/Xatom.h>
|
|
44 #include <X11/StringDefs.h>
|
|
45
|
|
46 #ifdef HAVE_XPM
|
|
47 #include <X11/xpm.h>
|
|
48 #endif
|
|
49
|
|
50 /* R5 defines the XPointer type, but R4 doesn't.
|
|
51 R4 also doesn't define a version number, but R5 does. */
|
|
52 #if (XlibSpecificationRelease < 5)
|
|
53 # define XPointer char *
|
|
54 #endif
|
|
55
|
|
56 DECLARE_CONSOLE_TYPE (x);
|
|
57
|
|
58 struct x_device
|
|
59 {
|
|
60 /* The X connection of this device. */
|
|
61 Display *display;
|
|
62
|
|
63 /* Set by x_IO_error_handler(). */
|
|
64 int being_deleted;
|
|
65
|
|
66 /* Xt application info. */
|
|
67 Widget Xt_app_shell;
|
|
68
|
454
|
69 /* Cache of GC's for frames on this device. */
|
428
|
70 struct gc_cache *gc_cache;
|
|
71
|
|
72 /* Selected visual, depth and colormap for this device */
|
|
73 Visual *visual;
|
|
74 int depth;
|
|
75 Colormap device_cmap;
|
|
76
|
|
77 /* Used by x_bevel_modeline in redisplay-x.c */
|
|
78 Pixmap gray_pixmap;
|
|
79
|
|
80 /* Atoms associated with this device. */
|
442
|
81 /* allocated in Xatoms_of_device_x */
|
428
|
82 Atom Xatom_WM_PROTOCOLS;
|
|
83 Atom Xatom_WM_DELETE_WINDOW;
|
|
84 Atom Xatom_WM_SAVE_YOURSELF;
|
|
85 Atom Xatom_WM_TAKE_FOCUS;
|
|
86 Atom Xatom_WM_STATE;
|
|
87
|
442
|
88 /* allocated in Xatoms_of_select_x */
|
428
|
89 Atom Xatom_CLIPBOARD;
|
|
90 Atom Xatom_TIMESTAMP;
|
|
91 Atom Xatom_TEXT;
|
|
92 Atom Xatom_DELETE;
|
|
93 Atom Xatom_MULTIPLE;
|
|
94 Atom Xatom_INCR;
|
|
95 Atom Xatom_EMACS_TMP;
|
|
96 Atom Xatom_TARGETS;
|
|
97 Atom Xatom_NULL;
|
|
98 Atom Xatom_ATOM_PAIR;
|
|
99 Atom Xatom_COMPOUND_TEXT;
|
|
100
|
442
|
101 /* allocated in Xatoms_of_objects_x */
|
428
|
102 Atom Xatom_FOUNDRY;
|
|
103 Atom Xatom_FAMILY_NAME;
|
|
104 Atom Xatom_WEIGHT_NAME;
|
|
105 Atom Xatom_SLANT;
|
|
106 Atom Xatom_SETWIDTH_NAME;
|
|
107 Atom Xatom_ADD_STYLE_NAME;
|
|
108 Atom Xatom_PIXEL_SIZE;
|
|
109 Atom Xatom_POINT_SIZE;
|
|
110 Atom Xatom_RESOLUTION_X;
|
|
111 Atom Xatom_RESOLUTION_Y;
|
|
112 Atom Xatom_SPACING;
|
|
113 Atom Xatom_AVERAGE_WIDTH;
|
|
114 Atom Xatom_CHARSET_REGISTRY;
|
|
115 Atom Xatom_CHARSET_ENCODING;
|
|
116
|
|
117 /* The following items are all used exclusively in event-Xt.c. */
|
|
118 int MetaMask, HyperMask, SuperMask, AltMask, ModeMask;
|
|
119 KeySym lock_interpretation;
|
|
120
|
|
121 XModifierKeymap *x_modifier_keymap;
|
|
122
|
|
123 KeySym *x_keysym_map;
|
|
124 int x_keysym_map_min_code;
|
|
125 int x_keysym_map_max_code;
|
|
126 int x_keysym_map_keysyms_per_code;
|
|
127 Lisp_Object x_keysym_map_hash_table;
|
|
128
|
|
129 /* frame that holds the WM_COMMAND property; there should be exactly
|
|
130 one of these per device. */
|
|
131 Lisp_Object WM_COMMAND_frame;
|
|
132
|
|
133 /* #### It's not clear that there is much distinction anymore
|
|
134 between mouse_timestamp and global_mouse_timestamp, now that
|
|
135 Emacs doesn't see most (all?) events not destined for it. */
|
|
136
|
|
137 /* The timestamp of the last button or key event used by emacs itself.
|
|
138 This is used for asserting selections and input focus. */
|
|
139 Time mouse_timestamp;
|
|
140
|
|
141 /* This is the timestamp the last button or key event whether it was
|
|
142 dispatched to emacs or widgets. */
|
|
143 Time global_mouse_timestamp;
|
|
144
|
|
145 /* This is the last known timestamp received from the server. It is
|
|
146 maintained by x_event_to_emacs_event and used to patch bogus
|
|
147 WM_TAKE_FOCUS messages sent by Mwm. */
|
|
148 Time last_server_timestamp;
|
|
149
|
|
150 /* Used by Xlib to preserve information across calls to
|
|
151 XLookupString(), to implement compose processing.
|
|
152
|
|
153 According to The X Window System, p. 467, "The creation of
|
|
154 XComposeStatus structures is implementation dependent;
|
|
155 a portable program must pass NULL for this argument."
|
|
156 But this means that a portable program cannot implement
|
|
157 compose processing! WTF?
|
|
158
|
|
159 So we just set it to all zeros. */
|
|
160
|
|
161 /* No X Server ever used this, AFAIK -- mrb */
|
|
162 /* XComposeStatus x_compose_status; */
|
|
163
|
|
164 #ifdef HAVE_XIM
|
|
165 XIM xim;
|
|
166 XIMStyles *xim_styles;
|
|
167 #endif /* HAVE_XIM */
|
|
168
|
|
169 /* stuff for sticky modifiers: */
|
|
170
|
|
171 unsigned int need_to_add_mask, down_mask;
|
|
172 KeyCode last_downkey;
|
|
173 Time release_time;
|
444
|
174 Time modifier_release_time;
|
428
|
175 };
|
|
176
|
|
177 #define DEVICE_X_DATA(d) DEVICE_TYPE_DATA (d, x)
|
|
178
|
|
179 #define FRAME_X_DISPLAY(f) (DEVICE_X_DISPLAY (XDEVICE (f->device)))
|
|
180 #define DEVICE_X_DISPLAY(d) (DEVICE_X_DATA (d)->display)
|
|
181 #define DEVICE_X_BEING_DELETED(d) (DEVICE_X_DATA (d)->being_deleted)
|
|
182 #define DEVICE_X_VISUAL(d) (DEVICE_X_DATA (d)->visual)
|
|
183 #define DEVICE_X_DEPTH(d) (DEVICE_X_DATA (d)->depth)
|
|
184 #define DEVICE_X_COLORMAP(d) (DEVICE_X_DATA (d)->device_cmap)
|
|
185 #define DEVICE_XT_APP_SHELL(d) (DEVICE_X_DATA (d)->Xt_app_shell)
|
|
186 #define DEVICE_X_GC_CACHE(d) (DEVICE_X_DATA (d)->gc_cache)
|
|
187 #define DEVICE_X_GRAY_PIXMAP(d) (DEVICE_X_DATA (d)->gray_pixmap)
|
|
188 #define DEVICE_X_WM_COMMAND_FRAME(d) (DEVICE_X_DATA (d)->WM_COMMAND_frame)
|
|
189 #define DEVICE_X_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->mouse_timestamp)
|
|
190 #define DEVICE_X_GLOBAL_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->global_mouse_timestamp)
|
|
191 #define DEVICE_X_LAST_SERVER_TIMESTAMP(d) (DEVICE_X_DATA (d)->last_server_timestamp)
|
|
192 #define DEVICE_X_KEYSYM_MAP_HASH_TABLE(d) (DEVICE_X_DATA (d)->x_keysym_map_hash_table)
|
|
193 /* #define DEVICE_X_X_COMPOSE_STATUS(d) (DEVICE_X_DATA (d)->x_compose_status) */
|
|
194 #ifdef HAVE_XIM
|
|
195 #define DEVICE_X_XIM(d) (DEVICE_X_DATA (d)->xim)
|
|
196 #define DEVICE_X_XIM_STYLES(d) (DEVICE_X_DATA (d)->xim_styles)
|
|
197 #define DEVICE_X_FONTSET(d) (DEVICE_X_DATA (d)->fontset)
|
|
198 #endif /* HAVE_XIM */
|
|
199
|
442
|
200 /* allocated in Xatoms_of_device_x */
|
428
|
201 #define DEVICE_XATOM_WM_PROTOCOLS(d) (DEVICE_X_DATA (d)->Xatom_WM_PROTOCOLS)
|
|
202 #define DEVICE_XATOM_WM_DELETE_WINDOW(d) (DEVICE_X_DATA (d)->Xatom_WM_DELETE_WINDOW)
|
|
203 #define DEVICE_XATOM_WM_SAVE_YOURSELF(d) (DEVICE_X_DATA (d)->Xatom_WM_SAVE_YOURSELF)
|
|
204 #define DEVICE_XATOM_WM_TAKE_FOCUS(d) (DEVICE_X_DATA (d)->Xatom_WM_TAKE_FOCUS)
|
|
205 #define DEVICE_XATOM_WM_STATE(d) (DEVICE_X_DATA (d)->Xatom_WM_STATE)
|
|
206
|
442
|
207 /* allocated in Xatoms_of_select_x */
|
428
|
208 #define DEVICE_XATOM_CLIPBOARD(d) (DEVICE_X_DATA (d)->Xatom_CLIPBOARD)
|
|
209 #define DEVICE_XATOM_TIMESTAMP(d) (DEVICE_X_DATA (d)->Xatom_TIMESTAMP)
|
|
210 #define DEVICE_XATOM_TEXT(d) (DEVICE_X_DATA (d)->Xatom_TEXT)
|
|
211 #define DEVICE_XATOM_DELETE(d) (DEVICE_X_DATA (d)->Xatom_DELETE)
|
|
212 #define DEVICE_XATOM_MULTIPLE(d) (DEVICE_X_DATA (d)->Xatom_MULTIPLE)
|
|
213 #define DEVICE_XATOM_INCR(d) (DEVICE_X_DATA (d)->Xatom_INCR)
|
|
214 #define DEVICE_XATOM_EMACS_TMP(d) (DEVICE_X_DATA (d)->Xatom_EMACS_TMP)
|
|
215 #define DEVICE_XATOM_TARGETS(d) (DEVICE_X_DATA (d)->Xatom_TARGETS)
|
|
216 #define DEVICE_XATOM_NULL(d) (DEVICE_X_DATA (d)->Xatom_NULL)
|
|
217 #define DEVICE_XATOM_ATOM_PAIR(d) (DEVICE_X_DATA (d)->Xatom_ATOM_PAIR)
|
|
218 #define DEVICE_XATOM_COMPOUND_TEXT(d) (DEVICE_X_DATA (d)->Xatom_COMPOUND_TEXT)
|
|
219
|
442
|
220 /* allocated in Xatoms_of_objects_x */
|
428
|
221 #define DEVICE_XATOM_FOUNDRY(d) (DEVICE_X_DATA (d)->Xatom_FOUNDRY)
|
|
222 #define DEVICE_XATOM_FAMILY_NAME(d) (DEVICE_X_DATA (d)->Xatom_FAMILY_NAME)
|
|
223 #define DEVICE_XATOM_WEIGHT_NAME(d) (DEVICE_X_DATA (d)->Xatom_WEIGHT_NAME)
|
|
224 #define DEVICE_XATOM_SLANT(d) (DEVICE_X_DATA (d)->Xatom_SLANT)
|
|
225 #define DEVICE_XATOM_SETWIDTH_NAME(d) (DEVICE_X_DATA (d)->Xatom_SETWIDTH_NAME)
|
|
226 #define DEVICE_XATOM_ADD_STYLE_NAME(d) (DEVICE_X_DATA (d)->Xatom_ADD_STYLE_NAME)
|
|
227 #define DEVICE_XATOM_PIXEL_SIZE(d) (DEVICE_X_DATA (d)->Xatom_PIXEL_SIZE)
|
|
228 #define DEVICE_XATOM_POINT_SIZE(d) (DEVICE_X_DATA (d)->Xatom_POINT_SIZE)
|
|
229 #define DEVICE_XATOM_RESOLUTION_X(d) (DEVICE_X_DATA (d)->Xatom_RESOLUTION_X)
|
|
230 #define DEVICE_XATOM_RESOLUTION_Y(d) (DEVICE_X_DATA (d)->Xatom_RESOLUTION_Y)
|
|
231 #define DEVICE_XATOM_SPACING(d) (DEVICE_X_DATA (d)->Xatom_SPACING)
|
|
232 #define DEVICE_XATOM_AVERAGE_WIDTH(d) (DEVICE_X_DATA (d)->Xatom_AVERAGE_WIDTH)
|
|
233 #define DEVICE_XATOM_CHARSET_REGISTRY(d) (DEVICE_X_DATA (d)->Xatom_CHARSET_REGISTRY)
|
|
234 #define DEVICE_XATOM_CHARSET_ENCODING(d) (DEVICE_X_DATA (d)->Xatom_CHARSET_ENCODING)
|
|
235
|
|
236 #define Xt_SET_VALUE(widget, resource, value) do { \
|
|
237 Arg al; \
|
|
238 XtSetArg (al, resource, value); \
|
|
239 XtSetValues (widget, &al, 1); \
|
|
240 } while (0)
|
|
241
|
|
242 #define Xt_GET_VALUE(widget, resource, location) do { \
|
|
243 Arg al; \
|
|
244 XtSetArg (al, resource, location); \
|
|
245 XtGetValues (widget, &al, 1); \
|
|
246 } while (0)
|
|
247
|
|
248 /* The maximum number of widgets that can be displayed above the text
|
|
249 area at one time. Currently no more than 3 will ever actually be
|
|
250 displayed (menubar, psheet, debugger panel). */
|
|
251 #define MAX_CONCURRENT_TOP_WIDGETS 8
|
|
252
|
|
253 struct x_frame
|
|
254 {
|
|
255 /* The widget of this frame. This is an EmacsShell or an
|
|
256 ExternalShell. */
|
|
257 Widget widget;
|
|
258
|
|
259 /* The parent of the EmacsFrame, the menubar, and the scrollbars.
|
|
260 This is an EmacsManager. */
|
|
261 Widget container;
|
|
262
|
|
263 /* The widget of the menubar, of whatever widget class it happens to be. */
|
|
264 Widget menubar_widget;
|
|
265
|
|
266 /* The widget of the edit portion of this frame; this is an EmacsFrame,
|
|
267 and the window of this widget is what the redisplay code draws on. */
|
|
268 Widget edit_widget;
|
|
269
|
|
270 /* Lists the widgets above the text area, in the proper order.
|
|
271 Used by the EmacsManager. */
|
|
272 Widget top_widgets[MAX_CONCURRENT_TOP_WIDGETS];
|
|
273 int num_top_widgets;
|
|
274
|
|
275 /*************************** Miscellaneous **************************/
|
|
276
|
|
277 /* The icon pixmaps; these are Lisp_Image_Instance objects, or Qnil. */
|
|
278 Lisp_Object icon_pixmap;
|
|
279 Lisp_Object icon_pixmap_mask;
|
|
280
|
|
281 #ifdef HAVE_TOOLBARS
|
|
282 int old_toolbar_size[4];
|
|
283
|
|
284 /* We don't provide a mechanism for changing these after they are
|
|
285 initialized so we might as well keep pointers to them and avoid
|
|
286 lots of expensive calls to gc_cache_lookup. */
|
|
287 GC toolbar_top_shadow_gc;
|
|
288 GC toolbar_bottom_shadow_gc;
|
|
289 GC toolbar_blank_background_gc;
|
|
290 GC toolbar_pixmap_background_gc;
|
|
291 #endif /* HAVE_TOOLBARS */
|
|
292
|
|
293 /* geometry string that ought to be freed. */
|
|
294 char *geom_free_me_please;
|
|
295
|
|
296 #ifdef HAVE_XIM
|
|
297 XPoint xic_spot; /* Spot Location cache */
|
|
298 #ifdef XIM_XLIB
|
|
299 XIC xic;
|
|
300 /* Could get these at any time by asking xic, but... */
|
|
301 XIMStyle xic_style; /* XIM Style cache */
|
|
302 #endif /* XIM_XLIB */
|
|
303 #endif /* HAVE_XIM */
|
|
304
|
|
305 /* 1 if the frame is completely visible on the display, 0 otherwise.
|
|
306 if 0 the frame may have been iconified or may be totally
|
|
307 or partially hidden by another X window */
|
|
308 unsigned int totally_visible_p :1;
|
|
309
|
|
310 /* NB: Both of the following flags are derivable from the 'shell'
|
|
311 field above, but it's easier if we also have them separately here. */
|
|
312
|
|
313 /* Are we a top-level frame? This means that our shell is a
|
|
314 TopLevelShell, and we should do certain things to interact with
|
|
315 the window manager. */
|
|
316 unsigned int top_level_frame_p :1;
|
|
317
|
|
318 #ifdef EXTERNAL_WIDGET
|
|
319 /* Are we using somebody else's window for our shell window? This
|
|
320 means that our shell is an ExternalShell. If this flag is set, then
|
|
321 `top_level_frame_p' will never be set. */
|
|
322 unsigned int external_window_p :1;
|
|
323 #endif /* EXTERNAL_WIDGET */
|
|
324 };
|
|
325
|
|
326 #define FRAME_X_DATA(f) FRAME_TYPE_DATA (f, x)
|
|
327
|
|
328 #define FRAME_X_SHELL_WIDGET(f) (FRAME_X_DATA (f)->widget)
|
|
329 #define FRAME_X_CONTAINER_WIDGET(f) (FRAME_X_DATA (f)->container)
|
|
330 #define FRAME_X_MENUBAR_WIDGET(f) (FRAME_X_DATA (f)->menubar_widget)
|
|
331 #define FRAME_X_TEXT_WIDGET(f) (FRAME_X_DATA (f)->edit_widget)
|
|
332 #define FRAME_X_TOP_WIDGETS(f) (FRAME_X_DATA (f)->top_widgets)
|
|
333 #define FRAME_X_NUM_TOP_WIDGETS(f) (FRAME_X_DATA (f)->num_top_widgets)
|
|
334
|
|
335 #define FRAME_X_ICON_PIXMAP(f) (FRAME_X_DATA (f)->icon_pixmap)
|
|
336 #define FRAME_X_ICON_PIXMAP_MASK(f) (FRAME_X_DATA (f)->icon_pixmap_mask)
|
|
337
|
|
338 #ifdef HAVE_TOOLBARS
|
|
339 #define FRAME_X_OLD_TOOLBAR_SIZE(f, pos) (FRAME_X_DATA (f)->old_toolbar_size[pos])
|
|
340
|
|
341 #define FRAME_X_TOOLBAR_TOP_SHADOW_GC(f) (FRAME_X_DATA (f)->toolbar_top_shadow_gc)
|
|
342 #define FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC(f) (FRAME_X_DATA (f)->toolbar_bottom_shadow_gc)
|
|
343 #define FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC(f) (FRAME_X_DATA (f)->toolbar_blank_background_gc)
|
|
344 #define FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC(f) (FRAME_X_DATA (f)->toolbar_pixmap_background_gc)
|
|
345 #endif /* HAVE_TOOLBARS */
|
|
346
|
|
347 #define FRAME_X_GEOM_FREE_ME_PLEASE(f) (FRAME_X_DATA (f)->geom_free_me_please)
|
|
348
|
|
349 #define FRAME_X_TOTALLY_VISIBLE_P(f) (FRAME_X_DATA (f)->totally_visible_p)
|
|
350 #define FRAME_X_TOP_LEVEL_FRAME_P(f) (FRAME_X_DATA (f)->top_level_frame_p)
|
|
351
|
|
352 #ifdef EXTERNAL_WIDGET
|
|
353 #define FRAME_X_EXTERNAL_WINDOW_P(f) (FRAME_X_DATA (f)->external_window_p)
|
|
354 #endif
|
|
355
|
|
356 #ifdef HAVE_XIM
|
|
357 #define FRAME_X_XIC_SPOT(f) (FRAME_X_DATA (f)->xic_spot)
|
|
358 #ifdef XIM_XLIB
|
|
359 #define FRAME_X_XIC(f) (FRAME_X_DATA (f)->xic)
|
|
360 #define FRAME_X_XIC_STYLE(f) (FRAME_X_DATA (f)->xic_style)
|
|
361 #endif /* XIM_XLIB */
|
|
362 #endif /* HAVE_XIM */
|
|
363
|
|
364 /* Variables associated with the X display frame this emacs is using. */
|
|
365 extern XtAppContext Xt_app_con;
|
|
366
|
|
367 extern Lisp_Object Vx_gc_pointer_shape;
|
|
368 extern Lisp_Object Vx_scrollbar_pointer_shape;
|
|
369 extern Lisp_Object Qx_error;
|
|
370
|
|
371 extern struct console_type *x_console_type;
|
|
372 extern Lisp_Object Vdefault_x_device;
|
|
373
|
|
374 /* Number of pixels below each line. */
|
|
375 extern int x_interline_space; /* #### implement me */
|
|
376
|
458
|
377 extern Fixnum x_selection_timeout;
|
428
|
378
|
|
379 struct frame *x_any_window_to_frame (struct device *d, Window);
|
|
380 struct frame *x_any_widget_or_parent_to_frame (struct device *d,
|
|
381 Widget widget);
|
|
382 struct frame *decode_x_frame (Lisp_Object);
|
|
383 struct frame *x_window_to_frame (struct device *d, Window);
|
|
384 struct device *get_device_from_display (Display *dpy);
|
|
385 struct device *decode_x_device (Lisp_Object);
|
|
386
|
|
387 void x_handle_selection_notify (XSelectionEvent *event);
|
|
388 void x_handle_selection_request (XSelectionRequestEvent *event);
|
|
389 void x_handle_selection_clear (XSelectionClearEvent *event);
|
|
390 void x_handle_property_notify (XPropertyEvent *event);
|
|
391
|
440
|
392 void Xatoms_of_select_x (struct device *d);
|
428
|
393 void Xatoms_of_objects_x (struct device *d);
|
|
394
|
|
395 void x_wm_set_shell_iconic_p (Widget shell, int iconic_p);
|
|
396 void x_wm_set_cell_size (Widget wmshell, int cw, int ch);
|
|
397 void x_wm_set_variable_size (Widget wmshell, int width, int height);
|
|
398
|
442
|
399 const char *x_event_name (int event_type);
|
428
|
400 int x_error_handler (Display *disp, XErrorEvent *event);
|
|
401 void expect_x_error (Display *dpy);
|
|
402 int x_error_occurred_p (Display *dpy);
|
|
403 int signal_if_x_error (Display *dpy, int resumable_p);
|
|
404 int x_IO_error_handler (Display *disp);
|
|
405
|
|
406 void x_redraw_exposed_area (struct frame *f, int x, int y,
|
|
407 int width, int height);
|
|
408 void x_output_string (struct window *w, struct display_line *dl,
|
867
|
409 Ichar_dynarr *buf, int xpos, int xoffset,
|
428
|
410 int start_pixpos, int width, face_index findex,
|
|
411 int cursor, int cursor_start, int cursor_width,
|
|
412 int cursor_height);
|
440
|
413 void x_output_x_pixmap (struct frame *f, Lisp_Image_Instance *p,
|
428
|
414 int x, int y, int xoffset, int yoffset,
|
|
415 int width, int height,
|
|
416 unsigned long fg, unsigned long bg,
|
|
417 GC override_gc);
|
|
418 void x_output_shadows (struct frame *f, int x, int y, int width,
|
|
419 int height, GC top_shadow_gc,
|
|
420 GC bottom_shadow_gc, GC background_gc,
|
|
421 int shadow_thickness, int edges);
|
|
422 void x_generate_shadow_pixels (struct frame *f,
|
|
423 unsigned long *top_shadow,
|
|
424 unsigned long *bottom_shadow,
|
|
425 unsigned long background,
|
|
426 unsigned long core_background);
|
|
427
|
|
428 int x_initialize_frame_menubar (struct frame *f);
|
|
429 void x_init_modifier_mapping (struct device *d);
|
|
430
|
593
|
431 int x_frame_window_state (struct frame *f);
|
|
432
|
|
433
|
428
|
434 #define X_ERROR_OCCURRED(dpy, body) \
|
|
435 (expect_x_error (dpy), body, x_error_occurred_p (dpy))
|
|
436
|
|
437 #define HANDLING_X_ERROR(dpy, body) \
|
|
438 (expect_x_error (dpy), body, signal_if_x_error (dpy, 0))
|
|
439
|
|
440 void Initialize_Locale (void);
|
|
441
|
|
442 #ifdef HAVE_XIM
|
|
443
|
|
444 /* X Input Method `methods' */
|
|
445 void XIM_init_device (struct device *d);
|
|
446 void XIM_init_frame (struct frame *f);
|
|
447 void XIM_SetSpotLocation (struct frame *f, int x, int y);
|
|
448 void XIM_SetGeometry (struct frame *f);
|
|
449 void XIM_focus_event (struct frame *f, int in_p);
|
|
450
|
|
451 #ifdef XIM_XLIB
|
|
452 /* XtTypeConverter */
|
|
453 Boolean EmacsXtCvtStringToXIMStyles (
|
|
454 Display *dpy,
|
|
455 XrmValuePtr args,
|
|
456 Cardinal *num_args,
|
|
457 XrmValuePtr from,
|
|
458 XrmValuePtr to_in_out,
|
|
459 XtPointer *converter_data);
|
|
460
|
|
461 /* XtDestructor */
|
|
462 void EmacsFreeXIMStyles (
|
|
463 XtAppContext app,
|
|
464 XrmValuePtr to,
|
|
465 XtPointer converter_data,
|
|
466 XrmValuePtr args,
|
|
467 Cardinal *num_args);
|
|
468
|
|
469 #ifdef DEBUG_XEMACS
|
|
470 void describe_Window (Window win);
|
|
471 void describe_XFontSet (XFontSet font_set);
|
|
472 void describe_XIM (XIM im);
|
|
473 void describe_XIMStyle (XIMStyle style);
|
|
474 void describe_XIMStyles (XIMStyles *styles);
|
|
475 void describe_XIC (XIC ic);
|
|
476 void describe_event_mask (unsigned long mask);
|
|
477 void describe_XRectangle (char *name, XRectangle *rect);
|
|
478 void describe_Status (Status status);
|
|
479 #endif /* DEBUG_XEMACS */
|
|
480 #endif /* XIM_XLIB */
|
|
481 #endif /* HAVE_XIM */
|
|
482
|
771
|
483 extern Lisp_Object Qxintl;
|
|
484
|
428
|
485 extern int in_resource_setting;
|
|
486 extern int in_specifier_change_function;
|
|
487
|
|
488 extern Lisp_Object Vx_initial_argv_list; /* #### ugh! */
|
|
489
|
|
490 #endif /* HAVE_X_WINDOWS */
|
440
|
491
|
|
492 #endif /* INCLUDED_console_x_h_ */
|