source: branch/egtra-gdiplus/windef.ab@ 620

Last change on this file since 620 was 179, checked in by dai, 18 years ago

_SystemEnd関数を追加(コンパイラが内部的に使います)。
WCHAR、Charをbasic.sbpで定義した。
LONGLONG、LONG、DWORD、WORD、BYTEなどのTypeDefを有効にした(#92に関連する変更)。
その他タイプミスを修正。

File size: 7.1 KB
Line 
1' windef.ab
2
3#ifndef _WINDEF_
4#define _WINDEF_
5
6'#ifndef WINVER
7'#define WINVER &h0500
8'#endif
9
10#ifndef BASETYPES
11#define BASETYPES
12'TypeDef ULONG = DWord
13'TypeDef PULONG = *ULONG
14'TypeDef USHORT = Word
15'TypeDef PUSHORT = *USHORT
16TypeDef UCHAR = Byte
17TypeDef PUCHAR = *UCHAR
18'TypeDef PSZ = *SByte
19#endif
20
21Const MAX_PATH = 260
22
23'#ifndef NULL
24'#define NULL
25Const NULL = 0 As VoidPtr
26'#endif
27
28'#ifndef FALSE
29'#define FALSE
30Const FALSE = 0
31'#endif
32
33'#ifndef TRUE
34'#define TRUE
35Const TRUE = 0
36'#endif
37
38TypeDef DWORD = DWord
39TypeDef BOOL = Long
40TypeDef BYTE = Byte
41TypeDef WORD = Word
42'TypeDef FLOAT = Single
43'TypeDef PFLOAT = *FLOAT
44'TypeDef PBOOL = *BOOL
45'TypeDef LPBOOL = *BOOL
46'TypeDef PBYTE = *Byte
47'TypeDef LPBYTE = *Byte
48'TypeDef PINT = *Long
49'TypeDef LPINT = *Long
50'TypeDef PWORD = *Word
51'TypeDef LPWORD = *Word
52'TypeDef LPLONG = *Long
53'TypeDef PDWORD = *DWord
54'TypeDef LPDWORD = *DWord
55TypeDef LPVOID = VoidPtr
56TypeDef LPCVOID = VoidPtr
57
58'TypeDef INT = Long
59'TypeDef UINT = DWord
60'TypeDef PUINT = *DWord
61
62#ifndef NT_INCLUDED
63#require <winnt.ab>
64#endif
65
66'#require <specstrings.ab>
67
68TypeDef WPARAM = ULONG_PTR
69TypeDef LPARAM = LONG_PTR
70TypeDef LRESULT = LONG_PTR
71/*
72#ifndef NOMINMAX
73
74#ifndef max
75#endif
76
77#ifndef min
78#endif
79
80#endif
81*/
82
83Const MAKEWORD(l, h) = (((l As Word) And &HFF) Or (((h As Word) And &HFF) << 8)) As Word
84Const MAKELONG(l, h) = (((l As DWord) And &HFFFF) Or (((h As DWord) And &HFFFF) << 16)) As Long
85Const HIBYTE(w) = (((w As Word) >> 8) And &HFF) As Byte
86Const LOBYTE(w) = ((w As Word) And &HFF) As Byte
87Const HIWORD(dw) = (((dw As DWord) >> 16) And &HFFFF) As Word
88Const LOWORD(dw) = ((dw As DWord) And &HFFFF) As Word
89
90#ifndef WIN_INTERNAL
91Type _System_DeclareHandle_HWND:unused As DWord:End Type
92TypeDef HWND = *_System_DeclareHandle_HWND
93Type _System_DeclareHandle_HHOOK:unused As DWord:End Type
94TypeDef HHOOK = *_System_DeclareHandle_HHOOK
95#ifdef WINABLE
96Type _System_DeclareHandleHEVENT:unused As DWord:End Type
97TypeDef HEVENT = *_System_DeclareHandle_HEVENT
98#endif
99#endif
100
101TypeDef ATOM = Word
102TypeDef SPHANDLE = *HANDLE
103TypeDef LPHANDLE = *HANDLE
104TypeDef HGLOBAL = HANDLE
105TypeDef HLOCAL = HANDLE
106TypeDef GLOBALHANDLE = HANDLE
107TypeDef LOCALHANDLE = HANDLE
108
109TypeDef FARPROC = *Function() As LONG_PTR
110TypeDef NEARPROC = *Function() As LONG_PTR
111TypeDef PROC = *Function() As LONG_PTR
112
113TypeDef HGDIOBJ = VoidPtr
114
115Type _System_DeclareHandle_HKEY:unused As DWord:End Type
116TypeDef HKEY = *_System_DeclareHandle_HKEY
117TypeDef PHKEY = *HKEY
118
119#ifndef WIN_INTERNAL
120Type _System_DeclareHandle_HACCEL:unused As DWord:End Type
121TypeDef HACCEL = *_System_DeclareHandle_HACCEL
122#endif
123#ifndef GDI_INTERNAL
124Type _System_DeclareHandle_HBITMAP:unused As DWord:End Type
125TypeDef HBITMAP = *_System_DeclareHandle_HBITMAP
126Type _System_DeclareHandle_HBRUSH:unused As DWord:End Type
127TypeDef HBRUSH = *_System_DeclareHandle_HBRUSH
128#endif
129Type _System_DeclareHandle_HCOLORSPACE:unused As DWord:End Type
130TypeDef HCOLORSPACE = *_System_DeclareHandle_HCOLORSPACE
131#ifndef GDI_INTERNAL
132Type _System_DeclareHandle_HDC:unused As DWord:End Type
133TypeDef HDC = *_System_DeclareHandle_HDC
134#endif
135Type _System_DeclareHandle_HGLRC:unused As DWord:End Type
136TypeDef HGLRC = *_System_DeclareHandle_HGLRC
137Type _System_DeclareHandle_HDESK:unused As DWord:End Type
138TypeDef HDESK = *_System_DeclareHandle_HDESK
139Type _System_DeclareHandle_HENHMETAFILE:unused As DWord:End Type
140TypeDef HENHMETAFILE = *_System_DeclareHandle_HENHMETAFILE
141#ifndef GDI_INTERNAL
142Type _System_DeclareHandle_HFONT:unused As DWord:End Type
143TypeDef HFONT = *_System_DeclareHandle_HFONT
144#endif
145Type _System_DeclareHandle_HICON:unused As DWord:End Type
146TypeDef HICON = *_System_DeclareHandle_HICON
147#ifndef WIN_INTERNAL
148Type _System_DeclareHandle_HMENU:unused As DWord:End Type
149TypeDef HMENU = *_System_DeclareHandle_HMENU
150#endif
151Type _System_DeclareHandle_HMETAFILE:unused As DWord:End Type
152TypeDef HMETAFILE = *_System_DeclareHandle_HMETAFILE
153Type _System_DeclareHandle_HINSTANCE:unused As DWord:End Type
154TypeDef HINSTANCE = *_System_DeclareHandle_HINSTANCE
155TypeDef HMODULE = HINSTANCE
156#ifndef GDI_INTERNAL
157Type _System_DeclareHandle_HPALETTE:unused As DWord:End Type
158TypeDef HPALETTE = *_System_DeclareHandle_HPALETTE
159Type _System_DeclareHandle_HPEN:unused As DWord:End Type
160TypeDef HPEN = *_System_DeclareHandle_HPEN
161#endif
162Type _System_DeclareHandle_HRGN:unused As DWord:End Type
163TypeDef HRGN = *_System_DeclareHandle_HRGN
164Type _System_DeclareHandle_HRSRC:unused As DWord:End Type
165TypeDef HRSRC = *_System_DeclareHandle_HRSRC
166Type _System_DeclareHandle_HSPRITE:unused As DWord:End Type
167TypeDef HSPRITE = *_System_DeclareHandle_HSPRITE
168Type _System_DeclareHandle_HSTR:unused As DWord:End Type
169TypeDef HSTR = *_System_DeclareHandle_HSTR
170Type _System_DeclareHandle_HTASK:unused As DWord:End Type
171TypeDef HTASK = *_System_DeclareHandle_HTASK
172Type _System_DeclareHandle_HWINSTA:unused As DWord:End Type
173TypeDef HWINSTA = *_System_DeclareHandle_HWINSTA
174Type _System_DeclareHandle_HKL:unused As DWord:End Type
175TypeDef HKL = *_System_DeclareHandle_HKL
176
177Type _System_DeclareHandle_HWINEVENTHOOK:unused As DWord:End Type
178TypeDef HWINEVENTHOOK = *_System_DeclareHandle_HWINEVENTHOOK
179
180'#if(WINVER >= 0x0500)
181Type _System_DeclareHandle_HMONITOR:unused As DWord:End Type
182TypeDef HMONITOR = *_System_DeclareHandle_HMONITOR
183Type _System_DeclareHandle_HUMPD:unused As DWord:End Type
184TypeDef HUMPD = *_System_DeclareHandle_HUMPD
185'#endif
186
187TypeDef HFILE = Long
188TypeDef HCURSOR = HICON
189
190TypeDef COLORREF = DWord
191TypeDef LPCOLORREF = *DWord
192
193Const HFILE_ERROR = ((-1) As HFILE)
194
195Type RECT
196 left As Long
197 top As Long
198 right As Long
199 bottom As Long
200End Type
201
202TypeDef PRECT = *RECT
203TypeDef NPRECT = *RECT
204TypeDef LPRECT = *RECT
205TypeDef LPCRECT = *RECT
206
207TypeDef RECTL = RECT
208TypeDef PRECTL = *RECTL
209TypeDef LPRECTL = *RECTL
210TypeDef LPCRECTL = *RECTL
211
212Type POINTAPI
213 x As Long
214 y As Long
215End Type
216
217TypeDef PPOINT = *POINTAPI
218TypeDef NPPOINT = *POINTAPI
219TypeDef LPPOINT = *POINTAPI
220
221TypeDef POINTL = POINTAPI
222TypeDef PPOINTL = *POINTL
223
224Type SIZE
225 cx As Long
226 cy As Long
227End Type
228
229TypeDef PSIZE = *SIZE
230TypeDef LPSIZE = *SIZE
231
232TypeDef SIZEL = SIZE
233TypeDef PSIZEL = *SIZEL
234TypeDef LPSIZEL = *SIZEL
235
236Type POINTS
237 x As Integer
238 y As Integer
239End Type
240
241TypeDef PPOINTS = *POINTS
242TypeDef LPPOINTS = *POINTS
243
244Type FILETIME
245 dwLowDateTime As DWord
246 dwHighDateTime As DWord
247End Type
248
249TypeDef PFILETIME = *FILETIME
250TypeDef LPFILETIME = *FILETIME
251
252#define _FILETIME_
253
254Const DM_UPDATE = 1
255Const DM_COPY = 2
256Const DM_PROMPT = 4
257Const DM_MODIFY = 8
258
259Const DM_IN_BUFFER = DM_MODIFY
260Const DM_IN_PROMPT = DM_PROMPT
261Const DM_OUT_BUFFER = DM_COPY
262Const DM_OUT_DEFAULT = DM_UPDATE
263
264Const DC_FIELDS = 1
265Const DC_PAPERS = 2
266Const DC_PAPERSIZE = 3
267Const DC_MINEXTENT = 4
268Const DC_MAXEXTENT = 5
269Const DC_BINS = 6
270Const DC_DUPLEX = 7
271Const DC_SIZE = 8
272Const DC_EXTRA = 9
273Const DC_VERSION = 10
274Const DC_DRIVER = 11
275Const DC_BINNAMES = 12
276Const DC_ENUMRESOLUTIONS = 13
277Const DC_FILEDEPENDENCIES = 14
278Const DC_TRUETYPE = 15
279Const DC_PAPERNAMES = 16
280Const DC_ORIENTATION = 17
281Const DC_COPIES = 18
282
283#endif
Note: See TracBrowser for help on using the repository browser.