import -ko -b 1.1.3 XEmacs XEmacs-21_2 r21-2-35
[chise/xemacs-chise.git.1] / src / syswindows.h
1 /* Copyright (C) 2000 Free Software Foundation, Inc.
2    Copyright (C) 2000 Ben Wing.
3
4 This file is part of XEmacs.
5
6 XEmacs is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
9 later version.
10
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with XEmacs; see the file COPYING.  If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 /* Synched up with: Not in FSF. */
22
23 /* Authorship:
24
25    Created May 2000 by Andy Piper.
26    Windows-Mule stuff added by Ben Wing.
27 */
28
29 #ifndef INCLUDED_syswindows_h_
30 #define INCLUDED_syswindows_h_
31
32 /* Note that there are currently FOUR different general
33    Windows-related include files in src!
34
35    Uses are approximately:
36
37    syswindows.h: Mostly a wrapper around <windows.h>, including missing
38    defines as necessary.  Also includes stuff needed on both Cygwin and
39    native Windows, regardless of window system chosen.
40
41    console-msw.h: Used on both Cygwin and native Windows, but only when
42    native window system (as opposed to X) chosen.
43
44    nt.h: [will be renamed to win32.h] Used only on native Windows, and
45    regardless of window system chosen -- but used on both purely native
46    Windows (s/windowsnt.h) and MinGW (s/mingw32.h).
47
48    ntheap.h: Used only on native Windows and only when standard dumping
49    mechanism (unexnt.c) used.
50
51    All of the last three files include the first.
52 */
53
54 #ifndef WIN32_LEAN_AND_MEAN
55 #define WIN32_LEAN_AND_MEAN
56 #endif
57
58 #include <windows.h>
59
60 #if (defined (CYGWIN) || defined(MINGW)) && \
61         CYGWIN_VERSION_DLL_MAJOR < 21
62 extern BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
63 extern BOOL WINAPI PlaySound(LPCSTR,HMODULE,DWORD);
64 #define stricmp strcasecmp
65 #define FONTENUMPROC FONTENUMEXPROC
66 #define ntmTm ntmentm
67 #elif defined (WIN32_LEAN_AND_MEAN)
68 #include <winspool.h>
69 #include <mmsystem.h>
70 #include <shellapi.h>
71 #include <ddeml.h>
72 #endif
73
74 /* mmsystem.h defines. */
75 #ifndef SND_ASYNC
76 #define SND_ASYNC               1
77 #endif
78 #ifndef SND_NODEFAULT
79 #define SND_NODEFAULT           2
80 #endif
81 #ifndef SND_MEMORY
82 #define SND_MEMORY              4
83 #endif
84 #ifndef SND_FILENAME
85 #define SND_FILENAME            0x2000L
86 #endif
87
88 /* winspool.h defines. */
89 #ifndef PHYSICALWIDTH
90 #define PHYSICALWIDTH 110
91 #endif
92 #ifndef PHYSICALHEIGHT
93 #define PHYSICALHEIGHT 111
94 #endif
95 #ifndef PHYSICALOFFSETX
96 #define PHYSICALOFFSETX 112
97 #endif
98 #ifndef PHYSICALOFFSETY
99 #define PHYSICALOFFSETY 113
100 #endif
101
102 /* windows.h defines. */
103 #if defined (CYGWIN) && (CYGWIN_VERSION_DLL_MAJOR < 20)
104 typedef NMHDR *LPNMHDR;
105 #endif
106
107 #ifndef SPI_GETWHEELSCROLLLINES
108 #define SPI_GETWHEELSCROLLLINES 104
109 #endif
110 #ifndef WHEEL_PAGESCROLL
111 #define WHEEL_PAGESCROLL (UINT_MAX)
112 #endif
113 #ifndef WHEEL_DELTA
114 #define WHEEL_DELTA 120
115 #endif
116 #ifndef WM_MOUSEWHEEL
117 #define WM_MOUSEWHEEL 0x20A
118 #endif
119 #ifndef VK_APPS
120 #define VK_APPS                 0x5D
121 #endif
122 #ifndef SIF_TRACKPOS
123 #define SIF_TRACKPOS            0x0010
124 #endif
125 #ifndef FW_BLACK
126 #define FW_BLACK        FW_HEAVY
127 #endif
128 #ifndef FW_ULTRABOLD
129 #define FW_ULTRABOLD    FW_EXTRABOLD
130 #endif
131 #ifndef FW_DEMIBOLD
132 #define FW_DEMIBOLD     FW_SEMIBOLD
133 #endif
134 #ifndef FW_ULTRALIGHT
135 #define FW_ULTRALIGHT   FW_EXTRALIGHT
136 #endif
137 #ifndef APPCMD_FILTERINITS
138 #define APPCMD_FILTERINITS      0x20L
139 #endif
140 #ifndef CBF_FAIL_SELFCONNECTIONS
141 #define CBF_FAIL_SELFCONNECTIONS 0x1000
142 #endif
143 #ifndef CBF_SKIP_ALLNOTIFICATIONS
144 #define CBF_SKIP_ALLNOTIFICATIONS       0x3C0000
145 #endif
146 #ifndef CBF_FAIL_ADVISES
147 #define CBF_FAIL_ADVISES        0x4000
148 #endif
149 #ifndef CBF_FAIL_POKES
150 #define CBF_FAIL_POKES          0x10000
151 #endif
152 #ifndef CBF_FAIL_REQUESTS
153 #define CBF_FAIL_REQUESTS       0x20000
154 #endif
155 #ifndef SZDDESYS_TOPIC
156 #define SZDDESYS_TOPIC          "System"
157 #endif
158 #ifndef JOHAB_CHARSET
159 #define JOHAB_CHARSET           130
160 #endif
161 #ifndef MAC_CHARSET
162 #define MAC_CHARSET             77
163 #endif
164
165 /***************************************************************/
166
167 /* Definitions for Mule under MS Windows */
168
169 /* extern int mswindows_windows9x_p; */
170 /* #define EIUNICODE_P (!mswindows_windows9x_p) */
171 #define EIUNICODE_P 0
172
173 #define EITCHAR_SIZE (EIUNICODE_P ? sizeof (WCHAR) : sizeof (CHAR))
174 #define EITEXT(arg) (EIUNICODE_P ? L##arg : (arg))
175 #define EICOPY_TCHAR(ptr, ch) \
176   (EIUNICODE_P ? (* (LPWSTR) (ptr) = L##ch) : (* (LPSTR) (ptr) = (ch)))
177
178 #endif /* INCLUDED_syswindows_h_ */