]> git.cworth.org Git - apitrace/blobdiff - windows.py
Unify GL specs.
[apitrace] / windows.py
index 9aebf1b4ff31336f2f08e9695ae4f9528f214c69..245a16b3569414e691ef3e11fcdcb753c44c6b20 100644 (file)
 
 from base import *
 
-SHORT = Intrinsic("SHORT", "%i")
-USHORT = Intrinsic("USHORT", "%u")
-INT = Intrinsic("INT", "%i")
-UINT = Intrinsic("UINT", "%u")
-LONG = Intrinsic("LONG", "%li")
-ULONG = Intrinsic("ULONG", "%lu")
-FLOAT = Intrinsic("FLOAT", "%f")
+SHORT = Alias("SHORT", Short)
+USHORT = Alias("USHORT", UShort)
+INT = Alias("INT", Int)
+UINT = Alias("UINT", UInt)
+LONG = Alias("LONG", Long)
+ULONG = Alias("ULONG", ULong)
+LONGLONG = Alias("LONGLONG", LongLong)
+FLOAT = Alias("FLOAT", Float)
 
-INT32 = Intrinsic("INT32", "%i")
-UINT32 = Intrinsic("UINT32", "%i")
+INT32 = Literal("INT32", "UInt")
+UINT32 = Literal("UINT32", "UInt")
 
-BYTE = Intrinsic("BYTE", "0x%02lx")
-WORD = Intrinsic("WORD", "0x%04lx")
-DWORD = Intrinsic("DWORD", "0x%08lx")
+BYTE = Literal("BYTE", "UInt", base=16)
+WORD = Literal("WORD", "UInt", base=16)
+DWORD = Literal("DWORD", "UInt", base=16)
 
-BOOL = Intrinsic("BOOL", "%i")
+BOOL = Alias("BOOL", Bool)
 
 LPLONG = Pointer(LONG)
 LPWORD = Pointer(WORD)
@@ -55,17 +56,20 @@ LPCSTR = Const(String)
 LPWSTR = WString
 LPCWSTR = Const(WString)
 
-LARGE_INTEGER = Intrinsic("LARGE_INTEGER", "0x%llx")
+LARGE_INTEGER = Struct("LARGE_INTEGER", [
+    (LONGLONG, 'QuadPart'),
+])
+
 SIZE_T = Alias("SIZE_T", SizeT)
 
 HRESULT = Alias("HRESULT", Int)
 
-PVOID = Intrinsic("PVOID", "%p")
+PVOID = Opaque("PVOID")
 LPVOID = PVOID
-HANDLE = Intrinsic("HANDLE", "%p")
-HWND = Intrinsic("HWND", "%p")
-HDC = Intrinsic("HDC", "%p")
-HMONITOR = Intrinsic("HMONITOR", "%p")
+HANDLE = Opaque("HANDLE")
+HWND = Opaque("HWND")
+HDC = Opaque("HDC")
+HMONITOR = Opaque("HMONITOR")
 
 GUID = Struct("GUID", [
     (DWORD, "Data1"),