Skip to content

Commit

Permalink
feat(glfw) add WAYLAND_LIBDECOR
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Mar 29, 2023
1 parent 410abf8 commit f72c9a4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc/notes/3.3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This build includes the following changes:
- bgfx: Updated to API version 118 (up from 115)
- CUDA: Updated to 12.1.0 (up from 11.5.0)
- glfw: Updated to latest 3.3.8 (up from 3.3.6)
* Added `GLFW_WAYLAND_LIBDECOR`, `GLFW_WAYLAND_PREFER_LIBDECOR` and `GLFW_WAYLAND_DISABLE_LIBDECOR`.
* Added `GLFW_CURSOR_CAPTURED`.
* Added `GLFW_WAYLAND_APP_ID`.
* Added `GLFW_POSITION_X`, `GLFW_POSITION_Y` and `GLFW_ANY_POSITION`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,9 @@ public static SharedLibrary getLibrary() {
/** X11 specific init hint. */
public static final int GLFW_X11_XCB_VULKAN_SURFACE = 0x52001;

/** Wayland specific init hint. */
public static final int GLFW_WAYLAND_LIBDECOR = 0x53001;

/** Hint value for {@link #GLFW_PLATFORM PLATFORM} that enables automatic platform selection. */
public static final int
GLFW_ANY_PLATFORM = 0x60000,
Expand Down Expand Up @@ -1027,6 +1030,11 @@ public static SharedLibrary getLibrary() {
GLFW_ANGLE_PLATFORM_TYPE_VULKAN = 0x37007,
GLFW_ANGLE_PLATFORM_TYPE_METAL = 0x37008;

/** Values for the {@link #GLFW_WAYLAND_LIBDECOR WAYLAND_LIBDECOR} hint. */
public static final int
GLFW_WAYLAND_PREFER_LIBDECOR = 0x38001,
GLFW_WAYLAND_DISABLE_LIBDECOR = 0x38002;

protected GLFW() {
throw new UnsupportedOperationException();
}
Expand Down
17 changes: 14 additions & 3 deletions modules/lwjgl/glfw/src/templates/kotlin/glfw/templates/GLFW.kt
Original file line number Diff line number Diff line change
Expand Up @@ -726,13 +726,17 @@ val GLFW = "GLFW".nativeClass(Module.GLFW, prefix = "GLFW", binding = GLFW_BINDI
)

IntConstant(
"""
X11 specific init hint.
""",
"X11 specific init hint.",

"X11_XCB_VULKAN_SURFACE"..0x00052001
)

IntConstant(
"Wayland specific init hint.",

"WAYLAND_LIBDECOR"..0x00053001
)

IntConstant(
"Hint value for #PLATFORM that enables automatic platform selection.",

Expand Down Expand Up @@ -1024,6 +1028,13 @@ val GLFW = "GLFW".nativeClass(Module.GLFW, prefix = "GLFW", binding = GLFW_BINDI
"ANGLE_PLATFORM_TYPE_METAL"..0x00037008
)

IntConstant(
"Values for the #WAYLAND_LIBDECOR hint.",

"WAYLAND_PREFER_LIBDECOR"..0x00038001,
"WAYLAND_DISABLE_LIBDECOR"..0x00038002
)

Code(
javaInit = statement("$t${t}EventLoop.check();")
)..intb(
Expand Down

0 comments on commit f72c9a4

Please sign in to comment.