Skip to content

Commit 5dcd77e

Browse files
committed
Add OS/2 and Haiku-related definitions to sdlsyswm.inc
1 parent d5b0117 commit 5dcd77e

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

sdlsyswm.inc

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222
{$DEFINE SDL_VIDEO_DRIVER_VIVANTE}
2323
{$ENDIF}
2424

25+
{$IFDEF OS2}
26+
{$DEFINE SDL_VIDEO_DRIVER_OS2}
27+
{$ENDIF}
28+
29+
{$IFDEF HAIKU}
30+
{$DEFINE SDL_VIDEO_DRIVER_HAIKU}
31+
{$ENDIF}
32+
2533

2634
{**
2735
* These are the various supported windowing subsystems
@@ -34,19 +42,21 @@ Type
3442
SDL_SYSWM_DIRECTFB,
3543
SDL_SYSWM_COCOA,
3644
SDL_SYSWM_UIKIT,
37-
SDL_SYSWM_WAYLAND, // Since SDL 2.0.2
45+
SDL_SYSWM_WAYLAND, // Since SDL 2.0.2 - REMOVED in SDL 2.0.10!
3846
SDL_SYSWM_MIR, // Since SDL 2.0.2
3947
SDL_SYSWM_WINRT, // Since SDL 2.0.3
4048
SDL_SYSWM_ANDROID, // Since SDL 2.0.4
41-
SDL_SYSWM_VIVANTE // Since SDL 2.0.5
49+
SDL_SYSWM_VIVANTE, // Since SDL 2.0.5
50+
SDL_SYSWM_OS2, // Since SDL 2.0.6
51+
SDL_SYSWM_HAIKU // Since SDL 2.0.12
4252
);
4353

4454
/// sdl_syswm.h uses anonymous structs, declared right in SDL_SysWMmsg and SDL_SysWMinfo.
4555
/// Since Pascal does not allow this, we workaround by introducing named types.
4656
{$IFDEF SDL_VIDEO_DRIVER_WINDOWS}
4757
__SYSWM_WINDOWS = record
4858
hwnd: HWND; {**< The window for the message }
49-
msg: uInt; {**< The type of message *}
59+
msg: uInt; {**< The type of message *}
5060
wParam: WPARAM; {**< WORD message parameter *}
5161
lParam: LPARAM; {**< WORD message parameter *}
5262
end;
@@ -139,6 +149,20 @@ Type
139149
end;
140150
{$ENDIF}
141151

152+
{$IFDEF SDL_VIDEO_DRIVER_OS2}
153+
__SYSWM_OS2 = record
154+
fFrame: Boolean; {**< TRUE if hwnd is a frame window *}
155+
hwnd: HWND; {**< The window receiving the message *}
156+
msg: uInt; {**< The message identifier *}
157+
mp1: MPARAM; {**< The first first message parameter *}
158+
mp2: MPARAM; {**< The second first message parameter *}
159+
end;
160+
__WMINFO_OS2 = record
161+
hwnd: HWND; {**< The window handle *}
162+
hwndFrame: HWND; {**< The frame window handle *}
163+
end;
164+
{$ENDIF}
165+
142166

143167
{**
144168
* The custom event structure.
@@ -165,6 +189,9 @@ Type
165189
{$IFDEF SDL_VIDEO_DRIVER_VIVANTE}
166190
SDL_SYSWM_VIVANTE: (vivante: __SYSWM_VIVANTE);
167191
{$ENDIF}
192+
{$IFDEF SDL_VIDEO_DRIVER_OS2}
193+
SDL_SYSWM_OS2: (os2: __SYSWM_OS2);
194+
{$ENDIF}
168195
SDL_SYSWM_UNKNOWN: (dummy: integer);
169196
end;
170197

@@ -208,6 +235,9 @@ Type
208235
{$IFDEF SDL_VIDEO_DRIVER_VIVANTE}
209236
SDL_SYSWM_VIVANTE: (vivante: __WMINFO_VIVANTE);
210237
{$ENDIF}
238+
{$IFDEF SDL_VIDEO_DRIVER_OS2}
239+
SDL_SYSWM_OS2: (os2: __WMINFO_OS2);
240+
{$ENDIF}
211241
(* Ensure this union is always 64 bytes (8 64-bit pointers) *)
212242
SDL_SYSWM_UNKNOWN: (dummy: array[0..63] of Byte);
213243
end;

0 commit comments

Comments
 (0)