annotate src/console-msw.h @ 231:557eaa0339bf r20-5b14

Import from CVS: tag r20-5b14
author cvs
date Mon, 13 Aug 2007 10:13:48 +0200
parents 2c611d1463a6
children 52952cbfc5b5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
1 /* Define mswindowsindows-specific console, device, and frame object for XEmacs.
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.
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
29 Rewritten for mswindows by Jonathan Harris, November 1997 for 20.4.
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"
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
36
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
37 #include "windows.h"
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
38
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
39 DECLARE_CONSOLE_TYPE (mswindows);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
40
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
41 struct mswindows_console
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
42 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
43 int infd, outfd;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
44 };
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
45
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
46
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
47 struct mswindows_device
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
48 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
49 int logpixelsx, logpixelsy;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
50 int planes, cells;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
51 int horzres, vertres; /* Size in pixels */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
52 int horzsize, vertsize; /* Size in mm */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
53 };
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
54
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
55 #define DEVICE_MSWINDOWS_DATA(d) DEVICE_TYPE_DATA (d, mswindows)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
56 #define DEVICE_MSWINDOWS_LOGPIXELSX(d) (DEVICE_MSWINDOWS_DATA (d)->logpixelsx)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
57 #define DEVICE_MSWINDOWS_LOGPIXELSY(d) (DEVICE_MSWINDOWS_DATA (d)->logpixelsy)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
58 #define DEVICE_MSWINDOWS_PLANES(d) (DEVICE_MSWINDOWS_DATA (d)->planes)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
59 #define DEVICE_MSWINDOWS_CELLS(d) (DEVICE_MSWINDOWS_DATA (d)->cells)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
60 #define DEVICE_MSWINDOWS_HORZRES(d) (DEVICE_MSWINDOWS_DATA (d)->horzres)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
61 #define DEVICE_MSWINDOWS_VERTRES(d) (DEVICE_MSWINDOWS_DATA (d)->vertres)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
62 #define DEVICE_MSWINDOWS_HORZSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->horzsize)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
63 #define DEVICE_MSWINDOWS_VERTSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->vertsize)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
64
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
65
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
66 struct mswindows_frame
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
67 {
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
68 /* win32 window handle */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
69 HWND hwnd;
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
70
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
71 /* DC for this win32 window */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
72 HDC hdc;
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
73
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
74 /* Time of last click event, for button 2 emul */
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
75 DWORD last_click_time;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
76
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
77 /* Coordinates of last click event, screen-relative */
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
78 POINTS last_click_point;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
79
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents: 223
diff changeset
80 /* Menu hashtable. See menubar-msw.h */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents: 223
diff changeset
81 Lisp_Object hash_table;
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents: 223
diff changeset
82
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
83 /* Misc flags */
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
84 int button2_need_lbutton : 1;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
85 int button2_need_rbutton : 1;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
86 int button2_is_down : 1;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
87 int ignore_next_lbutton_up : 1;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
88 int ignore_next_rbutton_up : 1;
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 213
diff changeset
89 int sizing : 1;
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
90 };
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
91
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
92 #define FRAME_MSWINDOWS_DATA(f) FRAME_TYPE_DATA (f, mswindows)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
93
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
94 #define FRAME_MSWINDOWS_HANDLE(f) (FRAME_MSWINDOWS_DATA (f)->hwnd)
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
95 #define FRAME_MSWINDOWS_DC(f) (FRAME_MSWINDOWS_DATA (f)->hdc)
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents: 223
diff changeset
96 #define FRAME_MSWINDOWS_MENU_HASHTABLE(f) (FRAME_MSWINDOWS_DATA (f)->hash_table)
213
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
97
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
98 /*
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
99 * Redisplay functions
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
100 */
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
101 void mswindows_redraw_exposed_area (struct frame *f, int x, int y,
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
102 int width, int height);
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
103
78f53ef88e17 Import from CVS: tag r20-4b5
cvs
parents:
diff changeset
104 #endif /* _XEMACS_CONSOLE_MSW_H_ */