Changeset 141 for Include/api_gdi.sbp


Ignore:
Timestamp:
Mar 8, 2007, 10:42:50 AM (18 years ago)
Author:
イグトランス (egtra)
Message:

#50 API宣言の変更完了

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/api_gdi.sbp

    r137 r141  
    66
    77#ifdef UNICODE
     8Const _FuncName_CopyEnhMetaFile = "CopyEnhMetaFileW"
     9Const _FuncName_CopyMetaFile = "CopyMetaFileW"
     10Const _FuncName_CreateDC = "CreateDCW"
     11Const _FuncName_CreateEnhMetaFile = "CreateEnhMetaFileW"
     12Const _FuncName_CreateMetaFile = "CreateMetaFileW"
     13Const _FuncName_CreateFont = "CreateFontW"
    814Const _FuncName_CreateFontIndirect = "CreateFontIndirectW"
     15Const _FuncName_GetEnhMetaFile = "GetEnhMetaFileW"
     16Const _FuncName_GetEnhMetaFileDescription = "GetEnhMetaFileDescriptionW"
     17Const _FuncName_GetObject = "GetObjectW"
     18Const _FuncName_GetTextMetrics = "GetTextMetricsW"
     19Const _FuncName_ResetDC = "ResetDCW"
     20Const _FuncName_StartDoc = "StartDocW"
     21Const _FuncName_wglUseFontBitmaps = "wglUseFontBitmapsW"
     22Const _FuncName_wglUseFontOutlines = "wglUseFontOutlinesW"
    923#else
     24Const _FuncName_CopyEnhMetaFile = "CopyEnhMetaFileA"
     25Const _FuncName_CopyMetaFile = "CopyMetaFileA"
     26Const _FuncName_CreateDC = "CreateDCA"
     27Const _FuncName_CreateEnhMetaFile = "CreateEnhMetaFileA"
     28Const _FuncName_CreateMetaFile = "CreateMetaFileA"
     29Const _FuncName_CreateFont = "CreateFontA"
    1030Const _FuncName_CreateFontIndirect = "CreateFontIndirectA"
     31Const _FuncName_GetEnhMetaFile = "GetEnhMetaFileA"
     32Const _FuncName_GetEnhMetaFileDescription = "GetEnhMetaFileDescriptionA"
     33Const _FuncName_GetObject = "GetObjectA"
     34Const _FuncName_GetTextMetrics = "GetTextMetricsA"
     35Const _FuncName_ResetDC = "ResetDCA"
     36Const _FuncName_StartDoc = "StartDocA"
     37Const _FuncName_wglUseFontBitmaps = "wglUseFontBitmapsA"
     38Const _FuncName_wglUseFontOutlines = "wglUseFontOutlinesA"
    1139#endif
    1240
     
    402430Const CCHDEVICENAME = 32
    403431Const CCHFORMNAME = 32
    404 Type _devicemodeA
    405     dmDeviceName[ELM(CCHDEVICENAME)] As Byte
     432Type DEVMODEW
     433    dmDeviceName[ELM(CCHDEVICENAME)] As WCHAR
    406434    dmSpecVersion As Word
    407435    dmDriverVersion As Word
     
    422450    dmTTOption As Integer
    423451    dmCollate As Integer
    424     dmFormName[ELM(CCHFORMNAME)] As Byte
     452    dmFormName[ELM(CCHFORMNAME)] As WCHAR
    425453    dmLogPixels As Word
    426454    dmBitsPerPel As DWord
     
    438466    dmPanningHeight As DWord
    439467End Type
    440 TypeDef DEVMODEA = _devicemodeA
     468Type 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
     503End Type
     504#ifdef UNICODE
     505TypeDef DEVMODE = DEVMODEW
     506#else
    441507TypeDef DEVMODE = DEVMODEA
    442 
     508#endif
    443509
    444510' Binary raster ops
     
    480546End Type
    481547
    482 Type DOCINFO
     548Type DOCINFOW
     549    cbSize As Long
     550    lpszDocName As LPCWSTR
     551    lpszOutput As LPCWSTR
     552    lpszDatatype As LPCWSTR
     553    fwType As DWord
     554End Type
     555Type DOCINFOA
    483556    cbSize As Long
    484557    lpszDocName As LPCSTR
     
    487560    fwType As DWord
    488561End Type
     562#ifdef UNICODE
     563TypeDef DOCINFO = DOCINFOW
     564#else
     565TypeDef DOCINFO = DOCINFOA
     566#endif
    489567
    490568'-------------------
     
    508586Const RGN_COPY = 5
    509587Declare 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 HENHMETAFILE
    511 Declare Function CopyMetaFile Lib "gdi32" Alias "CopyMetaFileA" (hmfSrc As HMETAFILE, pszFile As PCSTR) As HMETAFILE
     588Declare Function CopyEnhMetaFile Lib "gdi32" Alias _FuncName_CopyEnhMetaFile (hemfSrc As HENHMETAFILE, pszFile As PCTSTR) As HENHMETAFILE
     589Declare Function CopyMetaFile Lib "gdi32" Alias _FuncName_CopyMetaFile (hmfSrc As HMETAFILE, pszFile As PCTSTR) As HMETAFILE
    512590Declare 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 HBITMAP
     591Declare Function CreateBitmapIndirect Lib "gdi32" (ByRef bm As BITMAP) As HBITMAP
    514592
    515593Const BS_SOLID =          0
     
    541619Declare Function CreateCompatibleBitmap Lib "gdi32" (hdc As HDC, nWidth As Long, nHeight As Long) As HBITMAP
    542620Declare 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 HDC
     621Declare Function CreateDC Lib "gdi32" Alias _FuncName_CreateDC (pszDriver As PCTSTR, pszDevice As PCTSTR, pszOutput As PCTSTR, ByRef InitData As DEVMODE) As HDC
    544622
    545623Const 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 HBITMAP
     624Declare 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
    547625
    548626Declare Function CreateDIBPatternBrushPt Lib "gdi32" (lpPackedDIB As VoidPtr, iUsage As Long) As HBRUSH
     
    550628Declare Function CreateEllipticRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As HRGN
    551629Declare 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 HDC
    553 Declare Function CreateMetaFile Lib "gdi32" Alias "CreateMetaFileA" (pFileName As PCTSTR) As HDC
     630Declare Function CreateEnhMetaFile Lib "gdi32" Alias _FuncName_CreateEnhMetaFile (hdcRef As HDC, pFileName As PCTSTR, ByRef Rect As RECT, pDescription As PCTSTR) As HDC
     631Declare Function CreateMetaFile Lib "gdi32" Alias _FuncName_CreateMetaFile (pFileName As PCTSTR) As HDC
    554632
    555633Const FW_DONTCARE =       0
     
    625703Const FF_SCRIPT =         &H00040000
    626704Const 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 HFONT
     705Declare 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
    628706
    629707Const LF_FACESIZE = 32
     
    642720    lfQuality As Byte
    643721    lfPitchAndFamily As Byte
    644     lfFaceName[ELM(LF_FACESIZE)] As Byte
     722    lfFaceName[ELM(LF_FACESIZE)] As SByte
    645723End Type
    646724Type LOGFONTW
     
    726804Declare 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
    727805#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 Long
     806Declare 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
    729807#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 Long
     808Declare 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
    731809#endif
    732810Declare Function FillPath Lib "gdi32" (hdc As HDC) As Long
     
    738816Declare Function GetBkMode Lib "gdi32" (hdc As HDC) As Long
    739817Declare 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
    741820Declare Function GetClipBox Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
    742821Declare Function GetClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
    743822Declare 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 Long
     823Declare Function GetCurrentPositionEx Lib "gdi32" (hdc As HDC, ByRef Point As POINTAPI) As Long
    745824
    746825Const DRIVERVERSION =   0
     
    864943
    865944Declare 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 HENHMETAFILE
     945Declare Function GetEnhMetaFile Lib "gdi32" Alias _FuncName_GetEnhMetaFile (pszMetaFile As PCTSTR) As HENHMETAFILE
    867946Declare 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 DWord
     947Declare Function GetEnhMetaFileDescription Lib "gdi32" Alias _FuncName_GetEnhMetaFileDescription (hemf As HENHMETAFILE, cbBuffer As DWord, pszDescription As PTSTR) As DWord
    869948Declare Function GetEnhMetaFileHeader Lib "gdi32" (hemf As HENHMETAFILE, cbBuffer As DWord, ByRef emh As ENHMETAHEADER) As DWord
    870949Declare Function GetEnhMetaFilePaletteEntries Lib "gdi32" (hemf As HENHMETAFILE, cEntries As DWord, ByRef pe As PALETTEENTRY) As DWord
     
    881960Declare Function GetMetaFileBitsEx Lib "gdi32" (hmf As HMETAFILE, nSize As DWord, pvData As VoidPtr) As DWord
    882961Declare 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 Long
     962Declare Function GetObject Lib "gdi32" Alias _FuncName_GetObject (hgdiobj As HANDLE, cbBuffer As Long, ByRef pvObject As Any) As Long
    884963Declare Function GetObjectType Lib "gdi32" (hObject As HANDLE) As Long
    885964
     
    9311010Declare Function GetTextExtentPoint32W Lib "gdi32" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long
    9321011#ifdef UNICODE
    933 Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32W" (hdc As HDC, pString As PCTSTR, cbString As Long, ByRef Size As SIZE) As Long
     1012Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32W" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long
    9341013#else
    935 Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, pString As PCTSTR, cbString As Long, ByRef Size As SIZE) As Long
     1014Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, pString As PCSTR, cbString As Long, ByRef Size As SIZE) As Long
    9361015#endif
    9371016
     
    9401019Const TMPF_DEVICE =      &H08
    9411020Const TMPF_TRUETYPE =    &H04
    942 Type TEXTMETRIC
     1021Type TEXTMETRICW
    9431022    tmHeight As Long
    9441023    tmAscent As Long
     
    9521031    tmDigitizedAspectX As Long
    9531032    tmDigitizedAspectY As Long
    954     tmFirstChar As Byte
    955     tmLastChar As Byte
    956     tmDefaultChar As Byte
    957     tmBreakChar As Byte
     1033    tmFirstChar As WCHAR
     1034    tmLastChar As WCHAR
     1035    tmDefaultChar As WCHAR
     1036    tmBreakChar As WCHAR
    9581037    tmItalic As Byte
    9591038    tmUnderlined As Byte
     
    9621041    tmCharSet As Byte
    9631042End Type
    964 Declare Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (hdc As HDC, ByRef lptm As TEXTMETRIC) As Long
     1043Type 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
     1064End Type
     1065#ifdef UNICODE
     1066TypeDef TEXTMETRIC = TEXTMETRICW
     1067#else
     1068TypeDef TEXTMETRIC = TEXTMETRICA
     1069#endif
     1070Declare Function GetTextMetrics Lib "gdi32" Alias _FuncName_GetTextMetrics (hdc As HDC, ByRef tm As TEXTMETRIC) As Long
    9651071
    9661072Declare Function GetViewportExtEx Lib "gdi32" (hdc As HDC, ByRef lpSize As SIZE) As Long
     
    9981104Declare Function RectInRegion Lib "gdi32" (hRgn As HRGN, ByRef lpRect As RECT) As Long
    9991105Declare 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 HDC
     1106Declare Function ResetDC Lib "gdi32" Alias _FuncName_ResetDC (hdc As HDC, ByRef InitData As DEVMODE) As HDC
    10011107Declare Function RestoreDC Lib "gdi32" (hdc As HDC, nSavedDC As Long) As Long
    10021108Declare 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
     
    10421148Declare Function SetWindowOrgEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
    10431149Declare 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 Long
     1150Declare Function StartDoc Lib "gdi32" Alias _FuncName_StartDoc (hdc As HDC, ByRef di As DOCINFO) As Long
    10451151Declare Function StartPage Lib "gdi32" (hdc As HDC) As Long
    10461152Declare 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
     
    10511157Declare Function TextOutW Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long
    10521158#ifdef UNICODE
    1053 Declare Function TextOut Lib "gdi32" Alias "TextOutW" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCTSTR, cbString As Long) As Long
     1159Declare Function TextOut Lib "gdi32" Alias "TextOutW" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long
    10541160#else
    1055 Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCTSTR, cbString As Long) As Long
     1161Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCSTR, cbString As Long) As Long
    10561162#endif
    10571163
     
    11331239Declare Function wglMakeCurrent Lib "opengl32" (hdc As HDC, hglrc As HGLRC) As BOOL
    11341240Declare 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 BOOL
     1241Declare Function wglUseFontBitmaps Lib "opengl32" Alias _FuncName_wglUseFontBitmaps (hdc As HDC, first As DWord, count As DWord, listbase As DWord) As BOOL
    11361242Declare Function SwapBuffers Lib "gdi32" (hdc As HDC) As BOOL
    11371243
     
    11551261Const WGL_FONT_POLYGONS = 1
    11561262
    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 BOOL
     1263Declare 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
    11581264
    11591265Type LAYERPLANEDESCRIPTOR
Note: See TracChangeset for help on using the changeset viewer.