Changeset 141 for Include/api_gdi.sbp
- Timestamp:
- Mar 8, 2007, 10:42:50 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/api_gdi.sbp
r137 r141 6 6 7 7 #ifdef UNICODE 8 Const _FuncName_CopyEnhMetaFile = "CopyEnhMetaFileW" 9 Const _FuncName_CopyMetaFile = "CopyMetaFileW" 10 Const _FuncName_CreateDC = "CreateDCW" 11 Const _FuncName_CreateEnhMetaFile = "CreateEnhMetaFileW" 12 Const _FuncName_CreateMetaFile = "CreateMetaFileW" 13 Const _FuncName_CreateFont = "CreateFontW" 8 14 Const _FuncName_CreateFontIndirect = "CreateFontIndirectW" 15 Const _FuncName_GetEnhMetaFile = "GetEnhMetaFileW" 16 Const _FuncName_GetEnhMetaFileDescription = "GetEnhMetaFileDescriptionW" 17 Const _FuncName_GetObject = "GetObjectW" 18 Const _FuncName_GetTextMetrics = "GetTextMetricsW" 19 Const _FuncName_ResetDC = "ResetDCW" 20 Const _FuncName_StartDoc = "StartDocW" 21 Const _FuncName_wglUseFontBitmaps = "wglUseFontBitmapsW" 22 Const _FuncName_wglUseFontOutlines = "wglUseFontOutlinesW" 9 23 #else 24 Const _FuncName_CopyEnhMetaFile = "CopyEnhMetaFileA" 25 Const _FuncName_CopyMetaFile = "CopyMetaFileA" 26 Const _FuncName_CreateDC = "CreateDCA" 27 Const _FuncName_CreateEnhMetaFile = "CreateEnhMetaFileA" 28 Const _FuncName_CreateMetaFile = "CreateMetaFileA" 29 Const _FuncName_CreateFont = "CreateFontA" 10 30 Const _FuncName_CreateFontIndirect = "CreateFontIndirectA" 31 Const _FuncName_GetEnhMetaFile = "GetEnhMetaFileA" 32 Const _FuncName_GetEnhMetaFileDescription = "GetEnhMetaFileDescriptionA" 33 Const _FuncName_GetObject = "GetObjectA" 34 Const _FuncName_GetTextMetrics = "GetTextMetricsA" 35 Const _FuncName_ResetDC = "ResetDCA" 36 Const _FuncName_StartDoc = "StartDocA" 37 Const _FuncName_wglUseFontBitmaps = "wglUseFontBitmapsA" 38 Const _FuncName_wglUseFontOutlines = "wglUseFontOutlinesA" 11 39 #endif 12 40 … … 402 430 Const CCHDEVICENAME = 32 403 431 Const CCHFORMNAME = 32 404 Type _devicemodeA405 dmDeviceName[ELM(CCHDEVICENAME)] As Byte432 Type DEVMODEW 433 dmDeviceName[ELM(CCHDEVICENAME)] As WCHAR 406 434 dmSpecVersion As Word 407 435 dmDriverVersion As Word … … 422 450 dmTTOption As Integer 423 451 dmCollate As Integer 424 dmFormName[ELM(CCHFORMNAME)] As Byte452 dmFormName[ELM(CCHFORMNAME)] As WCHAR 425 453 dmLogPixels As Word 426 454 dmBitsPerPel As DWord … … 438 466 dmPanningHeight As DWord 439 467 End Type 440 TypeDef DEVMODEA = _devicemodeA 468 Type DEVMODEA 469 dmDeviceName[ELM(CCHDEVICENAME)] As SByte 470 dmSpecVersion As Word 471 dmDriverVersion As Word 472 dmSize As Word 473 dmDriverExtra As Word 474 dmFields As DWord 475 dmOrientation As Integer 476 dmPaperSize As Integer 477 dmPaperLength As Integer 478 dmPaperWidth As Integer 479 dmScale As Integer 480 dmCopies As Integer 481 dmDefaultSource As Integer 482 dmPrintQuality As Integer 483 dmColor As Integer 484 dmDuplex As Integer 485 dmYResolution As Integer 486 dmTTOption As Integer 487 dmCollate As Integer 488 dmFormName[ELM(CCHFORMNAME)] As SByte 489 dmLogPixels As Word 490 dmBitsPerPel As DWord 491 dmPelsWidth As DWord 492 dmPelsHeight As DWord 493 dmDisplayFlags As DWord 494 dmDisplayFrequency As DWord 495 dmICMMethod As DWord 496 dmICMIntent As DWord 497 dmMediaType As DWord 498 dmDitherType As DWord 499 dmReserved1 As DWord 500 dmReserved2 As DWord 501 dmPanningWidth As DWord 502 dmPanningHeight As DWord 503 End Type 504 #ifdef UNICODE 505 TypeDef DEVMODE = DEVMODEW 506 #else 441 507 TypeDef DEVMODE = DEVMODEA 442 508 #endif 443 509 444 510 ' Binary raster ops … … 480 546 End Type 481 547 482 Type DOCINFO 548 Type DOCINFOW 549 cbSize As Long 550 lpszDocName As LPCWSTR 551 lpszOutput As LPCWSTR 552 lpszDatatype As LPCWSTR 553 fwType As DWord 554 End Type 555 Type DOCINFOA 483 556 cbSize As Long 484 557 lpszDocName As LPCSTR … … 487 560 fwType As DWord 488 561 End Type 562 #ifdef UNICODE 563 TypeDef DOCINFO = DOCINFOW 564 #else 565 TypeDef DOCINFO = DOCINFOA 566 #endif 489 567 490 568 '------------------- … … 508 586 Const RGN_COPY = 5 509 587 Declare Function CombineRgn Lib "gdi32" (hrgnDest As HRGN, hrgnSrc1 As HRGN, hrgnSrc2 As HRGN, fnCombineMode As Long) As Long 510 Declare Function CopyEnhMetaFile Lib "gdi32" Alias "CopyEnhMetaFileA" (hemfSrc As HENHMETAFILE, pszFile As PCSTR) As HENHMETAFILE511 Declare Function CopyMetaFile Lib "gdi32" Alias "CopyMetaFileA" (hmfSrc As HMETAFILE, pszFile As PCSTR) As HMETAFILE588 Declare Function CopyEnhMetaFile Lib "gdi32" Alias _FuncName_CopyEnhMetaFile (hemfSrc As HENHMETAFILE, pszFile As PCTSTR) As HENHMETAFILE 589 Declare Function CopyMetaFile Lib "gdi32" Alias _FuncName_CopyMetaFile (hmfSrc As HMETAFILE, pszFile As PCTSTR) As HMETAFILE 512 590 Declare Function CreateBitmap Lib "gdi32" (nWidth As Long, nHeight As Long, cPlanes As Long, cBitsPerPel As Long, lpvBits As VoidPtr) As HBITMAP 513 Declare Function CreateBitmapIndirect Lib "gdi32" (ByRef lpbm As BITMAP) As HBITMAP591 Declare Function CreateBitmapIndirect Lib "gdi32" (ByRef bm As BITMAP) As HBITMAP 514 592 515 593 Const BS_SOLID = 0 … … 541 619 Declare Function CreateCompatibleBitmap Lib "gdi32" (hdc As HDC, nWidth As Long, nHeight As Long) As HBITMAP 542 620 Declare Function CreateCompatibleDC Lib "gdi32" (hdc As HDC) As HDC 543 Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (lpszDriver As PCSTR, lpszDevice As PCSTR, lpszOutput As PCSTR, ByRef lpInitData As DEVMODE) As HDC621 Declare Function CreateDC Lib "gdi32" Alias _FuncName_CreateDC (pszDriver As PCTSTR, pszDevice As PCTSTR, pszOutput As PCTSTR, ByRef InitData As DEVMODE) As HDC 544 622 545 623 Const CBM_INIT = &H04 546 Declare 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 HBITMAP624 Declare Function CreateDIBitmap Lib "gdi32" (hdc As HDC, ByRef bmih As BITMAPINFOHEADER, fdwInit As Long, lpbInit As VoidPtr, ByRef bmi As BITMAPINFO, fuUsage As Long) As HBITMAP 547 625 548 626 Declare Function CreateDIBPatternBrushPt Lib "gdi32" (lpPackedDIB As VoidPtr, iUsage As Long) As HBRUSH … … 550 628 Declare Function CreateEllipticRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As HRGN 551 629 Declare Function CreateEllipticRgnIndirect Lib "gdi32" (ByRef lpRect As RECT) As HRGN 552 Declare Function CreateEnhMetaFile Lib "gdi32" Alias "CreateEnhMetaFileA" (hdcRef As HDC, pFileName As PCTSTR, ByRef Rect As RECT, pDescription As PCTSTR) As HDC553 Declare Function CreateMetaFile Lib "gdi32" Alias "CreateMetaFileA" (pFileName As PCTSTR) As HDC630 Declare Function CreateEnhMetaFile Lib "gdi32" Alias _FuncName_CreateEnhMetaFile (hdcRef As HDC, pFileName As PCTSTR, ByRef Rect As RECT, pDescription As PCTSTR) As HDC 631 Declare Function CreateMetaFile Lib "gdi32" Alias _FuncName_CreateMetaFile (pFileName As PCTSTR) As HDC 554 632 555 633 Const FW_DONTCARE = 0 … … 625 703 Const FF_SCRIPT = &H00040000 626 704 Const FF_DECORATIVE = &H00050000 627 Declare 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 HFONT705 Declare Function CreateFont Lib "gdi32" Alias _FuncName_CreateFont (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 PCTSTR) As HFONT 628 706 629 707 Const LF_FACESIZE = 32 … … 642 720 lfQuality As Byte 643 721 lfPitchAndFamily As Byte 644 lfFaceName[ELM(LF_FACESIZE)] As Byte722 lfFaceName[ELM(LF_FACESIZE)] As SByte 645 723 End Type 646 724 Type LOGFONTW … … 726 804 Declare Function ExtTextOutW Lib "gdi32" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCWSTR, cbCount As Long, pDx As *Long) As Long 727 805 #ifdef UNICODE 728 Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutW" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCTSTR, cbCount As Long, pDx As *Long) As Long806 Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutW" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, pString As PCWSTR, cbCount As Long, pDx As *Long) As Long 729 807 #else 730 Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutA" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCTSTR, cbCount As Long, pDx As *Long) As Long808 Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutA" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, pString As PCSTR, cbCount As Long, pDx As *Long) As Long 731 809 #endif 732 810 Declare Function FillPath Lib "gdi32" (hdc As HDC) As Long … … 738 816 Declare Function GetBkMode Lib "gdi32" (hdc As HDC) As Long 739 817 Declare Function GetBrushOrgEx Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI) As Long 740 Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A" (hdc As HDC, iFirstChar As Long, iLastChar As Long, lpBuffer As DWordPtr) As Long 818 ' only WinNT 819 'Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A" (hdc As HDC, iFirstChar As DWord, iLastChar As DWord, pBuffer As *DWord) As Long 741 820 Declare Function GetClipBox Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long 742 821 Declare Function GetClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long 743 822 Declare Function GetCurrentObject Lib "gdi32" (hdc As HDC, dwObjectType As DWord) As HANDLE 744 Declare Function GetCurrentPositionEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long823 Declare Function GetCurrentPositionEx Lib "gdi32" (hdc As HDC, ByRef Point As POINTAPI) As Long 745 824 746 825 Const DRIVERVERSION = 0 … … 864 943 865 944 Declare 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 866 Declare Function GetEnhMetaFile Lib "gdi32" Alias "GetEnhMetaFileA" (pszMetaFile As PCSTR) As HENHMETAFILE945 Declare Function GetEnhMetaFile Lib "gdi32" Alias _FuncName_GetEnhMetaFile (pszMetaFile As PCTSTR) As HENHMETAFILE 867 946 Declare Function GetEnhMetaFileBits Lib "gdi32" (hemf As HENHMETAFILE, cbBuffer As DWord, pbBuffer As *Byte) As DWord 868 Declare Function GetEnhMetaFileDescription Lib "gdi32" Alias "GetEnhMetaFileDescriptionA"(hemf As HENHMETAFILE, cbBuffer As DWord, pszDescription As PTSTR) As DWord947 Declare Function GetEnhMetaFileDescription Lib "gdi32" Alias _FuncName_GetEnhMetaFileDescription (hemf As HENHMETAFILE, cbBuffer As DWord, pszDescription As PTSTR) As DWord 869 948 Declare Function GetEnhMetaFileHeader Lib "gdi32" (hemf As HENHMETAFILE, cbBuffer As DWord, ByRef emh As ENHMETAHEADER) As DWord 870 949 Declare Function GetEnhMetaFilePaletteEntries Lib "gdi32" (hemf As HENHMETAFILE, cEntries As DWord, ByRef pe As PALETTEENTRY) As DWord … … 881 960 Declare Function GetMetaFileBitsEx Lib "gdi32" (hmf As HMETAFILE, nSize As DWord, pvData As VoidPtr) As DWord 882 961 Declare Function GetMiterLimit Lib "gdi32" (hdc As HDC, peLimit As SinglePtr) As Long 883 Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (hgdiobj As HANDLE, cbBuffer As Long, ByRef lpvObject As Any) As Long962 Declare Function GetObject Lib "gdi32" Alias _FuncName_GetObject (hgdiobj As HANDLE, cbBuffer As Long, ByRef pvObject As Any) As Long 884 963 Declare Function GetObjectType Lib "gdi32" (hObject As HANDLE) As Long 885 964 … … 931 1010 Declare Function GetTextExtentPoint32W Lib "gdi32" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long 932 1011 #ifdef UNICODE 933 Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32W" (hdc As HDC, pString As PC TSTR, cbString As Long, ByRef Size As SIZE) As Long1012 Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32W" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long 934 1013 #else 935 Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, pString As PC TSTR, cbString As Long, ByRef Size As SIZE) As Long1014 Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, pString As PCSTR, cbString As Long, ByRef Size As SIZE) As Long 936 1015 #endif 937 1016 … … 940 1019 Const TMPF_DEVICE = &H08 941 1020 Const TMPF_TRUETYPE = &H04 942 Type TEXTMETRIC 1021 Type TEXTMETRICW 943 1022 tmHeight As Long 944 1023 tmAscent As Long … … 952 1031 tmDigitizedAspectX As Long 953 1032 tmDigitizedAspectY As Long 954 tmFirstChar As Byte955 tmLastChar As Byte956 tmDefaultChar As Byte957 tmBreakChar As Byte1033 tmFirstChar As WCHAR 1034 tmLastChar As WCHAR 1035 tmDefaultChar As WCHAR 1036 tmBreakChar As WCHAR 958 1037 tmItalic As Byte 959 1038 tmUnderlined As Byte … … 962 1041 tmCharSet As Byte 963 1042 End Type 964 Declare Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (hdc As HDC, ByRef lptm As TEXTMETRIC) As Long 1043 Type TEXTMETRICA 1044 tmHeight As Long 1045 tmAscent As Long 1046 tmDescent As Long 1047 tmInternalLeading As Long 1048 tmExternalLeading As Long 1049 tmAveCharWidth As Long 1050 tmMaxCharWidth As Long 1051 tmWeight As Long 1052 tmOverhang As Long 1053 tmDigitizedAspectX As Long 1054 tmDigitizedAspectY As Long 1055 tmFirstChar As SByte 1056 tmLastChar As SByte 1057 tmDefaultChar As SByte 1058 tmBreakChar As SByte 1059 tmItalic As Byte 1060 tmUnderlined As Byte 1061 tmStruckOut As Byte 1062 tmPitchAndFamily As Byte 1063 tmCharSet As Byte 1064 End Type 1065 #ifdef UNICODE 1066 TypeDef TEXTMETRIC = TEXTMETRICW 1067 #else 1068 TypeDef TEXTMETRIC = TEXTMETRICA 1069 #endif 1070 Declare Function GetTextMetrics Lib "gdi32" Alias _FuncName_GetTextMetrics (hdc As HDC, ByRef tm As TEXTMETRIC) As Long 965 1071 966 1072 Declare Function GetViewportExtEx Lib "gdi32" (hdc As HDC, ByRef lpSize As SIZE) As Long … … 998 1104 Declare Function RectInRegion Lib "gdi32" (hRgn As HRGN, ByRef lpRect As RECT) As Long 999 1105 Declare Function RectVisible Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long 1000 Declare Function ResetDC Lib "gdi32" Alias "ResetDCA" (hdc As HDC, ByRef lpInitData As DEVMODE) As HDC1106 Declare Function ResetDC Lib "gdi32" Alias _FuncName_ResetDC (hdc As HDC, ByRef InitData As DEVMODE) As HDC 1001 1107 Declare Function RestoreDC Lib "gdi32" (hdc As HDC, nSavedDC As Long) As Long 1002 1108 Declare 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 … … 1042 1148 Declare Function SetWindowOrgEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long 1043 1149 Declare Function SetWinMetaFileBits Lib "gdi32" (cbBuffer As DWord, pbBuffer As *Byte, hdcRef As HDC, ByRef mfp As METAFILEPICT) As HENHMETAFILE 1044 Declare Function StartDoc Lib "gdi32" Alias "StartDocA" (hdc As HDC, ByRef ref_di As DOCINFO) As Long1150 Declare Function StartDoc Lib "gdi32" Alias _FuncName_StartDoc (hdc As HDC, ByRef di As DOCINFO) As Long 1045 1151 Declare Function StartPage Lib "gdi32" (hdc As HDC) As Long 1046 1152 Declare 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 … … 1051 1157 Declare Function TextOutW Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long 1052 1158 #ifdef UNICODE 1053 Declare Function TextOut Lib "gdi32" Alias "TextOutW" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PC TSTR, cbString As Long) As Long1159 Declare Function TextOut Lib "gdi32" Alias "TextOutW" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long 1054 1160 #else 1055 Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PC TSTR, cbString As Long) As Long1161 Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCSTR, cbString As Long) As Long 1056 1162 #endif 1057 1163 … … 1133 1239 Declare Function wglMakeCurrent Lib "opengl32" (hdc As HDC, hglrc As HGLRC) As BOOL 1134 1240 Declare Function wglShareLists Lib "opengl32" (hglrc1 As HGLRC, hglrc2 As HGLRC) As BOOL 1135 Declare Function wglUseFontBitmaps Lib "opengl32" Alias "wglUseFontBitmapsA"(hdc As HDC, first As DWord, count As DWord, listbase As DWord) As BOOL1241 Declare Function wglUseFontBitmaps Lib "opengl32" Alias _FuncName_wglUseFontBitmaps (hdc As HDC, first As DWord, count As DWord, listbase As DWord) As BOOL 1136 1242 Declare Function SwapBuffers Lib "gdi32" (hdc As HDC) As BOOL 1137 1243 … … 1155 1261 Const WGL_FONT_POLYGONS = 1 1156 1262 1157 Declare 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 BOOL1263 Declare Function wglUseFontOutlines Lib "opengl32" Alias _FuncName_wglUseFontOutlines (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 1158 1264 1159 1265 Type LAYERPLANEDESCRIPTOR
Note:
See TracChangeset
for help on using the changeset viewer.