annotate src/xterm.h @ 14105:d8384341d55a

(edt-emulation-on): system-type is a symbol.
author Karl Heuer <kwzh@gnu.org>
date Tue, 09 Jan 1996 23:08:24 +0000
parents 33b3923c36b9
children 519566ee8a29
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 /* Definitions and headers for communication with X protocol.
7307
cd81dba38a49 Update copyright.
Karl Heuer <kwzh@gnu.org>
parents: 7265
diff changeset
2 Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc.
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4 This file is part of GNU Emacs.
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 any later version.
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 GNU General Public License for more details.
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 along with GNU Emacs; see the file COPYING. If not, write to
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20 #include <X11/Xlib.h>
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 #include <X11/cursorfont.h>
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 #include <X11/Xutil.h>
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 #include <X11/keysym.h>
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 #include <X11/Xatom.h>
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 #include <X11/Xresource.h>
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26
5656
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
27 #ifdef USE_X_TOOLKIT
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
28 #include <X11/StringDefs.h>
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
29 #include <X11/IntrinsicP.h> /* CoreP.h needs this */
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
30 #include <X11/CoreP.h> /* foul, but we need this to use our own
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
31 window inside a widget instead of one
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
32 that Xt creates... */
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
33 #include <X11/StringDefs.h>
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
34 #endif
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
35
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
36 /* The class of this X application. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
37 #define EMACS_CLASS "Emacs"
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
38
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
39 /* Bookkeeping to distinguish X versions. */
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
40
1040
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
41 /* HAVE_X11R4 is defined if we have the features of X11R4. It should
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
42 be defined when we're using X11R5, since X11R5 has the features of
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
43 X11R4. If, in the future, we find we need more of these flags
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
44 (HAVE_X11R5, for example), code should always be written to test
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
45 the most recent flag first:
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
46
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
47 #ifdef HAVE_X11R5
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
48 ...
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
49 #elif HAVE_X11R4
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
50 ...
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
51 #elif HAVE_X11
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
52 ...
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
53 #endif
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
54
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
55 If you ever find yourself writing a "#ifdef HAVE_FOO" clause that
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
56 looks a lot like another one, consider moving the text into a macro
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
57 whose definition is configuration-dependent, but whose usage is
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
58 universal - like the stuff in systime.h.
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
59
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
60 It turns out that we can auto-detect whether we're being compiled
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
61 with X11R3 or X11R4 by looking for the flag macros for R4 structure
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
62 members that R3 doesn't have. */
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
63 #ifdef PBaseSize
4711
94fe4e71f7fc (HAVE_X11R4): If AIX, do not define HAVE_X11R4.
Richard M. Stallman <rms@gnu.org>
parents: 3883
diff changeset
64 /* AIX 3.1's X is somewhere between X11R3 and X11R4. It has
94fe4e71f7fc (HAVE_X11R4): If AIX, do not define HAVE_X11R4.
Richard M. Stallman <rms@gnu.org>
parents: 3883
diff changeset
65 PBaseSize, but not XWithdrawWindow, XSetWMName, XSetWMNormalHints,
6603
ec7c89180b65 Define HAVE_X11R4 if AIX3_2 is defined.
Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
parents: 6571
diff changeset
66 XSetWMIconName.
ec7c89180b65 Define HAVE_X11R4 if AIX3_2 is defined.
Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
parents: 6571
diff changeset
67 AIX 3.2 is at least X11R4. */
ec7c89180b65 Define HAVE_X11R4 if AIX3_2 is defined.
Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
parents: 6571
diff changeset
68 #if (!defined AIX) || (defined AIX3_2)
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
69 #define HAVE_X11R4
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
70 #endif
4711
94fe4e71f7fc (HAVE_X11R4): If AIX, do not define HAVE_X11R4.
Richard M. Stallman <rms@gnu.org>
parents: 3883
diff changeset
71 #endif
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
72
2300
dfef2f43f4bf * xfns.c (Fx_open_connection): If we have X11R5, use
Jim Blandy <jimb@redhat.com>
parents: 2208
diff changeset
73 #ifdef XlibSpecificationRelease
dfef2f43f4bf * xfns.c (Fx_open_connection): If we have X11R5, use
Jim Blandy <jimb@redhat.com>
parents: 2208
diff changeset
74 #if XlibSpecificationRelease >= 5
dfef2f43f4bf * xfns.c (Fx_open_connection): If we have X11R5, use
Jim Blandy <jimb@redhat.com>
parents: 2208
diff changeset
75 #define HAVE_X11R5
6870
4b783d429e6e (HAVE_X11R4): If we define HAVE_X11R5, define this too.
Richard M. Stallman <rms@gnu.org>
parents: 6769
diff changeset
76 /* In case someone has X11R5 on AIX 3.1,
4b783d429e6e (HAVE_X11R4): If we define HAVE_X11R5, define this too.
Richard M. Stallman <rms@gnu.org>
parents: 6769
diff changeset
77 make sure HAVE_X11R4 is defined as well as HAVE_X11R5. */
4b783d429e6e (HAVE_X11R4): If we define HAVE_X11R5, define this too.
Richard M. Stallman <rms@gnu.org>
parents: 6769
diff changeset
78 #define HAVE_X11R4
2300
dfef2f43f4bf * xfns.c (Fx_open_connection): If we have X11R5, use
Jim Blandy <jimb@redhat.com>
parents: 2208
diff changeset
79 #endif
dfef2f43f4bf * xfns.c (Fx_open_connection): If we have X11R5, use
Jim Blandy <jimb@redhat.com>
parents: 2208
diff changeset
80 #endif
13346
620c6dc0329c Move the include of Xlocale.h after setting HAVE_X11R5.
Richard M. Stallman <rms@gnu.org>
parents: 13315
diff changeset
81
620c6dc0329c Move the include of Xlocale.h after setting HAVE_X11R5.
Richard M. Stallman <rms@gnu.org>
parents: 13315
diff changeset
82 #ifdef HAVE_X11R5
620c6dc0329c Move the include of Xlocale.h after setting HAVE_X11R5.
Richard M. Stallman <rms@gnu.org>
parents: 13315
diff changeset
83 #define HAVE_X_I18N
620c6dc0329c Move the include of Xlocale.h after setting HAVE_X11R5.
Richard M. Stallman <rms@gnu.org>
parents: 13315
diff changeset
84 #include <X11/Xlocale.h>
620c6dc0329c Move the include of Xlocale.h after setting HAVE_X11R5.
Richard M. Stallman <rms@gnu.org>
parents: 13315
diff changeset
85 #endif
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
86
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
87 #define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
88 XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
89 #define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
90 XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 #define FONT_WIDTH(f) ((f)->max_bounds.width)
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93 #define FONT_HEIGHT(f) ((f)->ascent + (f)->descent)
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 #define FONT_BASE(f) ((f)->ascent)
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
96 #define CHECK_X_FRAME(f, frame) \
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
97 if (NILP (frame)) \
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
98 f = selected_frame; \
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
99 else \
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
100 { \
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
101 CHECK_LIVE_FRAME (frame, 0); \
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
102 f = XFRAME (frame); \
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
103 } \
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
104 if (! FRAME_X_P (f))
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
105
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
106
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
107
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
108 /* The mask of events that text windows always want to receive. This
424
a9b60e014edd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 348
diff changeset
109 does not include mouse movement events. It is used when the window
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
110 is created (in x_window) and and in selection processing.
424
a9b60e014edd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 348
diff changeset
111
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
112 We do include ButtonReleases in this set because Emacs isn't always
424
a9b60e014edd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 348
diff changeset
113 fast enough to catch them when it wants them, and they're rare
a9b60e014edd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 348
diff changeset
114 enough that they don't use much processor time. */
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 #define STANDARD_EVENT_SET \
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
117 (KeyPressMask \
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
118 | ExposureMask \
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
119 | ButtonPressMask \
424
a9b60e014edd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 348
diff changeset
120 | ButtonReleaseMask \
a9b60e014edd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 348
diff changeset
121 | PointerMotionMask \
a9b60e014edd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 348
diff changeset
122 | PointerMotionHintMask \
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
123 | StructureNotifyMask \
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
124 | FocusChangeMask \
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
125 | LeaveWindowMask \
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
126 | EnterWindowMask \
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
127 | VisibilityChangeMask)
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
128
5946
44d0bebba84d (check_x): Declare it.
Karl Heuer <kwzh@gnu.org>
parents: 5677
diff changeset
129 /* This checks to make sure we have a display. */
44d0bebba84d (check_x): Declare it.
Karl Heuer <kwzh@gnu.org>
parents: 5677
diff changeset
130 extern void check_x ();
44d0bebba84d (check_x): Declare it.
Karl Heuer <kwzh@gnu.org>
parents: 5677
diff changeset
131
771
538c0bcb418e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 642
diff changeset
132 extern struct frame *x_window_to_frame ();
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
133
5656
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
134 #ifdef USE_X_TOOLKIT
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
135 extern struct frame *x_any_window_to_frame ();
11612
00bf6e6098d4 Declare x_non_menubar_window_to_frame.
Karl Heuer <kwzh@gnu.org>
parents: 11538
diff changeset
136 extern struct frame *x_non_menubar_window_to_frame ();
6994
b43ec2effc1d (x_top_window_to_frame): Declare this function.
Karl Heuer <kwzh@gnu.org>
parents: 6933
diff changeset
137 extern struct frame *x_top_window_to_frame ();
5656
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
138 #endif
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
139
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
140 extern Visual *select_visual ();
9013
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
141
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142 enum text_cursor_kinds {
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 filled_box_cursor, hollow_box_cursor, bar_cursor
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144 };
9692
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
145
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
146 /* This data type is used for the font_table field
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
147 of struct x_display_info. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
148
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
149 struct font_info
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
150 {
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
151 XFontStruct *font;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
152 char *name;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
153 char *full_name;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
154 };
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
155
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
156 /* Structure recording X pixmap and reference count.
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
157 If REFCOUNT is 0 then this record is free to be reused. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
158
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
159 struct x_bitmap_record
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
160 {
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
161 Pixmap pixmap;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
162 char *file;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
163 int refcount;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
164 /* Record some info about this pixmap. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
165 int height, width, depth;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
166 };
9013
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
167
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
168 /* For each X display, we have a structure that records
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
169 information about it. */
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
171 struct x_display_info
9013
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
172 {
9692
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
173 /* Chain of all x_display_info structures. */
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
174 struct x_display_info *next;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
175 /* Connection number (normally a file descriptor number). */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
176 int connection;
9013
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
177 /* This says how to access this display in Xlib. */
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
178 Display *display;
9692
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
179 /* This is a cons cell of the form (NAME . FONT-LIST-CACHE).
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
180 The same cons cell also appears in x_display_name_list. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
181 Lisp_Object name_list_element;
9013
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
182 /* Number of frames that are on this display. */
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
183 int reference_count;
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
184 /* The Screen this connection is connected to. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
185 Screen *screen;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
186 /* The Visual being used for this display. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
187 Visual *visual;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
188 /* Number of panes on this screen. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
189 int n_planes;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
190 /* Dimensions of this screen. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
191 int height, width;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
192 /* Mask of things that cause the mouse to be grabbed. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
193 int grabbed;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
194 /* Emacs bitmap-id of the default icon bitmap for this frame.
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
195 Or -1 if none has been allocated yet. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
196 int icon_bitmap_id;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
197 /* The root window of this screen. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
198 Window root_window;
9692
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
199 /* The cursor to use for vertical scroll bars. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
200 Cursor vertical_scroll_bar_cursor;
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
201 /* X Resource data base */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
202 XrmDatabase xrdb;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
203
9692
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
204 /* A table of all the fonts we have already loaded. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
205 struct font_info *font_table;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
206
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
207 /* The current capacity of x_font_table. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
208 int font_table_size;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
209
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
210 /* Reusable Graphics Context for drawing a cursor in a non-default face. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
211 GC scratch_cursor_gc;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
212
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
213 /* These variables describe the range of text currently shown
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
214 in its mouse-face, together with the window they apply to.
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
215 As long as the mouse stays within this range, we need not
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
216 redraw anything on its account. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
217 int mouse_face_beg_row, mouse_face_beg_col;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
218 int mouse_face_end_row, mouse_face_end_col;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
219 int mouse_face_past_end;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
220 Lisp_Object mouse_face_window;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
221 int mouse_face_face_id;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
222
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
223 /* 1 if a mouse motion event came and we didn't handle it right away because
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
224 gc was in progress. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
225 int mouse_face_deferred_gc;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
226
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
227 /* FRAME and X, Y position of mouse when last checked for
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
228 highlighting. X and Y can be negative or out of range for the frame. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
229 struct frame *mouse_face_mouse_frame;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
230 int mouse_face_mouse_x, mouse_face_mouse_y;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
231
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
232 /* Nonzero means defer mouse-motion highlighting. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
233 int mouse_face_defer;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
234
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
235 char *x_id_name;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
236
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
237 /* The number of fonts actually stored in x_font_table.
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
238 font_table[n] is used and valid iff 0 <= n < n_fonts.
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
239 0 <= n_fonts <= font_table_size. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
240 int n_fonts;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
241
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
242 /* Pointer to bitmap records. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
243 struct x_bitmap_record *bitmaps;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
244
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
245 /* Allocated size of bitmaps field. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
246 int bitmaps_size;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
247
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
248 /* Last used bitmap index. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
249 int bitmaps_last;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
250
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
251 /* Which modifier keys are on which modifier bits?
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
252
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
253 With each keystroke, X returns eight bits indicating which modifier
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
254 keys were held down when the key was pressed. The interpretation
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
255 of the top five modifier bits depends on what keys are attached
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
256 to them. If the Meta_L and Meta_R keysyms are on mod5, then mod5
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
257 is the meta bit.
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
258
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
259 meta_mod_mask is a mask containing the bits used for the meta key.
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
260 It may have more than one bit set, if more than one modifier bit
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
261 has meta keys on it. Basically, if EVENT is a KeyPress event,
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
262 the meta key is pressed if (EVENT.state & meta_mod_mask) != 0.
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
263
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
264 shift_lock_mask is LockMask if the XK_Shift_Lock keysym is on the
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
265 lock modifier bit, or zero otherwise. Non-alphabetic keys should
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
266 only be affected by the lock modifier bit if XK_Shift_Lock is in
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
267 use; XK_Caps_Lock should only affect alphabetic keys. With this
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
268 arrangement, the lock modifier should shift the character if
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
269 (EVENT.state & shift_lock_mask) != 0. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
270 int meta_mod_mask, shift_lock_mask;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
271
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
272 /* These are like meta_mod_mask, but for different modifiers. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
273 int alt_mod_mask, super_mod_mask, hyper_mod_mask;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
274
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
275 /* Communication with window managers. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
276 Atom Xatom_wm_protocols;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
277 /* Kinds of protocol things we may receive. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
278 Atom Xatom_wm_take_focus;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
279 Atom Xatom_wm_save_yourself;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
280 Atom Xatom_wm_delete_window;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
281 /* Atom for indicating window state to the window manager. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
282 Atom Xatom_wm_change_state;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
283 /* Other WM communication */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
284 Atom Xatom_wm_configure_denied; /* When our config request is denied */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
285 Atom Xatom_wm_window_moved; /* When the WM moves us. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
286 /* EditRes protocol */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
287 Atom Xatom_editres;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
288
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
289 /* More atoms, which are selection types. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
290 Atom Xatom_CLIPBOARD, Xatom_TIMESTAMP, Xatom_TEXT, Xatom_DELETE,
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
291 Xatom_MULTIPLE, Xatom_INCR, Xatom_EMACS_TMP, Xatom_TARGETS, Xatom_NULL,
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
292 Xatom_ATOM_PAIR;
11013
f0fe22922005 (struct x_display_info): member kboard (formerly perdisplay) is now a pointer,
Karl Heuer <kwzh@gnu.org>
parents: 10741
diff changeset
293 #ifdef MULTI_KBOARD
11352
800e56de3795 (struct x_display_info): Use `struct kboard', not KBOARD.
Richard M. Stallman <rms@gnu.org>
parents: 11163
diff changeset
294 struct kboard *kboard;
11013
f0fe22922005 (struct x_display_info): member kboard (formerly perdisplay) is now a pointer,
Karl Heuer <kwzh@gnu.org>
parents: 10741
diff changeset
295 #endif
11163
d6b56a8f415b (struct x_display_info): New member cut_buffers_initialized.
Karl Heuer <kwzh@gnu.org>
parents: 11013
diff changeset
296 int cut_buffers_initialized; /* Whether we're sure they all exist */
11538
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
297
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
298 /* The frame (if any) which has the X window that has keyboard focus.
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
299 Zero if none. This is examined by Ffocus_frame in xfns.c. Note
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
300 that a mere EnterNotify event can set this; if you need to know the
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
301 last frame specified in a FocusIn or FocusOut event, use
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
302 x_focus_event_frame. */
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
303 struct frame *x_focus_frame;
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
304
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
305 /* The last frame mentioned in a FocusIn or FocusOut event. This is
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
306 separate from x_focus_frame, because whether or not LeaveNotify
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
307 events cause us to lose focus depends on whether or not we have
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
308 received a FocusIn event for it. */
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
309 struct frame *x_focus_event_frame;
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
310
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
311 /* The frame which currently has the visual highlight, and should get
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
312 keyboard input (other sorts of input have the frame encoded in the
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
313 event). It points to the X focus frame's selected window's
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
314 frame. It differs from x_focus_frame when we're using a global
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
315 minibuffer. */
d0bd2102adbc (struct x_display_info): New members x_focus_frame,
Karl Heuer <kwzh@gnu.org>
parents: 11352
diff changeset
316 struct frame *x_highlight_frame;
9013
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
317 };
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
318
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
319 /* This is a chain of structures for all the X displays currently in use. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
320 extern struct x_display_info *x_display_list;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
321
9692
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
322 /* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE),
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
323 one for each element of x_display_list and in the same order.
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
324 NAME is the name of the frame.
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
325 FONT-LIST-CACHE records previous values returned by x-list-fonts. */
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
326 extern Lisp_Object x_display_name_list;
f4fa600e345f Delete X10 code.
Richard M. Stallman <rms@gnu.org>
parents: 9655
diff changeset
327
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
328 extern struct x_display_info *x_display_info_for_display ();
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
329 extern struct x_display_info *x_display_info_for_name ();
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
330
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
331 extern struct x_display_info *x_term_init ();
9013
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
332
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
333 /* Each X frame object points to its own struct x_output object
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
334 in the output_data.x field. The x_output structure contains
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
335 the information that is specific to X windows. */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
336
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
337 struct x_output
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
338 {
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
339 /* Position of the X window (x and y offsets in root window). */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
340 int left_pos;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
341 int top_pos;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
342
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
343 /* Border width of the X window as known by the X window system. */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
344 int border_width;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
345
7265
bca3fe63efec (struct x_display): New field size_hint_flags.
Richard M. Stallman <rms@gnu.org>
parents: 6994
diff changeset
346 /* Size of the X window in pixels. */
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
347 int pixel_height, pixel_width;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
348
11899
e1834fb53c35 (struct x_display): New field menubar_height.
Karl Heuer <kwzh@gnu.org>
parents: 11612
diff changeset
349 /* Height of menu bar widget, in pixels.
e1834fb53c35 (struct x_display): New field menubar_height.
Karl Heuer <kwzh@gnu.org>
parents: 11612
diff changeset
350 Zero if not using the X toolkit.
e1834fb53c35 (struct x_display): New field menubar_height.
Karl Heuer <kwzh@gnu.org>
parents: 11612
diff changeset
351 When using the toolkit, this value is not meaningful
e1834fb53c35 (struct x_display): New field menubar_height.
Karl Heuer <kwzh@gnu.org>
parents: 11612
diff changeset
352 if the menubar is turned off. */
e1834fb53c35 (struct x_display): New field menubar_height.
Karl Heuer <kwzh@gnu.org>
parents: 11612
diff changeset
353 int menubar_height;
e1834fb53c35 (struct x_display): New field menubar_height.
Karl Heuer <kwzh@gnu.org>
parents: 11612
diff changeset
354
6769
55237bfe01e5 (struct x_display): New field line_height.
Richard M. Stallman <rms@gnu.org>
parents: 6758
diff changeset
355 /* Height of a line, in pixels. */
55237bfe01e5 (struct x_display): New field line_height.
Richard M. Stallman <rms@gnu.org>
parents: 6758
diff changeset
356 int line_height;
55237bfe01e5 (struct x_display): New field line_height.
Richard M. Stallman <rms@gnu.org>
parents: 6758
diff changeset
357
7265
bca3fe63efec (struct x_display): New field size_hint_flags.
Richard M. Stallman <rms@gnu.org>
parents: 6994
diff changeset
358 /* The tiled border used when the mouse is out of the frame. */
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
359 Pixmap border_tile;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
360
7265
bca3fe63efec (struct x_display): New field size_hint_flags.
Richard M. Stallman <rms@gnu.org>
parents: 6994
diff changeset
361 /* Here are the Graphics Contexts for the default font. */
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
362 GC normal_gc; /* Normal video */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
363 GC reverse_gc; /* Reverse video */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
364 GC cursor_gc; /* cursor drawing */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
365
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
366 /* Width of the internal border. This is a line of background color
771
538c0bcb418e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 642
diff changeset
367 just inside the window's border. When the frame is selected,
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
368 a highlighting is displayed inside the internal border. */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
369 int internal_border_width;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
370
771
538c0bcb418e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 642
diff changeset
371 /* The X window used for this frame.
538c0bcb418e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 642
diff changeset
372 May be zero while the frame object is being created
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
373 and the X window has not yet been created. */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
374 Window window_desc;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
375
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
376 /* The X window used for the bitmap icon;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
377 or 0 if we don't have a bitmap icon. */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
378 Window icon_desc;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
379
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
380 /* The X window that is the parent of this X window.
10171
3c022e99daab (struct x_display): New field explicit_parent.
Richard M. Stallman <rms@gnu.org>
parents: 9961
diff changeset
381 Usually this is a window that was made by the window manager,
3c022e99daab (struct x_display): New field explicit_parent.
Richard M. Stallman <rms@gnu.org>
parents: 9961
diff changeset
382 but it can be the root window, and it can be explicitly specified
3c022e99daab (struct x_display): New field explicit_parent.
Richard M. Stallman <rms@gnu.org>
parents: 9961
diff changeset
383 (see the explicit_parent field, below). */
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
384 Window parent_desc;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
385
5656
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
386 #ifdef USE_X_TOOLKIT
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
387 /* The widget of this screen. This is the window of a "shell" widget. */
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
388 Widget widget;
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
389 /* The XmPanedWindows... */
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
390 Widget column_widget;
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
391 /* The widget of the edit portion of this screen; the window in
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
392 "window_desc" is inside of this. */
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
393 Widget edit_widget;
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
394
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
395 Widget menubar_widget;
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
396 #endif
94f317eca45d [USE_X_TOOLKIT]: Include StringDefs.h, IntrinsicP.h,
Richard M. Stallman <rms@gnu.org>
parents: 4711
diff changeset
397
9544
1f8c357797a2 (x_display): Changed icon_bitmap_flag to icon_bitmap.
Richard M. Stallman <rms@gnu.org>
parents: 9259
diff changeset
398 /* If >=0, a bitmap index. The indicated bitmap is used for the
1f8c357797a2 (x_display): Changed icon_bitmap_flag to icon_bitmap.
Richard M. Stallman <rms@gnu.org>
parents: 9259
diff changeset
399 icon. */
1f8c357797a2 (x_display): Changed icon_bitmap_flag to icon_bitmap.
Richard M. Stallman <rms@gnu.org>
parents: 9259
diff changeset
400 int icon_bitmap;
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
401
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
402 XFontStruct *font;
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
403
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
404 /* Pixel values used for various purposes.
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
405 border_pixel may be -1 meaning use a gray tile. */
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
406 unsigned long background_pixel;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
407 unsigned long foreground_pixel;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
408 unsigned long cursor_pixel;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
409 unsigned long border_pixel;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
410 unsigned long mouse_pixel;
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
411 unsigned long cursor_foreground_pixel;
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
412
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
413 /* Descriptor for the cursor in use for this window. */
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
414 Cursor text_cursor;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
415 Cursor nontext_cursor;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
416 Cursor modeline_cursor;
6758
2395a59123b8 (cross_cursor): New field for struct x_display.
Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
parents: 6603
diff changeset
417 Cursor cross_cursor;
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
418
7265
bca3fe63efec (struct x_display): New field size_hint_flags.
Richard M. Stallman <rms@gnu.org>
parents: 6994
diff changeset
419 /* Flag to set when the X window needs to be completely repainted. */
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
420 int needs_exposure;
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
421
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1788
diff changeset
422 /* What kind of text cursor is drawn in this window right now?
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1788
diff changeset
423 (If there is no cursor (phys_cursor_x < 0), then this means nothing.) */
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1788
diff changeset
424 enum text_cursor_kinds current_cursor;
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1788
diff changeset
425
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1788
diff changeset
426 /* What kind of text cursor should we draw in the future?
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1788
diff changeset
427 This should always be filled_box_cursor or bar_cursor. */
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1788
diff changeset
428 enum text_cursor_kinds desired_cursor;
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
429
10741
2bbb48f3dd0c (struct x_display): New element cursor_width.
Richard M. Stallman <rms@gnu.org>
parents: 10610
diff changeset
430 /* Width of bar cursor (if we are using that). */
2bbb48f3dd0c (struct x_display): New element cursor_width.
Richard M. Stallman <rms@gnu.org>
parents: 10610
diff changeset
431 int cursor_width;
2bbb48f3dd0c (struct x_display): New element cursor_width.
Richard M. Stallman <rms@gnu.org>
parents: 10610
diff changeset
432
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
433 /* These are the current window manager hints. It seems that
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
434 XSetWMHints, when presented with an unset bit in the `flags'
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
435 member of the hints structure, does not leave the corresponding
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
436 attribute unchanged; rather, it resets that attribute to its
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
437 default value. For example, unless you set the `icon_pixmap'
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
438 field and the `IconPixmapHint' bit, XSetWMHints will forget what
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
439 your icon pixmap was. This is rather troublesome, since some of
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
440 the members (for example, `input' and `icon_pixmap') want to stay
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
441 the same throughout the execution of Emacs. So, we keep this
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
442 structure around, just leaving values in it and adding new bits
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
443 to the mask as we go. */
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 771
diff changeset
444 XWMHints wm_hints;
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
445
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
446 /* The size of the extra width currently allotted for vertical
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
447 scroll bars, in pixels. */
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
448 int vertical_scroll_bar_extra;
2394
6ec15e6b2a08 (FRAME_FACES, FRAME_N_FACES, FRAME_DEFAULT_FACE)
Richard M. Stallman <rms@gnu.org>
parents: 2354
diff changeset
449
3883
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
450 /* Table of parameter faces for this frame. Any X resources (pixel
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
451 values, fonts) referred to here have been allocated explicitly
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
452 for this face, and should be freed if we change the face. */
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
453 struct face **param_faces;
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
454 int n_param_faces;
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
455
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
456 /* Table of computed faces for this frame. These are the faces
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
457 whose indexes go into the upper bits of a glyph, computed by
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
458 combining the parameter faces specified by overlays, text
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
459 properties, and what have you. The X resources mentioned here
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
460 are all shared with parameter faces. */
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
461 struct face **computed_faces;
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
462 int n_computed_faces; /* How many are valid */
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
463 int size_computed_faces; /* How many are allocated */
6933
b5f510efd194 (x_display): New field win_gravity.
Richard M. Stallman <rms@gnu.org>
parents: 6870
diff changeset
464
b5f510efd194 (x_display): New field win_gravity.
Richard M. Stallman <rms@gnu.org>
parents: 6870
diff changeset
465 /* This is the gravity value for the specified window position. */
b5f510efd194 (x_display): New field win_gravity.
Richard M. Stallman <rms@gnu.org>
parents: 6870
diff changeset
466 int win_gravity;
7265
bca3fe63efec (struct x_display): New field size_hint_flags.
Richard M. Stallman <rms@gnu.org>
parents: 6994
diff changeset
467
bca3fe63efec (struct x_display): New field size_hint_flags.
Richard M. Stallman <rms@gnu.org>
parents: 6994
diff changeset
468 /* The geometry flags for this window. */
bca3fe63efec (struct x_display): New field size_hint_flags.
Richard M. Stallman <rms@gnu.org>
parents: 6994
diff changeset
469 int size_hint_flags;
9013
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
470
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
471 /* This is the Emacs structure for the X display this frame is on. */
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
472 struct x_display_info *display_info;
10171
3c022e99daab (struct x_display): New field explicit_parent.
Richard M. Stallman <rms@gnu.org>
parents: 9961
diff changeset
473
12658
dd26c4fb9999 (struct x_display): New fields saved_button_event, id.
Richard M. Stallman <rms@gnu.org>
parents: 12275
diff changeset
474 /* This is a button event that wants to activate the menubar.
dd26c4fb9999 (struct x_display): New fields saved_button_event, id.
Richard M. Stallman <rms@gnu.org>
parents: 12275
diff changeset
475 We save it here until the command loop gets to think about it. */
dd26c4fb9999 (struct x_display): New fields saved_button_event, id.
Richard M. Stallman <rms@gnu.org>
parents: 12275
diff changeset
476 XButtonEvent *saved_button_event;
dd26c4fb9999 (struct x_display): New fields saved_button_event, id.
Richard M. Stallman <rms@gnu.org>
parents: 12275
diff changeset
477
dd26c4fb9999 (struct x_display): New fields saved_button_event, id.
Richard M. Stallman <rms@gnu.org>
parents: 12275
diff changeset
478 /* This is the widget id used for this frame's menubar in lwlib. */
dd26c4fb9999 (struct x_display): New fields saved_button_event, id.
Richard M. Stallman <rms@gnu.org>
parents: 12275
diff changeset
479 #ifdef USE_X_TOOLKIT
dd26c4fb9999 (struct x_display): New fields saved_button_event, id.
Richard M. Stallman <rms@gnu.org>
parents: 12275
diff changeset
480 int id;
dd26c4fb9999 (struct x_display): New fields saved_button_event, id.
Richard M. Stallman <rms@gnu.org>
parents: 12275
diff changeset
481 #endif
dd26c4fb9999 (struct x_display): New fields saved_button_event, id.
Richard M. Stallman <rms@gnu.org>
parents: 12275
diff changeset
482
10171
3c022e99daab (struct x_display): New field explicit_parent.
Richard M. Stallman <rms@gnu.org>
parents: 9961
diff changeset
483 /* Nonzero means our parent is another application's window
3c022e99daab (struct x_display): New field explicit_parent.
Richard M. Stallman <rms@gnu.org>
parents: 9961
diff changeset
484 and was explicitly specified. */
3c022e99daab (struct x_display): New field explicit_parent.
Richard M. Stallman <rms@gnu.org>
parents: 9961
diff changeset
485 char explicit_parent;
12191
33e8a9ef3cab (struct x_display): New field asked_for_visible.
Karl Heuer <kwzh@gnu.org>
parents: 12072
diff changeset
486
33e8a9ef3cab (struct x_display): New field asked_for_visible.
Karl Heuer <kwzh@gnu.org>
parents: 12072
diff changeset
487 /* Nonzero means tried already to make this frame visible. */
33e8a9ef3cab (struct x_display): New field asked_for_visible.
Karl Heuer <kwzh@gnu.org>
parents: 12072
diff changeset
488 char asked_for_visible;
13226
3b15cf8aa50d (HAVE_X_I18N): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 12666
diff changeset
489
3b15cf8aa50d (HAVE_X_I18N): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 12666
diff changeset
490 #ifdef HAVE_X_I18N
3b15cf8aa50d (HAVE_X_I18N): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 12666
diff changeset
491 /* Input context (currently, this means Compose key handler setup). */
3b15cf8aa50d (HAVE_X_I18N): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 12666
diff changeset
492 XIC xic;
3b15cf8aa50d (HAVE_X_I18N): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 12666
diff changeset
493 #endif
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
494 };
1040
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
495
3883
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
496 /* Get at the computed faces of an X window frame. */
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
497 #define FRAME_PARAM_FACES(f) ((f)->output_data.x->param_faces)
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
498 #define FRAME_N_PARAM_FACES(f) ((f)->output_data.x->n_param_faces)
3883
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
499 #define FRAME_DEFAULT_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[0])
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
500 #define FRAME_MODE_LINE_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[1])
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
501
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
502 #define FRAME_COMPUTED_FACES(f) ((f)->output_data.x->computed_faces)
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
503 #define FRAME_N_COMPUTED_FACES(f) ((f)->output_data.x->n_computed_faces)
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
504 #define FRAME_SIZE_COMPUTED_FACES(f) ((f)->output_data.x->size_computed_faces)
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
505 #define FRAME_DEFAULT_FACE(f) ((f)->output_data.x->computed_faces[0])
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
506 #define FRAME_MODE_LINE_FACE(f) ((f)->output_data.x->computed_faces[1])
2394
6ec15e6b2a08 (FRAME_FACES, FRAME_N_FACES, FRAME_DEFAULT_FACE)
Richard M. Stallman <rms@gnu.org>
parents: 2354
diff changeset
507
1040
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
508 /* Return the window associated with the frame F. */
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
509 #define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc)
1040
eb7ebe86e885 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
510
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
511 #define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
512 #define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
513 #define FRAME_FONT(f) ((f)->output_data.x->font)
13420
72e8212db4d9 (FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): New macros.
Geoff Voelker <voelker@cs.washington.edu>
parents: 13346
diff changeset
514 #define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width)
72e8212db4d9 (FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): New macros.
Geoff Voelker <voelker@cs.washington.edu>
parents: 13346
diff changeset
515 #define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height)
9547
b0cf6d689f7a (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL)
Richard M. Stallman <rms@gnu.org>
parents: 9544
diff changeset
516
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
517 /* This gives the x_display_info structure for the display F is on. */
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
518 #define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info)
9013
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
519
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
520 /* This is the `Display *' which frame F is on. */
9655
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
521 #define FRAME_X_DISPLAY(f) (FRAME_X_DISPLAY_INFO (f)->display)
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
522
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
523 /* This is the `Screen *' which frame F is on. */
93ccc7bbae8a (struct x_display_info): Struct renamed from x_screen.
Richard M. Stallman <rms@gnu.org>
parents: 9547
diff changeset
524 #define FRAME_X_SCREEN(f) (FRAME_X_DISPLAY_INFO (f)->screen)
9013
0ab80494b155 (FRAME_X_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 8947
diff changeset
525
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1788
diff changeset
526 /* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
527 #define PIXEL_WIDTH(f) ((f)->output_data.x->pixel_width)
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
528 #define PIXEL_HEIGHT(f) ((f)->output_data.x->pixel_height)
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1788
diff changeset
529
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
530 #define FRAME_DESIRED_CURSOR(f) ((f)->output_data.x->desired_cursor)
1821
04fb1d3d6992 JimB's changes since January 18th
Jim Blandy <jimb@redhat.com>
parents: 1788
diff changeset
531
13315
2edc6ae38a78 (FRAME_XIC): Fix wrong field name.
Richard M. Stallman <rms@gnu.org>
parents: 13226
diff changeset
532 #define FRAME_XIC(f) ((f)->output_data.x->xic)
259
470231fe99be Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
533
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
534 /* X-specific scroll bar stuff. */
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
535
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
536 /* We represent scroll bars as lisp vectors. This allows us to place
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
537 references to them in windows without worrying about whether we'll
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
538 end up with windows referring to dead scroll bars; the garbage
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
539 collector will free it when its time comes.
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
540
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
541 We use struct scroll_bar as a template for accessing fields of the
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
542 vector. */
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
543
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
544 struct scroll_bar {
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
545
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
546 /* These fields are shared by all vectors. */
8837
a48847852901 (struct scroll_bar, SCROLL_BAR_VEC_SIZE): Use EMACS_INT.
Richard M. Stallman <rms@gnu.org>
parents: 7307
diff changeset
547 EMACS_INT size_from_Lisp_Vector_struct;
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
548 struct Lisp_Vector *next_from_Lisp_Vector_struct;
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
549
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
550 /* The window we're a scroll bar for. */
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
551 Lisp_Object window;
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
552
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
553 /* The next and previous in the chain of scroll bars in this frame. */
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
554 Lisp_Object next, prev;
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
555
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
556 /* The X window representing this scroll bar. Since this is a full
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
557 32-bit quantity, we store it split into two 32-bit values. */
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
558 Lisp_Object x_window_low, x_window_high;
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
559
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
560 /* The position and size of the scroll bar in pixels, relative to the
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
561 frame. */
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
562 Lisp_Object top, left, width, height;
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
563
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
564 /* The starting and ending positions of the handle, relative to the
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
565 handle area (i.e. zero is the top position, not
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
566 SCROLL_BAR_TOP_BORDER). If they're equal, that means the handle
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
567 hasn't been drawn yet.
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
568
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
569 These are not actually the locations where the beginning and end
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
570 are drawn; in order to keep handles from becoming invisible when
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
571 editing large files, we establish a minimum height by always
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
572 drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
573 where they would be normally; the bottom and top are in a
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
574 different co-ordinate system. */
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
575 Lisp_Object start, end;
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
576
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
577 /* If the scroll bar handle is currently being dragged by the user,
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
578 this is the number of pixels from the top of the handle to the
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
579 place where the user grabbed it. If the handle isn't currently
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
580 being dragged, this is Qnil. */
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
581 Lisp_Object dragging;
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
582 };
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
583
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
584 /* The number of elements a vector holding a struct scroll_bar needs. */
9961
5ecf054a8c8f (XSCROLL_BAR): Extract from Lisp_Vector, not generic pointer.
Karl Heuer <kwzh@gnu.org>
parents: 9692
diff changeset
585 #define SCROLL_BAR_VEC_SIZE \
5ecf054a8c8f (XSCROLL_BAR): Extract from Lisp_Vector, not generic pointer.
Karl Heuer <kwzh@gnu.org>
parents: 9692
diff changeset
586 ((sizeof (struct scroll_bar) \
5ecf054a8c8f (XSCROLL_BAR): Extract from Lisp_Vector, not generic pointer.
Karl Heuer <kwzh@gnu.org>
parents: 9692
diff changeset
587 - sizeof (EMACS_INT) - sizeof (struct Lisp_Vector *)) \
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
588 / sizeof (Lisp_Object))
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
589
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
590 /* Turning a lisp vector value into a pointer to a struct scroll_bar. */
9961
5ecf054a8c8f (XSCROLL_BAR): Extract from Lisp_Vector, not generic pointer.
Karl Heuer <kwzh@gnu.org>
parents: 9692
diff changeset
591 #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec))
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
592
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
593
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
594 /* Building a 32-bit C integer from two 16-bit lisp integers. */
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
595 #define SCROLL_BAR_PACK(low, high) (XINT (high) << 16 | XINT (low))
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
596
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
597 /* Setting two lisp integers to the low and high words of a 32-bit C int. */
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
598 #define SCROLL_BAR_UNPACK(low, high, int32) \
9259
df555d80f093 (SCROLL_BAR_UNPACK): Use new accessor macros instead of calling XSET directly.
Karl Heuer <kwzh@gnu.org>
parents: 9168
diff changeset
599 (XSETINT ((low), (int32) & 0xffff), \
df555d80f093 (SCROLL_BAR_UNPACK): Use new accessor macros instead of calling XSET directly.
Karl Heuer <kwzh@gnu.org>
parents: 9168
diff changeset
600 XSETINT ((high), ((int32) >> 16) & 0xffff))
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
601
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
602
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
603 /* Extract the X window id of the scroll bar from a struct scroll_bar. */
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
604 #define SCROLL_BAR_X_WINDOW(ptr) \
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
605 ((Window) SCROLL_BAR_PACK ((ptr)->x_window_low, (ptr)->x_window_high))
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
606
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
607 /* Store a window id in a struct scroll_bar. */
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
608 #define SET_SCROLL_BAR_X_WINDOW(ptr, id) \
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
609 (SCROLL_BAR_UNPACK ((ptr)->x_window_low, (ptr)->x_window_high, (int) id))
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
610
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
611
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
612 /* Return the outside pixel height for a vertical scroll bar HEIGHT
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
613 rows high on frame F. */
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
614 #define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
615 ((height) * (f)->output_data.x->line_height)
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
616
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
617 /* Return the inside width of a vertical scroll bar, given the outside
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
618 width. */
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
619 #define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(width) \
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
620 ((width) - VERTICAL_SCROLL_BAR_LEFT_BORDER - VERTICAL_SCROLL_BAR_RIGHT_BORDER)
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
621
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
622 /* Return the length of the rectangle within which the top of the
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
623 handle must stay. This isn't equivalent to the inside height,
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
624 because the scroll bar handle has a minimum height.
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
625
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
626 This is the real range of motion for the scroll bar, so when we're
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
627 scaling buffer positions to scroll bar positions, we use this, not
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
628 VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
629 #define VERTICAL_SCROLL_BAR_TOP_RANGE(height) \
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
630 (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (height) - VERTICAL_SCROLL_BAR_MIN_HANDLE)
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
631
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
632 /* Return the inside height of vertical scroll bar, given the outside
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
633 height. See VERTICAL_SCROLL_BAR_TOP_RANGE too. */
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
634 #define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(height) \
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
635 ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER)
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
636
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
637
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
638 /* Border widths for scroll bars.
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
639
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
640 Scroll bar windows don't have any X borders; their border width is
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
641 set to zero, and we redraw borders ourselves. This makes the code
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
642 a bit cleaner, since we don't have to convert between outside width
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
643 (used when relating to the rest of the screen) and inside width
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
644 (used when sizing and drawing the scroll bar window itself).
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
645
3591
507f64624555 Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents: 3195
diff changeset
646 The handle moves up and down/back and forth in a rectangle inset
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
647 from the edges of the scroll bar. These are widths by which we
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
648 inset the handle boundaries from the scroll bar edges. */
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
649 #define VERTICAL_SCROLL_BAR_LEFT_BORDER (2)
6357
fb5923ece02c (VERTICAL_SCROLL_BAR_RIGHT_BORDER): Change from 3 to 2.
Karl Heuer <kwzh@gnu.org>
parents: 5946
diff changeset
650 #define VERTICAL_SCROLL_BAR_RIGHT_BORDER (2)
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
651 #define VERTICAL_SCROLL_BAR_TOP_BORDER (2)
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
652 #define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (2)
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
653
1994
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
654 /* Minimum lengths for scroll bar handles, in pixels. */
73ce9dd21093 Use the term `scroll bar', instead of `scrollbar'.
Jim Blandy <jimb@redhat.com>
parents: 1821
diff changeset
655 #define VERTICAL_SCROLL_BAR_MIN_HANDLE (5)
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
656
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
657
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
658 /* Manipulating pixel sizes and character sizes.
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
659 Knowledge of which factors affect the overall size of the window should
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
660 be hidden in these macros, if that's possible.
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
661
9168
632d43f8cde2 Comment fix.
Karl Heuer <kwzh@gnu.org>
parents: 9013
diff changeset
662 Return the upper/left pixel position of the character cell on frame F
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
663 at ROW/COL. */
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
664 #define CHAR_TO_PIXEL_ROW(f, row) \
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
665 ((f)->output_data.x->internal_border_width \
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
666 + (row) * (f)->output_data.x->line_height)
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
667 #define CHAR_TO_PIXEL_COL(f, col) \
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
668 ((f)->output_data.x->internal_border_width \
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
669 + (col) * FONT_WIDTH ((f)->output_data.x->font))
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
670
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
671 /* Return the pixel width/height of frame F if it has
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
672 WIDTH columns/HEIGHT rows. */
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
673 #define CHAR_TO_PIXEL_WIDTH(f, width) \
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
674 (CHAR_TO_PIXEL_COL (f, width) \
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
675 + (f)->output_data.x->vertical_scroll_bar_extra \
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
676 + (f)->output_data.x->internal_border_width)
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
677 #define CHAR_TO_PIXEL_HEIGHT(f, height) \
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
678 (CHAR_TO_PIXEL_ROW (f, height) \
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
679 + (f)->output_data.x->internal_border_width)
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
680
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
681
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
682 /* Return the row/column (zero-based) of the character cell containing
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
683 the pixel on FRAME at ROW/COL. */
3195
1071243e14c7 (PIXEL_TO_CHAR_COL, PIXEL_TO_CHAR_ROW): Fix mismatch in arg names.
Richard M. Stallman <rms@gnu.org>
parents: 3077
diff changeset
684 #define PIXEL_TO_CHAR_ROW(f, row) \
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
685 (((row) - (f)->output_data.x->internal_border_width) \
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
686 / (f)->output_data.x->line_height)
3195
1071243e14c7 (PIXEL_TO_CHAR_COL, PIXEL_TO_CHAR_ROW): Fix mismatch in arg names.
Richard M. Stallman <rms@gnu.org>
parents: 3077
diff changeset
687 #define PIXEL_TO_CHAR_COL(f, col) \
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
688 (((col) - (f)->output_data.x->internal_border_width) \
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
689 / FONT_WIDTH ((f)->output_data.x->font))
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
690
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
691 /* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
692 frame F? */
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
693 #define PIXEL_TO_CHAR_WIDTH(f, width) \
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
694 (PIXEL_TO_CHAR_COL (f, ((width) \
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
695 - (f)->output_data.x->internal_border_width \
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
696 - (f)->output_data.x->vertical_scroll_bar_extra)))
1721
6ba3bca4c3de * frame.h (struct frame): New fields `can_have_scrollbars' and
Jim Blandy <jimb@redhat.com>
parents: 1531
diff changeset
697 #define PIXEL_TO_CHAR_HEIGHT(f, height) \
1788
aaccd635fb71 Make scrollbar structures into lisp objects, so that they can be
Jim Blandy <jimb@redhat.com>
parents: 1721
diff changeset
698 (PIXEL_TO_CHAR_ROW (f, ((height) \
12666
47630952226e (struct x_output): Renamed from struct x_display.
Richard M. Stallman <rms@gnu.org>
parents: 12658
diff changeset
699 - (f)->output_data.x->internal_border_width)))
2196
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
700
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
701 /* If a struct input_event has a kind which is selection_request_event
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
702 or selection_clear_event, then its contents are really described
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
703 by this structure. */
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
704
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
705 /* For an event of kind selection_request_event,
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
706 this structure really describes the contents. */
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
707 struct selection_input_event
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
708 {
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
709 int kind;
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
710 Display *display;
14030
33b3923c36b9 Undo previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13939
diff changeset
711 /* We spell it with an "o" here because X does. */
33b3923c36b9 Undo previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13939
diff changeset
712 Window requestor;
2196
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
713 Atom selection, target, property;
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
714 Time time;
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
715 };
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
716
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
717 #define SELECTION_EVENT_DISPLAY(eventp) \
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
718 (((struct selection_input_event *) (eventp))->display)
14030
33b3923c36b9 Undo previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13939
diff changeset
719 /* We spell it with an "o" here because X does. */
33b3923c36b9 Undo previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13939
diff changeset
720 #define SELECTION_EVENT_REQUESTOR(eventp) \
33b3923c36b9 Undo previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13939
diff changeset
721 (((struct selection_input_event *) (eventp))->requestor)
2196
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
722 #define SELECTION_EVENT_SELECTION(eventp) \
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
723 (((struct selection_input_event *) (eventp))->selection)
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
724 #define SELECTION_EVENT_TARGET(eventp) \
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
725 (((struct selection_input_event *) (eventp))->target)
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
726 #define SELECTION_EVENT_PROPERTY(eventp) \
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
727 (((struct selection_input_event *) (eventp))->property)
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
728 #define SELECTION_EVENT_TIME(eventp) \
75e1f1ee83ad (SELECTION_EVENT_DISPLAY): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 1994
diff changeset
729 (((struct selection_input_event *) (eventp))->time)
3077
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
730
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
731
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
732 /* Interface to the face code functions. */
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
733
3883
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
734 /* Create the first two computed faces for a frame -- the ones that
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
735 have GC's. */
3077
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
736 extern void init_frame_faces (/* FRAME_PTR */);
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
737
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
738 /* Free the resources for the faces associated with a frame. */
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
739 extern void free_frame_faces (/* FRAME_PTR */);
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
740
3883
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
741 /* Given a computed face, find or make an equivalent display face
3077
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
742 in face_vector, and return a pointer to it. */
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
743 extern struct face *intern_face (/* FRAME_PTR, struct face * */);
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
744
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
745 /* Given a frame and a face name, return the face's ID number, or
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
746 zero if it isn't a recognized face name. */
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
747 extern int face_name_id_number (/* FRAME_PTR, Lisp_Object */);
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
748
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
749 /* Return non-zero if FONT1 and FONT2 have the same size bounding box.
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
750 We assume that they're both character-cell fonts. */
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
751 extern int same_size_fonts (/* XFontStruct *, XFontStruct * */);
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
752
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
753 /* Recompute the GC's for the default and modeline faces.
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
754 We call this after changing frame parameters on which those GC's
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
755 depend. */
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
756 extern void recompute_basic_faces (/* FRAME_PTR */);
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
757
3883
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
758 /* Return the face ID associated with a buffer position POS. Store
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
759 into *ENDPTR the next position at which a different face is
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
760 needed. This does not take account of glyphs that specify their
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
761 own face codes. F is the frame in use for display, and W is a
b9e5a869b33e Separate parameter faces (those created and modified by the user)
Jim Blandy <jimb@redhat.com>
parents: 3591
diff changeset
762 window displaying the current buffer.
3077
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
763
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
764 REGION_BEG, REGION_END delimit the region, so it can be highlighted. */
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
765 extern int compute_char_face (/* FRAME_PTR frame,
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
766 struct window *w,
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
767 int pos,
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
768 int region_beg, int region_end,
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
769 int *endptr */);
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
770 /* Return the face ID to use to display a special glyph which selects
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
771 FACE_CODE as the face ID, assuming that ordinarily the face would
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
772 be BASIC_FACE. F is the frame. */
8bba60752a32 * xterm.h: New section for declarations for xfaces.c.
Jim Blandy <jimb@redhat.com>
parents: 2841
diff changeset
773 extern int compute_glyph_face (/* FRAME_PTR, int */);