annotate src/console-msw.h @ 575:d5e8f5ad5043

[xemacs-hg @ 2001-05-25 04:22:31 by martinb] Fix compile warning
author martinb
date Fri, 25 May 2001 04:22:33 +0000
parents 183866b06e0b
children b5b4308a001d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* Define mswindows-specific console, device, and frame object for XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 /* Synched up with: Not in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 /* Authorship:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 Ultimately based on FSF, then later on JWZ work for Lemacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 Rewritten over time by Ben Wing and Chuck Thompson.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
32 #ifndef INCLUDED_console_msw_h_
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
33 #define INCLUDED_console_msw_h_
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 #include "console.h"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
36 #include "syswindows.h"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
37 #include "syscommctrl.h"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 #ifdef HAVE_XPM
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 #include <X11/xpm.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 /* The name of the main window class */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 #define XEMACS_CLASS "XEmacs"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 #define XEMACS_CONTROL_CLASS "XEmacsControl"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
49 * Consoles
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 DECLARE_CONSOLE_TYPE (mswindows);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 struct mswindows_console
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 int infd, outfd;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
59 DECLARE_CONSOLE_TYPE (msprinter);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
62 * Printer settings, aka devmode
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
63 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
64
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
65 typedef struct Lisp_Devmode
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
66 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
67 struct lcrecord_header header;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
68
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
69 /* Pointer to the DEVMODE structure */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
70 DEVMODE* devmode;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
71
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
72 /* Full printer name. It can be longer than devmode->dmDeviceName
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
73 can accommodate, so need to keep it separately */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
74 char* printer_name;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
75
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
76 /* Printer device this object is currently selected in, or Qnil
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
77 if not selected */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
78 Lisp_Object device;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
79
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
80 } Lisp_Devmode;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
81
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
82
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
83 DECLARE_LRECORD (devmode, Lisp_Devmode);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
84 #define XDEVMODE(x) XRECORD (x, devmode, Lisp_Devmode)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
85 #define XSETDEVMODE(x, p) XSETRECORD (x, p, devmode)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
86 #define DEVMODEP(x) RECORDP (x, devmode)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
87 #define CHECK_DEVMODE(x) CHECK_RECORD (x, devmode)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
88 #define CONCHECK_DEVMODE(x) CONCHECK_RECORD (x, devmode)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
89
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
90 #define DEVMODE_SIZE(dm) ((dm)->dmSize + (dm)->dmDriverExtra)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
91 #define XDEVMODE_SIZE(x) ((x)->devmode ? DEVMODE_SIZE((x)->devmode) : 0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
92
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
93 /*
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
94 * Devices
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 #define MSW_FONTSIZE (LF_FACESIZE*4+12)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 struct mswindows_device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 {
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
101 Lisp_Object fontlist; /* List of strings, device fonts */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
102 HDC hcdc; /* Compatible DC */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
103 DWORD update_tick; /* Used when device is modified through
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
104 Windows messages, see WM_DISPLAYCHANGE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
105 in event-msw.c */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 #define DEVICE_MSWINDOWS_DATA(d) DEVICE_TYPE_DATA (d, mswindows)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
109 #define DEVICE_MSWINDOWS_FONTLIST(d) (DEVICE_MSWINDOWS_DATA (d)->fontlist)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
110 #define DEVICE_MSWINDOWS_HCDC(d) (DEVICE_MSWINDOWS_DATA (d)->hcdc)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
111 #define DEVICE_MSWINDOWS_UPDATE_TICK(d) (DEVICE_MSWINDOWS_DATA (d)->update_tick)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
113 struct msprinter_device
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
114 {
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
115 HDC hdc, hcdc; /* Printer and the comp. DCs */
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
116 HANDLE hprinter;
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
117 char* name;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
118 Lisp_Object devmode;
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
119 Lisp_Object fontlist;
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
120 };
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
121
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
122 #define DEVICE_MSPRINTER_DATA(d) DEVICE_TYPE_DATA (d, msprinter)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
123 #define DEVICE_MSPRINTER_HDC(d) (DEVICE_MSPRINTER_DATA (d)->hdc)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
124 #define DEVICE_MSPRINTER_HCDC(d) (DEVICE_MSPRINTER_DATA (d)->hcdc)
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
125 #define DEVICE_MSPRINTER_HPRINTER(d) (DEVICE_MSPRINTER_DATA (d)->hprinter)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
126 #define DEVICE_MSPRINTER_FONTLIST(d) (DEVICE_MSPRINTER_DATA (d)->fontlist)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
127 #define DEVICE_MSPRINTER_NAME(d) (DEVICE_MSPRINTER_DATA (d)->name)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
128 #define DEVICE_MSPRINTER_DEVMODE(d) (DEVICE_MSPRINTER_DATA (d)->devmode)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
129
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
130 #define CONSOLE_TYPESYM_MSPRINTER_P(typesym) EQ (typesym, Qmsprinter)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
131 #define DEVICE_MSPRINTER_P(dev) CONSOLE_TYPESYM_MSPRINTER_P (DEVICE_TYPE (dev))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
132 #define CHECK_MSPRINTER_DEVICE(z) CHECK_DEVICE_TYPE (z, msprinter)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
133 #define CONCHECK_MSPRINTER_DEVICE(z) CONCHECK_DEVICE_TYPE (z, msprinter)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
134
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
135 /* Printer functions in frame-msw.c */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
136 void msprinter_start_page (struct frame *f);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
137
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
138 /* Common checks */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
139
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
140 #define DEVICE_MSGDI_P(dev) (DEVICE_MSWINDOWS_P(dev) || DEVICE_MSPRINTER_P(dev))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
141 #define CHECK_MSGDI_DEVICE(d) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
142 do { \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
143 CHECK_DEVICE (d); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
144 if (!(DEVICEP (d) && DEVICE_MSGDI_P(XDEVICE(d)))) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
145 dead_wrong_type_argument \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
146 (list3 (Qor, Qmswindows, Qmsprinter), d); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
147 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
148 #define CONCHECK_MSGDI_DEVICE(d) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
149 do { \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
150 CHECK_DEVICE (d); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
151 if (!(DEVICEP (d) && DEVICE_MSGDI_P(XDEVICE(d)))) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
152 wrong_type_argument \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
153 (list3 (Qor, Qmswindows, Qmsprinter), d); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
154 } while (0)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 /*
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
157 * Frames
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 typedef struct
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 int left;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 int top;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 int width;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 int height;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 } XEMACS_RECT_WH;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 struct mswindows_frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 /* win32 window handle */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 HWND hwnd;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 /* DC for this win32 window */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 HDC hdc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
175 /* Used with DeferWindowPos */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
176 HDWP hdwp;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 /* Time of last click event, for button 2 emul */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 DWORD last_click_time;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
181 /* Mods of last click event */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
182 DWORD last_click_mods;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
183
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 /* Coordinates of last click event, screen-relative */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 POINTS last_click_point;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 #ifdef HAVE_TOOLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 /* Toolbar hash table. See toolbar-msw.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 Lisp_Object toolbar_hash_table;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 unsigned int toolbar_checksum[4];
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 /* Menu hash table. See menubar-msw.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 Lisp_Object menu_hash_table;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 /* Menu checksum. See menubar-msw.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 unsigned int menu_checksum;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 /* Widget glyphs attached to this frame. See glyphs-msw.c */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
199 Lisp_Object widget_hash_table1, widget_hash_table2, widget_hash_table3;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 /* Frame title hash value. See frame-msw.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 unsigned int title_checksum;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 /* Real character width and height of the frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 FRAME_{HEIGHT,WIDTH} do not work for pixel geometry! */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 int charheight, charwidth;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 /* Misc flags */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 int button2_need_lbutton : 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 int button2_need_rbutton : 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 int button2_is_down : 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 int ignore_next_lbutton_up : 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 int ignore_next_rbutton_up : 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 int sizing : 1;
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
215 int paint_pending : 1; /* Whether a WM_PAINT magic event has been queued */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
216 int popup : 1; /* frame is a popup frame */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 /* Geometry, in characters, as specified by proplist during frame
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
219 creation. Members are set to -1 for unspecified */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 XEMACS_RECT_WH* target_rect;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 #define FRAME_MSWINDOWS_DATA(f) FRAME_TYPE_DATA (f, mswindows)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 #define FRAME_MSWINDOWS_HANDLE(f) (FRAME_MSWINDOWS_DATA (f)->hwnd)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 #define FRAME_MSWINDOWS_DC(f) (FRAME_MSWINDOWS_DATA (f)->hdc)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 #define FRAME_MSWINDOWS_MENU_HASH_TABLE(f) (FRAME_MSWINDOWS_DATA (f)->menu_hash_table)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 #define FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE(f) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 (FRAME_MSWINDOWS_DATA (f)->toolbar_hash_table)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
230 #define FRAME_MSWINDOWS_WIDGET_HASH_TABLE1(f) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
231 (FRAME_MSWINDOWS_DATA (f)->widget_hash_table1)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
232 #define FRAME_MSWINDOWS_WIDGET_HASH_TABLE2(f) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
233 (FRAME_MSWINDOWS_DATA (f)->widget_hash_table2)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
234 #define FRAME_MSWINDOWS_WIDGET_HASH_TABLE3(f) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
235 (FRAME_MSWINDOWS_DATA (f)->widget_hash_table3)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 #define FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 (FRAME_MSWINDOWS_DATA (f)->toolbar_checksum[pos])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 #define FRAME_MSWINDOWS_MENU_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->menu_checksum)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 #define FRAME_MSWINDOWS_TITLE_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->title_checksum)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 #define FRAME_MSWINDOWS_CHARWIDTH(f) (FRAME_MSWINDOWS_DATA (f)->charwidth)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 #define FRAME_MSWINDOWS_CHARHEIGHT(f) (FRAME_MSWINDOWS_DATA (f)->charheight)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 #define FRAME_MSWINDOWS_TARGET_RECT(f) (FRAME_MSWINDOWS_DATA (f)->target_rect)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
243 #define FRAME_MSWINDOWS_POPUP(f) (FRAME_MSWINDOWS_DATA (f)->popup)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 /* Frame check and validation macros */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 #define FRAME_MSWINDOWS_P(frm) CONSOLE_TYPESYM_MSWINDOWS_P (FRAME_TYPE (frm))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 #define CHECK_MSWINDOWS_FRAME(z) CHECK_FRAME_TYPE (z, mswindows)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 #define CONCHECK_MSWINDOWS_FRAME(z) CONCHECK_FRAME_TYPE (z, mswindows)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 /* win32 window LONG indices */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 #define XWL_FRAMEOBJ 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 #define XWL_COUNT 1 /* Number of LONGs that we use */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 #define MSWINDOWS_WINDOW_EXTRA_BYTES (XWL_COUNT*4)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
255 /*
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
256 * Printer frame, aka printer job
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
257 */
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
258
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
259 struct msprinter_frame
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
260 {
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
261 int left_margin, top_margin, /* All in twips */
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
262 right_margin, bottom_margin;
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
263 int charheight, charwidth; /* As per proplist or -1 if not given */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
264 int pix_left, pix_top; /* Calculated in init_frame_*, VP offset */
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
265 int job_started : 1;
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
266 int page_started : 1;
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
267 };
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
268
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
269 #define FRAME_MSPRINTER_DATA(f) FRAME_TYPE_DATA (f, msprinter)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
270 #define FRAME_MSPRINTER_LEFT_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->left_margin)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
271 #define FRAME_MSPRINTER_RIGHT_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->top_margin)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
272 #define FRAME_MSPRINTER_TOP_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->right_margin)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
273 #define FRAME_MSPRINTER_BOTTOM_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->bottom_margin)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
274 #define FRAME_MSPRINTER_JOB_STARTED(f) (FRAME_MSPRINTER_DATA (f)->job_started)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
275 #define FRAME_MSPRINTER_PAGE_STARTED(f) (FRAME_MSPRINTER_DATA (f)->page_started)
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
276 #define FRAME_MSPRINTER_CHARWIDTH(f) (FRAME_MSPRINTER_DATA (f)->charheight)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
277 #define FRAME_MSPRINTER_CHARHEIGHT(f) (FRAME_MSPRINTER_DATA (f)->charwidth)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
278 #define FRAME_MSPRINTER_PIXLEFT(f) (FRAME_MSPRINTER_DATA (f)->pix_left)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
279 #define FRAME_MSPRINTER_PIXTOP(f) (FRAME_MSPRINTER_DATA (f)->pix_top)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 * Events
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 /* win32 messages / magic event types */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 #define EVENT_MSWINDOWS_MAGIC_TYPE(e) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 ((e)->event.magic.underlying_mswindows_event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 #define XM_BUMPQUEUE (WM_USER + 101)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 #define XM_MAPFRAME (WM_USER + 102)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 #define XM_UNMAPFRAME (WM_USER + 103)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 * Random globals
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 /* win32 "Windows" procedure */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 LRESULT WINAPI mswindows_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 LPARAM lParam);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 LRESULT WINAPI mswindows_control_wnd_proc (HWND hwnd,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 UINT msg, WPARAM wParam,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 LPARAM lParam);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
304 void mswindows_redraw_exposed_area (struct frame *f, int x, int y,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 int width, int height);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
307 HWND mswindows_get_selected_frame_hwnd (void);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
308 void mswindows_enqueue_magic_event (HWND hwnd, UINT msg);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
309 int mswindows_is_dialog_msg (MSG *msg);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 /* win32 DDE management library */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 #define MSWINDOWS_DDE_ITEM_OPEN "Open"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 extern DWORD mswindows_dde_mlid;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 extern HSZ mswindows_dde_service;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 extern HSZ mswindows_dde_topic_system;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 extern HSZ mswindows_dde_item_open;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 HDDEDATA CALLBACK mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv,
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
318 HSZ hszTopic, HSZ hszItem,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
319 HDDEDATA hdata,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 DWORD dwData1, DWORD dwData2);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
322 void mswindows_enqueue_dispatch_event (Lisp_Object event);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 void mswindows_enqueue_misc_user_event (Lisp_Object channel,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 Lisp_Object function,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 Lisp_Object object);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
326 Lisp_Object mswindows_cancel_dispatch_event (Lisp_Event* event);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 Lisp_Object mswindows_pump_outstanding_events (void);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
328 Lisp_Object mswindows_protect_modal_loop (Lisp_Object (*bfun)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
329 (Lisp_Object barg),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 Lisp_Object barg);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 void mswindows_unmodalize_signal_maybe (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
333 COLORREF mswindows_string_to_color (const char *name);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
334 USID emacs_mswindows_create_stream_pair (void* inhandle, void* outhandle,
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
335 Lisp_Object* instream,
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
336 Lisp_Object* outstream,
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
337 int flags);
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
338 USID emacs_mswindows_delete_stream_pair (Lisp_Object instream,
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
339 Lisp_Object outstream);
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
340
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 #ifdef HAVE_WIN32_PROCESSES
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
342 HANDLE get_nt_process_handle (Lisp_Process *p);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 extern Lisp_Object Vmswindows_frame_being_created;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 extern Lisp_Object mswindows_frame_being_created;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
348 void mswindows_get_workspace_coords (RECT *rc);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
349
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
350 HWND mswindows_get_console_hwnd (void);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
351 void mswindows_hide_console (void);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
352 void mswindows_show_console (void);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
353 int mswindows_output_console_string (CONST Extbyte *str, Extcount len);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
354
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
355 Lisp_Object mswindows_enumerate_fonts (HDC hdc);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
357 int mswindows_char_is_accelerator (struct frame *f, Emchar ch);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
358 Bytecount mswindows_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
359 Bytecount maxlen, Emchar *accel,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
360 Lisp_Object error_name);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
361
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
362 #ifdef HAVE_TOOLBARS
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
363 Lisp_Object mswindows_get_toolbar_button_text (struct frame* f,
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
364 int command_id);
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
365 Lisp_Object mswindows_handle_toolbar_wm_command (struct frame* f,
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
366 HWND ctrl, WORD id);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
367 #endif
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
368 Lisp_Object mswindows_handle_gui_wm_command (struct frame* f,
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
369 HWND ctrl, LPARAM id);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
370
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
371 int mswindows_windows9x_p (void);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
372
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
373 void mswindows_output_last_error (char *frob);
563
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents: 546
diff changeset
374 DOESNT_RETURN mswindows_report_process_error (const char *string,
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents: 546
diff changeset
375 Lisp_Object data,
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents: 546
diff changeset
376 int errnum);
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents: 546
diff changeset
377 Lisp_Object mswindows_lisp_error (int errnum);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
378
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
379 Lisp_Object mswindows_handle_print_dialog_box (struct frame *f,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
380 Lisp_Object keys);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
381 Lisp_Object mswindows_handle_page_setup_dialog_box (struct frame *f,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
382 Lisp_Object keys);
506
39ccc7dd8077 [xemacs-hg @ 2001-05-05 08:39:59 by ben]
ben
parents: 442
diff changeset
383 int mswindows_get_default_margin (Lisp_Object prop);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
384
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
385 void mswindows_register_popup_frame (Lisp_Object frame);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
386 void mswindows_unregister_popup_frame (Lisp_Object frame);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
387
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
388 void mswindows_destroy_selection (Lisp_Object selection);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
389
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
390 Lisp_Object msprinter_default_printer (void);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
391
546
666d73d6ac56 [xemacs-hg @ 2001-05-20 01:17:07 by ben]
ben
parents: 510
diff changeset
392 Lisp_Object mswindows_find_frame (HWND hwnd);
666d73d6ac56 [xemacs-hg @ 2001-05-20 01:17:07 by ben]
ben
parents: 510
diff changeset
393
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
394 struct mswindows_dialog_id
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
395 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
396 struct lcrecord_header header;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
397
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
398 Lisp_Object frame;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
399 Lisp_Object callbacks;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
400 HWND hwnd;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
401 };
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
402
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
403 DECLARE_LRECORD (mswindows_dialog_id, struct mswindows_dialog_id);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
404 #define XMSWINDOWS_DIALOG_ID(x) XRECORD (x, mswindows_dialog_id, struct mswindows_dialog_id)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
405 #define XSETMSWINDOWS_DIALOG_ID(x, p) XSETRECORD (x, p, mswindows_dialog_id)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
406 #define MSWINDOWS_DIALOG_IDP(x) RECORDP (x, mswindows_dialog_id)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
407 #define CHECK_MSWINDOWS_DIALOG_ID(x) CHECK_RECORD (x, mswindows_dialog_id)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
408 #define CONCHECK_MSWINDOWS_DIALOG_ID(x) CONCHECK_RECORD (x, mswindows_dialog_id)
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
409
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 430
diff changeset
410 #endif /* INCLUDED_console_msw_h_ */