213
|
1 /* Define mswindowsindows-specific console, device, and frame object for XEmacs.
|
|
2 Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
|
3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
|
|
4
|
|
5 This file is part of XEmacs.
|
|
6
|
|
7 XEmacs is free software; you can redistribute it and/or modify it
|
|
8 under the terms of the GNU General Public License as published by the
|
|
9 Free Software Foundation; either version 2, or (at your option) any
|
|
10 later version.
|
|
11
|
|
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
15 for more details.
|
|
16
|
|
17 You should have received a copy of the GNU General Public License
|
|
18 along with XEmacs; see the file COPYING. If not, write to
|
|
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
20 Boston, MA 02111-1307, USA. */
|
|
21
|
|
22 /* Synched up with: Not in FSF. */
|
|
23
|
|
24
|
|
25 /* Authorship:
|
|
26
|
|
27 Ultimately based on FSF, then later on JWZ work for Lemacs.
|
|
28 Rewritten over time by Ben Wing and Chuck Thompson.
|
|
29 Rewritten for mswindows by Jonathan Harris, November 1997 for 20.4.
|
|
30 */
|
|
31
|
|
32 #ifndef _XEMACS_CONSOLE_MSW_H_
|
|
33 #define _XEMACS_CONSOLE_MSW_H_
|
|
34
|
|
35 #include "console.h"
|
|
36
|
|
37 #include "windows.h"
|
|
38
|
|
39 DECLARE_CONSOLE_TYPE (mswindows);
|
|
40
|
|
41 struct mswindows_console
|
|
42 {
|
|
43 int infd, outfd;
|
|
44 };
|
|
45
|
|
46
|
|
47 struct mswindows_device
|
|
48 {
|
|
49 int logpixelsx, logpixelsy;
|
|
50 int planes, cells;
|
|
51 int horzres, vertres; /* Size in pixels */
|
|
52 int horzsize, vertsize; /* Size in mm */
|
|
53 };
|
|
54
|
|
55 #define DEVICE_MSWINDOWS_DATA(d) DEVICE_TYPE_DATA (d, mswindows)
|
|
56 #define DEVICE_MSWINDOWS_LOGPIXELSX(d) (DEVICE_MSWINDOWS_DATA (d)->logpixelsx)
|
|
57 #define DEVICE_MSWINDOWS_LOGPIXELSY(d) (DEVICE_MSWINDOWS_DATA (d)->logpixelsy)
|
|
58 #define DEVICE_MSWINDOWS_PLANES(d) (DEVICE_MSWINDOWS_DATA (d)->planes)
|
|
59 #define DEVICE_MSWINDOWS_CELLS(d) (DEVICE_MSWINDOWS_DATA (d)->cells)
|
|
60 #define DEVICE_MSWINDOWS_HORZRES(d) (DEVICE_MSWINDOWS_DATA (d)->horzres)
|
|
61 #define DEVICE_MSWINDOWS_VERTRES(d) (DEVICE_MSWINDOWS_DATA (d)->vertres)
|
|
62 #define DEVICE_MSWINDOWS_HORZSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->horzsize)
|
|
63 #define DEVICE_MSWINDOWS_VERTSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->vertsize)
|
|
64
|
|
65
|
|
66 struct mswindows_frame
|
|
67 {
|
|
68 /* win32 window handle */
|
|
69 HWND hwnd;
|
|
70
|
|
71 /* DC for this win32 window */
|
|
72 HDC hdc;
|
223
|
73
|
|
74 /* Time of last click event, for button 2 emul */
|
|
75 DWORD last_click_time;
|
|
76
|
|
77 /* Coordinates of last click event, screen-relative */
|
|
78 POINTS last_click_point;
|
|
79
|
231
|
80 /* Menu hashtable. See menubar-msw.h */
|
|
81 Lisp_Object hash_table;
|
|
82
|
223
|
83 /* Misc flags */
|
|
84 int button2_need_lbutton : 1;
|
|
85 int button2_need_rbutton : 1;
|
|
86 int button2_is_down : 1;
|
|
87 int ignore_next_lbutton_up : 1;
|
|
88 int ignore_next_rbutton_up : 1;
|
|
89 int sizing : 1;
|
213
|
90 };
|
|
91
|
|
92 #define FRAME_MSWINDOWS_DATA(f) FRAME_TYPE_DATA (f, mswindows)
|
|
93
|
|
94 #define FRAME_MSWINDOWS_HANDLE(f) (FRAME_MSWINDOWS_DATA (f)->hwnd)
|
|
95 #define FRAME_MSWINDOWS_DC(f) (FRAME_MSWINDOWS_DATA (f)->hdc)
|
231
|
96 #define FRAME_MSWINDOWS_MENU_HASHTABLE(f) (FRAME_MSWINDOWS_DATA (f)->hash_table)
|
213
|
97
|
|
98 /*
|
|
99 * Redisplay functions
|
|
100 */
|
|
101 void mswindows_redraw_exposed_area (struct frame *f, int x, int y,
|
|
102 int width, int height);
|
|
103
|
|
104 #endif /* _XEMACS_CONSOLE_MSW_H_ */
|