Mercurial > hg > xemacs-beta
comparison src/console-msw.h @ 249:83b3d10dcba9 r20-5b23
Import from CVS: tag r20-5b23
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:19:09 +0200 |
parents | 52952cbfc5b5 |
children | 677f6a0ee643 |
comparison
equal
deleted
inserted
replaced
248:ad40ac2754d8 | 249:83b3d10dcba9 |
---|---|
1 /* Define mswindowsindows-specific console, device, and frame object for XEmacs. | 1 /* Define mswindows-specific console, device, and frame object for XEmacs. |
2 Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. | 2 Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. |
3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. | 3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. |
4 | 4 |
5 This file is part of XEmacs. | 5 This file is part of XEmacs. |
6 | 6 |
33 #define _XEMACS_CONSOLE_MSW_H_ | 33 #define _XEMACS_CONSOLE_MSW_H_ |
34 | 34 |
35 #include "console.h" | 35 #include "console.h" |
36 | 36 |
37 #include "windows.h" | 37 #include "windows.h" |
38 #include "ddeml.h" /* DDE management library */ | |
39 #include "shellapi.h" /* FileManager/Explorer drag and drop */ | |
40 | |
41 /* | |
42 * XXX FIXME: The following X modifier defs in events-mod.h clash with win32 | |
43 * hotkey defs in winuser.h. For the moment lose the win32 versions. | |
44 * Maybe we should rename all of MOD_* to something that doesn't clash. | |
45 */ | |
46 #ifdef MOD_CONTROL | |
47 # undef MOD_CONTROL | |
48 #endif | |
49 #ifdef MOD_ALT | |
50 # undef MOD_ALT | |
51 #endif | |
52 #ifdef MOD_SHIFT | |
53 # undef MOD_SHIFT | |
54 #endif | |
55 | |
56 | |
57 /* The name of the main window class */ | |
58 #define XEMACS_CLASS "XEmacs" | |
59 | |
60 | |
61 /* | |
62 * Console | |
63 */ | |
38 | 64 |
39 DECLARE_CONSOLE_TYPE (mswindows); | 65 DECLARE_CONSOLE_TYPE (mswindows); |
40 | 66 |
41 struct mswindows_console | 67 struct mswindows_console |
42 { | 68 { |
43 int infd, outfd; | 69 int infd, outfd; |
44 }; | 70 }; |
45 | 71 |
72 | |
73 /* | |
74 * Device | |
75 */ | |
46 | 76 |
47 struct mswindows_device | 77 struct mswindows_device |
48 { | 78 { |
49 int logpixelsx, logpixelsy; | 79 int logpixelsx, logpixelsy; |
50 int planes, cells; | 80 int planes, cells; |
60 #define DEVICE_MSWINDOWS_HORZRES(d) (DEVICE_MSWINDOWS_DATA (d)->horzres) | 90 #define DEVICE_MSWINDOWS_HORZRES(d) (DEVICE_MSWINDOWS_DATA (d)->horzres) |
61 #define DEVICE_MSWINDOWS_VERTRES(d) (DEVICE_MSWINDOWS_DATA (d)->vertres) | 91 #define DEVICE_MSWINDOWS_VERTRES(d) (DEVICE_MSWINDOWS_DATA (d)->vertres) |
62 #define DEVICE_MSWINDOWS_HORZSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->horzsize) | 92 #define DEVICE_MSWINDOWS_HORZSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->horzsize) |
63 #define DEVICE_MSWINDOWS_VERTSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->vertsize) | 93 #define DEVICE_MSWINDOWS_VERTSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->vertsize) |
64 | 94 |
95 | |
96 /* | |
97 * Frame | |
98 */ | |
65 | 99 |
66 struct mswindows_frame | 100 struct mswindows_frame |
67 { | 101 { |
68 /* win32 window handle */ | 102 /* win32 window handle */ |
69 HWND hwnd; | 103 HWND hwnd; |
97 #define FRAME_MSWINDOWS_HANDLE(f) (FRAME_MSWINDOWS_DATA (f)->hwnd) | 131 #define FRAME_MSWINDOWS_HANDLE(f) (FRAME_MSWINDOWS_DATA (f)->hwnd) |
98 #define FRAME_MSWINDOWS_DC(f) (FRAME_MSWINDOWS_DATA (f)->hdc) | 132 #define FRAME_MSWINDOWS_DC(f) (FRAME_MSWINDOWS_DATA (f)->hdc) |
99 #define FRAME_MSWINDOWS_MENU_HASHTABLE(f) (FRAME_MSWINDOWS_DATA (f)->menu_hashtable) | 133 #define FRAME_MSWINDOWS_MENU_HASHTABLE(f) (FRAME_MSWINDOWS_DATA (f)->menu_hashtable) |
100 #define FRAME_MSWINDOWS_MENU_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->menu_checksum) | 134 #define FRAME_MSWINDOWS_MENU_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->menu_checksum) |
101 | 135 |
136 /* win32 window LONG indices */ | |
137 #define XWL_FRAMEOBJ 0 | |
138 #define XWL_COUNT 1 /* Number of LONGs that we use */ | |
139 #define MSWINDOWS_WINDOW_EXTRA_BYTES (XWL_COUNT*4) | |
140 | |
141 | |
102 /* | 142 /* |
103 * Redisplay functions | 143 * Events |
104 */ | 144 */ |
145 | |
146 /* win32 messages / magic event types */ | |
147 #define EVENT_MSWINDOWS_MAGIC_TYPE(e) \ | |
148 ((e)->event.magic.underlying_mswindows_event) | |
149 #define XM_BUMPQUEUE (WM_USER + 101) | |
150 #define XM_MAPFRAME (WM_USER + 102) | |
151 #define XM_UNMAPFRAME (WM_USER + 103) | |
152 | |
153 | |
154 /* | |
155 * Random globals | |
156 */ | |
157 | |
158 /* win32 "Windows" procedure */ | |
159 LRESULT WINAPI mswindows_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, | |
160 LPARAM lParam); | |
161 | |
105 void mswindows_redraw_exposed_area (struct frame *f, int x, int y, | 162 void mswindows_redraw_exposed_area (struct frame *f, int x, int y, |
106 int width, int height); | 163 int width, int height); |
164 | |
165 /* win32 DDE management library */ | |
166 #define MSWINDOWS_DDE_ITEM_OPEN "Open" | |
167 extern DWORD mswindows_dde_mlid; | |
168 extern HSZ mswindows_dde_service; | |
169 extern HSZ mswindows_dde_topic_system; | |
170 extern HSZ mswindows_dde_item_open; | |
171 HDDEDATA CALLBACK mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv, | |
172 HSZ hszTopic, HSZ hszItem, HDDEDATA hdata, | |
173 DWORD dwData1, DWORD dwData2); | |
174 | |
175 void mswindows_enqueue_dispatch_event (Lisp_Object event); | |
176 void mswindows_enqueue_magic_event (HWND hwnd, UINT message); | |
177 Lisp_Object mswindows_cancel_dispatch_event (struct Lisp_Event* event); | |
178 Lisp_Object mswindows_pump_outstanding_events (void); | |
107 | 179 |
108 #endif /* _XEMACS_CONSOLE_MSW_H_ */ | 180 #endif /* _XEMACS_CONSOLE_MSW_H_ */ |