source: Include/api_gdi.sbp@ 62

Last change on this file since 62 was 1, checked in by (none), 18 years ago
File size: 39.1 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
486TypeDef LOGFONT = LOGFONTA
487Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (ByRef lplf As LOGFONT) As HFONT
488
489Declare Function CreateHatchBrush Lib "gdi32" (fnStyle As Long, clrref As COLORREF) As HBRUSH
490Declare Function CreatePatternBrush Lib "gdi32" (hbmp As HBITMAP) As HBRUSH
491
492Const PS_SOLID = 0
493Const PS_DASH = 1
494Const PS_DOT = 2
495Const PS_DASHDOT = 3
496Const PS_DASHDOTDOT = 4
497Const PS_NULL = 5
498Const PS_INSIDEFRAME = 6
499Const PS_USERSTYLE = 7
500Const PS_ALTERNATE = 8
501Declare Function CreatePen Lib "gdi32" (nPenStyle As Long, nWidth As Long, crColor As COLORREF) As HPEN
502
503Type LOGPEN
504 lopnStyle As DWord
505 lopnWidth As POINTAPI
506 lopnColor As COLORREF
507End Type
508Declare Function CreatePenIndirect Lib "gdi32" (ByRef lplgpn As LOGPEN) As HPEN
509
510Declare Function CreatePolygonRgn Lib "gdi32" (ByRef lpPoints As POINTAPI, cPoints As Long, fnPolyFillMode As Long) As HRGN
511Declare Function CreateRectRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As HRGN
512Declare Function CreateRectRgnIndirect Lib "gdi32" (ByRef lpRect As RECT) As HRGN
513Declare Function CreateRoundRectRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nWidthEllipse As Long, nHeightEllipse As Long) As HRGN
514Declare Function CreateSolidBrush Lib "gdi32" (crColor As COLORREF) As HBRUSH
515Declare Function DeleteDC Lib "gdi32" (hdc As HDC) As BOOL
516Declare Function DeleteObject Lib "gdi32" (hObject As HANDLE) As BOOL
517Declare Function DPtoLP Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, nCount As Long) As BOOL
518Declare Function Ellipse Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, RightRect As Long, nBottomRect As Long) As BOOL
519Declare Function EndDoc Lib "gdi32" (hdc As HDC) As Long
520Declare Function EndPage Lib "gdi32" (hdc As HDC) As Long
521Declare Function EndPath Lib "gdi32" (hdc As HDC) As BOOL
522Declare Function EqualRgn Lib "gdi32" (hSrcRgn1 As HRGN, hSrcRgn2 As HRGN) As BOOL
523Declare Function ExcludeClipRect Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
524
525Const FLOODFILLBORDER = 0
526Const FLOODFILLSURFACE = 1
527Declare Function ExtFloodFill Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, crColor As COLORREF, fuFillType As DWord) As BOOL
528
529Const PS_COSMETIC = &H00000000
530Const PS_GEOMETRIC = &H00010000
531Const PS_ENDCAP_ROUND = &H00000000
532Const PS_ENDCAP_SQUARE = &H00000100
533Const PS_ENDCAP_FLAT = &H00000200
534Const PS_JOIN_ROUND = &H00000000
535Const PS_JOIN_BEVEL = &H00001000
536Const PS_JOIN_MITER = &H00002000
537Declare Function ExtCreatePen Lib "gdi32" (dwPenStyle As DWord, dwWidth As DWord, ByRef lplb As LOGBRUSH, dwStyleCount As DWord, lpStyle As *DWord) As HPEN
538
539Declare Function ExtSelectClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN, fnMode As Long) As Long
540Declare Function FillPath Lib "gdi32" (hdc As HDC) As Long
541Declare Function FillRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN, hBrush As HBRUSH) As Long
542Declare Function FrameRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN, hBrush As HBRUSH, nWidth As Long, nHeight As Long) As Long
543Declare Function GetBitmapBits Lib "gdi32" (hbmp As HBITMAP, cbBuffer As Long, lpvBits As VoidPtr) As Long
544Declare Function GetBkColor Lib "gdi32" (hdc As HDC) As DWord
545Declare Function GetBkMode Lib "gdi32" (hdc As HDC) As Long
546Declare Function GetBrushOrgEx Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI) As Long
547Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A" (hdc As HDC, iFirstChar As Long, iLastChar As Long, lpBuffer As DWordPtr) As Long
548Declare Function GetClipBox Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
549Declare Function GetClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
550Declare Function GetCurrentObject Lib "gdi32" (hdc As HDC, dwObjectType As DWord) As HANDLE
551Declare Function GetCurrentPositionEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long
552
553Const DRIVERVERSION = 0
554Const TECHNOLOGY = 2
555Const HORZSIZE = 4
556Const VERTSIZE = 6
557Const HORZRES = 8
558Const VERTRES = 10
559Const BITSPIXEL = 12
560Const PLANES = 14
561Const NUMBRUSHES = 16
562Const NUMPENS = 18
563Const NUMMARKERS = 20
564Const NUMFONTS = 22
565Const NUMCOLORS = 24
566Const PDEVICESIZE = 26
567Const CURVECAPS = 28
568Const LINECAPS = 30
569Const POLYGONALCAPS = 32
570Const TEXTCAPS = 34
571Const CLIPCAPS = 36
572Const RASTERCAPS = 38
573Const ASPECTX = 40
574Const ASPECTY = 42
575Const ASPECTXY = 44
576Const SHADEBLENDCAPS = 45
577Const LOGPIXELSX = 88
578Const LOGPIXELSY = 90
579Const SIZEPALETTE = 104
580Const NUMRESERVED = 106
581Const COLORRES = 108
582Const PHYSICALWIDTH = 110
583Const PHYSICALHEIGHT = 111
584Const PHYSICALOFFSETX = 112
585Const PHYSICALOFFSETY = 113
586Const SCALINGFACTORX = 114
587Const SCALINGFACTORY = 115
588Const VREFRESH = 116
589Const DESKTOPVERTRES = 117
590Const DESKTOPHORZRES = 118
591Const BLTALIGNMENT = 119
592Const DT_PLOTTER = 0 ' Device Technologies
593Const DT_RASDISPLAY = 1
594Const DT_RASPRINTER = 2
595Const DT_RASCAMERA = 3
596Const DT_CHARSTREAM = 4
597Const DT_METAFILE = 5
598Const DT_DISPFILE = 6
599Const CC_NONE = 0 ' Curve Capabilities
600Const CC_CIRCLES = 1
601Const CC_PIE = 2
602Const CC_CHORD = 4
603Const CC_ELLIPSES = 8
604Const CC_WIDE = 16
605Const CC_STYLED = 32
606Const CC_WIDESTYLED = 64
607Const CC_INTERIORS = 128
608Const CC_ROUNDRECT = 256
609Const LC_NONE = 0 ' Line Capabilities
610Const LC_POLYLINE = 2
611Const LC_MARKER = 4
612Const LC_POLYMARKER = 8
613Const LC_WIDE = 16
614Const LC_STYLED = 32
615Const LC_WIDESTYLED = 64
616Const LC_INTERIORS = 128
617Const PC_NONE = 0 ' Polygonal Capabilities
618Const PC_POLYGON = 1
619Const PC_RECTANGLE = 2
620Const PC_WINDPOLYGON = 4
621Const PC_TRAPEZOID = 4
622Const PC_SCANLINE = 8
623Const PC_WIDE = 16
624Const PC_STYLED = 32
625Const PC_WIDESTYLED = 64
626Const PC_INTERIORS = 128
627Const PC_POLYPOLYGON = 256
628Const PC_PATHS = 512
629Const CP_NONE = 0 ' Clipping Capabilities
630Const CP_RECTANGLE = 1
631Const CP_REGION = 2
632Const TC_OP_CHARACTER = &H00000001 ' Text Capabilities
633Const TC_OP_STROKE = &H00000002
634Const TC_CP_STROKE = &H00000004
635Const TC_CR_90 = &H00000008
636Const TC_CR_ANY = &H00000010
637Const TC_SF_X_YINDEP = &H00000020
638Const TC_SA_DOUBLE = &H00000040
639Const TC_SA_INTEGER = &H00000080
640Const TC_SA_CONTIN = &H00000100
641Const TC_EA_DOUBLE = &H00000200
642Const TC_IA_ABLE = &H00000400
643Const TC_UA_ABLE = &H00000800
644Const TC_SO_ABLE = &H00001000
645Const TC_RA_ABLE = &H00002000
646Const TC_VA_ABLE = &H00004000
647Const TC_RESERVED = &H00008000
648Const TC_SCROLLBLT = &H00010000
649Const RC_BITBLT = 1 ' Raster Capabilities
650Const RC_BANDING = 2
651Const RC_SCALING = 4
652Const RC_BITMAP64 = 8
653Const RC_GDI20_OUTPUT = &H0010
654Const RC_GDI20_STATE = &H0020
655Const RC_SAVEBITMAP = &H0040
656Const RC_DI_BITMAP = &H0080
657Const RC_PALETTE = &H0100
658Const RC_DIBTODEV = &H0200
659Const RC_BIGFONT = &H0400
660Const RC_STRETCHBLT = &H0800
661Const RC_FLOODFILL = &H1000
662Const RC_STRETCHDIB = &H2000
663Const RC_OP_DX_OUTPUT = &H4000
664Const RC_DEVBITS = &H8000
665Const SB_NONE = &H00000000 ' Shading and blending caps
666Const SB_CONST_ALPHA = &H00000001
667Const SB_PIXEL_ALPHA = &H00000002
668Const SB_PREMULT_ALPHA = &H00000004
669Const SB_GRAD_RECT = &H00000010
670Declare Function GetDeviceCaps Lib "gdi32" (hdc As HDC, nIndex As Long) As Long
671
672Declare 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
673
674Const MM_TEXT = 1
675Const MM_LOMETRIC = 2
676Const MM_HIMETRIC = 3
677Const MM_LOENGLISH = 4
678Const MM_HIENGLISH = 5
679Const MM_TWIPS = 6
680Const MM_ISOTROPIC = 7
681Const MM_ANISOTROPIC = 8
682Declare Function GetMapMode Lib "gdi32" (hdc As HDC) As Long
683
684Declare Function GetMiterLimit Lib "gdi32" (hdc As HDC, peLimit As SinglePtr) As Long
685Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (hgdiobj As HANDLE, cbBuffer As Long, ByRef lpvObject As Any) As Long
686Declare Function GetObjectType Lib "gdi32" (hObject As HANDLE) As Long
687
688Const PT_CLOSEFIGURE = &H01
689Const PT_LINETO = &H02
690Const PT_BEZIERTO = &H04
691Const PT_MOVETO = &H06
692Declare Function GetPath Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, lpTypes As BytePtr, nSize As Long) As Long
693
694Declare Function GetPixel Lib "gdi32" (hdc As HDC, x As Long, y As Long) As DWord
695Declare Function GetPolyFillMode Lib "gdi32" (hdc As HDC) As Long
696Declare Function GetRgnBox Lib "gdi32" (hRgn As HRGN, ByRef lpRect As RECT) As Long
697Declare Function GetROP2 Lib "gdi32" (hdc As HDC) As Long
698
699Const WHITE_BRUSH = 0
700Const LTGRAY_BRUSH = 1
701Const GRAY_BRUSH = 2
702Const DKGRAY_BRUSH = 3
703Const BLACK_BRUSH = 4
704Const NULL_BRUSH = 5
705Const HOLLOW_BRUSH = NULL_BRUSH
706Const WHITE_PEN = 6
707Const BLACK_PEN = 7
708Const NULL_PEN = 8
709Const OEM_FIXED_FONT = 10
710Const ANSI_FIXED_FONT = 11
711Const ANSI_VAR_FONT = 12
712Const SYSTEM_FONT = 13
713Const DEVICE_DEFAULT_FONT = 14
714Const DEFAULT_PALETTE = 15
715Const SYSTEM_FIXED_FONT = 16
716Declare Function GetStockObject Lib "gdi32" (fnObject As Long) As HANDLE
717
718Declare Function GetStretchBltMode Lib "gdi32" (hdc As HDC) As Long
719
720Const TA_NOUPDATECP = 0
721Const TA_UPDATECP = 1
722Const TA_LEFT = 0
723Const TA_RIGHT = 2
724Const TA_CENTER = 6
725Const TA_TOP = 0
726Const TA_BOTTOM = 8
727Const TA_BASELINE = 24
728Const TA_RTLREADING = 256
729Declare Function GetTextAlign Lib "gdi32" (hdc As HDC) As DWord
730
731Declare Function GetTextColor Lib "gdi32" (hdc As HDC) As DWord
732Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, lpString As BytePtr, cbString As Long, ByRef lpSize As SIZE) As Long
733
734Const TMPF_FIXED_PITCH = &H01
735Const TMPF_VECTOR = &H02
736Const TMPF_DEVICE = &H08
737Const TMPF_TRUETYPE = &H04
738Type TEXTMETRIC
739 tmHeight As Long
740 tmAscent As Long
741 tmDescent As Long
742 tmInternalLeading As Long
743 tmExternalLeading As Long
744 tmAveCharWidth As Long
745 tmMaxCharWidth As Long
746 tmWeight As Long
747 tmOverhang As Long
748 tmDigitizedAspectX As Long
749 tmDigitizedAspectY As Long
750 tmFirstChar As Byte
751 tmLastChar As Byte
752 tmDefaultChar As Byte
753 tmBreakChar As Byte
754 tmItalic As Byte
755 tmUnderlined As Byte
756 tmStruckOut As Byte
757 tmPitchAndFamily As Byte
758 tmCharSet As Byte
759End Type
760Declare Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (hdc As HDC, ByRef lptm As TEXTMETRIC) As Long
761
762Declare Function GetViewportExtEx Lib "gdi32" (hdc As HDC, ByRef lpSize As SIZE) As Long
763Declare Function GetViewportOrgEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long
764Declare Function GetWindowExtEx Lib "gdi32" (hdc As HDC, ByRef lpSize As SIZE) As Long
765Declare Function GetWindowOrgEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long
766Declare Function IntersectClipRect Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
767Declare Function InvertRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
768Declare Function LineTo Lib "gdi32" (hdc As HDC, nXEnd As Long, nYEnd As Long) As Long
769Declare Function LPtoDP Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, nCount As Long) As Long
770Declare Function MoveToEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
771Declare Function OffsetRgn Lib "gdi32" (hRgn As HRGN, nXOffset As Long, nYOffset As Long) As Long
772Declare Function OffsetClipRgn Lib "gdi32" (hdc As HDC, nXOffset As Long, nYOffset As Long) As Long
773Declare Function OffsetViewportOrgEx Lib "gdi32" (hdc As HDC, nXOffset As Long, nYOffset As Long, ByRef lpPoint As POINTAPI) As Long
774Declare Function OffsetWindowOrgEx Lib "gdi32" (hdc As HDC, nXOffset As Long, nYOffset As Long, ByRef lpPoint As POINTAPI) As Long
775Declare Function PaintRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
776Declare Function PatBlt Lib "gdi32" (hdc As HDC, nXLeft As Long, nYLeft As Long, nWidth As Long, nHeight As Long, dwRop As DWord) As Long
777Declare Function PathToRegion Lib "gdi32" (hdc As HDC) As HRGN
778Declare 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
779Declare 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
780Declare Function PolyBezier Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
781Declare Function PolyBezierTo Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
782Declare Function Polygon Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, cPoints As Long) As Long
783Declare Function Polyline Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
784Declare Function PolylineTo Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
785Declare Function PtInRegion Lib "gdi32" (hRgn As HRGN, x As Long, y As Long) As Long
786Declare Function PtVisible Lib "gdi32" (hdc As HDC, x As Long, y As Long) As Long
787Declare Function RealizePalette Lib "gdi32" (hdc As HDC) As Long
788Declare Function Rectangle Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
789Declare Function RectInRegion Lib "gdi32" (hRgn As HRGN, ByRef lpRect As RECT) As Long
790Declare Function RectVisible Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
791Declare Function ResetDC Lib "gdi32" Alias "ResetDCA" (hdc As HDC, ByRef lpInitData As DEVMODE) As HDC
792Declare Function RestoreDC Lib "gdi32" (hdc As HDC, nSavedDC As Long) As Long
793Declare 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
794Declare Function SaveDC Lib "gdi32" (hdc As HDC) As Long
795Declare 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
796Declare 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
797Declare Function SelectClipPath Lib "gdi32" (hdc As HDC, iMode As Long) As Long
798Declare Function SelectClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
799Declare Function SelectObject Lib "gdi32" (hdc As HDC, hObject As HANDLE) As HANDLE
800Declare Function SelectPalette Lib "gdi32" (hdc As HDC, hpal As HPALETTE, bForceBackground As BOOL) As HPALETTE
801Declare Function SetBkColor Lib "gdi32" (hdc As HDC, crColor As DWord) As DWord
802
803Const TRANSPARENT = 1
804Const OPAQUE = 2
805Declare Function SetBkMode Lib "gdi32" (hdc As HDC, iBkMode As Long) As Long
806
807Declare Function SetBrushOrgEx Lib "gdi32" (hdc As HDC, nXOrg As Long, nYOrg As Long, ByRef lppt As POINTAPI) As Long
808Declare 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
809Declare Function SetMapMode Lib "gdi32" (hdc As HDC, fnMapMode As Long) As Long
810Declare Function SetMiterLimit Lib "gdi32" (hdc As HDC, eNewLimit As Single, peOldLimit As SinglePtr) As Long
811Declare Function SetPixel Lib "gdi32" (hdc As HDC, x As Long, y As Long, crColor As DWord) As DWord
812Declare Function SetPolyFillMode Lib "gdi32" (hdc As HDC, iPolyFillMode As Long) As Long
813Declare Function SetRectRgn Lib "gdi32" (hRgn As HRGN, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
814Declare Function SetROP2 Lib "gdi32" (hdc As HDC, fnDrawMode As Long) As Long
815
816Const BLACKONWHITE = 1
817Const WHITEONBLACK = 2
818Const COLORONCOLOR = 3
819Const HALFTONE = 4
820Const STRETCH_ANDSCANS = BLACKONWHITE
821Const STRETCH_ORSCANS = WHITEONBLACK
822Const STRETCH_DELETESCANS = COLORONCOLOR
823Const STRETCH_HALFTONE = HALFTONE
824Declare Function SetStretchBltMode Lib "gdi32" (hdc As HDC, iStretchMode As Long) As Long
825
826Declare Function SetTextAlign Lib "gdi32" (hdc As HDC, fMode As DWord) As DWord
827Declare Function SetTextColor Lib "gdi32" (hdc As HDC, crColor As DWord) As DWord
828Declare Function SetViewportExtEx Lib "gdi32" (hdc As HDC, nXExtent As Long, nYExtent As Long, ByRef lpSize As SIZE) As Long
829Declare Function SetViewportOrgEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
830Declare Function SetWindowExtEx Lib "gdi32" (hdc As HDC, nXExtent As Long, nYExtent As Long, ByRef lpSize As SIZE) As Long
831Declare Function SetWindowOrgEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
832Declare Function StartDoc Lib "gdi32" Alias "StartDocA" (hdc As HDC, ByRef ref_di As DOCINFO) As Long
833Declare Function StartPage Lib "gdi32" (hdc As HDC) As Long
834Declare 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
835Declare 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
836Declare Function StrokeAndFillPath Lib "gdi32" (hdc As HDC) As Long
837Declare Function StrokePath Lib "gdi32" (DC As DWord) As Long
838Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, lpString As BytePtr, cbString As Long) As Long
839
840
841/* Pixel Format */
842Type PIXELFORMATDESCRIPTOR
843 nSize As Word
844 nVersion As Word
845 dwFlags As DWord
846 iPixelType As Byte
847 cColorBits As Byte
848 cRedBits As Byte
849 cRedShift As Byte
850 cGreenBits As Byte
851 cGreenShift As Byte
852 cBlueBits As Byte
853 cBlueShift As Byte
854 cAlphaBits As Byte
855 cAlphaShift As Byte
856 cAccumBits As Byte
857 cAccumRedBits As Byte
858 cAccumGreenBits As Byte
859 cAccumBlueBits As Byte
860 cAccumAlphaBits As Byte
861 cDepthBits As Byte
862 cStencilBits As Byte
863 cAuxBuffers As Byte
864 iLayerType As Byte
865 bReserved As Byte
866 dwLayerMask As DWord
867 dwVisibleMask As DWord
868 dwDamageMask As DWord
869End Type
870TypeDef PPIXELFORMATDESCRIPTOR = *PIXELFORMATDESCRIPTOR
871TypeDef LPPIXELFORMATDESCRIPTOR = *PIXELFORMATDESCRIPTOR
872
873Const PFD_TYPE_RGBA = 0
874Const PFD_TYPE_COLORINDEX = 1
875
876Const PFD_MAIN_PLANE = 0
877Const PFD_OVERLAY_PLANE = 1
878Const PFD_UNDERLAY_PLANE = (-1)
879
880Const PFD_DOUBLEBUFFER = &H00000001
881Const PFD_STEREO = &H00000002
882Const PFD_DRAW_TO_WINDOW = &H00000004
883Const PFD_DRAW_TO_BITMAP = &H00000008
884Const PFD_SUPPORT_GDI = &H00000010
885Const PFD_SUPPORT_OPENGL = &H00000020
886Const PFD_GENERIC_FORMAT = &H00000040
887Const PFD_NEED_PALETTE = &H00000080
888Const PFD_NEED_SYSTEM_PALETTE = &H00000100
889Const PFD_SWAP_EXCHANGE = &H00000200
890Const PFD_SWAP_COPY = &H00000400
891Const PFD_SWAP_LAYER_BUFFERS = &H00000800
892Const PFD_GENERIC_ACCELERATED = &H00001000
893Const PFD_SUPPORT_DIRECTDRAW = &H00002000
894
895Const PFD_DEPTH_DONTCARE = &H20000000
896Const PFD_DOUBLEBUFFER_DONTCARE = &H40000000
897Const PFD_STEREO_DONTCARE = &H80000000
898
899Declare Function ChoosePixelFormat Lib "gdi32" (hdc As HDC, ByRef lppfd As PIXELFORMATDESCRIPTOR) As Long
900Declare Function DescribePixelFormat Lib "gdi32" (hdc As HDC, n As Long, u As DWord, ByRef lppfd As PIXELFORMATDESCRIPTOR) As Long
901Declare Function GetPixelFormat Lib "gdi32" (hdc As HDC) As Long
902Declare Function SetPixelFormat Lib "gdi32" (hdc As HDC, i As Long, ByRef lppfd As PIXELFORMATDESCRIPTOR) As BOOL
903
904
905/* OpenGL Support */
906Type _System_DeclareHandle_HGLRC:unused As DWord:End Type
907TypeDef HGLRC = *_System_DeclareHandle_HGLRC
908
909Declare Function wglCopyContext Lib "opengl32" (hglrcSource As HGLRC, hglrcDest As HGLRC, mask As DWord) As BOOL
910Declare Function wglCreateContext Lib "opengl32" (hdc As HDC) As HGLRC
911Declare Function wglCreateLayerContext Lib "opengl32" (hdc As HDC, iLayerPlane As Long) As HGLRC
912Declare Function wglDeleteContext Lib "opengl32" (hglrc As HGLRC) As BOOL
913Declare Function wglGetCurrentContext Lib "opengl32" () As HGLRC
914Declare Function wglGetCurrentDC Lib "opengl32" () As HDC
915Declare Function wglGetProcAddress Lib "opengl32" (lpstr As LPSTR) As PROC
916Declare Function wglMakeCurrent Lib "opengl32" (hdc As HDC, hglrc As HGLRC) As BOOL
917Declare Function wglShareLists Lib "opengl32" (hglrc1 As HGLRC, hglrc2 As HGLRC) As BOOL
918Declare Function wglUseFontBitmaps Lib "opengl32" Alias "wglUseFontBitmapsA" (hdc As HDC, first As DWord, count As DWord, listbase As DWord) As BOOL
919Declare Function SwapBuffers Lib "gdi32" (hdc As HDC) As BOOL
920
921Type POINTFLOAT
922 x As Single
923 y As Single
924End Type
925TypeDef PPOINTFLOAT = *POINTFLOAT
926
927Type GLYPHMETRICSFLOAT
928 gmfBlackBoxX As Single
929 gmfBlackBoxY As Single
930 gmfptGlyphOrigin As POINTFLOAT
931 gmfCellIncX As Single
932 gmfCellIncY As Single
933End Type
934TypeDef PGLYPHMETRICSFLOAT = *GLYPHMETRICSFLOAT
935TypeDef LPGLYPHMETRICSFLOAT = *GLYPHMETRICSFLOAT
936
937Const WGL_FONT_LINES = 0
938Const WGL_FONT_POLYGONS = 1
939
940Declare 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
941
942Type LAYERPLANEDESCRIPTOR
943 nSize As Word
944 nVersion As Word
945 dwFlags As DWord
946 iPixelType As Byte
947 cColorBits As Byte
948 cRedBits As Byte
949 cRedShift As Byte
950 cGreenBits As Byte
951 cGreenShift As Byte
952 cBlueBits As Byte
953 cBlueShift As Byte
954 cAlphaBits As Byte
955 cAlphaShift As Byte
956 cAccumBits As Byte
957 cAccumRedBits As Byte
958 cAccumGreenBits As Byte
959 cAccumBlueBits As Byte
960 cAccumAlphaBits As Byte
961 cDepthBits As Byte
962 cStencilBits As Byte
963 cAuxBuffers As Byte
964 iLayerPlane As Byte
965 bReserved As Byte
966 crTransparent As COLORREF
967End Type
968TypeDef PLAYERPLANEDESCRIPTOR = *LAYERPLANEDESCRIPTOR
969TypeDef LPLAYERPLANEDESCRIPTOR = *LAYERPLANEDESCRIPTOR
970
971Const LPD_DOUBLEBUFFER = &H00000001
972Const LPD_STEREO = &H00000002
973Const LPD_SUPPORT_GDI = &H00000010
974Const LPD_SUPPORT_OPENGL = &H00000020
975Const LPD_SHARE_DEPTH = &H00000040
976Const LPD_SHARE_STENCIL = &H00000080
977Const LPD_SHARE_ACCUM = &H00000100
978Const LPD_SWAP_EXCHANGE = &H00000200
979Const LPD_SWAP_COPY = &H00000400
980Const LPD_TRANSPARENT = &H00001000
981Const LPD_TYPE_RGBA = 0
982Const LPD_TYPE_COLORINDEX = 1
983
984Const WGL_SWAP_MAIN_PLANE = &H00000001
985Const WGL_SWAP_OVERLAY1 = &H00000002
986Const WGL_SWAP_OVERLAY2 = &H00000004
987Const WGL_SWAP_OVERLAY3 = &H00000008
988Const WGL_SWAP_OVERLAY4 = &H00000010
989Const WGL_SWAP_OVERLAY5 = &H00000020
990Const WGL_SWAP_OVERLAY6 = &H00000040
991Const WGL_SWAP_OVERLAY7 = &H00000080
992Const WGL_SWAP_OVERLAY8 = &H00000100
993Const WGL_SWAP_OVERLAY9 = &H00000200
994Const WGL_SWAP_OVERLAY10 = &H00000400
995Const WGL_SWAP_OVERLAY11 = &H00000800
996Const WGL_SWAP_OVERLAY12 = &H00001000
997Const WGL_SWAP_OVERLAY13 = &H00002000
998Const WGL_SWAP_OVERLAY14 = &H00004000
999Const WGL_SWAP_OVERLAY15 = &H00008000
1000Const WGL_SWAP_UNDERLAY1 = &H00010000
1001Const WGL_SWAP_UNDERLAY2 = &H00020000
1002Const WGL_SWAP_UNDERLAY3 = &H00040000
1003Const WGL_SWAP_UNDERLAY4 = &H00080000
1004Const WGL_SWAP_UNDERLAY5 = &H00100000
1005Const WGL_SWAP_UNDERLAY6 = &H00200000
1006Const WGL_SWAP_UNDERLAY7 = &H00400000
1007Const WGL_SWAP_UNDERLAY8 = &H00800000
1008Const WGL_SWAP_UNDERLAY9 = &H01000000
1009Const WGL_SWAP_UNDERLAY10 = &H02000000
1010Const WGL_SWAP_UNDERLAY11 = &H04000000
1011Const WGL_SWAP_UNDERLAY12 = &H08000000
1012Const WGL_SWAP_UNDERLAY13 = &H10000000
1013Const WGL_SWAP_UNDERLAY14 = &H20000000
1014Const WGL_SWAP_UNDERLAY15 = &H40000000
1015
1016Declare Function wglDescribeLayerPlane Lib "opengl32" (hdc As HDC, iPixelFormat As Long, iLayerPlane As Long, nByte As DWord, ByRef lplpd As LAYERPLANEDESCRIPTOR) As BOOL
1017Declare Function wglSetLayerPaletteEntries Lib "opengl32" (hdc As HDC, iLayerPlane As Long, iStart As Long, cEntries As Long, lpcr As *COLORREF) As Long
1018Declare Function wglGetLayerPaletteEntries Lib "opengl32" (hdc As HDC, iLayerPlane As Long, iStart As Long, cEntries As Long, lpcr As *COLORREF) As Long
1019Declare Function wglRealizeLayerPalette Lib "opengl32" (hdc As HDC, iLayerPlane As Long, bRealize As BOOL) As BOOL
1020Declare Function wglSwapLayerBuffers Lib "opengl32" (hdc As HDC, fuPlanes As DWord) As BOOL
1021
1022Type WGLSWAP
1023 hdc As HDC
1024 uiFlags As DWord
1025End Type
1026TypeDef PWGLSWAP = *WGLSWAP
1027TypeDef LPWGLSWAP = *WGLSWAP
1028
1029Const WGL_SWAPMULTIPLE_MAX = 16
1030
1031'Declare Function wglSwapMultipleBuffers Lib "opengl32" (u As DWord, lpwglswap As *WGLSWAP) As DWord
1032
1033#endif '_INC_GDI
Note: See TracBrowser for help on using the repository browser.