Difference between revisions of "Unit GlobalTypes"
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...") |
|||
(15 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
---- | ---- | ||
− | '' | + | '''Ultibo Global Type Definitions unit''' |
=== Constants === | === Constants === | ||
---- | ---- | ||
− | '' | + | ''None defined'' |
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
− | '' | + | |
+ | '''Handle types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSpinHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TMutexHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TCriticalSectionHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TSemaphoreHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TSynchronizerHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TConditionHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TCompletionHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TListHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TQueueHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TThreadHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TMessageslotHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TMailslotHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TBufferHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TEventHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TTimerHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TWorkerHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TWindowHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TFontHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TKeymapHandle = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>HANDLE = PtrUInt;</code> | ||
+ | | style="width: 40%;"|LongWord | ||
+ | |- | ||
+ | | <code>PHANDLE = ^HANDLE;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LPHANDLE = ^HANDLE;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>THandle = HANDLE;</code> | ||
+ | | style="width: 40%;"|Declared in system unit | ||
+ | |- | ||
+ | | <code>HLOCAL = HANDLE;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>HGLOBAL = HANDLE;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>HWND = HANDLE;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Pointer types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>PMutexHandle = ^TMutexHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PCriticalSectionHandle = ^TCriticalSectionHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PSemaphoreHandle = ^TSemaphoreHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PSynchronizerHandle = ^TSynchronizerHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PConditionHandle = ^TConditionHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PCompletionHandle = ^TCompletionHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PListHandle = ^TListHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PQueueHandle = ^TQueueHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PThreadHandle = ^TThreadHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PMessageslotHandle = ^TMessageslotHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PMailslotHandle = ^TMailslotHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PBufferHandle = ^TBufferHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PEventHandle = ^TEventHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PTimerHandle = ^TTimerHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PWorkerHandle = ^TWorkerHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PWindowHandle = ^TWindowHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PFontHandle = ^TFontHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PKeymapHandle = ^TKeymapHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PVOID = Pointer;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LPVOID = Pointer;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LPCVOID = Pointer;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LPBOOL = ^BOOL;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PLONG = ^LONG;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LPLONG = ^LONG;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LPDWORD = ^DWORD;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PUINT = ^UINT;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PUCHAR = ^UCHAR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PUSHORT = ^USHORT;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PULONG = ^ULONG;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>INT_PTR = PtrInt;</code> | ||
+ | | style="width: 40%;"|Integer | ||
+ | |- | ||
+ | | <code>UINT_PTR = PtrUInt;</code> | ||
+ | | style="width: 40%;"|LongWord | ||
+ | |- | ||
+ | | <code>LONG_PTR = PtrInt;</code> | ||
+ | | style="width: 40%;"|LongInt | ||
+ | |- | ||
+ | | <code>ULONG_PTR = PtrUInt;</code> | ||
+ | | style="width: 40%;"|LongWord | ||
+ | |- | ||
+ | | <code>DWORD_PTR = ULONG_PTR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PDWORD_PTR = ^DWORD_PTR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TFarProc = Pointer;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Method types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGetLastError = function:LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>TSetLastError = procedure(LastError:LongWord);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Color format32 (Generic)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PColorFormat32 = ^TColorFormat32;</code> | ||
+ | |||
+ | <code>TColorFormat32 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>case Integer of</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>0:(A:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>B:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>C:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>D:Byte);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1:(Value:LongWord);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>case Integer of</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>0:(D:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>C:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>B:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>A:Byte);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1:(Value:LongWord);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Color format24 (Generic)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PColorFormat24 = ^TColorFormat24;</code> | ||
+ | |||
+ | <code>TColorFormat24 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>A:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>B:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>C:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>C:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>B:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>A:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Color format16 (Generic)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PColorFormat16 = ^TColorFormat16;</code> | ||
+ | |||
+ | <code>TColorFormat16 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Value:Word;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Color format8 (Generic)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PColorFormat8 = ^TColorFormat8;</code> | ||
+ | |||
+ | <code>TColorFormat8 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Value:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Color formatARGB32 (RGB)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PColorFormatARGB32 = ^TColorFormatARGB32;</code> | ||
+ | |||
+ | <code>TColorFormatARGB32 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Alpha:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Alpha:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Color formatRGBA32 (RGB)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PColorFormatRGBA32 = ^TColorFormatRGBA32;</code> | ||
+ | |||
+ | <code>TColorFormatRGBA32 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Alpha:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>Alpha:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Color formatRGB24 (RGB)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PColorFormatRGB24 = ^TColorFormatRGB24;</code> | ||
+ | |||
+ | <code>TColorFormatRGB24 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Color formatABGR32 (BGR)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PColorFormatABGR32 = ^TColorFormatABGR32;</code> | ||
+ | |||
+ | <code>TColorFormatABGR32 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Alpha:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Alpha:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Color formatBGRA32 (BGR)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PColorFormatBGRA32 = ^TColorFormatBGRA32;</code> | ||
+ | |||
+ | <code>TColorFormatBGRA32 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Alpha:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>Alpha:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Display settings''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TDisplaySettings = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>DisplayNumber:LongWord;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Width:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Height:LongWord;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Depth:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Pitch:LongWord;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>VirtualWidth:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>VirtualHeight:LongWord;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>VirtualWidthOffset:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>VirtualHeightOffset:LongWord;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>FramebufferAddress:PtrUInt;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Color formatBGR24 (BGR)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PColorFormatBGR24 = ^TColorFormatBGR24;</code> | ||
+ | |||
+ | <code>TColorFormatBGR24 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>Red:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Green:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Blue:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Boolean types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>BOOL = ByteBool;</code> | ||
+ | | style="width: 40%;"|LongBool; (Compatible with built in GCC _Bool type) | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Signed types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>INT = Integer;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LONG = LongInt;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Unsigned types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>UINT = LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>UCHAR = Byte;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>USHORT = Word;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>ULONG = LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''64bit types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>LONGLONG = Int64;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>ULONGLONG = UInt64;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>DWORDLONG = ULONGLONG;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Size types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>SIZE_T = SizeUInt;</code> | ||
+ | | style="width: 40%;"|ULONG_PTR; | ||
+ | |- | ||
+ | | <code>SSIZE_T = SizeInt;</code> | ||
+ | | style="width: 40%;"|LONG_PTR; | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''String types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>LPSTR = ^CHAR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LPCSTR = ^CHAR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Wide string types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>WCHAR = WideChar;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>PWCHAR = ^WCHAR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LPWSTR = ^WCHAR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LPCWSTR = ^WCHAR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Parameter types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>WPARAM = UINT_PTR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LPARAM = LONG_PTR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>LRESULT = LONG_PTR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Procedure types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>FARPROC = function: Integer;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''C types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>int8_t = Shortint;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>pint8_t = PShortint;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>uint8_t = Byte;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>puint8_t = PByte;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>int16_t = Smallint;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>pint16_t = PSmallint;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>uint16_t = Word;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>puint16_t = PWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>int32_t = LongInt;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>pint32_t = PLongInt;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>uint32_t = LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>puint32_t = PLongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>int64_t = Int64;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>pint64_t = PInt64;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>uint64_t = QWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>puint64_t = PQWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>float_t = Single;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>pfloat_t = PSingle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>double_t = Double;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | | <code>pdouble_t = PDouble;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Atomic types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>patomic_t = ^atomic_t;</code> | ||
+ | |||
+ | <code>atomic_t = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>counter: LongInt;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Atomic64 types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>patomic64_t = ^atomic64_t;</code> | ||
+ | |||
+ | <code>atomic64_t = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>counter: Int64;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Socket types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSocket = UINT_PTR;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''WSA event''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>WSAEVENT = THandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Overlapped structure types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>OVERLAPPED = _OVERLAPPED;</code> | ||
+ | |||
+ | <code>TOverlapped = OVERLAPPED;</code> | ||
+ | |||
+ | <code>POverlapped = LPOVERLAPPED;</code> | ||
+ | |||
+ | <code>LPOVERLAPPED = ^OVERLAPPED;</code> | ||
+ | |||
+ | <code>_OVERLAPPED = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Internal: ULONG_PTR;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>InternalHigh: ULONG_PTR;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Union: record</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>case Integer of</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>0: (</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Offset: DWORD;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>OffsetHigh: DWORD);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1: (</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Pointer: PVOID);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>hEvent: HANDLE;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === | ||
---- | ---- | ||
− | '' | + | ''None defined'' |
=== Function declarations === | === Function declarations === | ||
---- | ---- | ||
− | '' | + | ''None defined'' |
Return to [[Unit_Reference|Unit Reference]] | Return to [[Unit_Reference|Unit Reference]] |
Latest revision as of 04:33, 31 August 2021
Return to Unit Reference
Description
Ultibo Global Type Definitions unit
Constants
None defined
Type definitions
Handle types
TSpinHandle = THandle;
|
|
TMutexHandle = THandle;
|
|
TCriticalSectionHandle = THandle;
|
|
TSemaphoreHandle = THandle;
|
|
TSynchronizerHandle = THandle;
|
|
TConditionHandle = THandle;
|
|
TCompletionHandle = THandle;
|
|
TListHandle = THandle;
|
|
TQueueHandle = THandle;
|
|
TThreadHandle = THandle;
|
|
TMessageslotHandle = THandle;
|
|
TMailslotHandle = THandle;
|
|
TBufferHandle = THandle;
|
|
TEventHandle = THandle;
|
|
TTimerHandle = THandle;
|
|
TWorkerHandle = THandle;
|
|
TWindowHandle = THandle;
|
|
TFontHandle = THandle;
|
|
TKeymapHandle = THandle;
|
|
HANDLE = PtrUInt;
|
LongWord |
PHANDLE = ^HANDLE;
|
|
LPHANDLE = ^HANDLE;
|
|
THandle = HANDLE;
|
Declared in system unit |
HLOCAL = HANDLE;
|
|
HGLOBAL = HANDLE;
|
|
HWND = HANDLE;
|
Pointer types
PMutexHandle = ^TMutexHandle;
|
|
PCriticalSectionHandle = ^TCriticalSectionHandle;
|
|
PSemaphoreHandle = ^TSemaphoreHandle;
|
|
PSynchronizerHandle = ^TSynchronizerHandle;
|
|
PConditionHandle = ^TConditionHandle;
|
|
PCompletionHandle = ^TCompletionHandle;
|
|
PListHandle = ^TListHandle;
|
|
PQueueHandle = ^TQueueHandle;
|
|
PThreadHandle = ^TThreadHandle;
|
|
PMessageslotHandle = ^TMessageslotHandle;
|
|
PMailslotHandle = ^TMailslotHandle;
|
|
PBufferHandle = ^TBufferHandle;
|
|
PEventHandle = ^TEventHandle;
|
|
PTimerHandle = ^TTimerHandle;
|
|
PWorkerHandle = ^TWorkerHandle;
|
|
PWindowHandle = ^TWindowHandle;
|
|
PFontHandle = ^TFontHandle;
|
|
PKeymapHandle = ^TKeymapHandle;
|
|
PVOID = Pointer;
|
|
LPVOID = Pointer;
|
|
LPCVOID = Pointer;
|
|
LPBOOL = ^BOOL;
|
|
PLONG = ^LONG;
|
|
LPLONG = ^LONG;
|
|
LPDWORD = ^DWORD;
|
|
PUINT = ^UINT;
|
|
PUCHAR = ^UCHAR;
|
|
PUSHORT = ^USHORT;
|
|
PULONG = ^ULONG;
|
|
INT_PTR = PtrInt;
|
Integer |
UINT_PTR = PtrUInt;
|
LongWord |
LONG_PTR = PtrInt;
|
LongInt |
ULONG_PTR = PtrUInt;
|
LongWord |
DWORD_PTR = ULONG_PTR;
|
|
PDWORD_PTR = ^DWORD_PTR;
|
|
TFarProc = Pointer;
|
Method types
TGetLastError = function:LongWord;
|
|
TSetLastError = procedure(LastError:LongWord);
|
Color format32 (Generic)
PColorFormat32 = ^TColorFormat32;
TColorFormat32 = packed record
case Integer of
|
|
0:(A:Byte;
|
|
B:Byte;
|
|
C:Byte;
|
|
D:Byte);
|
|
1:(Value:LongWord);
|
|
case Integer of
|
|
0:(D:Byte;
|
|
C:Byte;
|
|
B:Byte;
|
|
A:Byte);
|
|
1:(Value:LongWord);
|
Color format24 (Generic)
PColorFormat24 = ^TColorFormat24;
TColorFormat24 = packed record
A:Byte;
|
|
B:Byte;
|
|
C:Byte;
|
|
C:Byte;
|
|
B:Byte;
|
|
A:Byte;
|
Color format16 (Generic)
PColorFormat16 = ^TColorFormat16;
TColorFormat16 = packed record
Value:Word;
|
Color format8 (Generic)
PColorFormat8 = ^TColorFormat8;
TColorFormat8 = packed record
Value:Byte;
|
Color formatARGB32 (RGB)
PColorFormatARGB32 = ^TColorFormatARGB32;
TColorFormatARGB32 = packed record
Alpha:Byte;
|
|
Red:Byte;
|
|
Green:Byte;
|
|
Blue:Byte;
|
|
Blue:Byte;
|
|
Green:Byte;
|
|
Red:Byte;
|
|
Alpha:Byte;
|
Color formatRGBA32 (RGB)
PColorFormatRGBA32 = ^TColorFormatRGBA32;
TColorFormatRGBA32 = packed record
Red:Byte;
|
|
Green:Byte;
|
|
Blue:Byte;
|
|
Alpha:Byte;
|
|
Alpha:Byte;
|
|
Blue:Byte;
|
|
Green:Byte;
|
|
Red:Byte;
|
Color formatRGB24 (RGB)
PColorFormatRGB24 = ^TColorFormatRGB24;
TColorFormatRGB24 = packed record
Red:Byte;
|
|
Green:Byte;
|
|
Blue:Byte;
|
|
Blue:Byte;
|
|
Green:Byte;
|
|
Red:Byte;
|
Color formatABGR32 (BGR)
PColorFormatABGR32 = ^TColorFormatABGR32;
TColorFormatABGR32 = packed record
Alpha:Byte;
|
|
Blue:Byte;
|
|
Green:Byte;
|
|
Red:Byte;
|
|
Red:Byte;
|
|
Green:Byte;
|
|
Blue:Byte;
|
|
Alpha:Byte;
|
Color formatBGRA32 (BGR)
PColorFormatBGRA32 = ^TColorFormatBGRA32;
TColorFormatBGRA32 = packed record
Blue:Byte;
|
|
Green:Byte;
|
|
Red:Byte;
|
|
Alpha:Byte;
|
|
Alpha:Byte;
|
|
Red:Byte;
|
|
Green:Byte;
|
|
Blue:Byte;
|
Display settings
TDisplaySettings = record
DisplayNumber:LongWord;
|
|
Width:LongWord;
|
|
Height:LongWord;
|
|
Depth:LongWord;
|
|
Pitch:LongWord;
|
|
VirtualWidth:LongWord;
|
|
VirtualHeight:LongWord;
|
|
VirtualWidthOffset:LongWord;
|
|
VirtualHeightOffset:LongWord;
|
|
FramebufferAddress:PtrUInt;
|
Color formatBGR24 (BGR)
PColorFormatBGR24 = ^TColorFormatBGR24;
TColorFormatBGR24 = packed record
Blue:Byte;
|
|
Green:Byte;
|
|
Red:Byte;
|
|
Red:Byte;
|
|
Green:Byte;
|
|
Blue:Byte;
|
Boolean types
BOOL = ByteBool;
|
LongBool; (Compatible with built in GCC _Bool type) |
Signed types
INT = Integer;
|
|
LONG = LongInt;
|
Unsigned types
UINT = LongWord;
|
|
UCHAR = Byte;
|
|
USHORT = Word;
|
|
ULONG = LongWord;
|
64bit types
LONGLONG = Int64;
|
|
ULONGLONG = UInt64;
|
|
DWORDLONG = ULONGLONG;
|
Size types
SIZE_T = SizeUInt;
|
ULONG_PTR; |
SSIZE_T = SizeInt;
|
LONG_PTR; |
String types
LPSTR = ^CHAR;
|
|
LPCSTR = ^CHAR;
|
Wide string types
WCHAR = WideChar;
|
|
PWCHAR = ^WCHAR;
|
|
LPWSTR = ^WCHAR;
|
|
LPCWSTR = ^WCHAR;
|
Parameter types
WPARAM = UINT_PTR;
|
|
LPARAM = LONG_PTR;
|
|
LRESULT = LONG_PTR;
|
Procedure types
FARPROC = function: Integer;
|
C types
int8_t = Shortint;
|
|
pint8_t = PShortint;
|
|
uint8_t = Byte;
|
|
puint8_t = PByte;
|
|
int16_t = Smallint;
|
|
pint16_t = PSmallint;
|
|
uint16_t = Word;
|
|
puint16_t = PWord;
|
|
int32_t = LongInt;
|
|
pint32_t = PLongInt;
|
|
uint32_t = LongWord;
|
|
puint32_t = PLongWord;
|
|
int64_t = Int64;
|
|
pint64_t = PInt64;
|
|
uint64_t = QWord;
|
|
puint64_t = PQWord;
|
|
float_t = Single;
|
|
pfloat_t = PSingle;
|
|
double_t = Double;
|
|
pdouble_t = PDouble;
|
Atomic types
patomic_t = ^atomic_t;
atomic_t = record
counter: LongInt;
|
Atomic64 types
patomic64_t = ^atomic64_t;
atomic64_t = record
counter: Int64;
|
Socket types
TSocket = UINT_PTR;
|
WSA event
WSAEVENT = THandle;
|
Overlapped structure types
OVERLAPPED = _OVERLAPPED;
TOverlapped = OVERLAPPED;
POverlapped = LPOVERLAPPED;
LPOVERLAPPED = ^OVERLAPPED;
_OVERLAPPED = record
Internal: ULONG_PTR;
|
|
InternalHigh: ULONG_PTR;
|
|
Union: record
|
|
case Integer of
|
|
0: (
|
|
Offset: DWORD;
|
|
OffsetHigh: DWORD);
|
|
1: (
|
|
Pointer: PVOID);
|
|
hEvent: HANDLE;
|
Public variables
None defined
Function declarations
None defined
Return to Unit Reference