1 /* Copyright (C) 2000 Free Software Foundation, Inc.
2 Copyright (C) 2000 Ben Wing.
4 This file is part of XEmacs.
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
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
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. */
21 /* Synched up with: Not in FSF. */
25 Created May 2000 by Andy Piper.
26 Windows-Mule stuff added by Ben Wing.
29 #ifndef INCLUDED_syswindows_h_
30 #define INCLUDED_syswindows_h_
32 /* Note that there are currently FOUR different general
33 Windows-related include files in src!
35 Uses are approximately:
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.
41 console-msw.h: Used on both Cygwin and native Windows, but only when
42 native window system (as opposed to X) chosen.
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).
48 ntheap.h: Used only on native Windows and only when standard dumping
49 mechanism (unexnt.c) used.
51 All of the last three files include the first.
54 #ifndef WIN32_LEAN_AND_MEAN
55 #define WIN32_LEAN_AND_MEAN
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
67 #elif defined (WIN32_LEAN_AND_MEAN)
74 /* mmsystem.h defines. */
79 #define SND_NODEFAULT 2
85 #define SND_FILENAME 0x2000L
88 /* winspool.h defines. */
90 #define PHYSICALWIDTH 110
92 #ifndef PHYSICALHEIGHT
93 #define PHYSICALHEIGHT 111
95 #ifndef PHYSICALOFFSETX
96 #define PHYSICALOFFSETX 112
98 #ifndef PHYSICALOFFSETY
99 #define PHYSICALOFFSETY 113
102 /* windows.h defines. */
103 #if defined (CYGWIN) && (CYGWIN_VERSION_DLL_MAJOR < 20)
104 typedef NMHDR *LPNMHDR;
107 #ifndef SPI_GETWHEELSCROLLLINES
108 #define SPI_GETWHEELSCROLLLINES 104
110 #ifndef WHEEL_PAGESCROLL
111 #define WHEEL_PAGESCROLL (UINT_MAX)
114 #define WHEEL_DELTA 120
116 #ifndef WM_MOUSEWHEEL
117 #define WM_MOUSEWHEEL 0x20A
123 #define SIF_TRACKPOS 0x0010
126 #define FW_BLACK FW_HEAVY
129 #define FW_ULTRABOLD FW_EXTRABOLD
132 #define FW_DEMIBOLD FW_SEMIBOLD
134 #ifndef FW_ULTRALIGHT
135 #define FW_ULTRALIGHT FW_EXTRALIGHT
137 #ifndef APPCMD_FILTERINITS
138 #define APPCMD_FILTERINITS 0x20L
140 #ifndef CBF_FAIL_SELFCONNECTIONS
141 #define CBF_FAIL_SELFCONNECTIONS 0x1000
143 #ifndef CBF_SKIP_ALLNOTIFICATIONS
144 #define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000
146 #ifndef CBF_FAIL_ADVISES
147 #define CBF_FAIL_ADVISES 0x4000
149 #ifndef CBF_FAIL_POKES
150 #define CBF_FAIL_POKES 0x10000
152 #ifndef CBF_FAIL_REQUESTS
153 #define CBF_FAIL_REQUESTS 0x20000
155 #ifndef SZDDESYS_TOPIC
156 #define SZDDESYS_TOPIC "System"
158 #ifndef JOHAB_CHARSET
159 #define JOHAB_CHARSET 130
162 #define MAC_CHARSET 77
165 /***************************************************************/
167 /* Definitions for Mule under MS Windows */
169 /* extern int mswindows_windows9x_p; */
170 /* #define EIUNICODE_P (!mswindows_windows9x_p) */
171 #define EIUNICODE_P 0
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)))
178 #endif /* INCLUDED_syswindows_h_ */