annotate src/console-msw.h @ 298:70ad99077275 r21-0b47

Import from CVS: tag r21-0b47
author cvs
date Mon, 13 Aug 2007 10:39:40 +0200
parents 4b85ae5eabfb
children afd57c14dfc8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
1 /* Define mswindows-specific console, device, and frame object for XEmacs.
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
2 Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
4
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
5 This file is part of XEmacs.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
6
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify it
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
10 later version.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
11
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
15 for more details.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
16
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
21
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
22 /* Synched up with: Not in FSF. */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
23
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
24
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
25 /* Authorship:
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
26
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
27 Ultimately based on FSF, then later on JWZ work for Lemacs.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
28 Rewritten over time by Ben Wing and Chuck Thompson.
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
29 Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0.
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
30 */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
31
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
32 #ifndef _XEMACS_CONSOLE_MSW_H_
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
33 #define _XEMACS_CONSOLE_MSW_H_
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
34
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
35 #include "console.h"
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
36 #ifdef CONST /* I suspect this is safe */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
37 #undef CONST
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
38 #endif
286
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 278
diff changeset
39 #include <windows.h>
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 278
diff changeset
40 #include <ddeml.h> /* DDE management library */
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
41 #ifndef __CYGWIN32__
286
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 278
diff changeset
42 #include <shellapi.h> /* FileManager/Explorer drag and drop */
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 278
diff changeset
43 #include <commctrl.h>
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
44 #endif
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
45
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
46 #ifdef HAVE_XPM
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
47 #include <X11/xpm.h>
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 249
diff changeset
48 #endif
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
49
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
50 /*
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
51 * XXX FIXME: The following X modifier defs in events-mod.h clash with win32
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
52 * hotkey defs in winuser.h. For the moment lose the win32 versions.
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
53 * Maybe we should rename all of MOD_* to something that doesn't clash.
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
54 */
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
55 #ifdef MOD_CONTROL
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
56 # undef MOD_CONTROL
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
57 #endif
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
58 #ifdef MOD_ALT
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
59 # undef MOD_ALT
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
60 #endif
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
61 #ifdef MOD_SHIFT
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
62 # undef MOD_SHIFT
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
63 #endif
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
64
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
65
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
66 /* The name of the main window class */
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
67 #define XEMACS_CLASS "XEmacs"
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
68
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
69
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
70 /*
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
71 * Console
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
72 */
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
73
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
74 DECLARE_CONSOLE_TYPE (mswindows);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
75
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
76 struct mswindows_console
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
77 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
78 int infd, outfd;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
79 };
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
80
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
81
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
82 /*
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
83 * Device
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
84 */
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
85
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
86 #define MSW_FONTSIZE (LF_FACESIZE*4+12)
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
87
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
88 struct mswindows_font_enum
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
89 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
90 char fontname[MSW_FONTSIZE];
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
91 struct mswindows_font_enum *next;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
92 };
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
93
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
94 struct mswindows_device
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
95 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
96 int logpixelsx, logpixelsy;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
97 int planes, cells;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
98 int horzres, vertres; /* Size in pixels */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
99 int horzsize, vertsize; /* Size in mm */
267
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 251
diff changeset
100 int bitspixel;
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
101 struct mswindows_font_enum *fontlist;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
102 };
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
103
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
104 #define DEVICE_MSWINDOWS_DATA(d) DEVICE_TYPE_DATA (d, mswindows)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
105 #define DEVICE_MSWINDOWS_LOGPIXELSX(d) (DEVICE_MSWINDOWS_DATA (d)->logpixelsx)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
106 #define DEVICE_MSWINDOWS_LOGPIXELSY(d) (DEVICE_MSWINDOWS_DATA (d)->logpixelsy)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
107 #define DEVICE_MSWINDOWS_PLANES(d) (DEVICE_MSWINDOWS_DATA (d)->planes)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
108 #define DEVICE_MSWINDOWS_CELLS(d) (DEVICE_MSWINDOWS_DATA (d)->cells)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
109 #define DEVICE_MSWINDOWS_HORZRES(d) (DEVICE_MSWINDOWS_DATA (d)->horzres)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
110 #define DEVICE_MSWINDOWS_VERTRES(d) (DEVICE_MSWINDOWS_DATA (d)->vertres)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
111 #define DEVICE_MSWINDOWS_HORZSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->horzsize)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
112 #define DEVICE_MSWINDOWS_VERTSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->vertsize)
267
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 251
diff changeset
113 #define DEVICE_MSWINDOWS_BITSPIXEL(d) (DEVICE_MSWINDOWS_DATA (d)->bitspixel)
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
114 #define DEVICE_MSWINDOWS_FONTLIST(d) (DEVICE_MSWINDOWS_DATA (d)->fontlist)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
115
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
116
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
117 /*
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
118 * Frame
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
119 */
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
120 typedef struct
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
121 {
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
122 int left;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
123 int top;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
124 int width;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
125 int height;
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
126 } XEMACS_RECT_WH;
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
127
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
128 struct mswindows_frame
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
129 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
130 /* win32 window handle */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
131 HWND hwnd;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
132
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
133 /* DC for this win32 window */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
134 HDC hdc;
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
135
269
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
136 /* compatibke DC for bitmap operations */
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
137 HDC cdc;
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
138
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
139 /* Time of last click event, for button 2 emul */
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
140 DWORD last_click_time;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
141
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
142 /* Coordinates of last click event, screen-relative */
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
143 POINTS last_click_point;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
144 #ifdef HAVE_TOOLBARS
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
145 /* Toolbar hashtable. See toolbar-msw.c */
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
146 Lisp_Object toolbar_hashtable;
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
147 unsigned int toolbar_checksum[4];
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
148 #endif
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
149
233
52952cbfc5b5 Import from CVS: tag r20-5b15
cvs
parents: 231
diff changeset
150 /* Menu hashtable. See menubar-msw.c */
52952cbfc5b5 Import from CVS: tag r20-5b15
cvs
parents: 231
diff changeset
151 Lisp_Object menu_hashtable;
52952cbfc5b5 Import from CVS: tag r20-5b15
cvs
parents: 231
diff changeset
152
52952cbfc5b5 Import from CVS: tag r20-5b15
cvs
parents: 231
diff changeset
153 /* Menu checksum. See menubar-msw.c */
52952cbfc5b5 Import from CVS: tag r20-5b15
cvs
parents: 231
diff changeset
154 unsigned int menu_checksum;
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents: 223
diff changeset
155
274
ca9a9ec9c1c1 Import from CVS: tag r21-0b35
cvs
parents: 272
diff changeset
156 /* Frame title hash value. See frame-msw.c */
ca9a9ec9c1c1 Import from CVS: tag r21-0b35
cvs
parents: 272
diff changeset
157 unsigned int title_checksum;
ca9a9ec9c1c1 Import from CVS: tag r21-0b35
cvs
parents: 272
diff changeset
158
269
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
159 /* Real character width and height of the frame.
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
160 FRAME_{HEIGHT,WIDTH} do not work for pixel geometry! */
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
161 int charheight, charwidth;
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
162
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
163 /* Misc flags */
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
164 int button2_need_lbutton : 1;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
165 int button2_need_rbutton : 1;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
166 int button2_is_down : 1;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
167 int ignore_next_lbutton_up : 1;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
168 int ignore_next_rbutton_up : 1;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
169 int sizing : 1;
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
170
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
171 /* Geometry, in characters, as specified by proplist during frame
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
172 creation. Memebers are set to -1 for unspecified */
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
173 XEMACS_RECT_WH* target_rect;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
174 };
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
175
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
176 #define FRAME_MSWINDOWS_DATA(f) FRAME_TYPE_DATA (f, mswindows)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
177
233
52952cbfc5b5 Import from CVS: tag r20-5b15
cvs
parents: 231
diff changeset
178 #define FRAME_MSWINDOWS_HANDLE(f) (FRAME_MSWINDOWS_DATA (f)->hwnd)
52952cbfc5b5 Import from CVS: tag r20-5b15
cvs
parents: 231
diff changeset
179 #define FRAME_MSWINDOWS_DC(f) (FRAME_MSWINDOWS_DATA (f)->hdc)
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
180 #define FRAME_MSWINDOWS_CDC(f) (FRAME_MSWINDOWS_DATA (f)->cdc)
233
52952cbfc5b5 Import from CVS: tag r20-5b15
cvs
parents: 231
diff changeset
181 #define FRAME_MSWINDOWS_MENU_HASHTABLE(f) (FRAME_MSWINDOWS_DATA (f)->menu_hashtable)
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
182 #define FRAME_MSWINDOWS_TOOLBAR_HASHTABLE(f) \
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
183 (FRAME_MSWINDOWS_DATA (f)->toolbar_hashtable)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
184 #define FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos) \
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
185 (FRAME_MSWINDOWS_DATA (f)->toolbar_checksum[pos])
233
52952cbfc5b5 Import from CVS: tag r20-5b15
cvs
parents: 231
diff changeset
186 #define FRAME_MSWINDOWS_MENU_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->menu_checksum)
274
ca9a9ec9c1c1 Import from CVS: tag r21-0b35
cvs
parents: 272
diff changeset
187 #define FRAME_MSWINDOWS_TITLE_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->title_checksum)
ca9a9ec9c1c1 Import from CVS: tag r21-0b35
cvs
parents: 272
diff changeset
188 #define FRAME_MSWINDOWS_CHARWIDTH(f) (FRAME_MSWINDOWS_DATA (f)->charwidth)
ca9a9ec9c1c1 Import from CVS: tag r21-0b35
cvs
parents: 272
diff changeset
189 #define FRAME_MSWINDOWS_CHARHEIGHT(f) (FRAME_MSWINDOWS_DATA (f)->charheight)
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
190 #define FRAME_MSWINDOWS_TARGET_RECT(f) (FRAME_MSWINDOWS_DATA (f)->target_rect)
269
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
191
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
192 /* Frame check and validation macros */
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
193 #define FRAME_MSWINDOWS_P(frm) CONSOLE_TYPESYM_MSWINDOWS_P (FRAME_TYPE (frm))
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
194 #define CHECK_MSWINDOWS_FRAME(z) CHECK_FRAME_TYPE (z, mswindows)
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
195 #define CONCHECK_MSWINDOWS_FRAME(z) CONCHECK_FRAME_TYPE (z, mswindows)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
196
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
197 /* win32 window LONG indices */
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
198 #define XWL_FRAMEOBJ 0
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
199 #define XWL_COUNT 1 /* Number of LONGs that we use */
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
200 #define MSWINDOWS_WINDOW_EXTRA_BYTES (XWL_COUNT*4)
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
201
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
202
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
203 /*
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
204 * Events
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
205 */
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
206
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
207 /* win32 messages / magic event types */
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
208 #define EVENT_MSWINDOWS_MAGIC_TYPE(e) \
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
209 ((e)->event.magic.underlying_mswindows_event)
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
210 #define XM_BUMPQUEUE (WM_USER + 101)
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
211 #define XM_MAPFRAME (WM_USER + 102)
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
212 #define XM_UNMAPFRAME (WM_USER + 103)
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
213
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
214
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
215 /*
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
216 * Random globals
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
217 */
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
218
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
219 /* win32 "Windows" procedure */
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
220 LRESULT WINAPI mswindows_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam,
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
221 LPARAM lParam);
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
222
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
223 void mswindows_redraw_exposed_area (struct frame *f, int x, int y,
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
224 int width, int height);
294
4b85ae5eabfb Import from CVS: tag r21-0b45
cvs
parents: 288
diff changeset
225 void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest);
298
70ad99077275 Import from CVS: tag r21-0b47
cvs
parents: 294
diff changeset
226 void mswindows_enqueue_magic_event (HWND hwnd, UINT message);
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
227
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
228 /* win32 DDE management library */
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
229 #define MSWINDOWS_DDE_ITEM_OPEN "Open"
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
230 extern DWORD mswindows_dde_mlid;
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
231 extern HSZ mswindows_dde_service;
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
232 extern HSZ mswindows_dde_topic_system;
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
233 extern HSZ mswindows_dde_item_open;
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
234 HDDEDATA CALLBACK mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv,
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
235 HSZ hszTopic, HSZ hszItem, HDDEDATA hdata,
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
236 DWORD dwData1, DWORD dwData2);
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
237
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
238 void mswindows_enqueue_misc_user_event (Lisp_Object channel,
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
239 Lisp_Object function,
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
240 Lisp_Object object);
249
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
241 Lisp_Object mswindows_cancel_dispatch_event (struct Lisp_Event* event);
83b3d10dcba9 Import from CVS: tag r20-5b23
cvs
parents: 233
diff changeset
242 Lisp_Object mswindows_pump_outstanding_events (void);
269
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
243 Lisp_Object mswindows_protect_modal_loop (Lisp_Object (*bfun) (Lisp_Object barg),
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
244 Lisp_Object barg);
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
245 void mswindows_unmodalize_signal_maybe (void);
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
246
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
247 #ifdef HAVE_WIN32_PROCESSES
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
248 HANDLE get_nt_process_handle (struct Lisp_Process *p);
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
249 #endif
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
250
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 274
diff changeset
251 extern Lisp_Object Vmswindows_frame_being_created;
269
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 267
diff changeset
252 extern Lisp_Object mswindows_frame_being_created;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
253
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
254 #endif /* _XEMACS_CONSOLE_MSW_H_ */