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