16886
c686d4f3728a
Change all uses of win95, winnt, and win32 into Windows 95, Windows
Geoff Voelker <voelker@cs.washington.edu>
diff
changeset
|
1 /* Definitions and headers for communication on the Microsoft W32 API.
|
13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
2 Copyright (C) 1995 Free Software Foundation, Inc.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
3
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
4 This file is part of GNU Emacs.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
5
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
6 GNU Emacs is free software; you can redistribute it and/or modify
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
7 it under the terms of the GNU General Public License as published by
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
8 the Free Software Foundation; either version 2, or (at your option)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
9 any later version.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
10
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
11 GNU Emacs is distributed in the hope that it will be useful,
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
14 GNU General Public License for more details.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
15
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
16 You should have received a copy of the GNU General Public License
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
17 along with GNU Emacs; see the file COPYING. If not, write to
|
14186
|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
19 Boston, MA 02111-1307, USA. */
|
13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
20
|
29605
|
21 #ifndef EMACS_W32GUI_H
|
|
22 #define EMACS_W32GUI_H
|
13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
23 #include <windows.h>
|
31112
|
24
|
24144
|
25 #include "w32bdf.h"
|
13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
26
|
32724
|
27 /* Emulate XCharStruct. */
|
|
28 typedef struct _XCharStruct
|
|
29 {
|
|
30 short rbearing;
|
|
31 short lbearing;
|
|
32 short width;
|
|
33 short ascent;
|
|
34 short descent;
|
|
35 } XCharStruct;
|
|
36
|
|
37 enum w32_char_font_type
|
|
38 {
|
|
39 UNKNOWN_FONT,
|
|
40 ANSI_FONT,
|
|
41 UNICODE_FONT,
|
|
42 BDF_1D_FONT,
|
|
43 BDF_2D_FONT
|
|
44 };
|
|
45
|
13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
46 typedef struct W32FontStruct {
|
32724
|
47 enum w32_char_font_type font_type;
|
13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
48 TEXTMETRIC tm;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
49 HFONT hfont;
|
24144
|
50 bdffont *bdf;
|
29318
|
51 int double_byte_p;
|
32724
|
52 XCharStruct max_bounds;
|
|
53 XCharStruct scratch;
|
|
54 /* Only store info for ascii chars, if not fixed pitch. */
|
|
55 XCharStruct * per_char;
|
13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
56 } W32FontStruct;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
57
|
27398
|
58 typedef struct W32FontStruct XFontStruct;
|
|
59
|
|
60 /* Emulate X GC's by keeping color and font info in a structure. */
|
|
61 typedef struct _XGCValues
|
|
62 {
|
|
63 COLORREF foreground;
|
|
64 COLORREF background;
|
|
65 XFontStruct * font;
|
|
66 } XGCValues;
|
|
67
|
|
68 #define GCForeground 0x01
|
|
69 #define GCBackground 0x02
|
|
70 #define GCFont 0x03
|
|
71
|
13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
72 typedef HBITMAP Pixmap;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
73 typedef HBITMAP Bitmap;
|
27398
|
74
|
|
75 typedef XGCValues * GC;
|
13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
76 typedef COLORREF Color;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
77 typedef DWORD Time;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
78 typedef HWND Window;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
79 typedef HCURSOR Cursor;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
80
|
40327
57a44aac3228
Add a dummy typedef for XImage. From Juanma Barranquero <lektu@terra.es>.
Eli Zaretskii <eliz@gnu.org>
diff
changeset
|
81 /* Dummy; we don't yet support images in the Windows port */
|
57a44aac3228
Add a dummy typedef for XImage. From Juanma Barranquero <lektu@terra.es>.
Eli Zaretskii <eliz@gnu.org>
diff
changeset
|
82 typedef int XImage;
|
57a44aac3228
Add a dummy typedef for XImage. From Juanma Barranquero <lektu@terra.es>.
Eli Zaretskii <eliz@gnu.org>
diff
changeset
|
83
|
13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
84 #define FACE_DEFAULT (~0)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
85
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
86 extern HINSTANCE hinst;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
87 extern HINSTANCE hprevinst;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
88 extern LPSTR lpCmdLine;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
89 extern int nCmdShow;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
90
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
91 /* Bit Gravity */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
92
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
93 #define ForgetGravity 0
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
94 #define NorthWestGravity 1
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
95 #define NorthGravity 2
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
96 #define NorthEastGravity 3
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
97 #define WestGravity 4
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
98 #define CenterGravity 5
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
99 #define EastGravity 6
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
100 #define SouthWestGravity 7
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
101 #define SouthGravity 8
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
102 #define SouthEastGravity 9
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
103 #define StaticGravity 10
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
104
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
105 #define NoValue 0x0000
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
106 #define XValue 0x0001
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
107 #define YValue 0x0002
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
108 #define WidthValue 0x0004
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
109 #define HeightValue 0x0008
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
110 #define AllValues 0x000F
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
111 #define XNegative 0x0010
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
112 #define YNegative 0x0020
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
113
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
114 #define USPosition (1L << 0) /* user specified x, y */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
115 #define USSize (1L << 1) /* user specified width, height */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
116
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
117 #define PPosition (1L << 2) /* program specified position */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
118 #define PSize (1L << 3) /* program specified size */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
119 #define PMinSize (1L << 4) /* program specified minimum size */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
120 #define PMaxSize (1L << 5) /* program specified maximum size */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
121 #define PResizeInc (1L << 6) /* program specified resize increments */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
122 #define PAspect (1L << 7) /* program specified min and max aspect ratios */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
123 #define PBaseSize (1L << 8) /* program specified base for incrementing */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
124 #define PWinGravity (1L << 9) /* program specified window gravity */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
125
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
126 extern int XParseGeometry ();
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
127
|
29605
|
128 #endif /* EMACS_W32GUI_H */
|