Skip to content

Commit

Permalink
feat(sdl) update to 3.1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Jan 18, 2025
1 parent aa6f315 commit 327b77e
Show file tree
Hide file tree
Showing 16 changed files with 111 additions and 25 deletions.
13 changes: 13 additions & 0 deletions modules/lwjgl/sdl/src/generated/java/org/lwjgl/sdl/SDLAudio.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ private Functions() {}
ClearAudioStream = apiGetFunctionAddress(SDL.getLibrary(), "SDL_ClearAudioStream"),
PauseAudioStreamDevice = apiGetFunctionAddress(SDL.getLibrary(), "SDL_PauseAudioStreamDevice"),
ResumeAudioStreamDevice = apiGetFunctionAddress(SDL.getLibrary(), "SDL_ResumeAudioStreamDevice"),
AudioStreamDevicePaused = apiGetFunctionAddress(SDL.getLibrary(), "SDL_AudioStreamDevicePaused"),
LockAudioStream = apiGetFunctionAddress(SDL.getLibrary(), "SDL_LockAudioStream"),
UnlockAudioStream = apiGetFunctionAddress(SDL.getLibrary(), "SDL_UnlockAudioStream"),
SetAudioStreamGetCallback = apiGetFunctionAddress(SDL.getLibrary(), "SDL_SetAudioStreamGetCallback"),
Expand Down Expand Up @@ -761,6 +762,18 @@ public static boolean SDL_ResumeAudioStreamDevice(@NativeType("SDL_AudioStream *
return invokePZ(stream, __functionAddress);
}

// --- [ SDL_AudioStreamDevicePaused ] ---

/** {@code bool SDL_AudioStreamDevicePaused(SDL_AudioStream * stream)} */
@NativeType("bool")
public static boolean SDL_AudioStreamDevicePaused(@NativeType("SDL_AudioStream *") long stream) {
long __functionAddress = Functions.AudioStreamDevicePaused;
if (CHECKS) {
check(stream);
}
return invokePZ(stream, __functionAddress);
}

// --- [ SDL_LockAudioStream ] ---

/** {@code bool SDL_LockAudioStream(SDL_AudioStream * stream)} */
Expand Down
21 changes: 15 additions & 6 deletions modules/lwjgl/sdl/src/generated/java/org/lwjgl/sdl/SDLGPU.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,21 @@ private Functions() {}
SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING = "SDL.gpu.device.create.d3d12.semantic";

public static final String
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_R_FLOAT = "SDL.gpu.createtexture.d3d12.clear.r",
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_G_FLOAT = "SDL.gpu.createtexture.d3d12.clear.g",
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_B_FLOAT = "SDL.gpu.createtexture.d3d12.clear.b",
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_A_FLOAT = "SDL.gpu.createtexture.d3d12.clear.a",
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_DEPTH_FLOAT = "SDL.gpu.createtexture.d3d12.clear.depth",
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_STENCIL_UINT8 = "SDL.gpu.createtexture.d3d12.clear.stencil";
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_R_FLOAT = "SDL.gpu.texture.create.d3d12.clear.r",
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_G_FLOAT = "SDL.gpu.texture.create.d3d12.clear.g",
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_B_FLOAT = "SDL.gpu.texture.create.d3d12.clear.b",
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_A_FLOAT = "SDL.gpu.texture.create.d3d12.clear.a",
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_DEPTH_FLOAT = "SDL.gpu.texture.create.d3d12.clear.depth",
SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_STENCIL_UINT8 = "SDL.gpu.texture.create.d3d12.clear.stencil";

public static final String
SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING = "SDL.gpu.computepipeline.create.name",
SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING = "SDL.gpu.graphicspipeline.create.name",
SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING = "SDL.gpu.sampler.create.name",
SDL_PROP_GPU_SHADER_CREATE_NAME_STRING = "SDL.gpu.shader.create.name",
SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING = "SDL.gpu.texture.create.name",
SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING = "SDL.gpu.buffer.create.name",
SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING = "SDL.gpu.transferbuffer.create.name";

protected SDLGPU() {
throw new UnsupportedOperationException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ private Functions() {}
SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK = "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK",
SDL_HINT_VIDEO_FORCE_EGL = "SDL_VIDEO_FORCE_EGL",
SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES = "SDL_VIDEO_MAC_FULLSCREEN_SPACES",
SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY = "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY",
SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS",
SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES = "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES",
SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS = "SDL_VIDEO_SYNC_WINDOW_OPERATIONS",
Expand Down Expand Up @@ -269,7 +270,9 @@ private Functions() {}
SDL_HINT_X11_WINDOW_TYPE = "SDL_X11_WINDOW_TYPE",
SDL_HINT_X11_XCB_LIBRARY = "SDL_X11_XCB_LIBRARY",
SDL_HINT_XINPUT_ENABLED = "SDL_XINPUT_ENABLED",
SDL_HINT_ASSERT = "SDL_ASSERT";
SDL_HINT_ASSERT = "SDL_ASSERT",
SDL_HINT_PEN_MOUSE_EVENTS = "SDL_PEN_MOUSE_EVENTS",
SDL_HINT_PEN_TOUCH_EVENTS = "SDL_PEN_TOUCH_EVENTS";

public static final int
SDL_HINT_DEFAULT = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

public class SDLKeycode {

public static final int SDLK_EXTENDED_MASK = 1 << 29;

public static final int SDLK_SCANCODE_MASK = 1 << 30;

public static final int
Expand Down Expand Up @@ -263,12 +265,20 @@ public class SDLKeycode {
SDLK_SOFTLEFT = 0x4000011F,
SDLK_SOFTRIGHT = 0x40000120,
SDLK_CALL = 0x40000121,
SDLK_ENDCALL = 0x40000122;
SDLK_ENDCALL = 0x40000122,
SDLK_LEFT_TAB = 0x20000001,
SDLK_LEVEL5_SHIFT = 0x20000002,
SDLK_MULTI_KEY_COMPOSE = 0x20000003,
SDLK_LMETA = 0x20000004,
SDLK_RMETA = 0x20000005,
SDLK_LHYPER = 0x20000006,
SDLK_RHYPER = 0x20000007;

public static final int
SDL_KMOD_NONE = 0x0000,
SDL_KMOD_LSHIFT = 0x0001,
SDL_KMOD_RSHIFT = 0x0002,
SDL_KMOD_LEVEL5 = 0x0004,
SDL_KMOD_LCTRL = 0x0040,
SDL_KMOD_RCTRL = 0x0080,
SDL_KMOD_LALT = 0x0100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

public final class SDLPen {

public static final int SDL_PEN_MOUSEID = -2;

public static final long SDL_PEN_TOUCHID = -2L;

public static final int
SDL_PEN_INPUT_DOWN = (1 << 0),
SDL_PEN_INPUT_BUTTON_1 = (1 << 1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ private Functions() {}
SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE = 1,
SDL_TOUCH_DEVICE_INDIRECT_RELATIVE = 2;

public static final int
SDL_TOUCH_MOUSEID = -1,
SDL_MOUSE_TOUCHID = -1;
public static final int SDL_TOUCH_MOUSEID = -1;

public static final long SDL_MOUSE_TOUCHID = -1L;

protected SDLTouch() {
throw new UnsupportedOperationException();
Expand Down
12 changes: 12 additions & 0 deletions modules/lwjgl/sdl/src/generated/java/org/lwjgl/sdl/SDLTray.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ private Functions() {}
SetTrayEntryEnabled = apiGetFunctionAddress(SDL.getLibrary(), "SDL_SetTrayEntryEnabled"),
GetTrayEntryEnabled = apiGetFunctionAddress(SDL.getLibrary(), "SDL_GetTrayEntryEnabled"),
SetTrayEntryCallback = apiGetFunctionAddress(SDL.getLibrary(), "SDL_SetTrayEntryCallback"),
ClickTrayEntry = apiGetFunctionAddress(SDL.getLibrary(), "SDL_ClickTrayEntry"),
DestroyTray = apiGetFunctionAddress(SDL.getLibrary(), "SDL_DestroyTray"),
GetTrayEntryParent = apiGetFunctionAddress(SDL.getLibrary(), "SDL_GetTrayEntryParent"),
GetTrayMenuParentEntry = apiGetFunctionAddress(SDL.getLibrary(), "SDL_GetTrayMenuParentEntry"),
Expand Down Expand Up @@ -371,6 +372,17 @@ public static void SDL_SetTrayEntryCallback(@NativeType("SDL_TrayEntry *") long
nSDL_SetTrayEntryCallback(entry, memAddressSafe(callback), userdata);
}

// --- [ SDL_ClickTrayEntry ] ---

/** {@code void SDL_ClickTrayEntry(SDL_TrayEntry * entry)} */
public static void SDL_ClickTrayEntry(@NativeType("SDL_TrayEntry *") long entry) {
long __functionAddress = Functions.ClickTrayEntry;
if (CHECKS) {
check(entry);
}
invokePV(entry, __functionAddress);
}

// --- [ SDL_DestroyTray ] ---

/** {@code void SDL_DestroyTray(SDL_Tray * tray)} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private Functions() {}

public static final int SDL_MINOR_VERSION = 1;

public static final int SDL_MICRO_VERSION = 8;
public static final int SDL_MICRO_VERSION = 10;

public static final int SDL_VERSION = SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ val SDL_audio = "SDLAudio".nativeClassSDL("SDL_audio") {
SDL_AudioStream.p("stream")
)

bool(
"AudioStreamDevicePaused",

SDL_AudioStream.p("stream")
)

bool(
"LockAudioStream",

Expand Down
22 changes: 16 additions & 6 deletions modules/lwjgl/sdl/src/templates/kotlin/sdl/templates/SDL_gpu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,22 @@ val SDL_gpu = "SDLGPU".nativeClassSDL("SDL_gpu") {
)

StringConstant(
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_R_FLOAT".."SDL.gpu.createtexture.d3d12.clear.r",
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_G_FLOAT".."SDL.gpu.createtexture.d3d12.clear.g",
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_B_FLOAT".."SDL.gpu.createtexture.d3d12.clear.b",
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_A_FLOAT".."SDL.gpu.createtexture.d3d12.clear.a",
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_DEPTH_FLOAT".."SDL.gpu.createtexture.d3d12.clear.depth",
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_STENCIL_UINT8".."SDL.gpu.createtexture.d3d12.clear.stencil"
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_R_FLOAT".."SDL.gpu.texture.create.d3d12.clear.r",
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_G_FLOAT".."SDL.gpu.texture.create.d3d12.clear.g",
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_B_FLOAT".."SDL.gpu.texture.create.d3d12.clear.b",
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_A_FLOAT".."SDL.gpu.texture.create.d3d12.clear.a",
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_DEPTH_FLOAT".."SDL.gpu.texture.create.d3d12.clear.depth",
"PROP_GPU_CREATETEXTURE_D3D12_CLEAR_STENCIL_UINT8".."SDL.gpu.texture.create.d3d12.clear.stencil"
)

StringConstant(
"PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING".."SDL.gpu.computepipeline.create.name",
"PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING".."SDL.gpu.graphicspipeline.create.name",
"PROP_GPU_SAMPLER_CREATE_NAME_STRING".."SDL.gpu.sampler.create.name",
"PROP_GPU_SHADER_CREATE_NAME_STRING".."SDL.gpu.shader.create.name",
"PROP_GPU_TEXTURE_CREATE_NAME_STRING".."SDL.gpu.texture.create.name",
"PROP_GPU_BUFFER_CREATE_NAME_STRING".."SDL.gpu.buffer.create.name",
"PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING".."SDL.gpu.transferbuffer.create.name"
)

bool(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ val SDL_hints = "SDLHints".nativeClassSDL("SDL_hints") {
"HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK".."SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK",
"HINT_VIDEO_FORCE_EGL".."SDL_VIDEO_FORCE_EGL",
"HINT_VIDEO_MAC_FULLSCREEN_SPACES".."SDL_VIDEO_MAC_FULLSCREEN_SPACES",
"HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY".."SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY",
"HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS".."SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS",
"HINT_VIDEO_OFFSCREEN_SAVE_FRAMES".."SDL_VIDEO_OFFSCREEN_SAVE_FRAMES",
"HINT_VIDEO_SYNC_WINDOW_OPERATIONS".."SDL_VIDEO_SYNC_WINDOW_OPERATIONS",
Expand Down Expand Up @@ -240,7 +241,9 @@ val SDL_hints = "SDLHints".nativeClassSDL("SDL_hints") {
"HINT_X11_WINDOW_TYPE".."SDL_X11_WINDOW_TYPE",
"HINT_X11_XCB_LIBRARY".."SDL_X11_XCB_LIBRARY",
"HINT_XINPUT_ENABLED".."SDL_XINPUT_ENABLED",
"HINT_ASSERT".."SDL_ASSERT"
"HINT_ASSERT".."SDL_ASSERT",
"HINT_PEN_MOUSE_EVENTS".."SDL_PEN_MOUSE_EVENTS",
"HINT_PEN_TOUCH_EVENTS".."SDL_PEN_TOUCH_EVENTS"
)

EnumConstant(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.lwjgl.generator.*
import sdl.*

val SDL_keycode = "SDLKeycode".nativeClassSDL("SDL_keycode") {
IntConstant("SDLK_EXTENDED_MASK".."1 << 29").noPrefix()
IntConstant("SDLK_SCANCODE_MASK".."1 << 30").noPrefix()

IntConstant(
Expand Down Expand Up @@ -259,13 +260,21 @@ val SDL_keycode = "SDLKeycode".nativeClassSDL("SDL_keycode") {
"SDLK_SOFTLEFT"..0x4000011f,
"SDLK_SOFTRIGHT"..0x40000120,
"SDLK_CALL"..0x40000121,
"SDLK_ENDCALL"..0x40000122
"SDLK_ENDCALL"..0x40000122,
"SDLK_LEFT_TAB"..0x20000001,
"SDLK_LEVEL5_SHIFT"..0x20000002,
"SDLK_MULTI_KEY_COMPOSE"..0x20000003,
"SDLK_LMETA"..0x20000004,
"SDLK_RMETA"..0x20000005,
"SDLK_LHYPER"..0x20000006,
"SDLK_RHYPER"..0x20000007
).noPrefix()

IntConstant(
"KMOD_NONE".."0x0000",
"KMOD_LSHIFT".."0x0001",
"KMOD_RSHIFT".."0x0002",
"KMOD_LEVEL5".."0x0004",
"KMOD_LCTRL".."0x0040",
"KMOD_RCTRL".."0x0080",
"KMOD_LALT".."0x0100",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import org.lwjgl.generator.*
import sdl.*

val SDL_pen = "SDLPen".nativeClassSDL("SDL_pen") {
IntConstant("PEN_MOUSEID".."-2")
LongConstant("PEN_TOUCHID".."-2L")

IntConstant(
"PEN_INPUT_DOWN".."(1 << 0)",
"PEN_INPUT_BUTTON_1".."(1 << 1)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ val SDL_touch = "SDLTouch".nativeClassSDL("SDL_touch") {
"TOUCH_DEVICE_INDIRECT_RELATIVE".enum
)

IntConstant(
"TOUCH_MOUSEID".."-1",
"MOUSE_TOUCHID".."-1"
)
IntConstant("TOUCH_MOUSEID".."-1")
LongConstant("MOUSE_TOUCHID".."-1L")

SDL_TouchID.p(
"GetTouchDevices",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ val SDL_tray = "SDLTray".nativeClassSDL("SDL_tray") {
nullable..opaque_p("userdata")
)

void(
"ClickTrayEntry",

SDL_TrayEntry.p("entry")
)

void(
"DestroyTray",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import sdl.*
val SDL_version = "SDLVersion".nativeClassSDL("SDL_version") {
IntConstant("MAJOR_VERSION".."3")
IntConstant("MINOR_VERSION".."1")
IntConstant("MICRO_VERSION".."8")
IntConstant("MICRO_VERSION".."10")

int("GetVersion", void())
charASCII.const.p("GetRevision", void())
Expand Down

0 comments on commit 327b77e

Please sign in to comment.