annotate src/console-x.h @ 217:d44af0c54775 r20-4b7

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