Mercurial > emacs
annotate src/w32term.h @ 23855:5683a1280521
(cc-imenu-java-generic-expression): Get rid of nested loops.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 10 Dec 1998 03:27:31 +0000 |
parents | 11c43bcd6316 |
children | 95d0947c83b2 |
rev | line source |
---|---|
16886
c686d4f3728a
Change all uses of win95, winnt, and win32 into Windows 95, Windows
Geoff Voelker <voelker@cs.washington.edu>
parents:
16588
diff
changeset
|
1 /* Definitions and headers for communication on the Microsoft W32 API. |
13543 | 2 Copyright (C) 1995 Free Software Foundation, Inc. |
3 | |
4 This file is part of GNU Emacs. | |
5 | |
6 GNU Emacs is free software; you can redistribute it and/or modify | |
7 it under the terms of the GNU General Public License as published by | |
8 the Free Software Foundation; either version 2, or (at your option) | |
9 any later version. | |
10 | |
11 GNU Emacs is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with GNU Emacs; see the file COPYING. If not, write to | |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
13543
diff
changeset
|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
13543
diff
changeset
|
19 Boston, MA 02111-1307, USA. */ |
13543 | 20 |
21 /* Added by Kevin Gallo */ | |
22 | |
16888
380c7e461c14
Use new name w32gui.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
16886
diff
changeset
|
23 #include <w32gui.h> |
13543 | 24 |
25 /* The class of this X application. */ | |
26 #define EMACS_CLASS "Emacs" | |
27 | |
14984
e8a969370f33
(BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use PALETTERGB instead of RGB.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14809
diff
changeset
|
28 #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0) |
e8a969370f33
(BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use PALETTERGB instead of RGB.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14809
diff
changeset
|
29 #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255) |
13543 | 30 |
14521
4ffaeb5318c0
(FONT_WIDTH): Use average character width, not maximum.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14353
diff
changeset
|
31 #define FONT_WIDTH(f) ((f)->tm.tmAveCharWidth) |
13543 | 32 #define FONT_HEIGHT(f) ((f)->tm.tmHeight) |
33 #define FONT_BASE(f) ((f)->tm.tmAscent) | |
23807
11c43bcd6316
(FONT_MAX_WIDTH): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23805
diff
changeset
|
34 #define FONT_MAX_WIDTH(f) ((f)->tm.tmMaxCharWidth) |
13543 | 35 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
36 #define CHECK_W32_FRAME(f, frame) \ |
13543 | 37 if (NILP (frame)) \ |
38 f = selected_frame; \ | |
39 else \ | |
40 { \ | |
41 CHECK_LIVE_FRAME (frame, 0); \ | |
42 f = XFRAME (frame); \ | |
43 } \ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
44 if (! FRAME_W32_P (f)) |
13543 | 45 |
46 /* Indicates whether we are in the readsocket call and the message we | |
47 are processing in the current loop */ | |
48 | |
49 extern MSG CurMsg; | |
50 extern BOOL bUseDflt; | |
51 | |
52 extern struct frame *x_window_to_frame (); | |
53 | |
54 enum text_cursor_kinds { | |
55 filled_box_cursor, hollow_box_cursor, bar_cursor | |
56 }; | |
57 | |
58 /* Structure recording bitmaps and reference count. | |
59 If REFCOUNT is 0 then this record is free to be reused. */ | |
60 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
61 struct w32_bitmap_record |
13543 | 62 { |
63 Pixmap pixmap; | |
64 char *file; | |
65 HINSTANCE hinst; /* Used to load the file */ | |
66 int refcount; | |
67 /* Record some info about this pixmap. */ | |
68 int height, width, depth; | |
69 }; | |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
70 |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
71 /* Palette book-keeping stuff for mapping requested colors into the |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
72 system palette. Keep a ref-counted list of requested colors and |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
73 regenerate the app palette whenever the requested list changes. */ |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
74 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
75 extern Lisp_Object Vw32_enable_palette; |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
76 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
77 struct w32_palette_entry { |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
78 struct w32_palette_entry * next; |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
79 PALETTEENTRY entry; |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
80 #if 0 |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
81 unsigned refcount; |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
82 #endif |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
83 }; |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
84 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
85 extern void w32_regenerate_palette(struct frame *f); |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
86 |
13543 | 87 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
88 /* For each display (currently only one on w32), we have a structure that |
13543 | 89 records information about it. */ |
90 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
91 struct w32_display_info |
13543 | 92 { |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
93 /* Chain of all w32_display_info structures. */ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
94 struct w32_display_info *next; |
13543 | 95 /* This is a cons cell of the form (NAME . FONT-LIST-CACHE). |
96 The same cons cell also appears in x_display_name_list. */ | |
97 Lisp_Object name_list_element; | |
98 /* Number of frames that are on this display. */ | |
99 int reference_count; | |
100 /* Number of planes on this screen. */ | |
101 int n_planes; | |
102 /* Number of bits per pixel on this screen. */ | |
103 int n_cbits; | |
104 /* Dimensions of this screen. */ | |
105 int height, width; | |
106 int height_in,width_in; | |
107 /* Mask of things that cause the mouse to be grabbed. */ | |
108 int grabbed; | |
109 /* The root window of this screen. */ | |
110 Window root_window; | |
111 /* The cursor to use for vertical scroll bars. */ | |
112 Cursor vertical_scroll_bar_cursor; | |
113 | |
23676
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
114 /* color palette information. */ |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
115 int has_palette; |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
116 struct w32_palette_entry * color_list; |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
117 unsigned num_colors; |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
118 HPALETTE palette; |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
119 |
23676
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
120 /* deferred action flags checked when starting frame update. */ |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
121 int regen_palette; |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
122 |
23676
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
123 /* Keystroke that has been faked by Emacs and will be ignored when |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
124 received; value is reset after key is received. */ |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
125 int faked_key; |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
126 |
13543 | 127 /* A table of all the fonts we have already loaded. */ |
128 struct font_info *font_table; | |
129 | |
23508
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
130 /* The current capacity of font_table. */ |
13543 | 131 int font_table_size; |
132 | |
133 /* These variables describe the range of text currently shown | |
134 in its mouse-face, together with the window they apply to. | |
135 As long as the mouse stays within this range, we need not | |
136 redraw anything on its account. */ | |
137 int mouse_face_beg_row, mouse_face_beg_col; | |
138 int mouse_face_end_row, mouse_face_end_col; | |
139 int mouse_face_past_end; | |
140 Lisp_Object mouse_face_window; | |
141 int mouse_face_face_id; | |
142 | |
143 /* 1 if a mouse motion event came and we didn't handle it right away because | |
144 gc was in progress. */ | |
145 int mouse_face_deferred_gc; | |
146 | |
147 /* FRAME and X, Y position of mouse when last checked for | |
148 highlighting. X and Y can be negative or out of range for the frame. */ | |
149 struct frame *mouse_face_mouse_frame; | |
150 int mouse_face_mouse_x, mouse_face_mouse_y; | |
151 | |
152 /* Nonzero means defer mouse-motion highlighting. */ | |
153 int mouse_face_defer; | |
154 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
155 char *w32_id_name; |
13543 | 156 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
157 /* The number of fonts actually stored in w32_font_table. |
13543 | 158 font_table[n] is used and valid iff 0 <= n < n_fonts. |
159 0 <= n_fonts <= font_table_size. */ | |
160 int n_fonts; | |
161 | |
162 /* Pointer to bitmap records. */ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
163 struct w32_bitmap_record *bitmaps; |
13543 | 164 |
165 /* Allocated size of bitmaps field. */ | |
166 int bitmaps_size; | |
167 | |
168 /* Last used bitmap index. */ | |
169 int bitmaps_last; | |
170 | |
171 /* The frame (if any) which has the window that has keyboard focus. | |
172 Zero if none. This is examined by Ffocus_frame in w32fns.c. Note | |
173 that a mere EnterNotify event can set this; if you need to know the | |
174 last frame specified in a FocusIn or FocusOut event, use | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
175 w32_focus_event_frame. */ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
176 struct frame *w32_focus_frame; |
13543 | 177 |
178 /* The last frame mentioned in a FocusIn or FocusOut event. This is | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
179 separate from w32_focus_frame, because whether or not LeaveNotify |
13543 | 180 events cause us to lose focus depends on whether or not we have |
181 received a FocusIn event for it. */ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
182 struct frame *w32_focus_event_frame; |
13543 | 183 |
184 /* The frame which currently has the visual highlight, and should get | |
185 keyboard input (other sorts of input have the frame encoded in the | |
186 event). It points to the focus frame's selected window's | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
187 frame. It differs from w32_focus_frame when we're using a global |
13543 | 188 minibuffer. */ |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
189 struct frame *w32_highlight_frame; |
13543 | 190 }; |
191 | |
192 /* This is a chain of structures for all the displays currently in use. */ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
193 extern struct w32_display_info one_w32_display_info; |
13543 | 194 |
195 /* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE), | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
196 one for each element of w32_display_list and in the same order. |
13543 | 197 NAME is the name of the frame. |
198 FONT-LIST-CACHE records previous values returned by x-list-fonts. */ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
199 extern Lisp_Object w32_display_name_list; |
13543 | 200 |
23508
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
201 /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
202 extern Lisp_Object Vx_pixel_size_width_font_regexp; |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
203 |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
204 /* A flag to control how to display unibyte 8-bit character. */ |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
205 extern int unibyte_display_via_language_environment; |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
206 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
207 extern struct w32_display_info *x_display_info_for_display (); |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
208 extern struct w32_display_info *x_display_info_for_name (); |
13543 | 209 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
210 extern struct w32_display_info *w32_term_init (); |
13543 | 211 |
23508
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
212 extern Lisp_Object w32_list_fonts (); |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
213 extern struct font_info *w32_get_font_info (), *w32_query_font (); |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
214 extern void w32_find_ccl_program(); |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
215 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
216 /* Each W32 frame object points to its own struct w32_display object |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
217 in the output_data.w32 field. The w32_display structure contains all |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
218 the information that is specific to W32 windows. */ |
13543 | 219 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
220 struct w32_output |
13543 | 221 { |
19714
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
222 /* Menubar "widget" handle. */ |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
223 HMENU menubar_widget; |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
224 |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
225 /* Original palette (used to deselect real palette after drawing) */ |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
226 HPALETTE old_palette; |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
227 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
228 /* Position of the W32 window (x and y offsets in root window). */ |
13543 | 229 int left_pos; |
230 int top_pos; | |
231 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
232 /* Border width of the W32 window as known by the window system. */ |
13543 | 233 int border_width; |
234 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
235 /* Size of the W32 window in pixels. */ |
13543 | 236 int pixel_height, pixel_width; |
237 | |
238 /* Height of a line, in pixels. */ | |
239 int line_height; | |
240 | |
241 /* Width of the internal border. This is a line of background color | |
242 just inside the window's border. When the frame is selected, | |
243 a highlighting is displayed inside the internal border. */ | |
244 int internal_border_width; | |
245 | |
246 /* The window used for this frame. | |
247 May be zero while the frame object is being created | |
248 and the window has not yet been created. */ | |
249 Window window_desc; | |
250 | |
251 /* The window that is the parent of this window. | |
252 Usually this is a window that was made by the window manager, | |
253 but it can be the root window, and it can be explicitly specified | |
254 (see the explicit_parent field, below). */ | |
255 Window parent_desc; | |
256 | |
23508
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
257 /* Default ASCII font of this frame. */ |
13543 | 258 XFontStruct *font; |
259 | |
23508
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
260 /* The baseline position of the default ASCII font. */ |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
261 int font_baseline; |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
262 |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
263 /* If a fontset is specified for this frame instead of font, this |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
264 value contains an ID of the fontset, else -1. */ |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
265 int fontset; |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
266 |
13543 | 267 /* Pixel values used for various purposes. |
268 border_pixel may be -1 meaning use a gray tile. */ | |
269 unsigned long background_pixel; | |
270 unsigned long foreground_pixel; | |
271 unsigned long cursor_pixel; | |
272 unsigned long border_pixel; | |
273 unsigned long mouse_pixel; | |
274 unsigned long cursor_foreground_pixel; | |
275 | |
276 /* Descriptor for the cursor in use for this window. */ | |
277 Cursor text_cursor; | |
278 Cursor nontext_cursor; | |
279 Cursor modeline_cursor; | |
280 Cursor cross_cursor; | |
281 | |
282 /* Flag to set when the window needs to be completely repainted. */ | |
283 int needs_exposure; | |
284 | |
285 /* What kind of text cursor is drawn in this window right now? | |
286 (If there is no cursor (phys_cursor_x < 0), then this means nothing.) */ | |
287 enum text_cursor_kinds current_cursor; | |
288 | |
289 /* What kind of text cursor should we draw in the future? | |
290 This should always be filled_box_cursor or bar_cursor. */ | |
291 enum text_cursor_kinds desired_cursor; | |
292 | |
293 /* Width of bar cursor (if we are using that). */ | |
294 int cursor_width; | |
295 | |
296 DWORD dwStyle; | |
297 | |
298 /* The size of the extra width currently allotted for vertical | |
299 scroll bars, in pixels. */ | |
300 int vertical_scroll_bar_extra; | |
301 | |
302 /* Table of parameter faces for this frame. Any resources (pixel | |
303 values, fonts) referred to here have been allocated explicitly | |
304 for this face, and should be freed if we change the face. */ | |
305 struct face **param_faces; | |
306 int n_param_faces; | |
307 | |
308 /* Table of computed faces for this frame. These are the faces | |
309 whose indexes go into the upper bits of a glyph, computed by | |
310 combining the parameter faces specified by overlays, text | |
311 properties, and what have you. The resources mentioned here | |
312 are all shared with parameter faces. */ | |
313 struct face **computed_faces; | |
314 int n_computed_faces; /* How many are valid */ | |
315 int size_computed_faces; /* How many are allocated */ | |
316 | |
317 /* This is the gravity value for the specified window position. */ | |
318 int win_gravity; | |
319 | |
320 /* The geometry flags for this window. */ | |
321 int size_hint_flags; | |
322 | |
323 /* This is the Emacs structure for the display this frame is on. */ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
324 /* struct w32_display_info *display_info; */ |
13543 | 325 |
326 /* Nonzero means our parent is another application's window | |
327 and was explicitly specified. */ | |
328 char explicit_parent; | |
329 | |
330 /* Nonzero means tried already to make this frame visible. */ | |
331 char asked_for_visible; | |
19714
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
332 |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
333 /* Nonzero means menubar is currently active. */ |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
334 char menubar_active; |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
335 |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
336 /* Nonzero means menubar is about to become active, but should be |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
337 brought up to date first. */ |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
338 volatile char pending_menu_activation; |
13543 | 339 }; |
340 | |
341 /* Get at the computed faces of an X window frame. */ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
342 #define FRAME_PARAM_FACES(f) ((f)->output_data.w32->param_faces) |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
343 #define FRAME_N_PARAM_FACES(f) ((f)->output_data.w32->n_param_faces) |
13543 | 344 #define FRAME_DEFAULT_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[0]) |
345 #define FRAME_MODE_LINE_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[1]) | |
346 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
347 #define FRAME_COMPUTED_FACES(f) ((f)->output_data.w32->computed_faces) |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
348 #define FRAME_N_COMPUTED_FACES(f) ((f)->output_data.w32->n_computed_faces) |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
349 #define FRAME_SIZE_COMPUTED_FACES(f) ((f)->output_data.w32->size_computed_faces) |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
350 #define FRAME_DEFAULT_FACE(f) ((f)->output_data.w32->computed_faces[0]) |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
351 #define FRAME_MODE_LINE_FACE(f) ((f)->output_data.w32->computed_faces[1]) |
13543 | 352 |
353 /* Return the window associated with the frame F. */ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
354 #define FRAME_W32_WINDOW(f) ((f)->output_data.w32->window_desc) |
13543 | 355 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
356 #define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.w32->foreground_pixel) |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
357 #define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.w32->background_pixel) |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
358 #define FRAME_FONT(f) ((f)->output_data.w32->font) |
23508
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
359 #define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
360 #define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.w32->internal_border_width) |
13543 | 361 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
362 /* This gives the w32_display_info structure for the display F is on. */ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
363 #define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info) |
13543 | 364 |
23508
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
365 /* This is the 'font_info *' which frame F has. */ |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
366 #define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table) |
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
367 |
13543 | 368 /* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */ |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
369 #define PIXEL_WIDTH(f) ((f)->output_data.w32->pixel_width) |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
370 #define PIXEL_HEIGHT(f) ((f)->output_data.w32->pixel_height) |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
371 #define FRAME_LINE_HEIGHT(f) ((f)->output_data.w32->line_height) |
13543 | 372 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
373 #define FRAME_DESIRED_CURSOR(f) ((f)->output_data.w32->desired_cursor) |
13543 | 374 |
375 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
376 /* W32-specific scroll bar stuff. */ |
13543 | 377 |
378 /* We represent scroll bars as lisp vectors. This allows us to place | |
379 references to them in windows without worrying about whether we'll | |
380 end up with windows referring to dead scroll bars; the garbage | |
381 collector will free it when its time comes. | |
382 | |
383 We use struct scroll_bar as a template for accessing fields of the | |
384 vector. */ | |
385 | |
386 struct scroll_bar { | |
387 | |
388 /* These fields are shared by all vectors. */ | |
389 EMACS_INT size_from_Lisp_Vector_struct; | |
390 struct Lisp_Vector *next_from_Lisp_Vector_struct; | |
391 | |
392 /* The window we're a scroll bar for. */ | |
393 Lisp_Object window; | |
394 | |
395 /* The next and previous in the chain of scroll bars in this frame. */ | |
396 Lisp_Object next, prev; | |
397 | |
398 /* The window representing this scroll bar. Since this is a full | |
399 32-bit quantity, we store it split into two 32-bit values. */ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
400 Lisp_Object w32_window_low, w32_window_high; |
13543 | 401 |
402 /* The position and size of the scroll bar in pixels, relative to the | |
403 frame. */ | |
404 Lisp_Object top, left, width, height; | |
405 | |
406 /* The starting and ending positions of the handle, relative to the | |
407 handle area (i.e. zero is the top position, not | |
408 SCROLL_BAR_TOP_BORDER). If they're equal, that means the handle | |
409 hasn't been drawn yet. | |
410 | |
411 These are not actually the locations where the beginning and end | |
412 are drawn; in order to keep handles from becoming invisible when | |
413 editing large files, we establish a minimum height by always | |
414 drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below | |
415 where they would be normally; the bottom and top are in a | |
416 different co-ordinate system. */ | |
417 Lisp_Object start, end; | |
418 | |
419 /* If the scroll bar handle is currently being dragged by the user, | |
420 this is the number of pixels from the top of the handle to the | |
421 place where the user grabbed it. If the handle isn't currently | |
422 being dragged, this is Qnil. */ | |
423 Lisp_Object dragging; | |
424 }; | |
425 | |
426 /* The number of elements a vector holding a struct scroll_bar needs. */ | |
427 #define SCROLL_BAR_VEC_SIZE \ | |
428 ((sizeof (struct scroll_bar) \ | |
429 - sizeof (EMACS_INT) - sizeof (struct Lisp_Vector *)) \ | |
430 / sizeof (Lisp_Object)) | |
431 | |
432 /* Turning a lisp vector value into a pointer to a struct scroll_bar. */ | |
433 #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec)) | |
434 | |
435 | |
436 /* Building a 32-bit C integer from two 16-bit lisp integers. */ | |
437 #define SCROLL_BAR_PACK(low, high) (XINT (high) << 16 | XINT (low)) | |
438 | |
439 /* Setting two lisp integers to the low and high words of a 32-bit C int. */ | |
440 #define SCROLL_BAR_UNPACK(low, high, int32) \ | |
441 (XSETINT ((low), (int32) & 0xffff), \ | |
442 XSETINT ((high), ((int32) >> 16) & 0xffff)) | |
443 | |
444 | |
445 /* Extract the window id of the scroll bar from a struct scroll_bar. */ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
446 #define SCROLL_BAR_W32_WINDOW(ptr) \ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
447 ((Window) SCROLL_BAR_PACK ((ptr)->w32_window_low, (ptr)->w32_window_high)) |
13543 | 448 |
449 /* Store a window id in a struct scroll_bar. */ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
450 #define SET_SCROLL_BAR_W32_WINDOW(ptr, id) \ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
451 (SCROLL_BAR_UNPACK ((ptr)->w32_window_low, (ptr)->w32_window_high, (int) id)) |
13543 | 452 |
453 | |
454 /* Return the outside pixel height for a vertical scroll bar HEIGHT | |
455 rows high on frame F. */ | |
456 #define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
457 ((height) * (f)->output_data.w32->line_height) |
13543 | 458 |
459 /* Return the inside width of a vertical scroll bar, given the outside | |
460 width. */ | |
461 #define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(width) \ | |
462 ((width) - VERTICAL_SCROLL_BAR_LEFT_BORDER - VERTICAL_SCROLL_BAR_RIGHT_BORDER) | |
463 | |
464 /* Return the length of the rectangle within which the top of the | |
465 handle must stay. This isn't equivalent to the inside height, | |
466 because the scroll bar handle has a minimum height. | |
467 | |
468 This is the real range of motion for the scroll bar, so when we're | |
469 scaling buffer positions to scroll bar positions, we use this, not | |
470 VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */ | |
471 #define VERTICAL_SCROLL_BAR_TOP_RANGE(height) \ | |
472 (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (height) - VERTICAL_SCROLL_BAR_MIN_HANDLE) | |
473 | |
474 /* Return the inside height of vertical scroll bar, given the outside | |
475 height. See VERTICAL_SCROLL_BAR_TOP_RANGE too. */ | |
476 #define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(height) \ | |
477 ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER) | |
478 | |
479 | |
480 /* Border widths for scroll bars. | |
481 | |
482 Scroll bar windows don't have any borders; their border width is | |
483 set to zero, and we redraw borders ourselves. This makes the code | |
484 a bit cleaner, since we don't have to convert between outside width | |
485 (used when relating to the rest of the screen) and inside width | |
486 (used when sizing and drawing the scroll bar window itself). | |
487 | |
488 The handle moves up and down/back and forth in a rectangle inset | |
489 from the edges of the scroll bar. These are widths by which we | |
490 inset the handle boundaries from the scroll bar edges. */ | |
491 #define VERTICAL_SCROLL_BAR_LEFT_BORDER (0) | |
492 #define VERTICAL_SCROLL_BAR_RIGHT_BORDER (0) | |
19714
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
493 #define VERTICAL_SCROLL_BAR_TOP_BORDER (vertical_scroll_bar_top_border) |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
494 #define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (vertical_scroll_bar_bottom_border) |
13543 | 495 |
496 /* Minimum lengths for scroll bar handles, in pixels. */ | |
19714
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
497 #define VERTICAL_SCROLL_BAR_MIN_HANDLE (vertical_scroll_bar_min_handle) |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
498 |
13543 | 499 |
500 | |
501 /* Manipulating pixel sizes and character sizes. | |
502 Knowledge of which factors affect the overall size of the window should | |
503 be hidden in these macros, if that's possible. | |
504 | |
505 Return the upper/left pixel position of the character cell on frame F | |
506 at ROW/COL. */ | |
507 #define CHAR_TO_PIXEL_ROW(f, row) \ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
508 ((f)->output_data.w32->internal_border_width \ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
509 + (row) * (f)->output_data.w32->line_height) |
13543 | 510 #define CHAR_TO_PIXEL_COL(f, col) \ |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
511 ((f)->output_data.w32->internal_border_width \ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
512 + (col) * FONT_WIDTH ((f)->output_data.w32->font)) |
13543 | 513 |
514 /* Return the pixel width/height of frame F if it has | |
515 WIDTH columns/HEIGHT rows. */ | |
516 #define CHAR_TO_PIXEL_WIDTH(f, width) \ | |
517 (CHAR_TO_PIXEL_COL (f, width) \ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
518 + (f)->output_data.w32->vertical_scroll_bar_extra \ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
519 + (f)->output_data.w32->internal_border_width) |
13543 | 520 #define CHAR_TO_PIXEL_HEIGHT(f, height) \ |
521 (CHAR_TO_PIXEL_ROW (f, height) \ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
522 + (f)->output_data.w32->internal_border_width) |
13543 | 523 |
524 | |
525 /* Return the row/column (zero-based) of the character cell containing | |
526 the pixel on FRAME at ROW/COL. */ | |
527 #define PIXEL_TO_CHAR_ROW(f, row) \ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
528 (((row) - (f)->output_data.w32->internal_border_width) \ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
529 / (f)->output_data.w32->line_height) |
13543 | 530 #define PIXEL_TO_CHAR_COL(f, col) \ |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
531 (((col) - (f)->output_data.w32->internal_border_width) \ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
532 / FONT_WIDTH ((f)->output_data.w32->font)) |
13543 | 533 |
534 /* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on | |
535 frame F? */ | |
536 #define PIXEL_TO_CHAR_WIDTH(f, width) \ | |
537 (PIXEL_TO_CHAR_COL (f, ((width) \ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
538 - (f)->output_data.w32->internal_border_width \ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
539 - (f)->output_data.w32->vertical_scroll_bar_extra))) |
13543 | 540 #define PIXEL_TO_CHAR_HEIGHT(f, height) \ |
541 (PIXEL_TO_CHAR_ROW (f, ((height) \ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
542 - (f)->output_data.w32->internal_border_width))) |
13543 | 543 |
544 /* Interface to the face code functions. */ | |
545 | |
546 /* Create the first two computed faces for a frame -- the ones that | |
547 have GC's. */ | |
548 extern void init_frame_faces (/* FRAME_PTR */); | |
549 | |
550 /* Free the resources for the faces associated with a frame. */ | |
551 extern void free_frame_faces (/* FRAME_PTR */); | |
552 | |
553 /* Given a computed face, find or make an equivalent display face | |
554 in face_vector, and return a pointer to it. */ | |
555 extern struct face *intern_face (/* FRAME_PTR, struct face * */); | |
556 | |
557 /* Given a frame and a face name, return the face's ID number, or | |
558 zero if it isn't a recognized face name. */ | |
559 extern int face_name_id_number (/* FRAME_PTR, Lisp_Object */); | |
560 | |
561 /* Return non-zero if FONT1 and FONT2 have the same size bounding box. | |
562 We assume that they're both character-cell fonts. */ | |
563 extern int same_size_fonts (/* XFontStruct *, XFontStruct * */); | |
564 | |
565 /* Recompute the GC's for the default and modeline faces. | |
566 We call this after changing frame parameters on which those GC's | |
567 depend. */ | |
568 extern void recompute_basic_faces (/* FRAME_PTR */); | |
569 | |
570 /* Return the face ID associated with a buffer position POS. Store | |
571 into *ENDPTR the next position at which a different face is | |
572 needed. This does not take account of glyphs that specify their | |
573 own face codes. F is the frame in use for display, and W is a | |
574 window displaying the current buffer. | |
575 | |
576 REGION_BEG, REGION_END delimit the region, so it can be highlighted. */ | |
577 extern int compute_char_face (/* FRAME_PTR frame, | |
578 struct window *w, | |
579 int pos, | |
580 int region_beg, int region_end, | |
581 int *endptr */); | |
582 /* Return the face ID to use to display a special glyph which selects | |
583 FACE_CODE as the face ID, assuming that ordinarily the face would | |
584 be BASIC_FACE. F is the frame. */ | |
585 extern int compute_glyph_face (/* FRAME_PTR, int */); | |
586 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
587 extern void w32_fill_rect (); |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
588 extern void w32_clear_window (); |
13543 | 589 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
590 #define w32_fill_area(f,hdc,pix,x,y,nx,ny) \ |
13543 | 591 { \ |
592 RECT rect; \ | |
593 rect.left = x; \ | |
594 rect.top = y; \ | |
595 rect.right = x + nx; \ | |
596 rect.bottom = y + ny; \ | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
597 w32_fill_rect (f,hdc,pix,&rect); \ |
13543 | 598 } |
599 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
600 #define w32_clear_rect(f,hdc,lprect) \ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
601 w32_fill_rect (f,hdc,f->output_data.w32->background_pixel,lprect) |
13543 | 602 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
603 #define w32_clear_area(f,hdc,x,y,nx,ny) \ |
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
604 w32_fill_area (f,hdc,f->output_data.w32->background_pixel,x,y,nx,ny) |
13543 | 605 |
23508
4e067ce42325
Remove redundant font_info struct definition.
Geoff Voelker <voelker@cs.washington.edu>
parents:
22080
diff
changeset
|
606 extern struct font_info *w32_load_font (); |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
607 extern void w32_unload_font (); |
13543 | 608 |
19714
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
609 /* Define for earlier versions of Visual C */ |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
610 #ifndef WM_MOUSEWHEEL |
21876
52ebc509a367
(WM_MOUSEWHEEL): Define relative to WM_MOUSELAST.
Geoff Voelker <voelker@cs.washington.edu>
parents:
21615
diff
changeset
|
611 #define WM_MOUSEWHEEL (WM_MOUSELAST + 1) |
19714
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
612 #endif /* WM_MOUSEWHEEL */ |
21876
52ebc509a367
(WM_MOUSEWHEEL): Define relative to WM_MOUSELAST.
Geoff Voelker <voelker@cs.washington.edu>
parents:
21615
diff
changeset
|
613 #ifndef MSH_MOUSEWHEEL |
52ebc509a367
(WM_MOUSEWHEEL): Define relative to WM_MOUSELAST.
Geoff Voelker <voelker@cs.washington.edu>
parents:
21615
diff
changeset
|
614 #define MSH_MOUSEWHEEL "MSWHEEL_ROLLMSG" |
52ebc509a367
(WM_MOUSEWHEEL): Define relative to WM_MOUSELAST.
Geoff Voelker <voelker@cs.washington.edu>
parents:
21615
diff
changeset
|
615 #endif /* MSH_MOUSEWHEEL */ |
19714
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
616 |
13543 | 617 #define WM_EMACS_START (WM_USER + 1) |
23676
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
618 #define WM_EMACS_KILL (WM_EMACS_START + 0) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
619 #define WM_EMACS_CREATEWINDOW (WM_EMACS_START + 1) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
620 #define WM_EMACS_DONE (WM_EMACS_START + 2) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
621 #define WM_EMACS_CREATESCROLLBAR (WM_EMACS_START + 3) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
622 #define WM_EMACS_SHOWWINDOW (WM_EMACS_START + 4) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
623 #define WM_EMACS_SETWINDOWPOS (WM_EMACS_START + 5) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
624 #define WM_EMACS_DESTROYWINDOW (WM_EMACS_START + 6) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
625 #define WM_EMACS_TRACKPOPUPMENU (WM_EMACS_START + 7) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
626 #define WM_EMACS_SETFOCUS (WM_EMACS_START + 8) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
627 #define WM_EMACS_SETFOREGROUND (WM_EMACS_START + 9) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
628 #define WM_EMACS_SETLOCALE (WM_EMACS_START + 10) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
629 #define WM_EMACS_SETKEYBOARDLAYOUT (WM_EMACS_START + 11) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
630 #define WM_EMACS_REGISTER_HOT_KEY (WM_EMACS_START + 12) |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
631 #define WM_EMACS_UNREGISTER_HOT_KEY (WM_EMACS_START + 13) |
23805
44ad68548ff9
(WM_EMACS_TOGGLE_LOCK_KEY): New define.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23676
diff
changeset
|
632 #define WM_EMACS_TOGGLE_LOCK_KEY (WM_EMACS_START + 14) |
44ad68548ff9
(WM_EMACS_TOGGLE_LOCK_KEY): New define.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23676
diff
changeset
|
633 #define WM_EMACS_END (WM_EMACS_START + 15) |
13543 | 634 |
19714
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
635 #define WND_FONTWIDTH_INDEX (0) |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
636 #define WND_LINEHEIGHT_INDEX (4) |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
637 #define WND_BORDER_INDEX (8) |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
638 #define WND_SCROLLBAR_INDEX (12) |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
639 #define WND_BACKGROUND_INDEX (16) |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
640 #define WND_LAST_INDEX (20) |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
641 |
13543 | 642 #define WND_EXTRA_BYTES (WND_LAST_INDEX) |
643 | |
16886
c686d4f3728a
Change all uses of win95, winnt, and win32 into Windows 95, Windows
Geoff Voelker <voelker@cs.washington.edu>
parents:
16588
diff
changeset
|
644 extern DWORD dwWindowsThreadId; |
c686d4f3728a
Change all uses of win95, winnt, and win32 into Windows 95, Windows
Geoff Voelker <voelker@cs.washington.edu>
parents:
16588
diff
changeset
|
645 extern HANDLE hWindowsThread; |
13543 | 646 extern DWORD dwMainThreadId; |
647 extern HANDLE hMainThread; | |
648 | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
649 typedef struct W32Msg { |
13543 | 650 MSG msg; |
651 DWORD dwModifiers; | |
652 RECT rect; | |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
653 } W32Msg; |
13543 | 654 |
19714
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
655 /* Structure for recording message when input thread must return a |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
656 result that depends on lisp thread to compute. Lisp thread can |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
657 complete deferred messages out of order. */ |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
658 typedef struct deferred_msg |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
659 { |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
660 struct deferred_msg * next; |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
661 W32Msg w32msg; |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
662 LRESULT result; |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
663 int completed; |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
664 } deferred_msg; |
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
665 |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
666 extern CRITICAL_SECTION critsect; |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
667 |
13543 | 668 extern void init_crit (); |
669 extern void delete_crit (); | |
670 | |
22080
f519dedee9bc
(signal_quit): Add prototype.
Richard M. Stallman <rms@gnu.org>
parents:
21876
diff
changeset
|
671 extern void signal_quit (); |
f519dedee9bc
(signal_quit): Add prototype.
Richard M. Stallman <rms@gnu.org>
parents:
21876
diff
changeset
|
672 |
15152
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
673 #define enter_crit() EnterCriticalSection (&critsect) |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
674 #define leave_crit() LeaveCriticalSection (&critsect) |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
675 |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
676 extern void select_palette (struct frame * f, HDC hdc); |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
677 extern void deselect_palette (struct frame * f, HDC hdc); |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
678 extern HDC get_frame_dc (struct frame * f); |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
679 extern int release_frame_dc (struct frame * f, HDC hDC); |
2dd4961cefaa
(struct win32_palette_entry): New structure.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14984
diff
changeset
|
680 |
13543 | 681 extern BOOL get_next_msg (); |
682 extern BOOL post_msg (); | |
19714
72fa0e75a0fe
(w32_output): New fields menubar_widget, menubar_active,
Geoff Voelker <voelker@cs.washington.edu>
parents:
16888
diff
changeset
|
683 extern void complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result); |
13543 | 684 extern void wait_for_sync (); |
685 | |
686 extern BOOL parse_button (); | |
14809
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
687 |
16588
481b7874a1e9
Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents:
15152
diff
changeset
|
688 /* Keypad command key support. W32 doesn't have virtual keys defined |
14809
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
689 for the function keys on the keypad (they are mapped to the standard |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
690 fuction keys), so we define our own. */ |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
691 #define VK_NUMPAD_BEGIN 0x92 |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
692 #define VK_NUMPAD_CLEAR (VK_NUMPAD_BEGIN + 0) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
693 #define VK_NUMPAD_ENTER (VK_NUMPAD_BEGIN + 1) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
694 #define VK_NUMPAD_PRIOR (VK_NUMPAD_BEGIN + 2) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
695 #define VK_NUMPAD_NEXT (VK_NUMPAD_BEGIN + 3) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
696 #define VK_NUMPAD_END (VK_NUMPAD_BEGIN + 4) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
697 #define VK_NUMPAD_HOME (VK_NUMPAD_BEGIN + 5) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
698 #define VK_NUMPAD_LEFT (VK_NUMPAD_BEGIN + 6) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
699 #define VK_NUMPAD_UP (VK_NUMPAD_BEGIN + 7) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
700 #define VK_NUMPAD_RIGHT (VK_NUMPAD_BEGIN + 8) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
701 #define VK_NUMPAD_DOWN (VK_NUMPAD_BEGIN + 9) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
702 #define VK_NUMPAD_INSERT (VK_NUMPAD_BEGIN + 10) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
703 #define VK_NUMPAD_DELETE (VK_NUMPAD_BEGIN + 11) |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
704 |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
705 #ifndef VK_LWIN |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
706 /* Older compiler environments don't have these defined. */ |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
707 #define VK_LWIN 0x5B |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
708 #define VK_RWIN 0x5C |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
709 #define VK_APPS 0x5D |
fb9e2125fc2e
(VK_NUMPAD_*, VK_LWIN, VK_RWIN, VK_APPS):
Geoff Voelker <voelker@cs.washington.edu>
parents:
14521
diff
changeset
|
710 #endif |
23676
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
711 |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
712 /* Support for treating Windows and Apps keys as modifiers. These |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
713 constants must not overlap with any of the dwControlKeyState flags in |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
714 KEY_EVENT_RECORD. */ |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
715 #define LEFT_WIN_PRESSED 0x8000 |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
716 #define RIGHT_WIN_PRESSED 0x4000 |
704d2e178bcb
(struct w32_display_info): New element faked_key.
Geoff Voelker <voelker@cs.washington.edu>
parents:
23508
diff
changeset
|
717 #define APPS_PRESSED 0x2000 |