moved RGFW into folder
This commit is contained in:
parent
6b89db7470
commit
7090dd645f
55
src/Makefile
55
src/Makefile
|
|
@ -115,11 +115,6 @@ USE_EXTERNAL_GLFW ?= FALSE
|
|||
GLFW_LINUX_ENABLE_WAYLAND ?= FALSE
|
||||
GLFW_LINUX_ENABLE_X11 ?= TRUE
|
||||
|
||||
# Enable support for X11 by default on Linux when using GLFW
|
||||
# NOTE: Wayland is disabled by default, only enable if you are sure
|
||||
RGFW_LINUX_ENABLE_WAYLAND ?= FALSE
|
||||
RGFW_LINUX_ENABLE_X11 ?= TRUE
|
||||
|
||||
# PLATFORM_DESKTOP_SDL: It requires SDL library to be provided externally
|
||||
# WARNING: Library is not included in raylib, it MUST be configured by users
|
||||
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
|
||||
|
|
@ -324,17 +319,6 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
|
|||
# It seems from Android NDK r22 onwards we need to use llvm-ar
|
||||
AR = $(ANDROID_TOOLCHAIN)/bin/llvm-ar
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
|
||||
ifeq ($(PLATFORM_OS),OSX)
|
||||
# OSX default compiler
|
||||
CC = clang
|
||||
GLFW_OSX = -x objective-c
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),BSD)
|
||||
# FreeBSD, OpenBSD, NetBSD, DragonFly default compiler
|
||||
CC = clang
|
||||
endif
|
||||
endif
|
||||
|
||||
# Define compiler flags: CFLAGS
|
||||
#------------------------------------------------------------------------------------------------
|
||||
|
|
@ -488,38 +472,6 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
|
||||
ifeq ($(PLATFORM_OS), LINUX)
|
||||
ifeq ($(RGFW_LINUX_ENABLE_X11),TRUE)
|
||||
CFLAGS += -DRGFW_X11 -DRGFW_UNIX
|
||||
endif
|
||||
ifeq ($(RGFW_LINUX_ENABLE_WAYLAND),TRUE)
|
||||
CFLAGS += -DRGFW_WAYLAND -DRGFW_UNIX -DEGLAPIENTRY=
|
||||
LDFLAGS += $(shell pkg-config wayland-client wayland-cursor wayland-egl xkbcommon --libs)
|
||||
|
||||
WL_PROTOCOLS_DIR := external/RGFW/deps/wayland
|
||||
|
||||
wl_generate = \
|
||||
$(eval protocol=$(1)) \
|
||||
$(eval basename=$(2)) \
|
||||
$(shell wayland-scanner client-header $(protocol) $(RAYLIB_SRC_PATH)/$(basename).h) \
|
||||
$(shell wayland-scanner private-code $(protocol) $(RAYLIB_SRC_PATH)/$(basename)-code.h)
|
||||
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/xdg-shell.xml, xdg-shell)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/xdg-toplevel-icon-v1.xml, xdg-toplevel-icon-v1)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/wayland.xml, wayland-client-protocol)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/xdg-decoration-unstable-v1.xml, xdg-decoration-unstable-v1)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/viewporter.xml, viewporter-client-protocol)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/relative-pointer-unstable-v1.xml, relative-pointer-unstable-v1)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/pointer-constraints-unstable-v1.xml, pointer-constraints-unstable-v1)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/fractional-scale-v1.xml, fractional-scale-v1)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/xdg-activation-v1.xml, xdg-activation-v1)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/idle-inhibit-unstable-v1.xml, idle-inhibit-unstable-v1)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/xdg-output-unstable-v1.xml, xdg-output-unstable-v1)
|
||||
$(call wl_generate, $(WL_PROTOCOLS_DIR)/pointer-warp-v1.xml, pointer-warp-v1)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS += $(CUSTOM_CFLAGS)
|
||||
|
||||
|
|
@ -666,12 +618,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
|
|||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
# Libraries for Debian GNU/Linux desktop compipling
|
||||
# NOTE: Required packages: libegl1-mesa-dev
|
||||
ifeq ($(RGFW_LINUX_ENABLE_X11),TRUE)
|
||||
LDLIBS = -lGL -lX11 -lXrandr -lXinerama -lXi -lXcursor -lm -lpthread -ldl -lrt
|
||||
endif
|
||||
ifeq ($(RGFW_LINUX_ENABLE_WAYLAND),TRUE)
|
||||
LDLIBS += -lEGL $(shell pkg-config --libs wayland-client wayland-cursor wayland-egl xkbcommon --libs)
|
||||
endif
|
||||
|
||||
# Explicit link to libc
|
||||
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||
|
|
@ -684,7 +631,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
|
|||
ifeq ($(PLATFORM_OS),OSX)
|
||||
# Libraries for Debian MacOS desktop compiling
|
||||
# NOTE: Required packages: libegl1-mesa-dev
|
||||
LDLIBS = -lm -framework Foundation -framework AppKit -framework IOKit -framework OpenGL -framework CoreVideo
|
||||
LDLIBS += -lm -framework Foundation -framework AppKit -framework IOKit -framework OpenGL -framework CoreVideo
|
||||
endif
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
||||
|
|
|
|||
419
src/external/RGFW/Makefile
vendored
Normal file
419
src/external/RGFW/Makefile
vendored
Normal file
|
|
@ -0,0 +1,419 @@
|
|||
# CUSTOM ARGS :
|
||||
# WAYLAND=1 -> use wayland
|
||||
# WAYLAND_X11=1 -> use wayland AND X11
|
||||
# NO_VULKAN=1 -> do not compile the vulkan example
|
||||
# NO_GLES=1 -> do not compile the gles example (on by default for non-linux OSes)
|
||||
# NO_OSMESA=1 -> do not compile the osmesa example (on by default for non-linux OSes)
|
||||
|
||||
CC ?= gcc
|
||||
AR ?= ar
|
||||
|
||||
# used for compiling RGFW.o
|
||||
CUSTOM_CFLAGS =
|
||||
# used for the examples
|
||||
CFLAGS =
|
||||
CFLAGS += -g3
|
||||
|
||||
ifdef RGFW_C89
|
||||
CUSTOM_CFLAGS += -std=c89 -Wno-declaration-after-statement -Wall -Wextra -Wpedantic
|
||||
endif
|
||||
|
||||
DX11_LIBS = -static -lgdi32 -ldxgi -ld3d11 -luuid -ld3dcompiler
|
||||
VULKAN_LIBS = -lgdi32 -I $(VULKAN_SDK)\Include -L $(VULKAN_SDK)\Lib -lvulkan-1
|
||||
LIBS := -static -lgdi32
|
||||
LINK_GL1 = -lopengl32
|
||||
EXT = .exe
|
||||
LIB_EXT = .dll
|
||||
|
||||
ifneq ($(CC),zig cc)
|
||||
LIBS += -D _WIN32_WINNT=0x0501
|
||||
endif
|
||||
|
||||
OS_DIR = \\
|
||||
|
||||
NO_OSMESA = 1
|
||||
NO_GLES = 1
|
||||
NO_EGL = 1
|
||||
detected_OS = windows
|
||||
|
||||
OBJ_FILE = .o
|
||||
|
||||
ifeq ($(WAYLAND_ONLY), 1)
|
||||
WAYLAND = 1
|
||||
endif
|
||||
|
||||
ifeq ($(WAYLAND_X11), 1)
|
||||
WAYLAND = 1
|
||||
endif
|
||||
|
||||
# not using a cross compiler
|
||||
ifeq (,$(filter $(CC),x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc x86_64-w64-mingw32-g++ /opt/msvc/bin/x64/cl.exe /opt/msvc/bin/x86/cl.exe))
|
||||
detected_OS := $(shell uname 2>/dev/null || echo Unknown)
|
||||
|
||||
ifeq ($(detected_OS),Darwin) # Mac OS X
|
||||
DX11_LIBS =
|
||||
LIBS := -framework CoreVideo -framework Cocoa -framework OpenGL -framework IOKit
|
||||
LINK_GL1 = -framework OpenGL
|
||||
VULKAN_LIBS = $(LIBS) -lvulkan
|
||||
EXT =
|
||||
LIB_EXT = .dylib
|
||||
OS_DIR = /
|
||||
NO_VULKAN ?= 1
|
||||
endif
|
||||
ifeq ($(detected_OS),Linux)
|
||||
DX11_LIBS =
|
||||
LINK_GL1 = -lGL
|
||||
|
||||
ifneq ($(WAYLAND_ONLY), 1)
|
||||
LIBS = -lXrandr -lX11 -ldl -lpthread -lm
|
||||
else
|
||||
LIBS =
|
||||
endif
|
||||
|
||||
VULKAN_LIBS = $(LIBS) -lvulkan
|
||||
EXT =
|
||||
LIB_EXT = .so
|
||||
OS_DIR = /
|
||||
NO_GLES = 0
|
||||
NO_EGL = 0
|
||||
endif
|
||||
ifeq ($(detected_OS),NetBSD)
|
||||
DX11_LIBS =
|
||||
LINK_GL1 = -lGL
|
||||
CUSTOM_CFLAGS += -I/usr/pkg/include -I/usr/X11R7/include -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R7/lib -L/usr/pkg/lib -L/usr/X11R7/lib
|
||||
LIBS := $(CUSTOM_CFLAGS) -lXrandr -lX11 -lpthread -lm
|
||||
VULKAN_LIBS = $(LIBS) -lvulkan
|
||||
EXT =
|
||||
LIB_EXT = .so
|
||||
OS_DIR = /
|
||||
NO_GLES = 0
|
||||
NO_EGL = 0
|
||||
NO_VULKAN = 1
|
||||
endif
|
||||
|
||||
ifeq (,$(filter $(detected_OS),Linux Darwin NetBSD))
|
||||
detected_OS := windows
|
||||
endif
|
||||
else
|
||||
OS_DIR = /
|
||||
endif
|
||||
|
||||
ifeq ($(WAYLAND),1)
|
||||
WAYLAND_SOURCE = $(shell make -f wayland.mk sources -s)
|
||||
|
||||
NO_VULKAN = 1
|
||||
NO_GLES = 0
|
||||
NO_EGL = 0
|
||||
LIBS += -D RGFW_WAYLAND $(WAYLAND_SOURCE) -lwayland-cursor -lwayland-client -lxkbcommon -lwayland-egl -lEGL -lm
|
||||
LINK_GL1 = -lEGL -lGL
|
||||
|
||||
# LIBS += -ldecor-0
|
||||
|
||||
ifeq ($(WAYLAND_X11), 1)
|
||||
LIBS += -D RGFW_X11
|
||||
endif
|
||||
endif
|
||||
|
||||
LINK_GL3 =
|
||||
LINK_GL2 =
|
||||
LINK_OSMESA =
|
||||
|
||||
ifneq (,$(filter $(CC),cl /opt/msvc/bin/x64/cl.exe /opt/msvc/bin/x86/cl.exe))
|
||||
WARNINGS = -Wall -wd4668 -wd4820 -wd5045
|
||||
LIBS =
|
||||
DX11_LIBS =
|
||||
VULKAN_LIBS =
|
||||
OBJ_FILE = .obj
|
||||
else ifneq (,$(filter $(CC),emcc em++))
|
||||
DX11_LIBS =
|
||||
LINK_GL1 = -s LEGACY_GL_EMULATION -D LEGACY_GL_EMULATION -sGL_UNSAFE_OPTS=0
|
||||
LINK_GL3 = -s FULL_ES3 -s USE_WEBGL2
|
||||
LINK_GL2 = -s FULL_ES2 -s USE_WEBGL2
|
||||
LINK_OSMESA = -sALLOW_MEMORY_GROWTH
|
||||
EXPORTED_JS = -s EXPORTED_RUNTIME_METHODS="['stringToNewUTF8']"
|
||||
LIBS = -s WASM=1 -s ASYNCIFY -s GL_SUPPORT_EXPLICIT_SWAP_CONTROL=1 $(EXPORTED_JS)
|
||||
EXT = .js
|
||||
NO_GLES = 0
|
||||
NO_EGL = 0
|
||||
NO_VULKAN = 1
|
||||
detected_OS = web
|
||||
DX11_LIBS =
|
||||
else ifeq (,$(filter $(CC),g++ clang++ em++))
|
||||
CFLAGS += -std=c99
|
||||
WARNINGS = -Wall -Werror -Wdouble-promotion -Wmissing-prototypes -Wextra -Wstrict-prototypes -Wold-style-definition -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wpointer-arith -Wvla -Wcast-align -Wstrict-overflow -Wnested-externs -Wstrict-aliasing -Wredundant-decls -Winit-self -Wmissing-noreturn
|
||||
else
|
||||
WARNINGS = -Wall -Werror -Wdouble-promotion -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wpointer-arith -Wvla -Wcast-align -Wstrict-overflow -Wstrict-aliasing -Wredundant-decls -Winit-self -Wmissing-noreturn
|
||||
|
||||
NO_VULKAN = 1
|
||||
ifeq ($(detected_OS),Darwin)
|
||||
WARNINGS += -Wno-deprecated -Wno-unknown-warning-option -Wno-pedantic
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(WAYLAND_X11), 1)
|
||||
# lazy fix (no -Wmissing-prototypes for wayland X11)
|
||||
WARNINGS = -Wall -Werror -Wdouble-promotion -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wpointer-arith -Wvla -Wcast-align -Wstrict-overflow -Wstrict-aliasing -Wredundant-decls -Winit-self -Wmissing-noreturn
|
||||
endif
|
||||
|
||||
EXAMPLE_OUTPUTS = \
|
||||
examples/gl11/gl11 \
|
||||
examples/surface/surface\
|
||||
examples/event_queue/event_queue \
|
||||
examples/callbacks/callbacks \
|
||||
examples/state-checking/state-checking \
|
||||
examples/flags/flags \
|
||||
examples/monitor/monitor \
|
||||
examples/gamma/gamma \
|
||||
examples/gl33_ctx/gl33_ctx \
|
||||
examples/smooth-resize/smooth-resize \
|
||||
examples/multi-window/multi-window \
|
||||
examples/standard-mouse-icons/icons \
|
||||
examples/custom_alloc/custom_alloc \
|
||||
examples/flash/flash \
|
||||
|
||||
EXAMPLE_OUTPUTS_CUSTOM = \
|
||||
examples/window_icons/icons \
|
||||
examples/mouse_icons/icons \
|
||||
examples/gamepad/gamepad \
|
||||
examples/first-person-camera/camera \
|
||||
examples/microui_demo/microui_demo \
|
||||
examples/gl33/gl33 \
|
||||
examples/portableGL/pgl \
|
||||
examples/gles2/gles2 \
|
||||
examples/egl/egl \
|
||||
examples/osmesa_demo/osmesa_demo \
|
||||
examples/vk10/vk10 \
|
||||
examples/dx11/dx11 \
|
||||
examples/metal/metal \
|
||||
examples/minimal_links/minimal_links \
|
||||
examples/gears/gears \
|
||||
examples/srgb/srgb
|
||||
|
||||
TEST_OUTPUTS = \
|
||||
tests/loop \
|
||||
|
||||
|
||||
all: $(WAYLAND_SOURCE) $(EXAMPLE_OUTPUTS) $(EXAMPLE_OUTPUTS_CUSTOM) libRGFW$(LIB_EXT) libRGFW.a
|
||||
|
||||
examples: $(WAYLAND_SOURCE) $(EXAMPLE_OUTPUTS) $(EXAMPLE_OUTPUTS_CUSTOM)
|
||||
|
||||
tests: $(WAYLAND_SOURCE) $(TEST_OUTPUTS)
|
||||
|
||||
examples/gears/gears: examples/gears/gears.c RGFW.h $(WAYLAND_SOURCE)
|
||||
ifneq (,$(filter $(CC),emcc em++))
|
||||
@echo gears is not supported on this platform
|
||||
else
|
||||
$(CC) $(CFLAGS) -I. $< $(LINK_GL1) $(LIBS) -lm $($) -o $@$(EXT)
|
||||
endif
|
||||
|
||||
examples/srgb/srgb: examples/srgb/srgb.c RGFW.h $(WAYLAND_SOURCE)
|
||||
$(CC) $(CFLAGS) -I. $< $(LINK_GL1) $(LIBS) -lm $($) -o $@$(EXT)
|
||||
|
||||
examples/portableGL/pgl: examples/portableGL/pgl.c RGFW.h $(WAYLAND_SOURCE)
|
||||
ifeq (,$(filter $(CC),emcc em++))
|
||||
$(CC) -w $(CFLAGS) -I. $< -lm $(LIBS) -o $@
|
||||
else
|
||||
@echo "the portableGL example doesn't support html5"
|
||||
endif
|
||||
|
||||
examples/gles2/gles2: examples/gles2/gles2.c RGFW.h $(WAYLAND_SOURCE)
|
||||
ifneq ($(NO_GLES), 1)
|
||||
$(CC) $(CFLAGS) -I. $< $(LIBS) $(LINK_GL2) -lGL -o $@$(EXT)
|
||||
else
|
||||
@echo gles has been disabled
|
||||
endif
|
||||
|
||||
examples/egl/egl: examples/egl/egl.c RGFW.h $(WAYLAND_SOURCE)
|
||||
ifneq ($(NO_EGL), 1)
|
||||
$(CC) $(CFLAGS) -I. $< $(LIBS) $(LINK_GL1) -lGL -lEGL -o $@$(EXT)
|
||||
else
|
||||
@echo egl has been disabled
|
||||
endif
|
||||
|
||||
|
||||
|
||||
examples/osmesa_demo/osmesa_demo: examples/osmesa_demo/osmesa_demo.c RGFW.h $(WAYLAND_SOURCE)
|
||||
ifneq ($(NO_OSMESA), 1)
|
||||
$(CC) $(CFLAGS) -I. $< $(LIBS) $(LINK_OSMESA) -lOSMesa -o $@$(EXT)
|
||||
else
|
||||
@echo osmesa has been disabled
|
||||
endif
|
||||
|
||||
|
||||
examples/vk10/vk10: examples/vk10/vk10.c examples/vk10/vkinit.h RGFW.h $(WAYLAND_SOURCE)
|
||||
ifneq ($(NO_VULKAN), 1)
|
||||
glslangValidator -V examples/vk10/shaders/vert.vert -o examples/vk10/shaders/vert.h --vn vert_code
|
||||
glslangValidator -V examples/vk10/shaders/frag.frag -o examples/vk10/shaders/frag.h --vn frag_code
|
||||
|
||||
$(CC) $(CFLAGS) -I. $< $(VULKAN_LIBS) -o $@
|
||||
else
|
||||
@echo vulkan has been disabled
|
||||
endif
|
||||
|
||||
examples/every_api/every:
|
||||
ifneq ($(NO_VULKAN), 1)
|
||||
$(CC) $(CFLAGS) -I. $< $(LINK_GL1) $(VULKAN_LIBS) $(DX11_LIBS) -o $@
|
||||
else
|
||||
$(CC) $(CFLAGS) -I. $< $(LIBS) $(LINK_GL1) $(DX11_LIBS) -D RGFW_NO_VULKAN -o $@
|
||||
endif
|
||||
|
||||
examples/dx11/dx11: examples/dx11/dx11.c RGFW.h $(WAYLAND_SOURCE)
|
||||
ifeq ($(CC), zig cc)
|
||||
@echo directX is not supported with Zig
|
||||
else ifneq (,$(filter $(CC),g++ clang++ "zig cc"))
|
||||
@echo directX is not supported with C++
|
||||
else ifneq (,$(filter $(detected_OS), windows Windows_NT))
|
||||
$(CC) $(CFLAGS) -I. $< $(DX11_LIBS) -o $@
|
||||
else
|
||||
@echo directX is not supported on $(detected_OS)
|
||||
endif
|
||||
|
||||
|
||||
examples/metal/metal: examples/metal/metal.m RGFW.h $(WAYLAND_SOURCE)
|
||||
ifeq ($(detected_OS),Darwin) # Mac OS X
|
||||
$(CC) $(CFLAGS) examples/metal/metal.m -I. -framework CoreVideo -framework Metal -framework Cocoa -framework IOKit -framework QuartzCore -o $@
|
||||
else
|
||||
@echo metal is not supported on $(detected_OS)
|
||||
endif
|
||||
|
||||
examples/minimal_links/minimal_links: examples/minimal_links/minimal_links.c RGFW.h $(WAYLAND_SOURCE)
|
||||
ifeq ($(WAYLAND), 1)
|
||||
@echo nostl is not supported on this platform
|
||||
else ifneq (,$(filter $(CC),emcc em++))
|
||||
@echo nostl is not supported on this platform
|
||||
else ifeq ($(detected_OS),NetBSD)
|
||||
$(CC) $(CFLAGS) $(CFLAGS) -pthread -I. $< -o $@$(EXT)
|
||||
else ifeq ($(detected_OS),Linux)
|
||||
$(CC) $(CFLAGS) -I. $< -lXrandr -lX11 -o $@$(EXT)
|
||||
else ifeq ($(detected_OS),windows)
|
||||
$(CC) $(CFLAGS) $(WARNINGS) -I. $< -lgdi32 -o $@$(EXT)
|
||||
else ifeq ($(detected_OS),Darwin)
|
||||
$(CC) $(CFLAGS) $(WARNINGS) -I. $< -framework CoreVideo -framework Cocoa -o $@$(EXT)
|
||||
else
|
||||
@echo minimal_links is not supported on this platform
|
||||
endif
|
||||
|
||||
|
||||
examples/nostl/nostl: examples/nostl/nostl.c RGFW.h $(WAYLAND_SOURCE)
|
||||
ifeq ($(WAYLAND), 1)
|
||||
@echo nostl is not supported on this platform
|
||||
else ifneq (,$(filter $(CC),emcc em++))
|
||||
@echo nostl is not supported on this platform
|
||||
else ifeq ($(detected_OS),Linux)
|
||||
$(CC) $(CFLAGS) -fno-stack-protector -lX11 -lXcursor -lGL -lXi -lXrandr -I. $< -o $@$(EXT)
|
||||
else ifeq ($(detected_OS),windows)
|
||||
$(CC) $(CFLAGS) $(WARNINGS) -I. $< -lkernel32 -lgdi32 -lshell32 -lUser32 -o $@$(EXT)
|
||||
else ifeq ($(detected_OS),Darwin)
|
||||
$(CC) $(CFLAGS) -fno-stack-protector $(WARNINGS) -I. $< -framework CoreVideo -framework Cocoa -o $@$(EXT)
|
||||
else
|
||||
@echo nostl is not supported on this platform
|
||||
endif
|
||||
|
||||
|
||||
examples/microui_demo/microui_demo: examples/microui_demo/microui_demo.c RGFW.h $(WAYLAND_SOURCE)
|
||||
ifeq (,$(filter $(CC),emcc em++ g++ clang++))
|
||||
$(CC) $(CFLAGS) -I. $< examples/microui_demo/microui.c $(LINK_GL1) $(LIBS) -o $@$(EXT)
|
||||
else ifneq (,$(filter $(CC),em++ g++ clang++))
|
||||
@echo microui demo not supported with C++
|
||||
else
|
||||
$(CC) $(CFLAGS) -I. $< examples/microui_demo/microui.c -s USE_WEBGL2 $(LIBS) $(LINK_GL1) -o $@$(EXT)
|
||||
endif
|
||||
|
||||
examples/window_icons/icons: examples/window_icons/icons.c RGFW.h $(WAYLAND_SOURCE)
|
||||
$(CC) $(CFLAGS) -I. $< $(LIBS) -lm $(LINK_GL1) -o $@$(EXT)
|
||||
examples/mouse_icons/icons: examples/mouse_icons/icons.c RGFW.h $(WAYLAND_SOURCE)
|
||||
$(CC) $(CFLAGS) -I. $< $(LIBS) -lm $(LINK_GL1) -o $@$(EXT)
|
||||
examples/gamepad/gamepad: examples/gamepad/gamepad.c RGFW.h $(WAYLAND_SOURCE)
|
||||
$(CC) $(CFLAGS) -I. $< $(LIBS) -lm $(LINK_GL1) -o $@$(EXT)
|
||||
|
||||
examples/first-person-camera/camera: examples/first-person-camera/camera.c RGFW.h $(WAYLAND_SOURCE)
|
||||
$(CC) $(CFLAGS) -I. $< $(LIBS) -lm $(LINK_GL1) -o $@$(EXT)
|
||||
|
||||
|
||||
examples/gl33/gl33: examples/gl33/gl33.c RGFW.h $(WAYLAND_SOURCE)
|
||||
ifeq ($(WAYLAND), 1)
|
||||
$(CC) $(CFLAGS) $(WARNINGS) -I. $< -lm $(LIBS) $(LINK_GL1) -lEGL -lwayland-egl -o $@$(EXT)
|
||||
else ifeq ($(detected_OS),NetBSD)
|
||||
$(CC) $(CFLAGS) $(WARNINGS) $(CFLAGS) -I. $< -lm -o $@$(EXT)
|
||||
else ifeq ($(detected_OS),Linux)
|
||||
$(CC) $(CFLAGS) $(WARNINGS) -I. $< -lm -o $@$(EXT)
|
||||
else ifeq ($(detected_OS),windows)
|
||||
$(CC) $(CFLAGS) $(WARNINGS) -I. $< -lgdi32 -D UNICODE -o $@$(EXT)
|
||||
else ifeq ($(detected_OS),Darwin)
|
||||
$(CC) $(CFLAGS) $(WARNINGS) -I. $< -framework CoreVideo -framework IOKit -framework Cocoa -o $@$(EXT)
|
||||
else
|
||||
$(CC) $(CFLAGS) $(WARNINGS) -I. $< $(LIBS) $(LINK_GL3) -o $@$(EXT)
|
||||
endif
|
||||
|
||||
$(EXAMPLE_OUTPUTS): %: %.c RGFW.h $(WAYLAND_SOURCE)
|
||||
$(CC) $(CFLAGS) $(WARNINGS) -I. $< $(LINK_GL1) $(LIBS) $($) -o $@$(EXT)
|
||||
|
||||
$(TEST_OUTPUTS): %: %.c RGFW.h $(WAYLAND_SOURCE)
|
||||
$(CC) $(CFLAGS) $(WARNINGS) -I. $< $(LINK_GL1) $(LIBS) $($) -o $@$(EXT)
|
||||
@for exe in $(TEST_OUTPUTS); do \
|
||||
echo "Running $$exe..."; \
|
||||
./$$exe$(EXT); \
|
||||
done
|
||||
|
||||
debug: all
|
||||
@for exe in $(EXAMPLE_OUTPUTS); do \
|
||||
echo "Running $$exe..."; \
|
||||
./$$exe$(EXT); \
|
||||
done
|
||||
|
||||
./examples/gamepad/gamepad
|
||||
./examples/first-person-camera/camera
|
||||
./examples/portableGL/pgl$(EXT)
|
||||
./examples/microui_demo/microui_demo
|
||||
./examples/gl33/gl33$(EXT)
|
||||
ifneq ($(NO_GLES), 1)
|
||||
./examples/gles2/gles2$(EXT)
|
||||
endif
|
||||
ifneq ($(NO_OSMESA), 1)
|
||||
./examples/osmesa_demo/osmesa_demo$(EXT)
|
||||
endif
|
||||
ifneq ($(NO_VULKAN), 1)
|
||||
./examples/vk10/vk10$(EXT)
|
||||
endif
|
||||
ifeq ($(detected_OS), windows)
|
||||
./examples/dx11/dx11.exe
|
||||
endif
|
||||
$(MAKE) clean
|
||||
|
||||
|
||||
RGFW$(OBJ_FILE): RGFW.h $(WAYLAND_SOURCE)
|
||||
#$(CC) -x c $(CUSTOM_CFLAGS) -c RGFW.h -D RGFW_IMPLEMENTATION -fPIC -D RGFW_EXPORT
|
||||
cp RGFW.h RGFW.c
|
||||
$(CC) $(CUSTOM_CFLAGS) -c RGFW.c -D RGFW_IMPLEMENTATION -fPIC -D RGFW_EXPORT
|
||||
rm RGFW.c
|
||||
|
||||
libRGFW$(LIB_EXT): RGFW.h RGFW$(OBJ_FILE)
|
||||
$(MAKE) RGFW$(OBJ_FILE)
|
||||
ifeq ($(CC), cl)
|
||||
link /DLL /OUT:libRGFW.dll RGFW.obj
|
||||
else
|
||||
$(CC) $(CUSTOM_CFLAGS) -shared RGFW$(OBJ_FILE) $(LIBS) -o libRGFW$(LIB_EXT)
|
||||
endif
|
||||
|
||||
libRGFW.a: RGFW.h RGFW$(OBJ_FILE)
|
||||
$(MAKE) RGFW$(OBJ_FILE)
|
||||
$(AR) rcs libRGFW.a RGFW$(OBJ_FILE)
|
||||
|
||||
ifeq ($(WAYLAND),1)
|
||||
|
||||
$(WAYLAND_SOURCE): %.c:
|
||||
$(MAKE) -f wayland.mk
|
||||
|
||||
endif
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.o *.obj *.dll .dylib *.a *.so $(EXAMPLE_OUTPUTS) $(EXAMPLE_OUTPUTS_CUSTOM) $(TEST_OUTPUTS) .$(OS_DIR)examples$(OS_DIR)*$(OS_DIR)*.exe .$(OS_DIR)examples$(OS_DIR)*$(OS_DIR)*.js .$(OS_DIR)examples$(OS_DIR)*$(OS_DIR)*.wasm .$(OS_DIR)examples$(OS_DIR)vk10$(OS_DIR)shaders$(OS_DIR)*.h
|
||||
|
||||
ifeq ($(WAYLAND),1)
|
||||
$(MAKE) -f wayland.mk clean
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: all examples clean
|
||||
|
||||
|
|
@ -5038,6 +5038,7 @@ void RGFW_attribStack_pushAttribs(RGFW_attribStack* stack, i32 attrib1, i32 attr
|
|||
|
||||
/* EGL */
|
||||
#ifdef RGFW_EGL
|
||||
#include <EGL/eglplatform.h>
|
||||
#include <EGL/egl.h>
|
||||
|
||||
PFNEGLINITIALIZEPROC RGFW_eglInitialize;
|
||||
334
src/external/RGFW/deps/wayland/pointer-constraints-unstable-v1.xml
vendored
Normal file
334
src/external/RGFW/deps/wayland/pointer-constraints-unstable-v1.xml
vendored
Normal file
|
|
@ -0,0 +1,334 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="pointer_constraints_unstable_v1">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2014 Jonas Ådahl
|
||||
Copyright © 2015 Red Hat Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="protocol for constraining pointer motions">
|
||||
This protocol specifies a set of interfaces used for adding constraints to
|
||||
the motion of a pointer. Possible constraints include confining pointer
|
||||
motions to a given region, or locking it to its current position.
|
||||
|
||||
In order to constrain the pointer, a client must first bind the global
|
||||
interface "wp_pointer_constraints" which, if a compositor supports pointer
|
||||
constraints, is exposed by the registry. Using the bound global object, the
|
||||
client uses the request that corresponds to the type of constraint it wants
|
||||
to make. See wp_pointer_constraints for more details.
|
||||
|
||||
Warning! The protocol described in this file is experimental and backward
|
||||
incompatible changes may be made. Backward compatible changes may be added
|
||||
together with the corresponding interface version bump. Backward
|
||||
incompatible changes are done by bumping the version number in the protocol
|
||||
and interface names and resetting the interface version. Once the protocol
|
||||
is to be declared stable, the 'z' prefix and the version number in the
|
||||
protocol and interface names are removed and the interface version number is
|
||||
reset.
|
||||
</description>
|
||||
|
||||
<interface name="zwp_pointer_constraints_v1" version="1">
|
||||
<description summary="constrain the movement of a pointer">
|
||||
The global interface exposing pointer constraining functionality. It
|
||||
exposes two requests: lock_pointer for locking the pointer to its
|
||||
position, and confine_pointer for locking the pointer to a region.
|
||||
|
||||
The lock_pointer and confine_pointer requests create the objects
|
||||
wp_locked_pointer and wp_confined_pointer respectively, and the client can
|
||||
use these objects to interact with the lock.
|
||||
|
||||
For any surface, only one lock or confinement may be active across all
|
||||
wl_pointer objects of the same seat. If a lock or confinement is requested
|
||||
when another lock or confinement is active or requested on the same surface
|
||||
and with any of the wl_pointer objects of the same seat, an
|
||||
'already_constrained' error will be raised.
|
||||
</description>
|
||||
|
||||
<enum name="error">
|
||||
<description summary="wp_pointer_constraints error values">
|
||||
These errors can be emitted in response to wp_pointer_constraints
|
||||
requests.
|
||||
</description>
|
||||
<entry name="already_constrained" value="1"
|
||||
summary="pointer constraint already requested on that surface"/>
|
||||
</enum>
|
||||
|
||||
<enum name="lifetime">
|
||||
<description summary="constraint lifetime">
|
||||
These values represent different lifetime semantics. They are passed
|
||||
as arguments to the factory requests to specify how the constraint
|
||||
lifetimes should be managed.
|
||||
</description>
|
||||
<entry name="oneshot" value="1">
|
||||
<description summary="the pointer constraint is defunct once deactivated">
|
||||
A oneshot pointer constraint will never reactivate once it has been
|
||||
deactivated. See the corresponding deactivation event
|
||||
(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
|
||||
details.
|
||||
</description>
|
||||
</entry>
|
||||
<entry name="persistent" value="2">
|
||||
<description summary="the pointer constraint may reactivate">
|
||||
A persistent pointer constraint may again reactivate once it has
|
||||
been deactivated. See the corresponding deactivation event
|
||||
(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
|
||||
details.
|
||||
</description>
|
||||
</entry>
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the pointer constraints manager object">
|
||||
Used by the client to notify the server that it will no longer use this
|
||||
pointer constraints object.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="lock_pointer">
|
||||
<description summary="lock pointer to a position">
|
||||
The lock_pointer request lets the client request to disable movements of
|
||||
the virtual pointer (i.e. the cursor), effectively locking the pointer
|
||||
to a position. This request may not take effect immediately; in the
|
||||
future, when the compositor deems implementation-specific constraints
|
||||
are satisfied, the pointer lock will be activated and the compositor
|
||||
sends a locked event.
|
||||
|
||||
The protocol provides no guarantee that the constraints are ever
|
||||
satisfied, and does not require the compositor to send an error if the
|
||||
constraints cannot ever be satisfied. It is thus possible to request a
|
||||
lock that will never activate.
|
||||
|
||||
There may not be another pointer constraint of any kind requested or
|
||||
active on the surface for any of the wl_pointer objects of the seat of
|
||||
the passed pointer when requesting a lock. If there is, an error will be
|
||||
raised. See general pointer lock documentation for more details.
|
||||
|
||||
The intersection of the region passed with this request and the input
|
||||
region of the surface is used to determine where the pointer must be
|
||||
in order for the lock to activate. It is up to the compositor whether to
|
||||
warp the pointer or require some kind of user interaction for the lock
|
||||
to activate. If the region is null the surface input region is used.
|
||||
|
||||
A surface may receive pointer focus without the lock being activated.
|
||||
|
||||
The request creates a new object wp_locked_pointer which is used to
|
||||
interact with the lock as well as receive updates about its state. See
|
||||
the the description of wp_locked_pointer for further information.
|
||||
|
||||
Note that while a pointer is locked, the wl_pointer objects of the
|
||||
corresponding seat will not emit any wl_pointer.motion events, but
|
||||
relative motion events will still be emitted via wp_relative_pointer
|
||||
objects of the same seat. wl_pointer.axis and wl_pointer.button events
|
||||
are unaffected.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zwp_locked_pointer_v1"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="surface to lock pointer to"/>
|
||||
<arg name="pointer" type="object" interface="wl_pointer"
|
||||
summary="the pointer that should be locked"/>
|
||||
<arg name="region" type="object" interface="wl_region" allow-null="true"
|
||||
summary="region of surface"/>
|
||||
<arg name="lifetime" type="uint" enum="lifetime" summary="lock lifetime"/>
|
||||
</request>
|
||||
|
||||
<request name="confine_pointer">
|
||||
<description summary="confine pointer to a region">
|
||||
The confine_pointer request lets the client request to confine the
|
||||
pointer cursor to a given region. This request may not take effect
|
||||
immediately; in the future, when the compositor deems implementation-
|
||||
specific constraints are satisfied, the pointer confinement will be
|
||||
activated and the compositor sends a confined event.
|
||||
|
||||
The intersection of the region passed with this request and the input
|
||||
region of the surface is used to determine where the pointer must be
|
||||
in order for the confinement to activate. It is up to the compositor
|
||||
whether to warp the pointer or require some kind of user interaction for
|
||||
the confinement to activate. If the region is null the surface input
|
||||
region is used.
|
||||
|
||||
The request will create a new object wp_confined_pointer which is used
|
||||
to interact with the confinement as well as receive updates about its
|
||||
state. See the the description of wp_confined_pointer for further
|
||||
information.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zwp_confined_pointer_v1"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="surface to lock pointer to"/>
|
||||
<arg name="pointer" type="object" interface="wl_pointer"
|
||||
summary="the pointer that should be confined"/>
|
||||
<arg name="region" type="object" interface="wl_region" allow-null="true"
|
||||
summary="region of surface"/>
|
||||
<arg name="lifetime" type="uint" enum="lifetime" summary="confinement lifetime"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwp_locked_pointer_v1" version="1">
|
||||
<description summary="receive relative pointer motion events">
|
||||
The wp_locked_pointer interface represents a locked pointer state.
|
||||
|
||||
While the lock of this object is active, the wl_pointer objects of the
|
||||
associated seat will not emit any wl_pointer.motion events.
|
||||
|
||||
This object will send the event 'locked' when the lock is activated.
|
||||
Whenever the lock is activated, it is guaranteed that the locked surface
|
||||
will already have received pointer focus and that the pointer will be
|
||||
within the region passed to the request creating this object.
|
||||
|
||||
To unlock the pointer, send the destroy request. This will also destroy
|
||||
the wp_locked_pointer object.
|
||||
|
||||
If the compositor decides to unlock the pointer the unlocked event is
|
||||
sent. See wp_locked_pointer.unlock for details.
|
||||
|
||||
When unlocking, the compositor may warp the cursor position to the set
|
||||
cursor position hint. If it does, it will not result in any relative
|
||||
motion events emitted via wp_relative_pointer.
|
||||
|
||||
If the surface the lock was requested on is destroyed and the lock is not
|
||||
yet activated, the wp_locked_pointer object is now defunct and must be
|
||||
destroyed.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the locked pointer object">
|
||||
Destroy the locked pointer object. If applicable, the compositor will
|
||||
unlock the pointer.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="set_cursor_position_hint">
|
||||
<description summary="set the pointer cursor position hint">
|
||||
Set the cursor position hint relative to the top left corner of the
|
||||
surface.
|
||||
|
||||
If the client is drawing its own cursor, it should update the position
|
||||
hint to the position of its own cursor. A compositor may use this
|
||||
information to warp the pointer upon unlock in order to avoid pointer
|
||||
jumps.
|
||||
|
||||
The cursor position hint is double-buffered state, see
|
||||
wl_surface.commit.
|
||||
</description>
|
||||
<arg name="surface_x" type="fixed"
|
||||
summary="surface-local x coordinate"/>
|
||||
<arg name="surface_y" type="fixed"
|
||||
summary="surface-local y coordinate"/>
|
||||
</request>
|
||||
|
||||
<request name="set_region">
|
||||
<description summary="set a new lock region">
|
||||
Set a new region used to lock the pointer.
|
||||
|
||||
The new lock region is double-buffered, see wl_surface.commit.
|
||||
|
||||
For details about the lock region, see wp_locked_pointer.
|
||||
</description>
|
||||
<arg name="region" type="object" interface="wl_region" allow-null="true"
|
||||
summary="region of surface"/>
|
||||
</request>
|
||||
|
||||
<event name="locked">
|
||||
<description summary="lock activation event">
|
||||
Notification that the pointer lock of the seat's pointer is activated.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<event name="unlocked">
|
||||
<description summary="lock deactivation event">
|
||||
Notification that the pointer lock of the seat's pointer is no longer
|
||||
active. If this is a oneshot pointer lock (see
|
||||
wp_pointer_constraints.lifetime) this object is now defunct and should
|
||||
be destroyed. If this is a persistent pointer lock (see
|
||||
wp_pointer_constraints.lifetime) this pointer lock may again
|
||||
reactivate in the future.
|
||||
</description>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="zwp_confined_pointer_v1" version="1">
|
||||
<description summary="confined pointer object">
|
||||
The wp_confined_pointer interface represents a confined pointer state.
|
||||
|
||||
This object will send the event 'confined' when the confinement is
|
||||
activated. Whenever the confinement is activated, it is guaranteed that
|
||||
the surface the pointer is confined to will already have received pointer
|
||||
focus and that the pointer will be within the region passed to the request
|
||||
creating this object. It is up to the compositor to decide whether this
|
||||
requires some user interaction and if the pointer will warp to within the
|
||||
passed region if outside.
|
||||
|
||||
To unconfine the pointer, send the destroy request. This will also destroy
|
||||
the wp_confined_pointer object.
|
||||
|
||||
If the compositor decides to unconfine the pointer the unconfined event is
|
||||
sent. The wp_confined_pointer object is at this point defunct and should
|
||||
be destroyed.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the confined pointer object">
|
||||
Destroy the confined pointer object. If applicable, the compositor will
|
||||
unconfine the pointer.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="set_region">
|
||||
<description summary="set a new confine region">
|
||||
Set a new region used to confine the pointer.
|
||||
|
||||
The new confine region is double-buffered, see wl_surface.commit.
|
||||
|
||||
If the confinement is active when the new confinement region is applied
|
||||
and the pointer ends up outside of newly applied region, the pointer may
|
||||
warped to a position within the new confinement region. If warped, a
|
||||
wl_pointer.motion event will be emitted, but no
|
||||
wp_relative_pointer.relative_motion event.
|
||||
|
||||
The compositor may also, instead of using the new region, unconfine the
|
||||
pointer.
|
||||
|
||||
For details about the confine region, see wp_confined_pointer.
|
||||
</description>
|
||||
<arg name="region" type="object" interface="wl_region" allow-null="true"
|
||||
summary="region of surface"/>
|
||||
</request>
|
||||
|
||||
<event name="confined">
|
||||
<description summary="pointer confined">
|
||||
Notification that the pointer confinement of the seat's pointer is
|
||||
activated.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<event name="unconfined">
|
||||
<description summary="pointer unconfined">
|
||||
Notification that the pointer confinement of the seat's pointer is no
|
||||
longer active. If this is a oneshot pointer confinement (see
|
||||
wp_pointer_constraints.lifetime) this object is now defunct and should
|
||||
be destroyed. If this is a persistent pointer confinement (see
|
||||
wp_pointer_constraints.lifetime) this pointer confinement may again
|
||||
reactivate in the future.
|
||||
</description>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
||||
72
src/external/RGFW/deps/wayland/pointer-warp-v1.xml
vendored
Normal file
72
src/external/RGFW/deps/wayland/pointer-warp-v1.xml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="pointer_warp_v1">
|
||||
<copyright>
|
||||
Copyright © 2024 Neal Gompa
|
||||
Copyright © 2024 Xaver Hugl
|
||||
Copyright © 2024 Matthias Klumpp
|
||||
Copyright © 2024 Vlad Zahorodnii
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<interface name="wp_pointer_warp_v1" version="1">
|
||||
<description summary="reposition the pointer to a location on a surface">
|
||||
This global interface allows applications to request the pointer to be
|
||||
moved to a position relative to a wl_surface.
|
||||
|
||||
Note that if the desired behavior is to constrain the pointer to an area
|
||||
or lock it to a position, this protocol does not provide a reliable way
|
||||
to do that. The pointer constraint and pointer lock protocols should be
|
||||
used for those use cases instead.
|
||||
|
||||
Warning! The protocol described in this file is currently in the testing
|
||||
phase. Backward compatible changes may be added together with the
|
||||
corresponding interface version bump. Backward incompatible changes can
|
||||
only be done by creating a new major version of the extension.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the warp manager">
|
||||
Destroy the pointer warp manager.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="warp_pointer">
|
||||
<description summary="reposition the pointer">
|
||||
Request the compositor to move the pointer to a surface-local position.
|
||||
Whether or not the compositor honors the request is implementation defined,
|
||||
but it should
|
||||
- honor it if the surface has pointer focus, including
|
||||
when it has an implicit pointer grab
|
||||
- reject it if the enter serial is incorrect
|
||||
- reject it if the requested position is outside of the surface
|
||||
|
||||
Note that the enter serial is valid for any surface of the client,
|
||||
and does not have to be from the surface the pointer is warped to.
|
||||
|
||||
</description>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="surface to position the pointer on"/>
|
||||
<arg name="pointer" type="object" interface="wl_pointer"
|
||||
summary="the pointer that should be repositioned"/>
|
||||
<arg name="x" type="fixed"/>
|
||||
<arg name="y" type="fixed"/>
|
||||
<arg name="serial" type="uint" summary="serial number of the enter event"/>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
||||
136
src/external/RGFW/deps/wayland/relative-pointer-unstable-v1.xml
vendored
Normal file
136
src/external/RGFW/deps/wayland/relative-pointer-unstable-v1.xml
vendored
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="relative_pointer_unstable_v1">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2014 Jonas Ådahl
|
||||
Copyright © 2015 Red Hat Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="protocol for relative pointer motion events">
|
||||
This protocol specifies a set of interfaces used for making clients able to
|
||||
receive relative pointer events not obstructed by barriers (such as the
|
||||
monitor edge or other pointer barriers).
|
||||
|
||||
To start receiving relative pointer events, a client must first bind the
|
||||
global interface "wp_relative_pointer_manager" which, if a compositor
|
||||
supports relative pointer motion events, is exposed by the registry. After
|
||||
having created the relative pointer manager proxy object, the client uses
|
||||
it to create the actual relative pointer object using the
|
||||
"get_relative_pointer" request given a wl_pointer. The relative pointer
|
||||
motion events will then, when applicable, be transmitted via the proxy of
|
||||
the newly created relative pointer object. See the documentation of the
|
||||
relative pointer interface for more details.
|
||||
|
||||
Warning! The protocol described in this file is experimental and backward
|
||||
incompatible changes may be made. Backward compatible changes may be added
|
||||
together with the corresponding interface version bump. Backward
|
||||
incompatible changes are done by bumping the version number in the protocol
|
||||
and interface names and resetting the interface version. Once the protocol
|
||||
is to be declared stable, the 'z' prefix and the version number in the
|
||||
protocol and interface names are removed and the interface version number is
|
||||
reset.
|
||||
</description>
|
||||
|
||||
<interface name="zwp_relative_pointer_manager_v1" version="1">
|
||||
<description summary="get relative pointer objects">
|
||||
A global interface used for getting the relative pointer object for a
|
||||
given pointer.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the relative pointer manager object">
|
||||
Used by the client to notify the server that it will no longer use this
|
||||
relative pointer manager object.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_relative_pointer">
|
||||
<description summary="get a relative pointer object">
|
||||
Create a relative pointer interface given a wl_pointer object. See the
|
||||
wp_relative_pointer interface for more details.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zwp_relative_pointer_v1"/>
|
||||
<arg name="pointer" type="object" interface="wl_pointer"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwp_relative_pointer_v1" version="1">
|
||||
<description summary="relative pointer object">
|
||||
A wp_relative_pointer object is an extension to the wl_pointer interface
|
||||
used for emitting relative pointer events. It shares the same focus as
|
||||
wl_pointer objects of the same seat and will only emit events when it has
|
||||
focus.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="release the relative pointer object"/>
|
||||
</request>
|
||||
|
||||
<event name="relative_motion">
|
||||
<description summary="relative pointer motion">
|
||||
Relative x/y pointer motion from the pointer of the seat associated with
|
||||
this object.
|
||||
|
||||
A relative motion is in the same dimension as regular wl_pointer motion
|
||||
events, except they do not represent an absolute position. For example,
|
||||
moving a pointer from (x, y) to (x', y') would have the equivalent
|
||||
relative motion (x' - x, y' - y). If a pointer motion caused the
|
||||
absolute pointer position to be clipped by for example the edge of the
|
||||
monitor, the relative motion is unaffected by the clipping and will
|
||||
represent the unclipped motion.
|
||||
|
||||
This event also contains non-accelerated motion deltas. The
|
||||
non-accelerated delta is, when applicable, the regular pointer motion
|
||||
delta as it was before having applied motion acceleration and other
|
||||
transformations such as normalization.
|
||||
|
||||
Note that the non-accelerated delta does not represent 'raw' events as
|
||||
they were read from some device. Pointer motion acceleration is device-
|
||||
and configuration-specific and non-accelerated deltas and accelerated
|
||||
deltas may have the same value on some devices.
|
||||
|
||||
Relative motions are not coupled to wl_pointer.motion events, and can be
|
||||
sent in combination with such events, but also independently. There may
|
||||
also be scenarios where wl_pointer.motion is sent, but there is no
|
||||
relative motion. The order of an absolute and relative motion event
|
||||
originating from the same physical motion is not guaranteed.
|
||||
|
||||
If the client needs button events or focus state, it can receive them
|
||||
from a wl_pointer object of the same seat that the wp_relative_pointer
|
||||
object is associated with.
|
||||
</description>
|
||||
<arg name="utime_hi" type="uint"
|
||||
summary="high 32 bits of a 64 bit timestamp with microsecond granularity"/>
|
||||
<arg name="utime_lo" type="uint"
|
||||
summary="low 32 bits of a 64 bit timestamp with microsecond granularity"/>
|
||||
<arg name="dx" type="fixed"
|
||||
summary="the x component of the motion vector"/>
|
||||
<arg name="dy" type="fixed"
|
||||
summary="the y component of the motion vector"/>
|
||||
<arg name="dx_unaccel" type="fixed"
|
||||
summary="the x component of the unaccelerated motion vector"/>
|
||||
<arg name="dy_unaccel" type="fixed"
|
||||
summary="the y component of the unaccelerated motion vector"/>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
||||
160
src/external/RGFW/deps/wayland/xdg-decoration-unstable-v1.xml
vendored
Normal file
160
src/external/RGFW/deps/wayland/xdg-decoration-unstable-v1.xml
vendored
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="xdg_decoration_unstable_v1">
|
||||
<copyright>
|
||||
Copyright © 2018 Simon Ser
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<interface name="zxdg_decoration_manager_v1" version="1">
|
||||
<description summary="window decoration manager">
|
||||
This interface allows a compositor to announce support for server-side
|
||||
decorations.
|
||||
|
||||
A window decoration is a set of window controls as deemed appropriate by
|
||||
the party managing them, such as user interface components used to move,
|
||||
resize and change a window's state.
|
||||
|
||||
A client can use this protocol to request being decorated by a supporting
|
||||
compositor.
|
||||
|
||||
If compositor and client do not negotiate the use of a server-side
|
||||
decoration using this protocol, clients continue to self-decorate as they
|
||||
see fit.
|
||||
|
||||
Warning! The protocol described in this file is experimental and
|
||||
backward incompatible changes may be made. Backward compatible changes
|
||||
may be added together with the corresponding interface version bump.
|
||||
Backward incompatible changes are done by bumping the version number in
|
||||
the protocol and interface names and resetting the interface version.
|
||||
Once the protocol is to be declared stable, the 'z' prefix and the
|
||||
version number in the protocol and interface names are removed and the
|
||||
interface version number is reset.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the decoration manager object">
|
||||
Destroy the decoration manager. This doesn't destroy objects created
|
||||
with the manager.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_toplevel_decoration">
|
||||
<description summary="create a new toplevel decoration object">
|
||||
Create a new decoration object associated with the given toplevel.
|
||||
|
||||
Creating an xdg_toplevel_decoration from an xdg_toplevel which has a
|
||||
buffer attached or committed is a client error, and any attempts by a
|
||||
client to attach or manipulate a buffer prior to the first
|
||||
xdg_toplevel_decoration.configure event must also be treated as
|
||||
errors.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/>
|
||||
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zxdg_toplevel_decoration_v1" version="1">
|
||||
<description summary="decoration object for a toplevel surface">
|
||||
The decoration object allows the compositor to toggle server-side window
|
||||
decorations for a toplevel surface. The client can request to switch to
|
||||
another mode.
|
||||
|
||||
The xdg_toplevel_decoration object must be destroyed before its
|
||||
xdg_toplevel.
|
||||
</description>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="unconfigured_buffer" value="0"
|
||||
summary="xdg_toplevel has a buffer attached before configure"/>
|
||||
<entry name="already_constructed" value="1"
|
||||
summary="xdg_toplevel already has a decoration object"/>
|
||||
<entry name="orphaned" value="2"
|
||||
summary="xdg_toplevel destroyed before the decoration object"/>
|
||||
<entry name="invalid_mode" value="3" summary="invalid mode"/>
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the decoration object">
|
||||
Switch back to a mode without any server-side decorations at the next
|
||||
commit.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<enum name="mode">
|
||||
<description summary="window decoration modes">
|
||||
These values describe window decoration modes.
|
||||
</description>
|
||||
<entry name="client_side" value="1"
|
||||
summary="no server-side window decoration"/>
|
||||
<entry name="server_side" value="2"
|
||||
summary="server-side window decoration"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_mode">
|
||||
<description summary="set the decoration mode">
|
||||
Set the toplevel surface decoration mode. This informs the compositor
|
||||
that the client prefers the provided decoration mode.
|
||||
|
||||
After requesting a decoration mode, the compositor will respond by
|
||||
emitting an xdg_surface.configure event. The client should then update
|
||||
its content, drawing it without decorations if the received mode is
|
||||
server-side decorations. The client must also acknowledge the configure
|
||||
when committing the new content (see xdg_surface.ack_configure).
|
||||
|
||||
The compositor can decide not to use the client's mode and enforce a
|
||||
different mode instead.
|
||||
|
||||
Clients whose decoration mode depend on the xdg_toplevel state may send
|
||||
a set_mode request in response to an xdg_surface.configure event and wait
|
||||
for the next xdg_surface.configure event to prevent unwanted state.
|
||||
Such clients are responsible for preventing configure loops and must
|
||||
make sure not to send multiple successive set_mode requests with the
|
||||
same decoration mode.
|
||||
|
||||
If an invalid mode is supplied by the client, the invalid_mode protocol
|
||||
error is raised by the compositor.
|
||||
</description>
|
||||
<arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
|
||||
</request>
|
||||
|
||||
<request name="unset_mode">
|
||||
<description summary="unset the decoration mode">
|
||||
Unset the toplevel surface decoration mode. This informs the compositor
|
||||
that the client doesn't prefer a particular decoration mode.
|
||||
|
||||
This request has the same semantics as set_mode.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<event name="configure">
|
||||
<description summary="notify a decoration mode change">
|
||||
The configure event configures the effective decoration mode. The
|
||||
configured state should not be applied immediately. Clients must send an
|
||||
ack_configure in response to this event. See xdg_surface.configure and
|
||||
xdg_surface.ack_configure for details.
|
||||
|
||||
A configure event can be sent at any time. The specified mode must be
|
||||
obeyed by the client.
|
||||
</description>
|
||||
<arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
|
||||
</event>
|
||||
</interface>
|
||||
</protocol>
|
||||
222
src/external/RGFW/deps/wayland/xdg-output-unstable-v1.xml
vendored
Normal file
222
src/external/RGFW/deps/wayland/xdg-output-unstable-v1.xml
vendored
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="xdg_output_unstable_v1">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2017 Red Hat Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="Protocol to describe output regions">
|
||||
This protocol aims at describing outputs in a way which is more in line
|
||||
with the concept of an output on desktop oriented systems.
|
||||
|
||||
Some information are more specific to the concept of an output for
|
||||
a desktop oriented system and may not make sense in other applications,
|
||||
such as IVI systems for example.
|
||||
|
||||
Typically, the global compositor space on a desktop system is made of
|
||||
a contiguous or overlapping set of rectangular regions.
|
||||
|
||||
The logical_position and logical_size events defined in this protocol
|
||||
might provide information identical to their counterparts already
|
||||
available from wl_output, in which case the information provided by this
|
||||
protocol should be preferred to their equivalent in wl_output. The goal is
|
||||
to move the desktop specific concepts (such as output location within the
|
||||
global compositor space, etc.) out of the core wl_output protocol.
|
||||
|
||||
Warning! The protocol described in this file is experimental and
|
||||
backward incompatible changes may be made. Backward compatible
|
||||
changes may be added together with the corresponding interface
|
||||
version bump.
|
||||
Backward incompatible changes are done by bumping the version
|
||||
number in the protocol and interface names and resetting the
|
||||
interface version. Once the protocol is to be declared stable,
|
||||
the 'z' prefix and the version number in the protocol and
|
||||
interface names are removed and the interface version number is
|
||||
reset.
|
||||
</description>
|
||||
|
||||
<interface name="zxdg_output_manager_v1" version="3">
|
||||
<description summary="manage xdg_output objects">
|
||||
A global factory interface for xdg_output objects.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the xdg_output_manager object">
|
||||
Using this request a client can tell the server that it is not
|
||||
going to use the xdg_output_manager object anymore.
|
||||
|
||||
Any objects already created through this instance are not affected.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_xdg_output">
|
||||
<description summary="create an xdg output from a wl_output">
|
||||
This creates a new xdg_output object for the given wl_output.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zxdg_output_v1"/>
|
||||
<arg name="output" type="object" interface="wl_output"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zxdg_output_v1" version="3">
|
||||
<description summary="compositor logical output region">
|
||||
An xdg_output describes part of the compositor geometry.
|
||||
|
||||
This typically corresponds to a monitor that displays part of the
|
||||
compositor space.
|
||||
|
||||
For objects version 3 onwards, after all xdg_output properties have been
|
||||
sent (when the object is created and when properties are updated), a
|
||||
wl_output.done event is sent. This allows changes to the output
|
||||
properties to be seen as atomic, even if they happen via multiple events.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the xdg_output object">
|
||||
Using this request a client can tell the server that it is not
|
||||
going to use the xdg_output object anymore.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<event name="logical_position">
|
||||
<description summary="position of the output within the global compositor space">
|
||||
The position event describes the location of the wl_output within
|
||||
the global compositor space.
|
||||
|
||||
The logical_position event is sent after creating an xdg_output
|
||||
(see xdg_output_manager.get_xdg_output) and whenever the location
|
||||
of the output changes within the global compositor space.
|
||||
</description>
|
||||
<arg name="x" type="int"
|
||||
summary="x position within the global compositor space"/>
|
||||
<arg name="y" type="int"
|
||||
summary="y position within the global compositor space"/>
|
||||
</event>
|
||||
|
||||
<event name="logical_size">
|
||||
<description summary="size of the output in the global compositor space">
|
||||
The logical_size event describes the size of the output in the
|
||||
global compositor space.
|
||||
|
||||
Most regular Wayland clients should not pay attention to the
|
||||
logical size and would rather rely on xdg_shell interfaces.
|
||||
|
||||
Some clients such as Xwayland, however, need this to configure
|
||||
their surfaces in the global compositor space as the compositor
|
||||
may apply a different scale from what is advertised by the output
|
||||
scaling property (to achieve fractional scaling, for example).
|
||||
|
||||
For example, for a wl_output mode 3840×2160 and a scale factor 2:
|
||||
|
||||
- A compositor not scaling the monitor viewport in its compositing space
|
||||
will advertise a logical size of 3840×2160,
|
||||
|
||||
- A compositor scaling the monitor viewport with scale factor 2 will
|
||||
advertise a logical size of 1920×1080,
|
||||
|
||||
- A compositor scaling the monitor viewport using a fractional scale of
|
||||
1.5 will advertise a logical size of 2560×1440.
|
||||
|
||||
For example, for a wl_output mode 1920×1080 and a 90 degree rotation,
|
||||
the compositor will advertise a logical size of 1080x1920.
|
||||
|
||||
The logical_size event is sent after creating an xdg_output
|
||||
(see xdg_output_manager.get_xdg_output) and whenever the logical
|
||||
size of the output changes, either as a result of a change in the
|
||||
applied scale or because of a change in the corresponding output
|
||||
mode(see wl_output.mode) or transform (see wl_output.transform).
|
||||
</description>
|
||||
<arg name="width" type="int"
|
||||
summary="width in global compositor space"/>
|
||||
<arg name="height" type="int"
|
||||
summary="height in global compositor space"/>
|
||||
</event>
|
||||
|
||||
<event name="done" deprecated-since="3">
|
||||
<description summary="all information about the output have been sent">
|
||||
This event is sent after all other properties of an xdg_output
|
||||
have been sent.
|
||||
|
||||
This allows changes to the xdg_output properties to be seen as
|
||||
atomic, even if they happen via multiple events.
|
||||
|
||||
For objects version 3 onwards, this event is deprecated. Compositors
|
||||
are not required to send it anymore and must send wl_output.done
|
||||
instead.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<!-- Version 2 additions -->
|
||||
|
||||
<event name="name" since="2">
|
||||
<description summary="name of this output">
|
||||
Many compositors will assign names to their outputs, show them to the
|
||||
user, allow them to be configured by name, etc. The client may wish to
|
||||
know this name as well to offer the user similar behaviors.
|
||||
|
||||
The naming convention is compositor defined, but limited to
|
||||
alphanumeric characters and dashes (-). Each name is unique among all
|
||||
wl_output globals, but if a wl_output global is destroyed the same name
|
||||
may be reused later. The names will also remain consistent across
|
||||
sessions with the same hardware and software configuration.
|
||||
|
||||
Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
|
||||
not assume that the name is a reflection of an underlying DRM
|
||||
connector, X11 connection, etc.
|
||||
|
||||
The name event is sent after creating an xdg_output (see
|
||||
xdg_output_manager.get_xdg_output). This event is only sent once per
|
||||
xdg_output, and the name does not change over the lifetime of the
|
||||
wl_output global.
|
||||
|
||||
This event is deprecated, instead clients should use wl_output.name.
|
||||
Compositors must still support this event.
|
||||
</description>
|
||||
<arg name="name" type="string" summary="output name"/>
|
||||
</event>
|
||||
|
||||
<event name="description" since="2">
|
||||
<description summary="human-readable description of this output">
|
||||
Many compositors can produce human-readable descriptions of their
|
||||
outputs. The client may wish to know this description as well, to
|
||||
communicate the user for various purposes.
|
||||
|
||||
The description is a UTF-8 string with no convention defined for its
|
||||
contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11
|
||||
output via :1'.
|
||||
|
||||
The description event is sent after creating an xdg_output (see
|
||||
xdg_output_manager.get_xdg_output) and whenever the description
|
||||
changes. The description is optional, and may not be sent at all.
|
||||
|
||||
For objects of version 2 and lower, this event is only sent once per
|
||||
xdg_output, and the description does not change over the lifetime of
|
||||
the wl_output global.
|
||||
|
||||
This event is deprecated, instead clients should use
|
||||
wl_output.description. Compositors must still support this event.
|
||||
</description>
|
||||
<arg name="description" type="string" summary="output description"/>
|
||||
</event>
|
||||
|
||||
</interface>
|
||||
</protocol>
|
||||
1418
src/external/RGFW/deps/wayland/xdg-shell.xml
vendored
Normal file
1418
src/external/RGFW/deps/wayland/xdg-shell.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
205
src/external/RGFW/deps/wayland/xdg-toplevel-icon-v1.xml
vendored
Normal file
205
src/external/RGFW/deps/wayland/xdg-toplevel-icon-v1.xml
vendored
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="xdg_toplevel_icon_v1">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2023-2024 Matthias Klumpp
|
||||
Copyright © 2024 David Edmundson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="protocol to assign icons to toplevels">
|
||||
This protocol allows clients to set icons for their toplevel surfaces
|
||||
either via the XDG icon stock (using an icon name), or from pixel data.
|
||||
|
||||
A toplevel icon represents the individual toplevel (unlike the application
|
||||
or launcher icon, which represents the application as a whole), and may be
|
||||
shown in window switchers, window overviews and taskbars that list
|
||||
individual windows.
|
||||
|
||||
This document adheres to RFC 2119 when using words like "must",
|
||||
"should", "may", etc.
|
||||
|
||||
Warning! The protocol described in this file is currently in the testing
|
||||
phase. Backward compatible changes may be added together with the
|
||||
corresponding interface version bump. Backward incompatible changes can
|
||||
only be done by creating a new major version of the extension.
|
||||
</description>
|
||||
|
||||
<interface name="xdg_toplevel_icon_manager_v1" version="1">
|
||||
<description summary="interface to manage toplevel icons">
|
||||
This interface allows clients to create toplevel window icons and set
|
||||
them on toplevel windows to be displayed to the user.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the toplevel icon manager">
|
||||
Destroy the toplevel icon manager.
|
||||
This does not destroy objects created with the manager.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="create_icon">
|
||||
<description summary="create a new icon instance">
|
||||
Creates a new icon object. This icon can then be attached to a
|
||||
xdg_toplevel via the 'set_icon' request.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="xdg_toplevel_icon_v1"/>
|
||||
</request>
|
||||
|
||||
<request name="set_icon">
|
||||
<description summary="set an icon on a toplevel window">
|
||||
This request assigns the icon 'icon' to 'toplevel', or clears the
|
||||
toplevel icon if 'icon' was null.
|
||||
This state is double-buffered and is applied on the next
|
||||
wl_surface.commit of the toplevel.
|
||||
|
||||
After making this call, the xdg_toplevel_icon_v1 provided as 'icon'
|
||||
can be destroyed by the client without 'toplevel' losing its icon.
|
||||
The xdg_toplevel_icon_v1 is immutable from this point, and any
|
||||
future attempts to change it must raise the
|
||||
'xdg_toplevel_icon_v1.immutable' protocol error.
|
||||
|
||||
The compositor must set the toplevel icon from either the pixel data
|
||||
the icon provides, or by loading a stock icon using the icon name.
|
||||
See the description of 'xdg_toplevel_icon_v1' for details.
|
||||
|
||||
If 'icon' is set to null, the icon of the respective toplevel is reset
|
||||
to its default icon (usually the icon of the application, derived from
|
||||
its desktop-entry file, or a placeholder icon).
|
||||
If this request is passed an icon with no pixel buffers or icon name
|
||||
assigned, the icon must be reset just like if 'icon' was null.
|
||||
</description>
|
||||
<arg name="toplevel" type="object" interface="xdg_toplevel" summary="the toplevel to act on"/>
|
||||
<arg name="icon" type="object" interface="xdg_toplevel_icon_v1" allow-null="true"/>
|
||||
</request>
|
||||
|
||||
<event name="icon_size">
|
||||
<description summary="describes a supported & preferred icon size">
|
||||
This event indicates an icon size the compositor prefers to be
|
||||
available if the client has scalable icons and can render to any size.
|
||||
|
||||
When the 'xdg_toplevel_icon_manager_v1' object is created, the
|
||||
compositor may send one or more 'icon_size' events to describe the list
|
||||
of preferred icon sizes. If the compositor has no size preference, it
|
||||
may not send any 'icon_size' event, and it is up to the client to
|
||||
decide a suitable icon size.
|
||||
|
||||
A sequence of 'icon_size' events must be finished with a 'done' event.
|
||||
If the compositor has no size preferences, it must still send the
|
||||
'done' event, without any preceding 'icon_size' events.
|
||||
</description>
|
||||
<arg name="size" type="int"
|
||||
summary="the edge size of the square icon in surface-local coordinates, e.g. 64"/>
|
||||
</event>
|
||||
|
||||
<event name="done">
|
||||
<description summary="all information has been sent">
|
||||
This event is sent after all 'icon_size' events have been sent.
|
||||
</description>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="xdg_toplevel_icon_v1" version="1">
|
||||
<description summary="a toplevel window icon">
|
||||
This interface defines a toplevel icon.
|
||||
An icon can have a name, and multiple buffers.
|
||||
In order to be applied, the icon must have either a name, or at least
|
||||
one buffer assigned. Applying an empty icon (with no buffer or name) to
|
||||
a toplevel should reset its icon to the default icon.
|
||||
|
||||
It is up to compositor policy whether to prefer using a buffer or loading
|
||||
an icon via its name. See 'set_name' and 'add_buffer' for details.
|
||||
</description>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="invalid_buffer"
|
||||
summary="the provided buffer does not satisfy requirements"
|
||||
value="1"/>
|
||||
<entry name="immutable"
|
||||
summary="the icon has already been assigned to a toplevel and must not be changed"
|
||||
value="2"/>
|
||||
<entry name="no_buffer"
|
||||
summary="the provided buffer has been destroyed before the toplevel icon"
|
||||
value="3"/>
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the icon object">
|
||||
Destroys the 'xdg_toplevel_icon_v1' object.
|
||||
The icon must still remain set on every toplevel it was assigned to,
|
||||
until the toplevel icon is reset explicitly.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="set_name">
|
||||
<description summary="set an icon name">
|
||||
This request assigns an icon name to this icon.
|
||||
Any previously set name is overridden.
|
||||
|
||||
The compositor must resolve 'icon_name' according to the lookup rules
|
||||
described in the XDG icon theme specification[1] using the
|
||||
environment's current icon theme.
|
||||
|
||||
If the compositor does not support icon names or cannot resolve
|
||||
'icon_name' according to the XDG icon theme specification it must
|
||||
fall back to using pixel buffer data instead.
|
||||
|
||||
If this request is made after the icon has been assigned to a toplevel
|
||||
via 'set_icon', a 'immutable' error must be raised.
|
||||
|
||||
[1]: https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
|
||||
</description>
|
||||
<arg name="icon_name" type="string"/>
|
||||
</request>
|
||||
|
||||
<request name="add_buffer">
|
||||
<description summary="add icon data from a pixel buffer">
|
||||
This request adds pixel data supplied as wl_buffer to the icon.
|
||||
|
||||
The client should add pixel data for all icon sizes and scales that
|
||||
it can provide, or which are explicitly requested by the compositor
|
||||
via 'icon_size' events on xdg_toplevel_icon_manager_v1.
|
||||
|
||||
The wl_buffer supplying pixel data as 'buffer' must be backed by wl_shm
|
||||
and must be a square (width and height being equal).
|
||||
If any of these buffer requirements are not fulfilled, a 'invalid_buffer'
|
||||
error must be raised.
|
||||
|
||||
If this icon instance already has a buffer of the same size and scale
|
||||
from a previous 'add_buffer' request, data from the last request
|
||||
overrides the preexisting pixel data.
|
||||
|
||||
The wl_buffer must be kept alive for as long as the xdg_toplevel_icon
|
||||
it is associated with is not destroyed, otherwise a 'no_buffer' error
|
||||
is raised. The buffer contents must not be modified after it was
|
||||
assigned to the icon. As a result, the region of the wl_shm_pool's
|
||||
backing storage used for the wl_buffer must not be modified after this
|
||||
request is sent. The wl_buffer.release event is unused.
|
||||
|
||||
If this request is made after the icon has been assigned to a toplevel
|
||||
via 'set_icon', a 'immutable' error must be raised.
|
||||
</description>
|
||||
<arg name="buffer" type="object" interface="wl_buffer"/>
|
||||
<arg name="scale" type="int"
|
||||
summary="the scaling factor of the icon, e.g. 1"/>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
||||
36
src/external/RGFW/wayland.mk
vendored
Normal file
36
src/external/RGFW/wayland.mk
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
SYSTEM_WAYLAND := /usr/share/wayland-protocols
|
||||
LOCAL_WAYLAND := ./deps/wayland
|
||||
|
||||
WAYLAND_PROTO := \
|
||||
stable/xdg-shell/xdg-shell \
|
||||
unstable/xdg-decoration/xdg-decoration-unstable-v1 \
|
||||
staging/xdg-toplevel-icon/xdg-toplevel-icon-v1 \
|
||||
unstable/relative-pointer/relative-pointer-unstable-v1 \
|
||||
unstable/pointer-constraints/pointer-constraints-unstable-v1 \
|
||||
unstable/xdg-output/xdg-output-unstable-v1 \
|
||||
staging/pointer-warp/pointer-warp-v1 \
|
||||
|
||||
|
||||
WAYLAND_HEADERS = $(addsuffix .h,$(WAYLAND_PROTO))
|
||||
WAYLAND_SOURCE = $(addsuffix .c,$(WAYLAND_PROTO))
|
||||
|
||||
# if the file exists in $(SYSTEM_WAYLAND) exists, use it else use the one in $(LOCAL_WAYLAND) but without the extra path
|
||||
define find_xml
|
||||
$(if $(wildcard $(SYSTEM_WAYLAND)/$(1)),\
|
||||
$(SYSTEM_WAYLAND)/$(1),\
|
||||
$(LOCAL_WAYLAND)/$(notdir $(1)))
|
||||
endef
|
||||
|
||||
all: $(WAYLAND_HEADERS) $(WAYLAND_SOURCE)
|
||||
|
||||
$(WAYLAND_HEADERS): %.h:
|
||||
wayland-scanner client-header $(call find_xml,$(@:.h=.xml)) $(notdir $@)
|
||||
|
||||
$(WAYLAND_SOURCE): %.c:
|
||||
wayland-scanner public-code $(call find_xml,$(@:.c=.xml)) $(notdir $@)
|
||||
|
||||
sources:
|
||||
@echo $(notdir $(WAYLAND_SOURCE))
|
||||
|
||||
clean:
|
||||
rm $(notdir $(WAYLAND_SOURCE)) $(notdir $(WAYLAND_HEADERS))
|
||||
Loading…
Reference in New Issue
Block a user