source: Include/api_gdi.sbp@ 119

Last change on this file since 119 was 119, checked in by イグトランス (egtra), 18 years ago

Unicode (#50) 前準備
Byte→Char (#51) 型名は殆ど完了、ただし中身までは手を付けていないものが多い

File size: 40.0 KB
Line 
1' api_gdi.sbp - Graphics Device Integerface API
2
3
4#ifndef _INC_GDI
5#define _INC_GDI
6
7
8Const CLR_INVALID = &HFFFFFFFF
9Const GDI_ERROR = &HFFFFFFFF
10
11
12Type _System_DeclareHandle_HPALETTE:unused As DWord:End Type
13TypeDef HPALETTE = *_System_DeclareHandle_HPALETTE
14
15
16' Point/Rectangle/Size struct
17Type POINTAPI
18 x As Long
19 y As Long
20End Type
21
22Type RECT
23 left As Long
24 top As Long
25 right As Long
26 bottom As Long
27End Type
28
29Type SIZE
30 cx As Long
31 cy As Long
32End Type
33
34Type Align(2) METAHEADER
35 mtType As Word
36 mtHeaderSize As Word
37 mtVersion As Word
38 mtSize As DWord
39 mtNoObjects As Word
40 mtMaxRecord As DWord
41 mtNoParameters As Word
42End Type
43TypeDef PMETAHEADER = *METAHEADER
44
45Const RGB(r, g, b) = ((r) As Long) Or (((g) As Long) <<8) Or (((b) As Long) <<16)
46Const GetRValue(rgb) = (rgb And &hff)
47Const GetGValue(rgb) = ((rgb >> 8) And &hff)
48Const GetBValue(rgb) = ((rgb >> 16) And &hff)
49
50Type RGBQUAD
51 rgbBlue As Byte
52 rgbGreen As Byte
53 rgbRed As Byte
54 rgbReserved As Byte
55End Type
56
57
58' raster operations
59Const SRCCOPY = &H00CC0020
60Const SRCPAINT = &H00EE0086
61Const SRCAND = &H008800C6
62Const SRCINVERT = &H00660046
63Const SRCERASE = &H00440328
64Const NOTSRCCOPY = &H00330008
65Const NOTSRCERASE = &H001100A6
66Const MERGECOPY = &H00C000CA
67Const MERGEPAINT = &H00BB0226
68Const PATCOPY = &H00F00021
69Const PATPAINT = &H00FB0A09
70Const PATINVERT = &H005A0049
71Const DSTINVERT = &H00550009
72Const BLACKNESS = &H00000042
73Const WHITENESS = &H00FF0062
74
75
76' Object types
77Const OBJ_PEN = 1
78Const OBJ_BRUSH = 2
79Const OBJ_DC = 3
80Const OBJ_METADC = 4
81Const OBJ_PAL = 5
82Const OBJ_FONT = 6
83Const OBJ_BITMAP = 7
84Const OBJ_REGION = 8
85Const OBJ_METAFILE = 9
86Const OBJ_MEMDC = 10
87Const OBJ_EXTPEN = 11
88Const OBJ_ENHMETADC = 12
89Const OBJ_ENHMETAFILE = 13
90
91
92' Bitmap Header Definition
93Type BITMAP
94 bmType As Long
95 bmWidth As Long
96 bmHeight As Long
97 bmWidthBytes As Long
98 bmPlanes As Word
99 bmBitsPixel As Word
100 bmBits As VoidPtr
101End Type
102
103
104' structures for defining DIBs
105Const BI_RGB = 0
106Const BI_RLE8 = 1
107Const BI_RLE4 = 2
108Const BI_BITFIELDS = 3
109Const BI_JPEG = 4
110Const BI_PNG = 5
111Type BITMAPINFOHEADER
112 biSize As DWord
113 biWidth As Long
114 biHeight As Long
115 biPlanes As Word
116 biBitCount As Word
117 biCompression As DWord
118 biSizeImage As DWord
119 biXPelsPerMeter As Long
120 biYPelsPerMeter As Long
121 biClrUsed As DWord
122 biClrImportant As DWord
123End Type
124Type BITMAPINFO
125 bmiHeader As BITMAPINFOHEADER
126 bmpColors[255] As RGBQUAD
127End Type
128
129
130' Bitmap file header struct
131Type Align(2) BITMAPFILEHEADER
132 bfType As Word
133 bfSize As DWord
134 bfReserved1 As Word
135 bfReserved2 As Word
136 bfOffBits As DWord
137End Type
138
139
140' Region flags
141Const NULLREGION = 1
142Const SIMPLEREGION = 2
143Const COMPLEXREGION = 3
144
145
146' Poly fill mode
147Const ALTERNATE = 1
148Const WINDING = 2
149
150
151' Device mode
152Const DM_ORIENTATION = &H00000001
153Const DM_PAPERSIZE = &H00000002
154Const DM_PAPERLENGTH = &H00000004
155Const DM_PAPERWIDTH = &H00000008
156Const DM_SCALE = &H00000010
157Const DM_POSITION = &H00000020
158Const DM_COPIES = &H00000100
159Const DM_DEFAULTSOURCE = &H00000200
160Const DM_PRINTQUALITY = &H00000400
161Const DM_COLOR = &H00000800
162Const DM_DUPLEX = &H00001000
163Const DM_YRESOLUTION = &H00002000
164Const DM_TTOPTION = &H00004000
165Const DM_COLLATE = &H00008000
166Const DM_FORMNAME = &H00010000
167Const DM_LOGPIXELS = &H00020000
168Const DM_BITSPERPEL = &H00040000
169Const DM_PELSWIDTH = &H00080000
170Const DM_PELSHEIGHT = &H00100000
171Const DM_DISPLAYFLAGS = &H00200000
172Const DM_DISPLAYFREQUENCY = &H00400000
173Const DMORIENT_PORTRAIT = 1
174Const DMORIENT_LANDSCAPE = 2
175Const DMPAPER_LETTER = 1
176Const DMPAPER_LETTERSMALL = 2
177Const DMPAPER_TABLOID = 3
178Const DMPAPER_LEDGER = 4
179Const DMPAPER_LEGAL = 5
180Const DMPAPER_STATEMENT = 6
181Const DMPAPER_EXECUTIVE = 7
182Const DMPAPER_A3 = 8
183Const DMPAPER_A4 = 9
184Const DMPAPER_A4SMALL = 10
185Const DMPAPER_A5 = 11
186Const DMPAPER_B4 = 12
187Const DMPAPER_B5 = 13
188Const DMPAPER_FOLIO = 14
189Const DMPAPER_QUARTO = 15
190Const DMPAPER_10X14 = 16
191Const DMPAPER_11X17 = 17
192Const DMPAPER_NOTE = 18
193Const DMPAPER_ENV_9 = 19
194Const DMPAPER_ENV_10 = 20
195Const DMPAPER_ENV_11 = 21
196Const DMPAPER_ENV_12 = 22
197Const DMPAPER_ENV_14 = 23
198Const DMPAPER_CSHEET = 24
199Const DMPAPER_DSHEET = 25
200Const DMPAPER_ESHEET = 26
201Const DMPAPER_ENV_DL = 27
202Const DMPAPER_ENV_C5 = 28
203Const DMPAPER_ENV_C3 = 29
204Const DMPAPER_ENV_C4 = 30
205Const DMPAPER_ENV_C6 = 31
206Const DMPAPER_ENV_C65 = 32
207Const DMPAPER_ENV_B4 = 33
208Const DMPAPER_ENV_B5 = 34
209Const DMPAPER_ENV_B6 = 35
210Const DMPAPER_ENV_ITALY = 36
211Const DMPAPER_ENV_MONARCH = 37
212Const DMPAPER_ENV_PERSONAL = 38
213Const DMPAPER_FANFOLD_US = 39
214Const DMPAPER_FANFOLD_STD_GERMAN = 40
215Const DMPAPER_FANFOLD_LGL_GERMAN = 41
216Const DMRES_DRAFT = -1
217Const DMRES_LOW = -2
218Const DMRES_MEDIUM = -3
219Const DMRES_HIGH = -4
220Const DMCOLOR_MONOCHROME = 1
221Const DMCOLOR_COLOR = 2
222Const DMDUP_SIMPLEX = 1
223Const DMDUP_VERTICAL = 2
224Const DMDUP_HORIZONTAL = 3
225Const DMTT_BITMAP = 1
226Const DMTT_DOWNLOAD = 2
227Const DMTT_SUBDEV = 3
228Const DMCOLLATE_FALSE = 0
229Const DMCOLLATE_TRUE = 1
230
231Const CCHDEVICENAME = 32
232Const CCHFORMNAME = 32
233Type _devicemodeA
234 dmDeviceName[ELM(CCHDEVICENAME)] As Byte
235 dmSpecVersion As Word
236 dmDriverVersion As Word
237 dmSize As Word
238 dmDriverExtra As Word
239 dmFields As DWord
240 dmOrientation As Integer
241 dmPaperSize As Integer
242 dmPaperLength As Integer
243 dmPaperWidth As Integer
244 dmScale As Integer
245 dmCopies As Integer
246 dmDefaultSource As Integer
247 dmPrintQuality As Integer
248 dmColor As Integer
249 dmDuplex As Integer
250 dmYResolution As Integer
251 dmTTOption As Integer
252 dmCollate As Integer
253 dmFormName[ELM(CCHFORMNAME)] As Byte
254 dmLogPixels As Word
255 dmBitsPerPel As DWord
256 dmPelsWidth As DWord
257 dmPelsHeight As DWord
258 dmDisplayFlags As DWord
259 dmDisplayFrequency As DWord
260 dmICMMethod As DWord
261 dmICMIntent As DWord
262 dmMediaType As DWord
263 dmDitherType As DWord
264 dmReserved1 As DWord
265 dmReserved2 As DWord
266 dmPanningWidth As DWord
267 dmPanningHeight As DWord
268End Type
269TypeDef DEVMODEA = _devicemodeA
270TypeDef DEVMODE = DEVMODEA
271
272
273' Binary raster ops
274Const R2_BLACK = 1
275Const R2_NOTMERGEPEN = 2
276Const R2_MASKNOTPEN = 3
277Const R2_NOTCOPYPEN = 4
278Const R2_MASKPENNOT = 5
279Const R2_NOT = 6
280Const R2_XORPEN = 7
281Const R2_NOTMASKPEN = 8
282Const R2_MASKPEN = 9
283Const R2_NOTXORPEN = 10
284Const R2_NOP = 11
285Const R2_MERGENOTPEN = 12
286Const R2_COPYPEN = 13
287Const R2_MERGEPENNOT = 14
288Const R2_MERGEPEN = 15
289Const R2_WHITE = 16
290
291
292Type RGNDATAHEADER
293 dwSize As DWord
294 iType As DWord
295 nCount As DWord
296 nRgnSize As DWord
297 rcBound As RECT
298End Type
299Type RGNDATA
300 rdh As RGNDATAHEADER
301 Buffer As Byte
302End Type
303
304Type PALETTEENTRY
305 peRed As Byte
306 peGreen As Byte
307 peBlue As Byte
308 peFlags As Byte
309End Type
310
311Type DOCINFO
312 cbSize As Long
313 lpszDocName As LPCSTR
314 lpszOutput As LPCSTR
315 lpszDatatype As LPCSTR
316 fwType As DWord
317End Type
318
319'-------------------
320' GDI API Functions
321'-------------------
322
323Declare Function AbortPath Lib "gdi32" (hdc As HDC) As BOOL
324Declare Function Arc Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nXStartArc As Long, nYStartArc As Long, nXEndArc As Long, nYEndArc As Long) As BOOL
325Declare Function BeginPath Lib "gdi32" (hdc As HDC) As BOOL
326Declare Function BitBlt Lib "gdi32" (hdcDest As HDC, nXDest As Long, nYDest As Long, nWidth As Long, nHeight As Long, hdcSrc As HDC, nXSrc As Long, nYSrc As Long, dwRop As DWord) As BOOL
327Declare Function CancelDC Lib "gdi32" (hdc As HDC) As BOOL
328Declare Function Chord Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nXRadial1 As Long, nYRadial1 As Long, nXRadial2 As Long, nYRadial2 As Long) As BOOL
329Declare Function CloseFigure Lib "gdi32" (hdc As HDC) As BOOL
330
331Const RGN_AND = 1
332Const RGN_OR = 2
333Const RGN_XOR = 3
334Const RGN_DIFF = 4
335Const RGN_COPY = 5
336Declare Function CombineRgn Lib "gdi32" (hrgnDest As HRGN, hrgnSrc1 As HRGN, hrgnSrc2 As HRGN, fnCombineMode As Long) As Long
337
338Declare Function CreateBitmap Lib "gdi32" (nWidth As Long, nHeight As Long, cPlanes As Long, cBitsPerPel As Long, lpvBits As VoidPtr) As HBITMAP
339Declare Function CreateBitmapIndirect Lib "gdi32" (ByRef lpbm As BITMAP) As HBITMAP
340
341Const BS_SOLID = 0
342Const BS_NULL = 1
343Const BS_HOLLOW = BS_NULL
344Const BS_HATCHED = 2
345Const BS_PATTERN = 3
346Const BS_INDEXED = 4
347Const BS_DIBPATTERN = 5
348Const BS_DIBPATTERNPT = 6
349Const BS_PATTERN8X8 = 7
350Const BS_DIBPATTERN8X8 = 8
351Const BS_MONOPATTERN = 9
352Const DIB_RGB_COLORS = 0
353Const DIB_PAL_COLORS = 1
354Const HS_HORIZONTAL = 0
355Const HS_VERTICAL = 1
356Const HS_FDIAGONAL = 2
357Const HS_BDIAGONAL = 3
358Const HS_CROSS = 4
359Const HS_DIAGCROSS = 5
360Type LOGBRUSH
361 lbStyle As Long
362 lbColor As Long
363 lbHatch As Long
364End Type
365Declare Function CreateBrushIndirect Lib "gdi32" (ByRef lplb As LOGBRUSH) As HBRUSH
366
367Declare Function CreateCompatibleBitmap Lib "gdi32" (hdc As HDC, nWidth As Long, nHeight As Long) As HBITMAP
368Declare Function CreateCompatibleDC Lib "gdi32" (hdc As HDC) As HDC
369Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (lpszDriver As PCSTR, lpszDevice As PCSTR, lpszOutput As PCSTR, ByRef lpInitData As DEVMODE) As HDC
370
371Const CBM_INIT = &H04
372Declare Function CreateDIBitmap Lib "gdi32" (hdc As HDC, ByRef lpbmih As BITMAPINFOHEADER, fdwInit As Long, lpbInit As VoidPtr, ByRef lpbmi As BITMAPINFO, fuUsage As Long) As HBITMAP
373
374Declare Function CreateDIBPatternBrushPt Lib "gdi32" (lpPackedDIB As VoidPtr, iUsage As Long) As HBRUSH
375Declare Function CreateDIBSection Lib "gdi32" (hdc As HDC, ByRef BmpInfo As BITMAPINFO, iUsage As DWord, ppvBits As *VoidPtr, hSection As HANDLE, dwOffset As DWord) As HBITMAP
376Declare Function CreateEllipticRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As HRGN
377Declare Function CreateEllipticRgnIndirect Lib "gdi32" (ByRef lpRect As RECT) As HRGN
378
379Const FW_DONTCARE = 0
380Const FW_THIN = 100
381Const FW_EXTRALIGHT = 200
382Const FW_LIGHT = 300
383Const FW_NORMAL = 400
384Const FW_MEDIUM = 500
385Const FW_SEMIBOLD = 600
386Const FW_BOLD = 700
387Const FW_EXTRABOLD = 800
388Const FW_HEAVY = 900
389Const FW_ULTRALIGHT = FW_EXTRALIGHT
390Const FW_REGULAR = FW_NORMAL
391Const FW_DEMIBOLD = FW_SEMIBOLD
392Const FW_ULTRABOLD = FW_EXTRABOLD
393Const FW_BLACK = FW_HEAVY
394
395Const ANSI_CHARSET = 0
396Const DEFAULT_CHARSET = 1
397Const SYMBOL_CHARSET = 2
398Const SHIFTJIS_CHARSET = 128
399Const HANGEUL_CHARSET = 129
400Const HANGUL_CHARSET = 129
401Const GB2312_CHARSET = 134
402Const CHINESEBIG5_CHARSET = 136
403Const OEM_CHARSET = 255
404Const JOHAB_CHARSET = 130
405Const HEBREW_CHARSET = 177
406Const ARABIC_CHARSET = 178
407Const GREEK_CHARSET = 161
408Const TURKISH_CHARSET = 162
409Const VIETNAMESE_CHARSET = 163
410Const THAI_CHARSET = 222
411Const EASTEUROPE_CHARSET = 238
412Const RUSSIAN_CHARSET = 204
413Const MAC_CHARSET = 77
414Const BALTIC_CHARSET = 186
415
416Const OUT_DEFAULT_PRECIS = 0
417Const OUT_STRING_PRECIS = 1
418Const OUT_CHARACTER_PRECIS = 2
419Const OUT_STROKE_PRECIS = 3
420Const OUT_TT_PRECIS = 4
421Const OUT_DEVICE_PRECIS = 5
422Const OUT_RASTER_PRECIS = 6
423Const OUT_TT_ONLY_PRECIS = 7
424Const OUT_OUTLINE_PRECIS = 8
425Const OUT_SCREEN_OUTLINE_PRECIS = 9
426
427Const CLIP_DEFAULT_PRECIS = 0
428Const CLIP_CHARACTER_PRECIS = 1
429Const CLIP_STROKE_PRECIS = 2
430Const CLIP_MASK = &Hf
431Const CLIP_LH_ANGLES = &H00010000
432Const CLIP_TT_ALWAYS = &H00020000
433Const CLIP_EMBEDDED = &H00080000
434
435Const DEFAULT_QUALITY = 0
436Const DRAFT_QUALITY = 1
437Const PROOF_QUALITY = 2
438Const NONANTIALIASED_QUALITY =3
439Const ANTIALIASED_QUALITY = 4
440
441Const DEFAULT_PITCH = 0
442Const FIXED_PITCH = 1
443Const VARIABLE_PITCH = 2
444
445Const FF_DONTCARE = 0
446Const FF_ROMAN = &H00010000
447Const FF_SWISS = &H00020000
448Const FF_MODERN = &H00030000
449Const FF_SCRIPT = &H00040000
450Const FF_DECORATIVE = &H00050000
451Declare Function CreateFont Lib "gdi32" Alias "CreateFontA" (nHeight As Long, nWidth As Long, nEscapement As Long, nOrientation As Long, fnWeight As Long, fdwItalic As DWord, fdwUnderline As DWord, fdwStrikeOut As DWord, fdwCharSet As DWord, fdwOutputPrecision As DWord, fdwClipPrecision As DWord, fdwQuality As DWord, fdwPitchAndFamily As DWord, lpszFace As PCSTR) As HFONT
452
453Const LF_FACESIZE = 32
454Type LOGFONTA
455 lfHeight As Long
456 lfWidth As Long
457 lfEscapement As Long
458 lfOrientation As Long
459 lfWeight As Long
460 lfItalic As Byte
461 lfUnderline As Byte
462 lfStrikeOut As Byte
463 lfCharSet As Byte
464 lfOutPrecision As Byte
465 lfClipPrecision As Byte
466 lfQuality As Byte
467 lfPitchAndFamily As Byte
468 lfFaceName[ELM(LF_FACESIZE)] As Byte
469End Type
470Type LOGFONTW
471 lfHeight As Long
472 lfWidth As Long
473 lfEscapement As Long
474 lfOrientation As Long
475 lfWeight As Long
476 lfItalic As Byte
477 lfUnderline As Byte
478 lfStrikeOut As Byte
479 lfCharSet As Byte
480 lfOutPrecision As Byte
481 lfClipPrecision As Byte
482 lfQuality As Byte
483 lfPitchAndFamily As Byte
484 lfFaceName[ELM(LF_FACESIZE)] As WCHAR
485End Type
486#ifdef UNICODE
487TypeDef LOGFONT = LOGFONTW
488#else
489TypeDef LOGFONT = LOGFONTA
490#endif
491Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (ByRef lplf As LOGFONT) As HFONT
492
493Declare Function CreateHatchBrush Lib "gdi32" (fnStyle As Long, clrref As COLORREF) As HBRUSH
494Declare Function CreatePatternBrush Lib "gdi32" (hbmp As HBITMAP) As HBRUSH
495
496Const PS_SOLID = 0
497Const PS_DASH = 1
498Const PS_DOT = 2
499Const PS_DASHDOT = 3
500Const PS_DASHDOTDOT = 4
501Const PS_NULL = 5
502Const PS_INSIDEFRAME = 6
503Const PS_USERSTYLE = 7
504Const PS_ALTERNATE = 8
505Declare Function CreatePen Lib "gdi32" (nPenStyle As Long, nWidth As Long, crColor As COLORREF) As HPEN
506
507Type LOGPEN
508 lopnStyle As DWord
509 lopnWidth As POINTAPI
510 lopnColor As COLORREF
511End Type
512Declare Function CreatePenIndirect Lib "gdi32" (ByRef lplgpn As LOGPEN) As HPEN
513
514Declare Function CreatePolygonRgn Lib "gdi32" (ByRef lpPoints As POINTAPI, cPoints As Long, fnPolyFillMode As Long) As HRGN
515Declare Function CreateRectRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As HRGN
516Declare Function CreateRectRgnIndirect Lib "gdi32" (ByRef lpRect As RECT) As HRGN
517Declare Function CreateRoundRectRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nWidthEllipse As Long, nHeightEllipse As Long) As HRGN
518Declare Function CreateSolidBrush Lib "gdi32" (crColor As COLORREF) As HBRUSH
519Declare Function DeleteDC Lib "gdi32" (hdc As HDC) As BOOL
520Declare Function DeleteObject Lib "gdi32" (hObject As HANDLE) As BOOL
521Declare Function DPtoLP Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, nCount As Long) As BOOL
522Declare Function Ellipse Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, RightRect As Long, nBottomRect As Long) As BOOL
523Declare Function EndDoc Lib "gdi32" (hdc As HDC) As Long
524Declare Function EndPage Lib "gdi32" (hdc As HDC) As Long
525Declare Function EndPath Lib "gdi32" (hdc As HDC) As BOOL
526Declare Function EqualRgn Lib "gdi32" (hSrcRgn1 As HRGN, hSrcRgn2 As HRGN) As BOOL
527Declare Function ExcludeClipRect Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
528
529Const FLOODFILLBORDER = 0
530Const FLOODFILLSURFACE = 1
531Declare Function ExtFloodFill Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, crColor As COLORREF, fuFillType As DWord) As BOOL
532
533Const PS_COSMETIC = &H00000000
534Const PS_GEOMETRIC = &H00010000
535Const PS_ENDCAP_ROUND = &H00000000
536Const PS_ENDCAP_SQUARE = &H00000100
537Const PS_ENDCAP_FLAT = &H00000200
538Const PS_JOIN_ROUND = &H00000000
539Const PS_JOIN_BEVEL = &H00001000
540Const PS_JOIN_MITER = &H00002000
541Declare Function ExtCreatePen Lib "gdi32" (dwPenStyle As DWord, dwWidth As DWord, ByRef lplb As LOGBRUSH, dwStyleCount As DWord, lpStyle As *DWord) As HPEN
542
543Declare Function ExtSelectClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN, fnMode As Long) As Long
544Declare Function FillPath Lib "gdi32" (hdc As HDC) As Long
545Declare Function FillRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN, hBrush As HBRUSH) As Long
546Declare Function FrameRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN, hBrush As HBRUSH, nWidth As Long, nHeight As Long) As Long
547Declare Function GetBitmapBits Lib "gdi32" (hbmp As HBITMAP, cbBuffer As Long, lpvBits As VoidPtr) As Long
548Declare Function GetBkColor Lib "gdi32" (hdc As HDC) As DWord
549Declare Function GetBkMode Lib "gdi32" (hdc As HDC) As Long
550Declare Function GetBrushOrgEx Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI) As Long
551Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A" (hdc As HDC, iFirstChar As Long, iLastChar As Long, lpBuffer As DWordPtr) As Long
552Declare Function GetClipBox Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
553Declare Function GetClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
554Declare Function GetCurrentObject Lib "gdi32" (hdc As HDC, dwObjectType As DWord) As HANDLE
555Declare Function GetCurrentPositionEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long
556
557Const DRIVERVERSION = 0
558Const TECHNOLOGY = 2
559Const HORZSIZE = 4
560Const VERTSIZE = 6
561Const HORZRES = 8
562Const VERTRES = 10
563Const BITSPIXEL = 12
564Const PLANES = 14
565Const NUMBRUSHES = 16
566Const NUMPENS = 18
567Const NUMMARKERS = 20
568Const NUMFONTS = 22
569Const NUMCOLORS = 24
570Const PDEVICESIZE = 26
571Const CURVECAPS = 28
572Const LINECAPS = 30
573Const POLYGONALCAPS = 32
574Const TEXTCAPS = 34
575Const CLIPCAPS = 36
576Const RASTERCAPS = 38
577Const ASPECTX = 40
578Const ASPECTY = 42
579Const ASPECTXY = 44
580Const SHADEBLENDCAPS = 45
581Const LOGPIXELSX = 88
582Const LOGPIXELSY = 90
583Const SIZEPALETTE = 104
584Const NUMRESERVED = 106
585Const COLORRES = 108
586Const PHYSICALWIDTH = 110
587Const PHYSICALHEIGHT = 111
588Const PHYSICALOFFSETX = 112
589Const PHYSICALOFFSETY = 113
590Const SCALINGFACTORX = 114
591Const SCALINGFACTORY = 115
592Const VREFRESH = 116
593Const DESKTOPVERTRES = 117
594Const DESKTOPHORZRES = 118
595Const BLTALIGNMENT = 119
596Const DT_PLOTTER = 0 ' Device Technologies
597Const DT_RASDISPLAY = 1
598Const DT_RASPRINTER = 2
599Const DT_RASCAMERA = 3
600Const DT_CHARSTREAM = 4
601Const DT_METAFILE = 5
602Const DT_DISPFILE = 6
603Const CC_NONE = 0 ' Curve Capabilities
604Const CC_CIRCLES = 1
605Const CC_PIE = 2
606Const CC_CHORD = 4
607Const CC_ELLIPSES = 8
608Const CC_WIDE = 16
609Const CC_STYLED = 32
610Const CC_WIDESTYLED = 64
611Const CC_INTERIORS = 128
612Const CC_ROUNDRECT = 256
613Const LC_NONE = 0 ' Line Capabilities
614Const LC_POLYLINE = 2
615Const LC_MARKER = 4
616Const LC_POLYMARKER = 8
617Const LC_WIDE = 16
618Const LC_STYLED = 32
619Const LC_WIDESTYLED = 64
620Const LC_INTERIORS = 128
621Const PC_NONE = 0 ' Polygonal Capabilities
622Const PC_POLYGON = 1
623Const PC_RECTANGLE = 2
624Const PC_WINDPOLYGON = 4
625Const PC_TRAPEZOID = 4
626Const PC_SCANLINE = 8
627Const PC_WIDE = 16
628Const PC_STYLED = 32
629Const PC_WIDESTYLED = 64
630Const PC_INTERIORS = 128
631Const PC_POLYPOLYGON = 256
632Const PC_PATHS = 512
633Const CP_NONE = 0 ' Clipping Capabilities
634Const CP_RECTANGLE = 1
635Const CP_REGION = 2
636Const TC_OP_CHARACTER = &H00000001 ' Text Capabilities
637Const TC_OP_STROKE = &H00000002
638Const TC_CP_STROKE = &H00000004
639Const TC_CR_90 = &H00000008
640Const TC_CR_ANY = &H00000010
641Const TC_SF_X_YINDEP = &H00000020
642Const TC_SA_DOUBLE = &H00000040
643Const TC_SA_INTEGER = &H00000080
644Const TC_SA_CONTIN = &H00000100
645Const TC_EA_DOUBLE = &H00000200
646Const TC_IA_ABLE = &H00000400
647Const TC_UA_ABLE = &H00000800
648Const TC_SO_ABLE = &H00001000
649Const TC_RA_ABLE = &H00002000
650Const TC_VA_ABLE = &H00004000
651Const TC_RESERVED = &H00008000
652Const TC_SCROLLBLT = &H00010000
653Const RC_BITBLT = 1 ' Raster Capabilities
654Const RC_BANDING = 2
655Const RC_SCALING = 4
656Const RC_BITMAP64 = 8
657Const RC_GDI20_OUTPUT = &H0010
658Const RC_GDI20_STATE = &H0020
659Const RC_SAVEBITMAP = &H0040
660Const RC_DI_BITMAP = &H0080
661Const RC_PALETTE = &H0100
662Const RC_DIBTODEV = &H0200
663Const RC_BIGFONT = &H0400
664Const RC_STRETCHBLT = &H0800
665Const RC_FLOODFILL = &H1000
666Const RC_STRETCHDIB = &H2000
667Const RC_OP_DX_OUTPUT = &H4000
668Const RC_DEVBITS = &H8000
669Const SB_NONE = &H00000000 ' Shading and blending caps
670Const SB_CONST_ALPHA = &H00000001
671Const SB_PIXEL_ALPHA = &H00000002
672Const SB_PREMULT_ALPHA = &H00000004
673Const SB_GRAD_RECT = &H00000010
674Declare Function GetDeviceCaps Lib "gdi32" (hdc As HDC, nIndex As Long) As Long
675
676Declare Function GetDIBits Lib "gdi32" (hdc As HDC, hbmp As HBITMAP, uStartScan As DWord, cScanLines As DWord, lpvBits As VoidPtr, ByRef lpbi As BITMAPINFO, uUsage As DWord) As Long
677
678Const MM_TEXT = 1
679Const MM_LOMETRIC = 2
680Const MM_HIMETRIC = 3
681Const MM_LOENGLISH = 4
682Const MM_HIENGLISH = 5
683Const MM_TWIPS = 6
684Const MM_ISOTROPIC = 7
685Const MM_ANISOTROPIC = 8
686Declare Function GetMapMode Lib "gdi32" (hdc As HDC) As Long
687
688Declare Function GetMiterLimit Lib "gdi32" (hdc As HDC, peLimit As SinglePtr) As Long
689Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (hgdiobj As HANDLE, cbBuffer As Long, ByRef lpvObject As Any) As Long
690Declare Function GetObjectType Lib "gdi32" (hObject As HANDLE) As Long
691
692Const PT_CLOSEFIGURE = &H01
693Const PT_LINETO = &H02
694Const PT_BEZIERTO = &H04
695Const PT_MOVETO = &H06
696Declare Function GetPath Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, lpTypes As BytePtr, nSize As Long) As Long
697
698Declare Function GetPixel Lib "gdi32" (hdc As HDC, x As Long, y As Long) As DWord
699Declare Function GetPolyFillMode Lib "gdi32" (hdc As HDC) As Long
700Declare Function GetRgnBox Lib "gdi32" (hRgn As HRGN, ByRef lpRect As RECT) As Long
701Declare Function GetROP2 Lib "gdi32" (hdc As HDC) As Long
702
703Const WHITE_BRUSH = 0
704Const LTGRAY_BRUSH = 1
705Const GRAY_BRUSH = 2
706Const DKGRAY_BRUSH = 3
707Const BLACK_BRUSH = 4
708Const NULL_BRUSH = 5
709Const HOLLOW_BRUSH = NULL_BRUSH
710Const WHITE_PEN = 6
711Const BLACK_PEN = 7
712Const NULL_PEN = 8
713Const OEM_FIXED_FONT = 10
714Const ANSI_FIXED_FONT = 11
715Const ANSI_VAR_FONT = 12
716Const SYSTEM_FONT = 13
717Const DEVICE_DEFAULT_FONT = 14
718Const DEFAULT_PALETTE = 15
719Const SYSTEM_FIXED_FONT = 16
720Declare Function GetStockObject Lib "gdi32" (fnObject As Long) As HANDLE
721
722Declare Function GetStretchBltMode Lib "gdi32" (hdc As HDC) As Long
723
724Const TA_NOUPDATECP = 0
725Const TA_UPDATECP = 1
726Const TA_LEFT = 0
727Const TA_RIGHT = 2
728Const TA_CENTER = 6
729Const TA_TOP = 0
730Const TA_BOTTOM = 8
731Const TA_BASELINE = 24
732Const TA_RTLREADING = 256
733Declare Function GetTextAlign Lib "gdi32" (hdc As HDC) As DWord
734
735Declare Function GetTextColor Lib "gdi32" (hdc As HDC) As DWord
736Declare Function GetTextExtentPoint32A Lib "gdi32" (hdc As HDC, pString As PCSTR, cbString As Long, ByRef Size As SIZE) As Long
737Declare Function GetTextExtentPoint32W Lib "gdi32" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long
738#ifdef UNICODE
739Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32W" (hdc As HDC, pString As PCTSTR, cbString As Long, ByRef Size As SIZE) As Long
740#else
741Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, pString As PCTSTR, cbString As Long, ByRef Size As SIZE) As Long
742#endif
743
744Const TMPF_FIXED_PITCH = &H01
745Const TMPF_VECTOR = &H02
746Const TMPF_DEVICE = &H08
747Const TMPF_TRUETYPE = &H04
748Type TEXTMETRIC
749 tmHeight As Long
750 tmAscent As Long
751 tmDescent As Long
752 tmInternalLeading As Long
753 tmExternalLeading As Long
754 tmAveCharWidth As Long
755 tmMaxCharWidth As Long
756 tmWeight As Long
757 tmOverhang As Long
758 tmDigitizedAspectX As Long
759 tmDigitizedAspectY As Long
760 tmFirstChar As Byte
761 tmLastChar As Byte
762 tmDefaultChar As Byte
763 tmBreakChar As Byte
764 tmItalic As Byte
765 tmUnderlined As Byte
766 tmStruckOut As Byte
767 tmPitchAndFamily As Byte
768 tmCharSet As Byte
769End Type
770Declare Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (hdc As HDC, ByRef lptm As TEXTMETRIC) As Long
771
772Declare Function GetViewportExtEx Lib "gdi32" (hdc As HDC, ByRef lpSize As SIZE) As Long
773Declare Function GetViewportOrgEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long
774Declare Function GetWindowExtEx Lib "gdi32" (hdc As HDC, ByRef lpSize As SIZE) As Long
775Declare Function GetWindowOrgEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long
776Declare Function IntersectClipRect Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
777Declare Function InvertRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
778Declare Function LineTo Lib "gdi32" (hdc As HDC, nXEnd As Long, nYEnd As Long) As Long
779Declare Function LPtoDP Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, nCount As Long) As Long
780Declare Function MoveToEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
781Declare Function OffsetRgn Lib "gdi32" (hRgn As HRGN, nXOffset As Long, nYOffset As Long) As Long
782Declare Function OffsetClipRgn Lib "gdi32" (hdc As HDC, nXOffset As Long, nYOffset As Long) As Long
783Declare Function OffsetViewportOrgEx Lib "gdi32" (hdc As HDC, nXOffset As Long, nYOffset As Long, ByRef lpPoint As POINTAPI) As Long
784Declare Function OffsetWindowOrgEx Lib "gdi32" (hdc As HDC, nXOffset As Long, nYOffset As Long, ByRef lpPoint As POINTAPI) As Long
785Declare Function PaintRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
786Declare Function PatBlt Lib "gdi32" (hdc As HDC, nXLeft As Long, nYLeft As Long, nWidth As Long, nHeight As Long, dwRop As DWord) As Long
787Declare Function PathToRegion Lib "gdi32" (hdc As HDC) As HRGN
788Declare Function Pie Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nXRadial1 As Long, nYRadial1 As Long, nXRadial2 As Long, nYRadial2 As Long) As Long
789Declare Function PlgBlt Lib "gdi32" (hdcDest As HDC, ByRef lpPoint As POINTAPI, hdcSrc As HDC, nXSrc As Long, nYSrc As Long, nWidth As Long, nHeight As Long, hbmMask As HBITMAP, xMask As Long, yMask As Long) As Long
790Declare Function PolyBezier Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
791Declare Function PolyBezierTo Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
792Declare Function Polygon Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, cPoints As Long) As Long
793Declare Function Polyline Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
794Declare Function PolylineTo Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
795Declare Function PtInRegion Lib "gdi32" (hRgn As HRGN, x As Long, y As Long) As Long
796Declare Function PtVisible Lib "gdi32" (hdc As HDC, x As Long, y As Long) As Long
797Declare Function RealizePalette Lib "gdi32" (hdc As HDC) As Long
798Declare Function Rectangle Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
799Declare Function RectInRegion Lib "gdi32" (hRgn As HRGN, ByRef lpRect As RECT) As Long
800Declare Function RectVisible Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
801Declare Function ResetDC Lib "gdi32" Alias "ResetDCA" (hdc As HDC, ByRef lpInitData As DEVMODE) As HDC
802Declare Function RestoreDC Lib "gdi32" (hdc As HDC, nSavedDC As Long) As Long
803Declare Function RoundRect Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nWidth As Long, nHeight As Long) As Long
804Declare Function SaveDC Lib "gdi32" (hdc As HDC) As Long
805Declare Function ScaleViewportExtEx Lib "gdi32" (hdc As HDC, Xnum As Long, Xdenom As Long, Ynum As Long, Ydenom As Long, ByRef lpSize As SIZE) As Long
806Declare Function ScaleWindowExtEx Lib "gdi32" (hdc As HDC, Xnum As Long, Xdenom As Long, Ynum As Long, Ydenom As Long, ByRef lpSize As SIZE) As Long
807Declare Function SelectClipPath Lib "gdi32" (hdc As HDC, iMode As Long) As Long
808Declare Function SelectClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
809Declare Function SelectObject Lib "gdi32" (hdc As HDC, hObject As HANDLE) As HANDLE
810Declare Function SelectPalette Lib "gdi32" (hdc As HDC, hpal As HPALETTE, bForceBackground As BOOL) As HPALETTE
811Declare Function SetBkColor Lib "gdi32" (hdc As HDC, crColor As DWord) As DWord
812
813Const TRANSPARENT = 1
814Const OPAQUE = 2
815Declare Function SetBkMode Lib "gdi32" (hdc As HDC, iBkMode As Long) As Long
816
817Declare Function SetBrushOrgEx Lib "gdi32" (hdc As HDC, nXOrg As Long, nYOrg As Long, ByRef lppt As POINTAPI) As Long
818Declare Function SetDIBits Lib "gdi32" (hdc As HDC, hbmp As HBITMAP, uStartScan As DWord, cScanLines As DWord, lpvBits As VoidPtr, ByRef lpbmi As BITMAPINFO, fuColorUse As DWord) As Long
819Declare Function SetMapMode Lib "gdi32" (hdc As HDC, fnMapMode As Long) As Long
820Declare Function SetMiterLimit Lib "gdi32" (hdc As HDC, eNewLimit As Single, peOldLimit As SinglePtr) As Long
821Declare Function SetPixel Lib "gdi32" (hdc As HDC, x As Long, y As Long, crColor As DWord) As DWord
822Declare Function SetPolyFillMode Lib "gdi32" (hdc As HDC, iPolyFillMode As Long) As Long
823Declare Function SetRectRgn Lib "gdi32" (hRgn As HRGN, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
824Declare Function SetROP2 Lib "gdi32" (hdc As HDC, fnDrawMode As Long) As Long
825
826Const BLACKONWHITE = 1
827Const WHITEONBLACK = 2
828Const COLORONCOLOR = 3
829Const HALFTONE = 4
830Const STRETCH_ANDSCANS = BLACKONWHITE
831Const STRETCH_ORSCANS = WHITEONBLACK
832Const STRETCH_DELETESCANS = COLORONCOLOR
833Const STRETCH_HALFTONE = HALFTONE
834Declare Function SetStretchBltMode Lib "gdi32" (hdc As HDC, iStretchMode As Long) As Long
835
836Declare Function SetTextAlign Lib "gdi32" (hdc As HDC, fMode As DWord) As DWord
837Declare Function SetTextColor Lib "gdi32" (hdc As HDC, crColor As DWord) As DWord
838Declare Function SetViewportExtEx Lib "gdi32" (hdc As HDC, nXExtent As Long, nYExtent As Long, ByRef lpSize As SIZE) As Long
839Declare Function SetViewportOrgEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
840Declare Function SetWindowExtEx Lib "gdi32" (hdc As HDC, nXExtent As Long, nYExtent As Long, ByRef lpSize As SIZE) As Long
841Declare Function SetWindowOrgEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
842Declare Function StartDoc Lib "gdi32" Alias "StartDocA" (hdc As HDC, ByRef ref_di As DOCINFO) As Long
843Declare Function StartPage Lib "gdi32" (hdc As HDC) As Long
844Declare Function StretchBlt Lib "gdi32" (hdcDest As HDC, nXOriginDest As Long, nYOriginDest As Long, nWidthDest As Long, nHeightDest As Long, hdcSrc As HDC, nXOriginSrc As Long, nYOriginSrc As Long, nWidthSrc As Long, nHeightSrc As Long, dwRop As DWord) As Long
845Declare Function StretchDIBits Lib "gdi32" (hdc As HDC, XDest As Long, YDest As Long, nDestWidth As Long, nDestHeight As Long, XSrc As Long, YSrc As Long, nSrcWidth As Long, nSrcHeight As Long, lpBits As VoidPtr, ByRef lpBitsInfo As BITMAPINFO, iUsage As Long, dwRop As DWord) As Long
846Declare Function StrokeAndFillPath Lib "gdi32" (hdc As HDC) As Long
847Declare Function StrokePath Lib "gdi32" (DC As DWord) As Long
848Declare Function TextOutA Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCSTR, cbString As Long) As Long
849Declare Function TextOutW Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long
850#ifdef UNICODE
851Declare Function TextOut Lib "gdi32" Alias "TextOutW" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCTSTR, cbString As Long) As Long
852#else
853Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCTSTR, cbString As Long) As Long
854#endif
855
856/* Pixel Format */
857Type PIXELFORMATDESCRIPTOR
858 nSize As Word
859 nVersion As Word
860 dwFlags As DWord
861 iPixelType As Byte
862 cColorBits As Byte
863 cRedBits As Byte
864 cRedShift As Byte
865 cGreenBits As Byte
866 cGreenShift As Byte
867 cBlueBits As Byte
868 cBlueShift As Byte
869 cAlphaBits As Byte
870 cAlphaShift As Byte
871 cAccumBits As Byte
872 cAccumRedBits As Byte
873 cAccumGreenBits As Byte
874 cAccumBlueBits As Byte
875 cAccumAlphaBits As Byte
876 cDepthBits As Byte
877 cStencilBits As Byte
878 cAuxBuffers As Byte
879 iLayerType As Byte
880 bReserved As Byte
881 dwLayerMask As DWord
882 dwVisibleMask As DWord
883 dwDamageMask As DWord
884End Type
885TypeDef PPIXELFORMATDESCRIPTOR = *PIXELFORMATDESCRIPTOR
886TypeDef LPPIXELFORMATDESCRIPTOR = *PIXELFORMATDESCRIPTOR
887
888Const PFD_TYPE_RGBA = 0
889Const PFD_TYPE_COLORINDEX = 1
890
891Const PFD_MAIN_PLANE = 0
892Const PFD_OVERLAY_PLANE = 1
893Const PFD_UNDERLAY_PLANE = (-1)
894
895Const PFD_DOUBLEBUFFER = &H00000001
896Const PFD_STEREO = &H00000002
897Const PFD_DRAW_TO_WINDOW = &H00000004
898Const PFD_DRAW_TO_BITMAP = &H00000008
899Const PFD_SUPPORT_GDI = &H00000010
900Const PFD_SUPPORT_OPENGL = &H00000020
901Const PFD_GENERIC_FORMAT = &H00000040
902Const PFD_NEED_PALETTE = &H00000080
903Const PFD_NEED_SYSTEM_PALETTE = &H00000100
904Const PFD_SWAP_EXCHANGE = &H00000200
905Const PFD_SWAP_COPY = &H00000400
906Const PFD_SWAP_LAYER_BUFFERS = &H00000800
907Const PFD_GENERIC_ACCELERATED = &H00001000
908Const PFD_SUPPORT_DIRECTDRAW = &H00002000
909
910Const PFD_DEPTH_DONTCARE = &H20000000
911Const PFD_DOUBLEBUFFER_DONTCARE = &H40000000
912Const PFD_STEREO_DONTCARE = &H80000000
913
914Declare Function ChoosePixelFormat Lib "gdi32" (hdc As HDC, ByRef lppfd As PIXELFORMATDESCRIPTOR) As Long
915Declare Function DescribePixelFormat Lib "gdi32" (hdc As HDC, n As Long, u As DWord, ByRef lppfd As PIXELFORMATDESCRIPTOR) As Long
916Declare Function GetPixelFormat Lib "gdi32" (hdc As HDC) As Long
917Declare Function SetPixelFormat Lib "gdi32" (hdc As HDC, i As Long, ByRef lppfd As PIXELFORMATDESCRIPTOR) As BOOL
918
919
920/* OpenGL Support */
921Type _System_DeclareHandle_HGLRC:unused As DWord:End Type
922TypeDef HGLRC = *_System_DeclareHandle_HGLRC
923
924Declare Function wglCopyContext Lib "opengl32" (hglrcSource As HGLRC, hglrcDest As HGLRC, mask As DWord) As BOOL
925Declare Function wglCreateContext Lib "opengl32" (hdc As HDC) As HGLRC
926Declare Function wglCreateLayerContext Lib "opengl32" (hdc As HDC, iLayerPlane As Long) As HGLRC
927Declare Function wglDeleteContext Lib "opengl32" (hglrc As HGLRC) As BOOL
928Declare Function wglGetCurrentContext Lib "opengl32" () As HGLRC
929Declare Function wglGetCurrentDC Lib "opengl32" () As HDC
930Declare Function wglGetProcAddress Lib "opengl32" (lpstr As LPSTR) As PROC
931Declare Function wglMakeCurrent Lib "opengl32" (hdc As HDC, hglrc As HGLRC) As BOOL
932Declare Function wglShareLists Lib "opengl32" (hglrc1 As HGLRC, hglrc2 As HGLRC) As BOOL
933Declare Function wglUseFontBitmaps Lib "opengl32" Alias "wglUseFontBitmapsA" (hdc As HDC, first As DWord, count As DWord, listbase As DWord) As BOOL
934Declare Function SwapBuffers Lib "gdi32" (hdc As HDC) As BOOL
935
936Type POINTFLOAT
937 x As Single
938 y As Single
939End Type
940TypeDef PPOINTFLOAT = *POINTFLOAT
941
942Type GLYPHMETRICSFLOAT
943 gmfBlackBoxX As Single
944 gmfBlackBoxY As Single
945 gmfptGlyphOrigin As POINTFLOAT
946 gmfCellIncX As Single
947 gmfCellIncY As Single
948End Type
949TypeDef PGLYPHMETRICSFLOAT = *GLYPHMETRICSFLOAT
950TypeDef LPGLYPHMETRICSFLOAT = *GLYPHMETRICSFLOAT
951
952Const WGL_FONT_LINES = 0
953Const WGL_FONT_POLYGONS = 1
954
955Declare Function wglUseFontOutlines Lib "opengl32" Alias "wglUseFontOutlinesA" (hdc As HDC, first As DWord, count As DWord, listbase As DWord, deviation As Single, extrusion As Single, format As Long, ByRef lpgmf As GLYPHMETRICSFLOAT) As BOOL
956
957Type LAYERPLANEDESCRIPTOR
958 nSize As Word
959 nVersion As Word
960 dwFlags As DWord
961 iPixelType As Byte
962 cColorBits As Byte
963 cRedBits As Byte
964 cRedShift As Byte
965 cGreenBits As Byte
966 cGreenShift As Byte
967 cBlueBits As Byte
968 cBlueShift As Byte
969 cAlphaBits As Byte
970 cAlphaShift As Byte
971 cAccumBits As Byte
972 cAccumRedBits As Byte
973 cAccumGreenBits As Byte
974 cAccumBlueBits As Byte
975 cAccumAlphaBits As Byte
976 cDepthBits As Byte
977 cStencilBits As Byte
978 cAuxBuffers As Byte
979 iLayerPlane As Byte
980 bReserved As Byte
981 crTransparent As COLORREF
982End Type
983TypeDef PLAYERPLANEDESCRIPTOR = *LAYERPLANEDESCRIPTOR
984TypeDef LPLAYERPLANEDESCRIPTOR = *LAYERPLANEDESCRIPTOR
985
986Const LPD_DOUBLEBUFFER = &H00000001
987Const LPD_STEREO = &H00000002
988Const LPD_SUPPORT_GDI = &H00000010
989Const LPD_SUPPORT_OPENGL = &H00000020
990Const LPD_SHARE_DEPTH = &H00000040
991Const LPD_SHARE_STENCIL = &H00000080
992Const LPD_SHARE_ACCUM = &H00000100
993Const LPD_SWAP_EXCHANGE = &H00000200
994Const LPD_SWAP_COPY = &H00000400
995Const LPD_TRANSPARENT = &H00001000
996Const LPD_TYPE_RGBA = 0
997Const LPD_TYPE_COLORINDEX = 1
998
999Const WGL_SWAP_MAIN_PLANE = &H00000001
1000Const WGL_SWAP_OVERLAY1 = &H00000002
1001Const WGL_SWAP_OVERLAY2 = &H00000004
1002Const WGL_SWAP_OVERLAY3 = &H00000008
1003Const WGL_SWAP_OVERLAY4 = &H00000010
1004Const WGL_SWAP_OVERLAY5 = &H00000020
1005Const WGL_SWAP_OVERLAY6 = &H00000040
1006Const WGL_SWAP_OVERLAY7 = &H00000080
1007Const WGL_SWAP_OVERLAY8 = &H00000100
1008Const WGL_SWAP_OVERLAY9 = &H00000200
1009Const WGL_SWAP_OVERLAY10 = &H00000400
1010Const WGL_SWAP_OVERLAY11 = &H00000800
1011Const WGL_SWAP_OVERLAY12 = &H00001000
1012Const WGL_SWAP_OVERLAY13 = &H00002000
1013Const WGL_SWAP_OVERLAY14 = &H00004000
1014Const WGL_SWAP_OVERLAY15 = &H00008000
1015Const WGL_SWAP_UNDERLAY1 = &H00010000
1016Const WGL_SWAP_UNDERLAY2 = &H00020000
1017Const WGL_SWAP_UNDERLAY3 = &H00040000
1018Const WGL_SWAP_UNDERLAY4 = &H00080000
1019Const WGL_SWAP_UNDERLAY5 = &H00100000
1020Const WGL_SWAP_UNDERLAY6 = &H00200000
1021Const WGL_SWAP_UNDERLAY7 = &H00400000
1022Const WGL_SWAP_UNDERLAY8 = &H00800000
1023Const WGL_SWAP_UNDERLAY9 = &H01000000
1024Const WGL_SWAP_UNDERLAY10 = &H02000000
1025Const WGL_SWAP_UNDERLAY11 = &H04000000
1026Const WGL_SWAP_UNDERLAY12 = &H08000000
1027Const WGL_SWAP_UNDERLAY13 = &H10000000
1028Const WGL_SWAP_UNDERLAY14 = &H20000000
1029Const WGL_SWAP_UNDERLAY15 = &H40000000
1030
1031Declare Function wglDescribeLayerPlane Lib "opengl32" (hdc As HDC, iPixelFormat As Long, iLayerPlane As Long, nByte As DWord, ByRef lplpd As LAYERPLANEDESCRIPTOR) As BOOL
1032Declare Function wglSetLayerPaletteEntries Lib "opengl32" (hdc As HDC, iLayerPlane As Long, iStart As Long, cEntries As Long, lpcr As *COLORREF) As Long
1033Declare Function wglGetLayerPaletteEntries Lib "opengl32" (hdc As HDC, iLayerPlane As Long, iStart As Long, cEntries As Long, lpcr As *COLORREF) As Long
1034Declare Function wglRealizeLayerPalette Lib "opengl32" (hdc As HDC, iLayerPlane As Long, bRealize As BOOL) As BOOL
1035Declare Function wglSwapLayerBuffers Lib "opengl32" (hdc As HDC, fuPlanes As DWord) As BOOL
1036
1037Type WGLSWAP
1038 hdc As HDC
1039 uiFlags As DWord
1040End Type
1041TypeDef PWGLSWAP = *WGLSWAP
1042TypeDef LPWGLSWAP = *WGLSWAP
1043
1044Const WGL_SWAPMULTIPLE_MAX = 16
1045
1046'Declare Function wglSwapMultipleBuffers Lib "opengl32" (u As DWord, lpwglswap As *WGLSWAP) As DWord
1047
1048#endif '_INC_GDI
Note: See TracBrowser for help on using the repository browser.