Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
globaltypes.h
Go to the documentation of this file.
1/*
2 * This file is part of the Ultibo project, https://ultibo.org/
3 *
4 * The MIT License (MIT)
5 *
6 * Copyright (c) 2025 Garry Wood <garry@softoz.com.au>
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 */
26#ifndef _ULTIBO_GLOBALTYPES_H
27#define _ULTIBO_GLOBALTYPES_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include <stdint.h>
34#include <stddef.h>
35#include <stdbool.h>
36#include <math.h>
37
38#include <sys/types.h>
39#include <sys/time.h>
40
42#ifdef __i386__
43#define STDCALL __stdcall
44#else
45#define STDCALL
46#endif
47
48#define PACKED __attribute__((__packed__))
49
51typedef size_t HANDLE;
52
53typedef uint32_t DWORD;
54
55typedef _Bool BOOL;
56typedef int32_t LONGBOOL;
57
58typedef wchar_t WCHAR;
59
60typedef size_t SOCKET;
61
63
64typedef void *FARPROC; //To Do //
65
66#define TRUE -1
67#define FALSE 0
68
70typedef struct _OVERLAPPED OVERLAPPED;
72{
73 size_t Internal;
75 union
76 {
77 struct
78 {
81 };
82 void *Pointer;
83 };
85};
86
90{
91 uint32_t displaynumber;
92 uint32_t width;
93 uint32_t height;
94 uint32_t depth;
95 uint32_t pitch;
96 uint32_t virtualwidth;
97 uint32_t virtualheight;
101};
102
118
124
125
126#ifdef __cplusplus
127}
128#endif
129
130#endif // _ULTIBO_GLOBALTYPES_H
void * FARPROC
Definition globaltypes.h:64
HANDLE EVENT_HANDLE
Definition globaltypes.h:117
HANDLE WINDOW_HANDLE
Definition globaltypes.h:121
struct _DISPLAY_SETTINGS DISPLAY_SETTINGS
Definition globaltypes.h:88
HANDLE CRITICAL_SECTION_HANDLE
Definition globaltypes.h:106
int32_t LONGBOOL
Compatibility with FPC LongBool type (4 bytes).
Definition globaltypes.h:56
HANDLE MESSAGESLOT_HANDLE
Definition globaltypes.h:114
size_t HANDLE
Definition globaltypes.h:51
HANDLE CONDITION_HANDLE
Definition globaltypes.h:109
HANDLE KEYMAP_HANDLE
Definition globaltypes.h:123
HANDLE WSAEVENT
Definition globaltypes.h:62
HANDLE SPIN_HANDLE
Definition globaltypes.h:104
HANDLE WORKER_HANDLE
Definition globaltypes.h:120
HANDLE MAILSLOT_HANDLE
Definition globaltypes.h:115
_Bool BOOL
Built in Boolean type (1 byte) (Redeclared here for flexibility).
Definition globaltypes.h:55
HANDLE THREAD_HANDLE
Definition globaltypes.h:113
HANDLE SEMAPHORE_HANDLE
Definition globaltypes.h:107
struct _OVERLAPPED OVERLAPPED
Definition globaltypes.h:70
wchar_t WCHAR
Standard WideChar type (2 bytes) (Redeclared here for flexibility).
Definition globaltypes.h:58
HANDLE BUFFER_HANDLE
Definition globaltypes.h:116
HANDLE COMPLETION_HANDLE
Definition globaltypes.h:110
HANDLE LIST_HANDLE
Definition globaltypes.h:111
uint32_t DWORD
Definition globaltypes.h:53
HANDLE TIMER_HANDLE
Definition globaltypes.h:119
size_t SOCKET
Definition globaltypes.h:60
HANDLE QUEUE_HANDLE
Definition globaltypes.h:112
HANDLE FONT_HANDLE
Definition globaltypes.h:122
HANDLE SYNCHRONIZER_HANDLE
Definition globaltypes.h:108
HANDLE MUTEX_HANDLE
Definition globaltypes.h:105
Definition globaltypes.h:90
uint32_t virtualwidth
Definition globaltypes.h:96
uint32_t displaynumber
Definition globaltypes.h:91
uint32_t pitch
Definition globaltypes.h:95
uint32_t width
Definition globaltypes.h:92
uint32_t virtualheightoffset
Definition globaltypes.h:99
uint32_t virtualwidthoffset
Definition globaltypes.h:98
uint32_t height
Definition globaltypes.h:93
size_t framebufferaddress
Definition globaltypes.h:100
uint32_t virtualheight
Definition globaltypes.h:97
uint32_t depth
Definition globaltypes.h:94
Definition globaltypes.h:72
size_t Internal
Definition globaltypes.h:73
size_t InternalHigh
Definition globaltypes.h:74
HANDLE hEvent
Definition globaltypes.h:84
void * Pointer
Definition globaltypes.h:82
DWORD Offset
Definition globaltypes.h:79
DWORD OffsetHigh
Definition globaltypes.h:80