Unit GlobalTypes

From Ultibo.org
Jump to: navigation, search

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 = ^AnsiCHAR;
LPCSTR = ^AnsiCHAR;

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