Changeset 77


Ignore:
Timestamp:
Jan 27, 2007, 12:04:09 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

Controlの追加とそれに伴う修正

Location:
Include
Files:
15 added
9 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/Drawing/Color.ab

    r25 r77  
    5050
    5151    Function A() As Byte
    52         Return (Argb >> Color_AlphaShift) As Byte
     52        Return (argb >> ALPHA_SHIFT) As Byte
    5353    End Function
    5454
    5555    Function R() As Byte
    56         Return (Argb >> Color_RedShift) As Byte
     56        Return (argb >> RED_SHIFT) As Byte
    5757    End Function
    5858
    5959    Function G() As Byte
    60         Return (Argb >> Color_GreenShift) As Byte
     60        Return (argb >> GREEN_SHIFT) As Byte
    6161    End Function
    6262
    6363    Function B() As Byte
    64         GetBlue = (argb >> Color_BlueShift) As Byte
     64        Return (argb >> BLUE_SHIFT) As Byte
    6565    End Function
    6666
     
    306306*/
    307307    Static Function MakeARGB(a As Byte, r As Byte, g As Byte, b As Byte) As ARGB
    308         MakeARGB = (((b As ARGB) <<  Color_BlueShift) Or _
    309                     ((g As ARGB) << Color_GreenShift) Or _
    310                     ((r As ARGB) <<   Color_RedShift) Or _
    311                     ((a As ARGB) << Color_AlphaShift))
     308        MakeARGB = (((b As ARGB) <<  BLUE_SHIFT) Or _
     309                    ((g As ARGB) << GREEN_SHIFT) Or _
     310                    ((r As ARGB) <<   RED_SHIFT) Or _
     311                    ((a As ARGB) << ALPHA_SHIFT))
    312312    End Function
    313313
  • Include/Classes/System/Drawing/Imaging/misc.ab

    r12 r77  
    1414End Enum
    1515
    16 Const ALPHA_SHIFT = 24
    17 Const RED_SHIFT   = 16
    18 Const GREEN_SHIFT = 8
    19 Const BLUE_SHIFT  = 0
     16Const ALPHA_SHIFT = 24 As DWord
     17Const RED_SHIFT   = 16 As DWord
     18Const GREEN_SHIFT = 8 As DWord
     19Const BLUE_SHIFT  = 0 As DWord
    2020Const ALPHA_MASK  = ((&hff As ARGB) << ALPHA_SHIFT)
    2121
  • Include/Classes/System/Drawing/PointF.ab

    r27 r77  
    110110    End Function
    111111
    112     Static Function Substract((pt1 As PointF, pt2 As PointF) As PointF
     112    Static Function Substract(pt1 As PointF, pt2 As PointF) As PointF
    113113        Dim ret As PointF(pt1.x - pt2.x, pt1.y - pt2.y)
    114114        Return ret
  • Include/Classes/System/Drawing/Rectangle.ab

    r28 r77  
    1818    End Sub
    1919
    20     Sub Rectangle(x As Single, y As Single, width As Single, height As Single)
     20    Sub Rectangle(x As Long, y As Long, width As Long, height As Long)
    2121        x = x
    2222        y = y
     
    2525    End Sub
    2626
    27     Sub Rectangle(location As Point, size As Size)
    28         x = location.X
    29         y = location.Y
    30         width = size.Height
    31         height = size.Height
    32     End Sub
    33 
    34     Sub Rectangle(ByRef rc As Rectangle)
    35         x = rc.x
    36         y = rc.y
    37         width = rc.width
    38         height = rc.height
     27    Sub Rectangle(l As Point, s As Size)
     28        x = l.X
     29        y = l.Y
     30        width = s.Height
     31        height = s.Height
     32    End Sub
     33
     34    Sub Rectangle(ByRef r As Rectangle)
     35        x = r.x
     36        y = r.y
     37        width = r.width
     38        height = r.height
     39    End Sub
     40
     41    Sub Rectangle(ByRef r As RECT)
     42        This = FromLTRB(r.left, r.top, r.right, r.bottom)
    3943    End Sub
    4044
     
    5862    End Sub
    5963
    60     Function X() As Single
     64    Function X() As Long
    6165        Return x
    6266    End Function
    6367
    64     Sub X(value As Single)
     68    Sub X(value As Long)
    6569        x = value
    6670    End Sub
    6771
    68     Function Y() As Single
     72    Function Y() As Long
    6973        Return y
    7074    End Function
    7175
    72     Sub Y(value As Single)
     76    Sub Y(value As Long)
    7377        y = value
    7478    End Sub
    7579
    76     Function Width() As Single
     80    Function Width() As Long
    7781        Return width
    7882    End Function
    7983
    80     Sub Width(value As Single)
     84    Sub Width(value As Long)
    8185        width = value
    8286    End Sub
    8387
    84     Function Height() As Single
     88    Function Height() As Long
    8589        Return height
    8690    End Function
    8791
    88     Sub Height(value As Single)
     92    Sub Height(value As Long)
    8993        height = value
    9094    End Sub
    9195
    92     Function Left() As Single
     96    Function Left() As Long
    9397        Return X
    9498    End Function
    9599
    96     Function Top() As Single
     100    Function Top() As Long
    97101        Return Y
    98102    End Function
    99103
    100     Function Right() As Single
     104    Function Right() As Long
    101105        Return X + Width
    102106    End Function
    103107
    104     Function Bottom() As Single
     108    Function Bottom() As Long
    105109        Return Y + Height
    106110    End Function
     
    144148    End Function
    145149
    146     Static Function FromLTRB(l As Single, t As Single, r As Single, b As Single) As Rectangle
     150    Static Function FromLTRB(l As Long, t As Long, r As Long, b As Long) As Rectangle
    147151        Dim rect As Rectangle(l, t, r - l, r - b)
    148152        return rect
    149153    End Function
    150154
    151     Function Contains(x As Single, y As Single) As BOOL
     155    Function Contains(x As Long, y As Long) As BOOL
    152156        If x >= X And x < X + Width And y >= Y And y < Y + Height Then
    153157            Contains = _System_TRUE
     
    169173    End Function
    170174
    171     Sub Inflate(dx As Single, dy As Single)
     175    Sub Inflate(dx As Long, dy As Long)
    172176        X -= dx
    173177        Y -= dy
     
    180184    End Sub
    181185
    182     Static Function Inflate(ByRef rc As Rectangle, x As Single, y As Single) As Rectangle
     186    Static Function Inflate(ByRef rc As Rectangle, x As Long, y As Long) As Rectangle
    183187        Inflate = rc
    184188        Inflate.Inflate(x, y)
     
    190194
    191195    Static Function Intersect(ByRef a As Rectangle, ByRef b As Rectangle) As Rectangle
    192         Dim right As Single, bottom As Single, left As Single, top As Single
     196        Dim right As Long, bottom As Long, left As Long, top As Long
    193197        right = Math.Min(a.Right, b.Right)
    194198        bottom = Math.Min(a.Bottom, b.Bottom)
     
    210214
    211215    Static Function Union(ByRef a As Rectangle, ByRef b As Rectangle) As Rectangle
    212         Dim right As Single, bottom As Single, left As Single, top As Single
     216        Dim right As Long, bottom As Long, left As Long, top As Long
    213217        right = Math.Max(a.Right(), b.Right())
    214218        bottom = Math.Max(a.Bottom(), b.Bottom())
     
    222226    End Sub
    223227
    224     Sub Offset(dx As Single, dy As Single)
     228    Sub Offset(dx As Long, dy As Long)
    225229        X += dx
    226230        Y += dy
     
    254258    End Function
    255259
     260    Function ToRECT() As RECT
     261        With ToRECT
     262            .left = x
     263            .top = y
     264            .right = x + width
     265            .bottom = y + height
     266        End With
     267    End Function
     268
    256269Public
    257     x As Single
    258     y As Single
    259     width As Single
    260     height As Single
     270    x As Long
     271    y As Long
     272    width As Long
     273    height As Long
    261274End Class
    262275
  • Include/Classes/System/Threading/WaitHandle.ab

    r58 r77  
    66Class WaitHandle
    77Public
    8     Virtual Sub ~WaitHandle()
    9         Close()
    10     End Sub
    11 
    12     ' Const Function SafeWaitHandle() As SafeWaitHandle
    13     ' Sub SafeWaitHandle(h As SafeWaitHandle)
     8    ' Properties
     9'   Const Function SafeWaitHandle() As SafeWaitHandle
     10'   Sub SafeWaitHandle(h As SafeWaitHandle)
    1411
    1512    Const Virtual Function Handle() As HANDLE
     
    1916    Virtual Sub Handle(newHandle As HANDLE)
    2017        h = newHandle
     18    End Sub
     19
     20    ' Methods
     21
     22    Virtual Sub ~WaitHandle()
     23        Close()
    2124    End Sub
    2225
  • Include/GdiPlusInit.ab

    r13 r77  
    55
    66Enum DebugEventLevel
    7     DebugEventLevelFatal
    8     DebugEventLevelWarning
     7    DebugEventLevelFatal
     8    DebugEventLevelWarning
    99End Enum
    1010
  • Include/OAIdl.ab

    r42 r77  
    936936    Inherits IUnknown
    937937
    938         Function SetGuid(
    939             /* [in] */ ByRef guid As GUID) As HRESULT
    940 
    941         Function SetTypeFlags(
    942             /* [in] */ uTypeFlags As DWord) As HRESULT
    943 
    944         Function SetDocString(
    945             /* [in] */ pStrDoc As LPOLESTR) As HRESULT
    946 
    947         Function SetHelpContext(
    948             /* [in] */ dwHelpContext As DWord) As HRESULT
    949 
    950         Function SetVersion(
    951             /* [in] */ wMajorVerNum As Word,
    952             /* [in] */ wMinorVerNum As Word) As HRESULT
    953 
    954         Function AddRefTypeInfo(
    955             /* [in] */ pTInfo As VoidPtr /* *ITypeInfo */,
    956             /* [in] */ByRef hRefType As HREFTYPE) As HRESULT
    957 
    958         Function AddFuncDesc(
    959             /* [in] */ index As DWord,
    960             /* [in] */ ByRef FuncDesc As FUNCDESC) As HRESULT
    961 
    962         Function AddImplType(
    963             /* [in] */ index As DWord,
    964             /* [in] */ hRefType As HREFTYPE) As HRESULT
    965 
    966         Function SetImplTypeFlags(
    967             /* [in] */ index As DWord,
    968             /* [in] */ implTypeFlags As Long) As HRESULT
    969 
    970         Function SetAlignment(
    971             /* [in] */ cbAlignment As Long) As HRESULT
    972 
    973         Function SetSchema(
    974             /* [in] */ pStrSchema As LPOLESTR) As HRESULT
    975 
    976         Function AddVarDesc(
    977             /* [in] */ index As DWord,
    978             /* [in] */ ByRef VarDesc As VARDESC) As HRESULT
    979 
    980         Function SetFuncAndParamNames(
    981             /* [in] */ index As DWord,
    982             /* [in][size_is][in] */ rgszNames As *LPOLESTR,
    983             /* [in] */ cNames As DWord) As HRESULT
    984 
    985         Function SetVarName(
    986             /* [in] */ index As DWord,
    987             /* [in] */ szName As LPOLESTR) As HRESULT
    988 
    989         Function SetTypeDescAlias(
    990             /* [in] */ ByRef TDescAlias As TYPEDESC) As HRESULT
    991 
    992         Function DefineFuncAsDllEntry(
    993             /* [in] */ index As DWord,
    994             /* [in] */ szDllName As LPOLESTR,
    995             /* [in] */ zProcName As LPOLESTR) As HRESULT
    996 
    997         Function SetFuncDocString(
    998             /* [in] */ index As DWord,
    999             /* [in] */ szDocString As LPOLESTR) As HRESULT
    1000 
    1001         Function SetVarDocString(
    1002             /* [in] */ index As DWord,
    1003             /* [in] */ szDocString As LPOLESTR) As HRESULT
    1004 
    1005         Function SetFuncHelpContext(
    1006             /* [in] */ index As DWord,
    1007             /* [in] */ dwHelpContext As DWord) As HRESULT
    1008 
    1009         Function SetVarHelpContext(
    1010             /* [in] */ index As DWord,
    1011             /* [in] */ dwHelpContext As DWord) As HRESULT
    1012 
    1013         Function SetMops(
    1014             /* [in] */ index As DWord,
    1015             /* [in] */ bstrMops As BSTR) As HRESULT
    1016 
    1017         Function SetTypeIdldesc(
    1018             /* [in] */ ByRef IdlDesc As IDLDESC) As HRESULT
    1019 
    1020         Function LayOut() As HRESULT
     938    Function SetGuid(
     939        /* [in] */ ByRef guid As GUID) As HRESULT
     940
     941    Function SetTypeFlags(
     942        /* [in] */ uTypeFlags As DWord) As HRESULT
     943
     944    Function SetDocString(
     945        /* [in] */ pStrDoc As LPOLESTR) As HRESULT
     946
     947    Function SetHelpContext(
     948        /* [in] */ dwHelpContext As DWord) As HRESULT
     949
     950    Function SetVersion(
     951        /* [in] */ wMajorVerNum As Word,
     952        /* [in] */ wMinorVerNum As Word) As HRESULT
     953
     954    Function AddRefTypeInfo(
     955        /* [in] */ pTInfo As VoidPtr /* *ITypeInfo */,
     956        /* [in] */ByRef hRefType As HREFTYPE) As HRESULT
     957
     958    Function AddFuncDesc(
     959        /* [in] */ index As DWord,
     960        /* [in] */ ByRef FuncDesc As FUNCDESC) As HRESULT
     961
     962    Function AddImplType(
     963        /* [in] */ index As DWord,
     964        /* [in] */ hRefType As HREFTYPE) As HRESULT
     965
     966    Function SetImplTypeFlags(
     967        /* [in] */ index As DWord,
     968        /* [in] */ implTypeFlags As Long) As HRESULT
     969
     970    Function SetAlignment(
     971        /* [in] */ cbAlignment As Long) As HRESULT
     972
     973    Function SetSchema(
     974        /* [in] */ pStrSchema As LPOLESTR) As HRESULT
     975
     976    Function AddVarDesc(
     977        /* [in] */ index As DWord,
     978        /* [in] */ ByRef VarDesc As VARDESC) As HRESULT
     979
     980    Function SetFuncAndParamNames(
     981        /* [in] */ index As DWord,
     982        /* [in][size_is][in] */ rgszNames As *LPOLESTR,
     983        /* [in] */ cNames As DWord) As HRESULT
     984
     985    Function SetVarName(
     986        /* [in] */ index As DWord,
     987        /* [in] */ szName As LPOLESTR) As HRESULT
     988
     989    Function SetTypeDescAlias(
     990        /* [in] */ ByRef TDescAlias As TYPEDESC) As HRESULT
     991
     992    Function DefineFuncAsDllEntry(
     993        /* [in] */ index As DWord,
     994        /* [in] */ szDllName As LPOLESTR,
     995        /* [in] */ zProcName As LPOLESTR) As HRESULT
     996
     997    Function SetFuncDocString(
     998        /* [in] */ index As DWord,
     999        /* [in] */ szDocString As LPOLESTR) As HRESULT
     1000
     1001    Function SetVarDocString(
     1002        /* [in] */ index As DWord,
     1003        /* [in] */ szDocString As LPOLESTR) As HRESULT
     1004
     1005    Function SetFuncHelpContext(
     1006        /* [in] */ index As DWord,
     1007        /* [in] */ dwHelpContext As DWord) As HRESULT
     1008
     1009    Function SetVarHelpContext(
     1010        /* [in] */ index As DWord,
     1011        /* [in] */ dwHelpContext As DWord) As HRESULT
     1012
     1013    Function SetMops(
     1014        /* [in] */ index As DWord,
     1015        /* [in] */ bstrMops As BSTR) As HRESULT
     1016
     1017    Function SetTypeIdldesc(
     1018        /* [in] */ ByRef IdlDesc As IDLDESC) As HRESULT
     1019
     1020    Function LayOut() As HRESULT
    10211021End Interface
    10221022
     
    12391239/* [unique][uuid][object] */
    12401240
    1241 Typedef /* [unique] */ LPENUMVARIANT = *IEnumVARIANT
     1241Typedef LPENUMVARIANT = /* [unique] */ *IEnumVARIANT
    12421242
    12431243Dim IID_IEnumVARIANT = [&h00020404, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
     
    12601260#endif  /* __IEnumVARIANT_INTERFACE_DEFINED__ */
    12611261
    1262 #ifdef __UNDECLARED__
    1263 
    12641262#ifndef __ITypeComp_INTERFACE_DEFINED__
    12651263#define __ITypeComp_INTERFACE_DEFINED__
     
    12681266/* [unique][uuid][object] */
    12691267
    1270 TypeDef /* [unique] */ ITypeComp *LPTYPECOMP;
     1268TypeDef LPTYPECOMP = /* [unique] */ *ITypeComp
    12711269
    12721270/* [v1_enum] */
     
    12851283    lptcomp As *ITypeComp
    12861284End Union
     1285*/
     1286Type BINDPTR
     1287    p As VoidPtr '暫定
     1288End Type
    12871289
    12881290TypeDef LPBINDPTR = *BINDPTR
    1289 */
    1290 
    1291 EXTERN_C const IID IID_ITypeComp;
    1292 
    1293     MIDL_INTERFACE("00020403-0000-0000-C000-000000000046")
    1294     ITypeComp : public IUnknown
    1295     {
    1296     public:
    1297         virtual /* [local] */ HRESULT STDMETHODCALLTYPE Bind(
    1298             /* [in] */ LPOLESTR szName,
    1299             /* [in] */ ULONG lHashVal,
    1300             /* [in] */ WORD wFlags,
    1301             /* [out] */ ITypeInfo **ppTInfo,
    1302             /* [out] */ DESCKIND *pDescKind,
    1303             /* [out] */ BINDPTR *pBindPtr) As HRESULT
    1304 
    1305         virtual /* [local] */ HRESULT STDMETHODCALLTYPE BindType(
    1306             /* [in] */ LPOLESTR szName,
    1307             /* [in] */ ULONG lHashVal,
    1308             /* [out] */ ITypeInfo **ppTInfo,
    1309             /* [out] */ ITypeComp **ppTComp) As HRESULT
    1310 
    1311     };
    1312 
     1291
     1292Dim IID_ITypeComp = [&h00020403, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
     1293
     1294Interface ITypeComp
     1295    Inherits IUnknown
     1296
     1297    Function /* [local] */ Bind(
     1298        /* [in] */ szName As LPOLESTR,
     1299        /* [in] */ HashVal As DWord,
     1300        /* [in] */ wFlags As Word,
     1301        /* [out] */ ByRef pTInfo As *ITypeInfo,
     1302        /* [out] */ ByRef DescKind As DESCKIND,
     1303        /* [out] */ ByRef BindPtr As BINDPTR) As HRESULT
     1304
     1305    Function /* [local] */ BindType(
     1306        /* [in] */ szName As LPOLESTR,
     1307        /* [in] */ HashVal As DWord,
     1308        /* [out] */ ByRef pTInfo As *ITypeInfo,
     1309        /* [out] */ ByRef pTComp As *ITypeComp) As HRESULT
     1310End Interface
    13131311
    13141312#endif  /* __ITypeComp_INTERFACE_DEFINED__ */
    1315 
    13161313
    13171314#ifndef __ITypeInfo_INTERFACE_DEFINED__
     
    13211318/* [unique][uuid][object] */
    13221319
    1323 TypeDef /* [unique] */ ITypeInfo *LPTYPEINFO;
    1324 
    1325 
    1326 EXTERN_C const IID IID_ITypeInfo;
    1327 
    1328     MIDL_INTERFACE("00020401-0000-0000-C000-000000000046")
    1329     ITypeInfo : public IUnknown
    1330     {
    1331     public:
    1332         virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetTypeAttr(
    1333             /* [out] */ TYPEATTR **ppTypeAttr) As HRESULT
    1334 
    1335         Function GetTypeComp(
    1336             /* [out] */ ITypeComp **ppTComp) As HRESULT
    1337 
    1338         virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetFuncDesc(
    1339             /* [in] */ UINT index,
    1340             /* [out] */ FUNCDESC **ppFuncDesc) As HRESULT
    1341 
    1342         virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetVarDesc(
    1343             /* [in] */ UINT index,
    1344             /* [out] */ VARDESC **ppVarDesc) As HRESULT
    1345 
    1346         virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetNames(
    1347             /* [in] */ MEMBERID memid,
    1348             /* [length_is][size_is][out] */ BSTR *rgBstrNames,
    1349             /* [in] */ UINT cMaxNames,
    1350             /* [out] */ UINT *pcNames) As HRESULT
    1351 
    1352         Function GetRefTypeOfImplType(
    1353             /* [in] */ UINT index,
    1354             /* [out] */ HREFTYPE *pRefType) As HRESULT
    1355 
    1356         Function GetImplTypeFlags(
    1357             /* [in] */ UINT index,
    1358             /* [out] */ INT *pImplTypeFlags) As HRESULT
    1359 
    1360         virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetIDsOfNames(
    1361             /* [size_is][in] */ LPOLESTR *rgszNames,
    1362             /* [in] */ UINT cNames,
    1363             /* [size_is][out] */ MEMBERID *pMemId) As HRESULT
    1364 
    1365         virtual /* [local] */ HRESULT STDMETHODCALLTYPE Invoke(
    1366             /* [in] */ PVOID pvInstance,
    1367             /* [in] */ MEMBERID memid,
    1368             /* [in] */ WORD wFlags,
    1369             /* [out][in] */ DISPPARAMS *pDispParams,
    1370             /* [out] */ VARIANT *pVarResult,
    1371             /* [out] */ EXCEPINFO *pExcepInfo,
    1372             /* [out] */ UINT *puArgErr) As HRESULT
    1373 
    1374         virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDocumentation(
    1375             /* [in] */ MEMBERID memid,
    1376             /* [out] */ BSTR *pBstrName,
    1377             /* [out] */ BSTR *pBstrDocString,
    1378             /* [out] */ DWORD *pdwHelpContext,
    1379             /* [out] */ BSTR *pBstrHelpFile) As HRESULT
    1380 
    1381         virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDllEntry(
    1382             /* [in] */ MEMBERID memid,
    1383             /* [in] */ INVOKEKIND invKind,
    1384             /* [out] */ BSTR *pBstrDllName,
    1385             /* [out] */ BSTR *pBstrName,
    1386             /* [out] */ WORD *pwOrdinal) As HRESULT
    1387 
    1388         Function GetRefTypeInfo(
    1389             /* [in] */ HREFTYPE hRefType,
    1390             /* [out] */ ITypeInfo **ppTInfo) As HRESULT
    1391 
    1392         virtual /* [local] */ HRESULT STDMETHODCALLTYPE AddressOfMember(
    1393             /* [in] */ MEMBERID memid,
    1394             /* [in] */ INVOKEKIND invKind,
    1395             /* [out] */ PVOID *ppv) As HRESULT
    1396 
    1397         virtual /* [local] */ HRESULT STDMETHODCALLTYPE CreateInstance(
    1398             /* [in] */ IUnknown *pUnkOuter,
    1399             /* [in] */ REFIID riid,
    1400             /* [iid_is][out] */ PVOID *ppvObj) As HRESULT
    1401 
    1402         Function GetMops(
    1403             /* [in] */ MEMBERID memid,
    1404             /* [out] */ BSTR *pBstrMops) As HRESULT
    1405 
    1406         virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetContainingTypeLib(
    1407             /* [out] */ ITypeLib **ppTLib,
    1408             /* [out] */ UINT *pIndex) As HRESULT
    1409 
    1410         virtual /* [local] */ void STDMETHODCALLTYPE ReleaseTypeAttr(
    1411             /* [in] */ TYPEATTR *pTypeAttr) As HRESULT
    1412 
    1413         virtual /* [local] */ void STDMETHODCALLTYPE ReleaseFuncDesc(
    1414             /* [in] */ FUNCDESC *pFuncDesc) As HRESULT
    1415 
    1416         virtual /* [local] */ void STDMETHODCALLTYPE ReleaseVarDesc(
    1417             /* [in] */ VARDESC *pVarDesc) As HRESULT
    1418 
    1419     };
     1320TypeDef LPTYPEINFO = /* [unique] */ *ITypeInfo
     1321
     1322Dim IID_ITypeInfo = [&H00020401, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
     1323
     1324Interface ITypeInfo
     1325    Inherits IUnknown
     1326
     1327    Function /* [local] */ GetTypeAttr(
     1328        /* [out] */ ByRef pTypeAttr As *TYPEATTR) As HRESULT
     1329
     1330    Function GetTypeComp(
     1331        /* [out] */ ByRef pTComp As *ITypeComp) As HRESULT
     1332
     1333    Function /* [local] */ GetFuncDesc(
     1334        /* [in] */ index As DWord,
     1335        /* [out] */ ByRef pFuncDesc As *FUNCDESC) As HRESULT
     1336
     1337    Function /* [local] */ GetVarDesc(
     1338        /* [in] */ index As DWord,
     1339        /* [out] */ ByRef pVarDesc As *VARDESC) As HRESULT
     1340
     1341    Function /* [local] */ GetNames(
     1342        /* [in] */ memid As MEMBERID,
     1343        /* [length_is][size_is][out] */ rgBstrNames As *BSTR,
     1344        /* [in] */ cMaxNames As DWord,
     1345        /* [out] */ ByRef cNames As DWord) As HRESULT
     1346
     1347    Function GetRefTypeOfImplType(
     1348        /* [in] */ index As DWord,
     1349        /* [out] */ ByRef RefType As HREFTYPE) As HRESULT
     1350
     1351    Function GetImplTypeFlags(
     1352        /* [in] */ index As DWord,
     1353        /* [out] */ ByRef ImplTypeFlags As Long) As HRESULT
     1354
     1355    Function /* [local] */ GetIDsOfNames(
     1356        /* [size_is][in] */ rgszNames As *LPOLESTR,
     1357        /* [in] */ cNames As DWord,
     1358        /* [size_is][out] */ pMemId As *MEMBERID) As HRESULT
     1359
     1360    Function /* [local] */ Invoke(
     1361        /* [in] */ pvInstance As VoidPtr,
     1362        /* [in] */ memid As MEMBERID,
     1363        /* [in] */ wFlags As Word,
     1364        /* [out][in] */ ByRef DispParams As DISPPARAMS,
     1365        /* [out] */ ByRef VarResult As VARIANT,
     1366        /* [out] */ ByRef ExcepInfo As EXCEPINFO,
     1367        /* [out] */ ByRef uArgErr As DWord) As HRESULT
     1368
     1369    Function /* [local] */ GetDocumentation(
     1370        /* [in] */ memid As MEMBERID,
     1371        /* [out] */ ByRef BstrName As BSTR,
     1372        /* [out] */ ByRef BstrDocString As BSTR,
     1373        /* [out] */ ByRef dwHelpContext As DWord,
     1374        /* [out] */ ByRef BstrHelpFile As BSTR) As HRESULT
     1375
     1376    Function /* [local] */ GetDllEntry(
     1377        /* [in] */ memid As MEMBERID,
     1378        /* [in] */ invKind As INVOKEKIND,
     1379        /* [out] */ ByRef BstrDllName As BSTR,
     1380        /* [out] */ ByRef BstrName As BSTR,
     1381        /* [out] */ ByRef wOrdinal As Word) As HRESULT
     1382
     1383    Function GetRefTypeInfo(
     1384        /* [in] */ hRefType As HREFTYPE,
     1385        /* [out] */ ByRef pTInfo As *ITypeInfo) As HRESULT
     1386
     1387    Function /* [local] */ AddressOfMember(
     1388        /* [in] */ memid As MEMBERID,
     1389        /* [in] */ invKind As INVOKEKIND,
     1390        /* [out] */ ByRef pv As VoidPtr) As HRESULT
     1391
     1392    Function /* [local] */ CreateInstance(
     1393        /* [in] */ pUnkOuter As *IUnknown,
     1394        /* [in] */ ByRef riid As IID,
     1395        /* [iid_is][out] */ ByRef pvObj As Any) As HRESULT
     1396
     1397    Function GetMops(
     1398        /* [in] */ memid As MEMBERID,
     1399        /* [out] */ ByRef BstrMops As BSTR) As HRESULT
     1400
     1401    Function /* [local] */ GetContainingTypeLib(
     1402        /* [out] */ ByRef pTLib As *ITypeLib,
     1403        /* [out] */ ByRef Index As UINT) As HRESULT
     1404
     1405    Function /* [local] */ void STDMETHODCALLTYPE ReleaseTypeAttr(
     1406        /* [in] */ pTypeAttr As *TYPEATTR) As HRESULT
     1407
     1408    Function /* [local] */ void STDMETHODCALLTYPE ReleaseFuncDesc(
     1409        /* [in] */ pFuncDesc As *FUNCDESC) As HRESULT
     1410
     1411    Function /* [local] */ void STDMETHODCALLTYPE ReleaseVarDesc(
     1412        /* [in] */ pVarDesc As *VARDESC) As HRESULT
     1413End Interface
    14201414
    14211415#endif  /* __ITypeInfo_INTERFACE_DEFINED__ */
    1422 
    14231416
    14241417#ifndef __ITypeInfo2_INTERFACE_DEFINED__
     
    14281421/* [unique][uuid][object] */
    14291422
    1430 TypeDef /* [unique] */ ITypeInfo2 *LPTYPEINFO2;
    1431 
    1432 
    1433 EXTERN_C const IID IID_ITypeInfo2;
    1434 
    1435     MIDL_INTERFACE("00020412-0000-0000-C000-000000000046")
    1436     ITypeInfo2 : public ITypeInfo
    1437     {
    1438     public:
    1439         Function GetTypeKind(
    1440             /* [out] */ TYPEKIND *pTypeKind) As HRESULT
    1441 
    1442         Function GetTypeFlags(
    1443             /* [out] */ ULONG *pTypeFlags) As HRESULT
    1444 
    1445         Function GetFuncIndexOfMemId(
    1446             /* [in] */ MEMBERID memid,
    1447             /* [in] */ INVOKEKIND invKind,
    1448             /* [out] */ UINT *pFuncIndex) As HRESULT
    1449 
    1450         Function GetVarIndexOfMemId(
    1451             /* [in] */ MEMBERID memid,
    1452             /* [out] */ UINT *pVarIndex) As HRESULT
    1453 
    1454         Function GetCustData(
    1455             /* [in] */ REFGUID guid,
    1456             /* [out] */ VARIANT *pVarVal) As HRESULT
    1457 
    1458         Function GetFuncCustData(
    1459             /* [in] */ UINT index,
    1460             /* [in] */ REFGUID guid,
    1461             /* [out] */ VARIANT *pVarVal) As HRESULT
    1462 
    1463         Function GetParamCustData(
    1464             /* [in] */ UINT indexFunc,
    1465             /* [in] */ UINT indexParam,
    1466             /* [in] */ REFGUID guid,
    1467             /* [out] */ VARIANT *pVarVal) As HRESULT
    1468 
    1469         Function GetVarCustData(
    1470             /* [in] */ UINT index,
    1471             /* [in] */ REFGUID guid,
    1472             /* [out] */ VARIANT *pVarVal) As HRESULT
    1473 
    1474         Function GetImplTypeCustData(
    1475             /* [in] */ UINT index,
    1476             /* [in] */ REFGUID guid,
    1477             /* [out] */ VARIANT *pVarVal) As HRESULT
    1478 
    1479         virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDocumentation2(
    1480             /* [in] */ MEMBERID memid,
    1481             /* [in] */ LCID lcid,
    1482             /* [out] */ BSTR *pbstrHelpString,
    1483             /* [out] */ DWORD *pdwHelpStringContext,
    1484             /* [out] */ BSTR *pbstrHelpStringDll) As HRESULT
    1485 
    1486         Function GetAllCustData(
    1487             /* [out] */ CUSTDATA *pCustData) As HRESULT
    1488 
    1489         Function GetAllFuncCustData(
    1490             /* [in] */ UINT index,
    1491             /* [out] */ CUSTDATA *pCustData) As HRESULT
    1492 
    1493         Function GetAllParamCustData(
    1494             /* [in] */ UINT indexFunc,
    1495             /* [in] */ UINT indexParam,
    1496             /* [out] */ CUSTDATA *pCustData) As HRESULT
    1497 
    1498         Function GetAllVarCustData(
    1499             /* [in] */ UINT index,
    1500             /* [out] */ CUSTDATA *pCustData) As HRESULT
    1501 
    1502         Function GetAllImplTypeCustData(
    1503             /* [in] */ UINT index,
    1504             /* [out] */ CUSTDATA *pCustData) As HRESULT
    1505 
    1506     };
    1507 
     1423TypeDef LPTYPEINFO2 = /* [unique] */ *ITypeInfo2
     1424
     1425Dim IID_ITypeInfo2 = [&H00020412, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID
     1426
     1427Interface ITypeInfo2
     1428    Inherits ITypeInfo
     1429
     1430    Function GetTypeKind(
     1431        /* [out] */ ByRef TypeKind As TYPEKIND) As HRESULT
     1432    Function GetTypeFlags(
     1433        /* [out] */ ByRef TypeFlags As DWord) As HRESULT
     1434    Function GetFuncIndexOfMemId(
     1435        /* [in] */ memid As MEMBERID,
     1436        /* [in] */ invKind As INVOKEKIND,
     1437        /* [out] */ ByRef FuncIndex As DWord) As HRESULT
     1438    Function GetVarIndexOfMemId(
     1439        /* [in] */ memid As MEMBERID,
     1440        /* [out] */ ByRef pVarIndex As DWord) As HRESULT
     1441    Function GetCustData(
     1442        /* [in] */ ByRef guid As GUID,
     1443        /* [out] */ ByRef VarVal As VARIANT) As HRESULT
     1444    Function GetFuncCustData(
     1445        /* [in] */ index As DWord,
     1446        /* [in] */ ByRef guid As GUID,
     1447        /* [out] */ ByRef VarVal As VARIANT) As HRESULT
     1448    Function GetParamCustData(
     1449        /* [in] */ indexFunc As DWord,
     1450        /* [in] */ indexParam As DWord,
     1451        /* [in] */ ByRef guid As GUID,
     1452        /* [out] */ ByRef VarVal As VARIANT) As HRESULT
     1453    Function GetVarCustData(
     1454        /* [in] */ UINT index,
     1455        /* [in] */ ByRef guid As GUID,
     1456        /* [out] */ ByRef VarVal As VARIANT) As HRESULT
     1457    Function GetImplTypeCustData(
     1458        /* [in] */ UINT index,
     1459        /* [in] */ ByRef guid As GUID,
     1460        /* [out] */ ByRef VarVal As VARIANT) As HRESULT
     1461    virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDocumentation2(
     1462        /* [in] */ memid As MEMBERID,
     1463        /* [in] */ lcid As LCID,
     1464        /* [out] */ ByRef bstrHelpString As BSTR,
     1465        /* [out] */ ByRef dwHelpStringContext As DWord,
     1466        /* [out] */ ByRef bstrHelpStringDll As BSTR) As HRESULT
     1467    Function GetAllCustData(
     1468        /* [out] */ ByRef CustData As CUSTDATA) As HRESULT
     1469    Function GetAllFuncCustData(
     1470        /* [in] */ index As DWord,
     1471        /* [out] */ ByRef CustData As CUSTDATA) As HRESULT
     1472    Function GetAllParamCustData(
     1473        /* [in] */ indexFunc As DWord,
     1474        /* [in] */ indexParam As DWord,
     1475        /* [out] */ ByRef CustData As CUSTDATA) As HRESULT
     1476    Function GetAllVarCustData(
     1477        /* [in] */ index As DWord,
     1478        /* [out] */ ByRef CustData As CUSTDATA) As HRESULT
     1479    Function GetAllImplTypeCustData(
     1480        /* [in] */ index As DWord,
     1481        /* [out] */ ByRef CustData As CUSTDATA) As HRESULT
     1482End Interface
    15081483
    15091484#endif  /* __ITypeInfo2_INTERFACE_DEFINED__ */
    15101485
     1486#ifdef __UNDECLARED__
    15111487
    15121488#ifndef __ITypeLib_INTERFACE_DEFINED__
     
    15161492/* [unique][uuid][object] */
    15171493
    1518 TypeDef /* [v1_enum] */
    1519 enum tagSYSKIND
    1520     {   SYS_WIN16 = 0,
    1521     SYS_WIN32 = SYS_WIN16 + 1,
    1522     SYS_MAC = SYS_WIN32 + 1,
     1494/* [v1_enum] */
     1495Enum SYSKIND
     1496    SYS_WIN16 = 0
     1497    SYS_WIN32 = SYS_WIN16 + 1
     1498    SYS_MAC = SYS_WIN32 + 1
    15231499    SYS_WIN64 = SYS_MAC + 1
    1524     }   SYSKIND;
    1525 
    1526 TypeDef /* [v1_enum] */
    1527 enum tagLIBFLAGS
    1528     {   LIBFLAG_FRESTRICTED = 0x1,
    1529     LIBFLAG_FCONTROL = 0x2,
    1530     LIBFLAG_FHIDDEN = 0x4,
    1531     LIBFLAG_FHASDISKIMAGE = 0x8
    1532     }   LIBFLAGS;
     1500End Enum
     1501
     1502/* [v1_enum] */
     1503Enum LIBFLAGS
     1504    LIBFLAG_FRESTRICTED = &h1
     1505    LIBFLAG_FCONTROL = &h2
     1506    LIBFLAG_FHIDDEN = &h4
     1507    LIBFLAG_FHASDISKIMAGE = &h8
     1508End Enum
    15331509
    15341510TypeDef /* [unique] */ ITypeLib *LPTYPELIB;
    15351511
    1536 TypeDef struct tagTLIBATTR
    1537     {
    1538     GUID guid;
    1539     LCID lcid;
    1540     SYSKIND syskind;
    1541     WORD wMajorVerNum;
    1542     WORD wMinorVerNum;
    1543     WORD wLibFlags;
    1544     }   TLIBATTR;
     1512Type TLIBATTR
     1513    guid As GUID
     1514    lcid As LCID
     1515    syskind As SYSKIND
     1516    wMajorVerNum As Word
     1517    wMinorVerNum As Word
     1518    wLibFlags As Word
     1519End Type
    15451520
    15461521TypeDef struct tagTLIBATTR *LPTLIBATTR;
  • Include/api_window.sbp

    r9 r77  
    204204' Window API
    205205
    206 Declare Function AdjustWindowRect Lib "user32"(ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL) As BOOL
    207 Declare Function AdjustWindowRectEx Lib "user32"(ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL, dwExStyle As DWord) As BOOL
     206Declare Function AdjustWindowRect Lib "user32" (ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL) As BOOL
     207Declare Function AdjustWindowRectEx Lib "user32" (ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL, dwExStyle As DWord) As BOOL
     208Declare Function AnyPopup Lib "user32" () As BOOL
     209Declare Function ArrangeIconicWindows Lib "user32" (hWnd As HWND) As DWord
    208210
    209211Type PAINTSTRUCT
     
    215217    rgbReserved(31) As Byte
    216218End Type
    217 Declare Function BeginPaint Lib "user32" (hWnd As HWND, ByRef lpPaint As PAINTSTRUCT) As HDC
     219Declare Function BeginPaint Lib "user32" (hWnd As HWND, ByRef Paint As PAINTSTRUCT) As HDC
    218220
    219221Declare Function BringWindowToTop Lib "user32" (hWnd As HWND) As Long
     
    800802Declare Function RedrawWindow Lib "user32" (hWnd As HWND, ByRef lprcUpdate As RECT, hrgnUpdate As HRGN, flags As DWord) As BOOL
    801803
    802 Declare Function RegisterClassEx Lib "user32" Alias "RegisterClassExA" (ByRef lpwcx As WNDCLASSEX) As BOOL
     804Declare Function RegisterClassEx Lib "user32" Alias "RegisterClassExA" (ByRef wcx As WNDCLASSEX) As ATOM
    803805Declare Function RegisterClipboardFormat Lib "user32" Alias "RegisterClipboardFormatA" (lpszFormat As PCSTR) As DWord
    804806Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (lpString As PCSTR) As DWord
     
    809811Declare Function TranslateMessage Lib "user32" (ByRef lpMsg As MSG) As Long
    810812Declare Function ScreenToClient Lib "user32" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL
    811 Declare Function ScrollDC Lib "user32" (hdc As HDC, dx As Long, dy As Long, ByRef lprcScroll As RECT, ByRef lprcClip As RECT, hrgnUpdate As HRGN, ByRef lprcUpdate As RECT) As BOOL
     813Declare Function ScrollDC Lib "user32" (hdc As HDC, dx As Long, dy As Long, ByRef rcScroll As RECT, ByRef rcClip As RECT, hrgnUpdate As HRGN, ByRef rcUpdate As RECT) As BOOL
    812814
    813815Const SW_SCROLLCHILDREN = &H0001
    814816Const SW_INVALIDATE =     &H0002
    815817Const SW_ERASE =          &H0004
    816 Declare Function ScrollWindowEx Lib "user32" (hWnd As HWND, dx As Long, dy As Long, ByRef lprcScroll As RECT, ByRef lprcClip As RECT, hrgnUpdate As HRGN, ByRef lprcUpdate As RECT, flags As DWord) As BOOL
     818Declare Function ScrollWindowEx Lib "user32" (hWnd As HWND, dx As Long, dy As Long, ByRef rcScroll As RECT, ByRef rcClip As RECT, hrgnUpdate As HRGN, ByRef rcUpdate As RECT, flags As DWord) As BOOL
    817819
    818820Declare Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
  • Include/windows/WindowHandle.sbp

    r42 r77  
    11#ifndef __WINDOWSHANDLE_SBP__
    22#define __WINDOWSHANDLE_SBP__
     3
     4#ifdef _WIN64
     5Declare Function _System_GetWindowLongPtr Lib "user32" Alias "GetWindowLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
     6Declare Function _System_SetWindowLongPtr Lib "user32" Alias "SetWindowLongPtrA" (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR
     7#else
     8Declare Function _System_GetWindowLongPtr Lib "user32" Alias "GetWindowLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
     9Declare Function _System_SetWindowLongPtr Lib "user32" Alias "SetWindowLongA" (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR
     10#endif
     11Declare Function _System_GetParent Lib "user32" Alias "GetParent" (hWnd As HWND) As HWND
     12Declare Function _System_SetParent Lib "user32" Alias "SetParent" (hWnd As HWND) As HWND
     13Declare Function _System_GetMenu Lib "user32" Alias "GetMenu" (hWnd As HWND) As HMENU
     14Declare Function _System_SetMenu Lib "user32" Alias "SetMenu" (hWnd As HWND) As HMENU
     15Declare Function _System_InvalidateRect Lib "user32" Alias "InvalidateRect" (hWnd As HWND, ByRef Rect As RECT, bErase As BOOL) As BOOL
     16Declare Function _System_InvalidateRgn Lib "user32" Alias "InvalidateRgn" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
     17Declare Function _System_ValidateRect Lib "user32" Alias "ValidateRect" (hWnd As HWND, ByRef Rect As RECT) As BOOL
     18Declare Function _System_ValidateRgn Lib "user32" Alias "ValidateRgn" (hWnd As HWND, hRgn As HRGN) As BOOL
     19Declare Function _System_BeginPaint Lib "user32" Alias "BeginPaint" (hWnd As HWND, ByRef ps As PAINTSTRUCT) As HDC
     20Declare Function _System_EndPaint Lib "user32" Alias "EndPaint" (hWnd As HWND, ByRef lpPaint As PAINTSTRUCT) As HDC
     21Declare Function _System_ClientToScreen Lib "user32" Alias "ClientToScreen" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL
     22Declare Function _System_ScreenToClient Lib "user32" Alias "ScreenToClient" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL
     23Declare Function _System_CreateCaret Lib "user32" Alias "CreateCaret" (hWnd As HWND, hBitmap As HBITMAP, nWidth As Long, nHeight As Long) As BOOL
     24Declare Function _System_HideCaret Lib "user32" Alias "HideCaret" (hWnd As HWND) As BOOL
     25Declare Function _System_ShowCaret Lib "user32" Alias "ShowCaret" (hWnd As HWND) As BOOL
     26Declare Function _System_DrawMenuBar Lib "user32" Alias "DrawMenuBar" (hwnd As HWND) As BOOL
     27Declare Function _System_GetWindowRect Lib "user32" Alias "DrawMenuBar" (hWnd As HWND, ByRef Rect As RECT) As BOOL
     28Declare Function _System_IsWindow Lib "user32" Alias "IsWindow" (hWnd As HWND) As BOOL
     29Declare Function _System_Isiconic Lib "user32" Alias "Isiconic" (hWnd As HWND) As BOOL
     30Declare Function _System_GetClientRect Lib "user32" Alias "GetClientRect" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
    331
    432Class WindowHandle
     
    2149    End Sub
    2250
    23     Function HWnd() As HWND
     51    Const Function HWnd() As HWND
    2452        Return hwnd
    2553    End Function
    2654
    27     Function Operator() As HWND
     55    Const Function Operator() As HWND
    2856        Return hwnd
    2957    End Function
    3058
     59    Function BringToTop() As BOOL
     60        Return BringWindowToTop(hwnd)
     61    End Function
     62
    3163    Function BeginPaint(ByRef ps As PAINTSTRUCT) As HDC
    32         Return BeginPaint(hwnd, ps)
    33     End Function
    34 
    35     Function ChildFromPoint(x As Long, y As Long) As HWND
     64        Return _System_BeginPaint(hwnd, ps)
     65    End Function
     66
     67    Const Function ChildFromPoint(x As Long, y As Long) As HWND
    3668        Return ChildWindowFromPoint(hwnd, x, y)
    3769    End Function
    3870
    39     Function ChildFromPointEx(x As Long, y As Long, flags As DWord) As HWND
     71    Const Function ChildFromPointEx(x As Long, y As Long, flags As DWord) As HWND
    4072        Return ChildWindowFromPointEx(hwnd, x, y, flags)
    4173    End Function
    4274
    43     Function ClientToScreen(ByRef pt As POINTAPI) As BOOL
    44         Return ClientToScreen(pt)
     75    Const Function ClientToScreen(ByRef pt As POINTAPI) As BOOL
     76        Return _System_ClientToScreen(hwnd, pt)
    4577    End Function
    4678
    4779    Function Close() As BOOL
    48         Return CloseWindow()
     80        Return CloseWindow(hwnd)
    4981    End Function
    5082
    5183    Function CreateCaret(hbmp As HBITMAP, width As Long, height As Long) As BOOL
    52         Return CreateCaret(hwnd, hbmp, width, hegiht)
     84        Return _System_CreateCaret(hwnd, hbmp, width, hegiht)
    5385    End Function
    5486
     
    5890
    5991    Function DrawMenuBar() As BOOL
    60         Return DrawMenuBar(hwnd)
     92        Return _System_DrawMenuBar(hwnd)
    6193    End Function
    6294
     
    70102
    71103    Function EndPaint(ByRef ps As PAINTSTRUCT) As BOOL
    72         Return EndPaint(hwnd, ps)
    73     End Function
    74 
    75     Function EnumChilds(enumFunc As WNDENUMPROC, lp As LPARAM) As BOOL
     104        Return _System_EndPaint(hwnd, ps)
     105    End Function
     106
     107    Const Function EnumChilds(enumFunc As WNDENUMPROC, lp As LPARAM) As BOOL
    76108        Return EnumChildWindows(hwnd, enumFunc, lp)
    77109    End Function
     
    81113    End Function
    82114
    83     Function GetClassLongPtr(index As Long) As LONG_PTR
     115    Const Function GetClassLongPtr(index As Long) As LONG_PTR
    84116        Return GetClassLongPtr(hwnd, index)
    85117    End Function
    86118
    87     Function GetClassName(className As PSTR, maxCount As Long) As Long
     119    Const Function GetClassName(className As PSTR, maxCount As Long) As Long
    88120        Return GetClassName(className, maxCount)
    89121    End Function
    90122
    91     Function GetClientRect(ByRef rc As RECT) As BOOL
    92         Return GetClientRect(hwnd, rc)
     123    Const Function GetClientRect(ByRef rc As RECT) As BOOL
     124        Return _System_GetClientRect(hwnd, rc)
     125    End Function
     126
     127    Const Function GetContextHelpId() As DWord
     128        Return GetWindowContextHelpId(hwnd)
    93129    End Function
    94130
     
    101137    End Function
    102138
    103     Function GetDlgCtrlID() As Long
     139    Const Function GetDlgCtrlID() As Long
    104140        Return GetDlgCtrlID(hwnd)
    105141    End Function
    106142
    107     Function GetDlgItem(idDlgItem As Long) As WindowHandle
     143    Const Function GetDlgItem(idDlgItem As Long) As WindowHandle
    108144        Return GetDlgItem(hwnd, idDlgItem)
    109145    End Function
    110146
    111     Function GetDlgItemText(idDlgItem As Long, ps As PSTR, maxCount As Long) As Long
     147    Const Function GetDlgItemText(idDlgItem As Long, ps As PSTR, maxCount As Long) As Long
    112148        Return GetDlgItemText(hwnd, idDlgItem, ps, maxCount)
    113149    End Function
    114150
    115     Function GetMenu() As HMENU
    116         Return GetMenu(hwnd)
    117     End Function
    118 
    119     Function GetParent() As WindowHandle
    120         Return GetParent(hwnd)
    121     End Function
    122 
    123     Function GetProp(psz As PCSTR) As HANDLE
     151    Const Function GetMenu() As HMENU
     152        Return _System_GetMenu(hwnd)
     153    End Function
     154
     155    Const Function GetParent() As WindowHandle
     156        Dim w As WindowHandle(_System_GetParent(hwnd))
     157        Return w
     158    End Function
     159
     160    Const Function GetProp(psz As PCSTR) As HANDLE
    124161        Return GetProp(hwnd, psz)
    125162    End Function
    126163
    127     Function GetProp(atom As ATOM) As HANDLE
     164    Const Function GetProp(atom As ATOM) As HANDLE
    128165        Return GetProp(hwnd, atom As ULONG_PTR As PCSTR)
    129166    End Function
    130167
    131     Function GetScrollInfo(fnBar As Long, ByRef si As SCROLLINFO) As BOOL
     168    Const Function GetScrollInfo(fnBar As Long, ByRef si As SCROLLINFO) As BOOL
    132169        Return GetScrollInfo(hwnd, fnBar, si)
    133170    End Function
    134171
    135     Function GetSystemMenu(revert As BOOL) As HMENU
     172    Const Function GetSystemMenu(revert As BOOL) As HMENU
    136173        Return GetSystemMenu(hwnd, revert)
    137174    End Function
    138175
    139     Function GetUpdateRect(ByRef rc As RECT, erase As BOOL) As BOOL
     176    Const Function GetUpdateRect(ByRef rc As RECT, erase As BOOL) As BOOL
    140177        Return GetUpdateRact(hwnd, rc, erase)
    141178    End Function
    142179
    143     Function GetUpdateRgn(hrgn As HRGN, erase As BOOL) As BOOL
     180    Const Function GetUpdateRgn(hrgn As HRGN, erase As BOOL) As BOOL
    144181        Return GetUpdateRgn(hwnd, hrgn, erase)
    145182    End Function
    146183
    147     Function GetWindow(cmd As DWord) As WindowHandle
     184    Const Function GetWindow(cmd As DWord) As WindowHandle
    148185        Return GetWindow(hwnd, cmd)
    149     End Function
    150 
    151     Function GetWindowPlacement(ByRef wndpl As WINDOWPLACEMENT) As BOOL
    152         Return GetWindowPlacement(hwnd, wndpl)
    153     End Function
    154 
    155     Function GetContextHelpId() As DWord
    156         Return GetWindowContextHelpId(hwnd)
    157186    End Function
    158187
     
    161190    End Function
    162191
    163     Function GetWindowLongPtr(index As Long) As LONG_PTR
    164         Return GetWindowLongPtr(hwnd, index)
    165     End Function
    166 
    167     Function GetWindowPlasement(ByRef wndpl As WINDOWPLACEMENT) As BOOL
     192    Const Function GetWindowLongPtr(index As Long) As LONG_PTR
     193        Return _System_GetWindowLongPtr(hwnd, index)
     194    End Function
     195
     196    Const Function GetWindowPlasement(ByRef wndpl As WINDOWPLACEMENT) As BOOL
    168197        Return GetWindowPlasement(hwnd, wndpl)
    169198    End Function
    170199
    171     Function GetWindowRect(ByRef rc As RECT) As BOOL
    172         Return GetWindowRect(rc)
    173     End Function
    174 
    175     Function GetText(ps As PSTR, maxCount As Long) As BOOL
     200    Const Function GetWindowRect(ByRef rc As RECT) As BOOL
     201        Return _System_GetWindowRect(rc)
     202    End Function
     203
     204    Const Function GetText(ps As PSTR, maxCount As Long) As BOOL
    176205        Return GetWindowText(ps, maxCount)
    177206    End Function
    178207
    179     Function GetTextLength() As Long
     208    Const Function GetTextLength() As Long
    180209        Return GetWindowTextLength(hwnd)
    181210    End Function
    182211
    183     Function GetWindowThreadId() As DWord
     212    Const Function GetWindowThreadId() As DWord
    184213        Return GetWindowProcessThreadId(hwnd, 0)
    185214    End Function
    186215
    187     Function GetWindowProcessThreadId(ByRef processId As DWord) As DWord
     216    Const Function GetWindowProcessThreadId(ByRef processId As DWord) As DWord
    188217        Return GetWindowProcessThreadId(hwnd, processId)
    189218    End Function
    190219
    191220    Function HideCaret() As BOOL
    192         Return HideCaret(hwnd)
     221        Return _System_HideCaret(hwnd)
    193222    End Function
    194223
    195224    Function InvalidateRect(ByRef rc As RECT, erace As BOOL) As BOOL
    196         Return InvalidateRect(hwnd, rc, erace)
     225        Return _System_InvalidateRect(hwnd, rc, erace)
    197226    End Function
    198227
    199228    Function InvalidateRect(ByRef rc As RECT) As BOOL
    200         Return InvalidateRect(hwnd, rc, TRUE)
     229        Return _System_InvalidateRect(hwnd, rc, TRUE)
    201230    End Function
    202231
    203232    Function InvalidateRgn(hrgn As HRGN, erace As BOOL) As BOOL
    204         Return InvalidateRgn(hwnd, hrgn, erace)
     233        Return _System_InvalidateRgn(hwnd, hrgn, erace)
    205234    End Function
    206235
    207236    Function InvalidateRgn(hrgn As HRGN) As BOOL
    208         Return InvalidateRgn(hwnd, hrgn, TRUE)
     237        Return _System_InvalidateRgn(hwnd, hrgn, TRUE)
    209238    End Function
    210239
    211240    Function Invalidate(erace As BOOL) As BOOL
    212         Return InvalidateRect(hwnd, ByVal 0, erace)
     241        Return _System_InvalidateRect(hwnd, ByVal 0, erace)
    213242    End Function
    214243
    215244    Function Invalidate() As BOOL
    216         Return InvalidateRect(hwnd, ByVal 0, TRUE)
    217     End Function
    218 
    219     Function IsChild(hwnd As HWND) As BOOL
     245        Return _System_InvalidateRect(hwnd, ByVal 0, TRUE)
     246    End Function
     247
     248    Const Function IsChild(hwnd As HWND) As BOOL
    220249        Return IsChild(This.hwnd, hwnd)
    221250    End Function
    222251
    223     Function IsDialogMessage(ByRef msg As MSG) As BOOL
     252    Const Function IsDialogMessage(ByRef msg As MSG) As BOOL
    224253        Return IsDialogMessage(hwnd, msg)
    225254    End Function
    226255
    227     Function IsIconic() As BOOL
    228         Return IsIconic(hwnd)
    229     End Function
    230 
    231     Function IsWindow() As BOOL
    232         Return IsWindow(hwnd)
    233     End Function
    234 
    235     Function IsEnabled() As BOOL
     256    Const Function IsIconic() As BOOL
     257        Return _System_IsIconic(hwnd)
     258    End Function
     259
     260    Const Function IsWindow() As BOOL
     261        Return _System_IsWindow(hwnd)
     262    End Function
     263
     264    Const Function IsEnabled() As BOOL
    236265        Return IsWindowEnabled(hwnd)
    237266    End Function
    238267
    239     Function IsUnicode() As BOOL
     268    Const Function IsUnicode() As BOOL
    240269        Return IsWindowUnicode(hwnd)
    241270    End Function
    242271
    243     Function IsVisible() As BOOL
     272    Const Function IsVisible() As BOOL
    244273        Return IsWindowVisible(hwnd)
    245274    End Function
    246275
    247     Function IsZoomed() As BOOL
     276    Const Function IsZoomed() As BOOL
    248277        Return IsZoomed(hwnd)
    249278    End Function
     
    265294    End Function
    266295
    267     Function MessageBox(text As PCSTR, caption As PCSTR, uType As DWord) As Long
     296    Const Function MessageBox(text As PCSTR, caption As PCSTR, uType As DWord) As Long
    268297        Return MessageBox(hwnd, text, caption, uType)
    269298    End Function
    270299
    271     Function MessageBox(text As PCSTR, caption As PCSTR) As Long
     300    Const Function MessageBox(text As PCSTR, caption As PCSTR) As Long
    272301        Return MessageBox(hwnd, text, caption, MB_OK)
    273302    End Function
    274303
    275     Function MessageBox(text As PCSTR) As Long
     304    Const Function MessageBox(text As PCSTR) As Long
    276305        Return MessageBox(hwnd, text, 0, MB_OK)
    277306    End Function
    278307
    279     Function MoveWindow(x As Long, y As Long, width As Long, height As Long, repaint As BOOL) As BOOL
     308    Function Move(x As Long, y As Long, width As Long, height As Long, repaint As BOOL) As BOOL
    280309        Return MoveWindow(hwnd, x, y, width, height, repaint)
    281310    End Function
    282311
    283     Function MoveWindow(x As Long, y As Long, width As Long, height As Long) As BOOL
     312    Function Move(x As Long, y As Long, width As Long, height As Long) As BOOL
    284313        Return MoveWindow(hwnd, x, y, width, height, TRUE)
    285314    End Function
    286315
    287     Function MoveWindow(ByRef rc As RECT, repeaint As BOOL) As BOOL
     316    Function Move(ByRef rc As RECT, repeaint As BOOL) As BOOL
    288317        With rc
    289318            Return MoveWindow(hwnd, .left, .top, .right - .left, .bottom - .top, repaint)
     
    291320    End Function
    292321
    293     Function MoveWindow(ByRef rc As RECT) As BOOL
     322    Function Move(ByRef rc As RECT) As BOOL
    294323        With rc
    295324            Return MoveWindow(hwnd, .left, .top, .right - .left, .bottom - .top, TRUE)
     
    329358    End Function
    330359
    331     Function ScreenToClient(ByRef pt As POINTAPI) As BOOL
    332         Return ScreenToClient(hwnd, pt)
     360    Const Function ScreenToClient(ByRef pt As POINTAPI) As BOOL
     361        Return _System_ScreenToClient(hwnd, pt)
    333362    End Function
    334363
     
    378407
    379408    Function SetMenu(hmenu As HMENU) As BOOL
    380         Return SetMenu(hwnd, hmenu)
     409        Return _System_SetMenu(hwnd, hmenu)
    381410    End Function
    382411
    383412    Function SetParent(hwndNewParent As HWND) As HWND
    384         Return SetParent(hwnd, hwndNewParent)
     413        Return _System_SetParent(hwnd, hwndNewParent)
    385414    End Function
    386415
     
    414443
    415444    Function SetWindowLongPtr(index As Long, newLong As LONG_PTR) As LONG_PTR
    416         Return SetWindowLongPtr(hwnd, index, newLong)
     445        Return _System_SetWindowLongPtr(hwnd, index, newLong)
    417446    End Function
    418447
     
    443472    End Function
    444473
     474    Function ShowCaret() As BOOL
     475        Return _System_ShowCaret(hwnd)
     476    End Function
     477
    445478    Function ShowScrollBar(bar As DWord, show As BOOL) As BOOL
    446479        Return ShowScrollBar(hwnd, bar, show)
     
    464497
    465498    Function ValidateRect(ByRef rc As RECT) As BOOL
    466         Return ValidateRect(hwnd, rc)
     499        Return _System_ValidateRect(hwnd, rc)
    467500    End Function
    468501
    469502    Function ValidateRgn(hrgn As HRGN) As BOOL
    470         Return ValidateRgn(hwnd, hrgn)
     503        Return _System_ValidateRgn(hwnd, hrgn)
    471504    End Function
    472505
    473506    Function Validate() As BOOL
    474         Return ValidateRect(hwnd, ByVal 0)
     507        Return _System_ValidateRect(hwnd, ByVal 0)
    475508    End Function
    476509
    477510    ' Get/SetWindowLongPtr Wrappers
    478511
    479     Function GetExStyle() As DWord
    480         Return GetWindowLongPtr(hwnd, GWL_EXSTYLE) As DWord
    481     End Function
    482 
    483     Function GetStyle() As DWord
    484         Return GetWindowLongPtr(hwnd, GWL_STYLE) As DWord
    485     End Function
    486 
    487     Function GetWndProc() As WNDPROC
    488         Return GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As WNDPROC
    489     End Function
    490 
    491     Function GetInstance() As HINSTANCE
    492         Return GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As HINSTANCE
    493     End Function
    494 
    495     Function GetUserData() As LONG_PTR
    496         Return GetWindowLongPtr(hwnd, GWLP_USERDATA)
     512    Const Function GetExStyle() As DWord
     513        Return _System_GetWindowLongPtr(hwnd, GWL_EXSTYLE) As DWord
     514    End Function
     515
     516    Const Function GetStyle() As DWord
     517        Return _System_GetWindowLongPtr(hwnd, GWL_STYLE) As DWord
     518    End Function
     519
     520    Const Function GetWndProc() As WNDPROC
     521        Return _System_GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As WNDPROC
     522    End Function
     523
     524    Const Function GetInstance() As HINSTANCE
     525        Return _System_GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As HINSTANCE
     526    End Function
     527
     528    Const Function GetUserData() As LONG_PTR
     529        Return _System_GetWindowLongPtr(hwnd, GWLP_USERDATA)
    497530    End Function
    498531
    499532    Function SetExStyle(style As DWord) As DWord
    500         Return SetWindowLongPtr(hwnd, GWL_EXSTYLE, style) As DWord
     533        Return _System_SetWindowLongPtr(hwnd, GWL_EXSTYLE, style) As DWord
    501534    End Function
    502535
    503536    Function SetStyle(style As DWord) As DWord
    504         Return SetWindowLongPtr(hwnd, GWL_STYLE, style) As DWord
     537        Return _System_SetWindowLongPtr(hwnd, GWL_STYLE, style) As DWord
    505538    End Function
    506539
    507540    Function SetWndProc(wndProc As WNDPROC) As WNDPROC
    508         Return SetWindowLongPtR(hwnd, GWLP_WNDPROC, wndProc As WNDPROC) As WNDPROC
     541        Return _System_SetWindowLongPtR(hwnd, GWLP_WNDPROC, wndProc As WNDPROC) As WNDPROC
    509542    End Function
    510543
    511544    Function SetUserData(value As LONG_PTR) As LONG_PTR
    512         Return SetWindowLongPtr(value As LONG_PTR)
     545        Return _System_SetWindowLongPtr(value As LONG_PTR)
    513546    End Function
    514547
    515548    ' Propaties
    516549
    517     Function ClientRect() As RECT
     550    Const Function ClientRect() As RECT
    518551        Dim rc As RECT
    519         GetClientRect(hwnd, rc)
     552        _System_GetClientRect(hwnd, rc)
    520553        Return rc
    521554    End Function
     
    532565    End Sub
    533566
    534     Function WindowRect() As RECT
     567    Const Function WindowRect() As RECT
    535568        Dim rc As RECT
    536         GetWindowRect(hwnd, rc)
     569        _System_GetWindowRect(hwnd, rc)
    537570        Return rc
    538571    End Function
     
    542575    End Sub
    543576
    544     Function ContextHelpID() As DWord
     577    Const Function ContextHelpID() As DWord
    545578        Return GetContextHelpId(hwnd)
    546579    End Function
    547580
    548581    Sub ContextHelpID(newID As DWord)
    549         SetContextHelpId(hwnd, newId)
    550     End Sub
    551 
    552     Function DlgCtrlID() As Long
     582        _System_SetContextHelpId(hwnd, newId)
     583    End Sub
     584
     585    Const Function DlgCtrlID() As Long
    553586        Return GetDlgCtrlID(hwnd)
    554587    End Function
    555588
    556589    Sub DlgCtrlId(newId As Long)
    557         SetWindowLongPtr(hwnd, GWLP_ID, newId)
     590        _System_SetWindowLongPtr(hwnd, GWLP_ID, newId)
    558591    End Sub
    559592
    560593    Function DlgItem(idDlgItem As Long) As WindowHandle
    561         Return GetDlgItem(hwnd, idDlgItem)
    562     End Function
    563 
    564     Function ExStyle() As DWord
    565         Return GetWindowLongPtr(hwnd, GWL_EXSTYLE) As DWord
     594        Dim w As WindowHandle(GetDlgItem(hwnd, idDlgItem))
     595        Return w
     596    End Function
     597
     598    Const Function ExStyle() As DWord
     599        Return _System_GetWindowLongPtr(hwnd, GWL_EXSTYLE) As DWord
    566600    End Function
    567601
    568602    Sub ExStyle(newExStyle As DWord)
    569         SetWindowLongPtr(hwnd, GWL_EXSTYLE, newExStyle)
    570     End Sub
    571 
    572     Function Style() As DWord
    573         Return GetWindowLongPtr(hwnd, GWL_STYLE) As DWord
     603        _System_SetWindowLongPtr(hwnd, GWLP_EXSTYLE, newExStyle)
     604    End Sub
     605
     606    Const Function Style() As DWord
     607        Return _System_GetWindowLongPtr(hwnd, GWL_STYLE) As DWord
    574608    End Function
    575609
    576610    Sub Style(newStyle As DWord) DWord
    577         SetWindowLongPtr(hwnd, GWL_STYLE, newStyle)
    578     End Sub
    579 
    580     Function Enabled() As BOOL
     611        _System_SetWindowLongPtr(hwnd, GWLP_STYLE, newStyle)
     612    End Sub
     613
     614    Const Function Enabled() As BOOL
    581615        Return IsWindowEnabled(hwnd)
    582616    End Function
     
    586620    End Sub
    587621
    588     Function Font() As HFONT
     622    Const Function Font() As HFONT
    589623        Return SendMessage(hwnd, WM_GETFONT, 0, 0) As HFONT
    590624    End Function
     
    594628    End Sub
    595629
    596     Function Maximized() As BOOL
     630    Const Function Maximized() As BOOL
    597631        Return IsIconic(hwnd)
    598632    End Function
     
    606640    End Sub
    607641
    608     Function Minimized() As BOOL
     642    Const Function Minimized() As BOOL
    609643        Return IsIconic(hwnd)
    610644    End Function
     
    618652    End Sub
    619653
    620     Function Instance() As HINSTANCE
    621         Return GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As HINSTANCE
     654    Const Function Instance() As HINSTANCE
     655        Return _System_GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As HINSTANCE
    622656    End Function
    623657
    624658    ' IsWindow, IsUnicodeはメソッドと同じ。
    625659
    626     Function Parent() As WindowHandle
    627         Return GetParent(hwnd)
     660    Const Function Parent() As WindowHandle
     661        Return _System_GetParent(hwnd)
    628662    End Function
    629663
    630664    Sub Parent(hwndNewParent As HWND)
    631         SetParent(hwnd, hwndNewParent)
    632     End Sub
    633 
    634     Function ProcessID() As DWord
     665        _System_SetParent(hwnd, hwndNewParent)
     666    End Sub
     667
     668    Const Function ProcessID() As DWord
    635669        GetWindowProcessThreadId(ProcessID)
    636670    End Function
    637671
    638     Function ThreadID() As DWord
     672    Const Function ThreadID() As DWord
    639673        Return GetWindowProcessThreadId(ByVal 0)
    640674    End Function
    641675
    642     Function Menu() As HMENU
    643         Return GetMenu(hwnd)
     676    Const Function Menu() As HMENU
     677        Return _System_GetMenu(hwnd)
    644678    End Function
    645679
    646680    Sub Menu(hmenuNew As HMENU)
    647         SetMenu(hwnd, hmenuNew)
    648     End Sub
    649 
    650     Function Text() As String
     681        _System_SetMenu(hwnd, hmenuNew)
     682    End Sub
     683
     684    Const Function Text() As String
    651685        With Text
    652686            .ReSize(GetWindowTextLength(hwnd))
     
    659693    End Sub
    660694
    661     Function TextLength() As Long
     695    Const Function TextLength() As Long
    662696        Return GetWindowTextLength(hwnd)
    663697    End Function
    664698
    665     Function UserData() As LONG_PTR
    666         Return GetWindowLongPtr(hwnd, GWLP_USERDATA)
     699    Const Function UserData() As LONG_PTR
     700        Return _System_GetWindowLongPtr(hwnd, GWLP_USERDATA)
    667701    End Function
    668702
    669703    Sub UserData(newValue As LONG_PTR)
    670         SetWindowLongPtr(hwnd, GWLP_USERDATA, newValue)
    671     End Sub
    672 
    673     Function Visible() As BOOL
     704        _System_SetWindowLongPtr(hwnd, GWLP_USERDATA, newValue)
     705    End Sub
     706
     707    Const Function Visible() As BOOL
    674708        Return IsVisible(hwnd)
    675709    End Function
     
    683717    End Sub
    684718
    685     Function WindowPlacement() As WINDOWPLACEMENT
     719    Const Function WindowPlacement() As WINDOWPLACEMENT
    686720        WindowPlacement.length = Len(WindowPlacement)
    687721        GetWindowPlacement(hwnd, WindowPlacement)
     
    692726    End Sub
    693727
    694     Function WndProc() As WNDPROC
    695         Return GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As WNDPROC
     728    Const Function WndProc() As WNDPROC
     729        Return _System_GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As WNDPROC
    696730    End Function
    697731
    698732    Sub WndProc(newWndProc As WNDPROC)
    699         SetWindowLongPtr(hwnd, GWLP_WNDPROC, newWndProc As LONG_PTR)
     733        _System_SetWindowLongPtr(hwnd, GWLP_WNDPROC, newWndProc As LONG_PTR)
    700734    End Sub
    701735
Note: See TracChangeset for help on using the changeset viewer.