koffi 0.9.5 → 0.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +661 -0
- package/README.md +74 -9
- package/package.json +27 -7
- package/src/call.hh +2 -1
- package/src/call_arm32.cc +525 -0
- package/src/call_arm32_fwd.S +108 -0
- package/src/call_arm64.cc +90 -63
- package/src/call_arm64_fwd.S +24 -29
- package/src/call_x64_sysv.cc +61 -48
- package/src/call_x64_win.cc +69 -43
- package/src/call_x86.cc +83 -62
- package/src/ffi.cc +166 -37
- package/src/ffi.hh +43 -12
- package/src/util.cc +72 -32
- package/src/util.hh +127 -18
- package/test/files/node32.cmd +6 -0
- package/test/files/node64.cmd +6 -0
- package/test/registry/machines.json +185 -0
- package/test/registry/sha256sum.txt +24 -0
- package/test/test.js +625 -0
- package/test/tests/misc.c +40 -0
- package/test/tests/misc.js +54 -0
- package/test/tests/raylib.js +167 -0
- package/vendor/dragonbox/include/dragonbox/dragonbox.h +6 -2
- package/vendor/dragonbox/other_files/Dragonbox.pdf +0 -0
- package/vendor/libcc/libcc.cc +36 -18
- package/vendor/libcc/libcc.hh +23 -1
- package/vendor/raylib/BINDINGS.md +123 -0
- package/vendor/raylib/CHANGELOG +1495 -0
- package/vendor/raylib/CMakeLists.txt +33 -0
- package/vendor/raylib/CMakeOptions.txt +87 -0
- package/vendor/raylib/CONTRIBUTING.md +76 -0
- package/vendor/raylib/CONTRIBUTORS.md +63 -0
- package/vendor/raylib/CONVENTIONS.md +95 -0
- package/vendor/raylib/HISTORY.md +364 -0
- package/vendor/raylib/LICENSE +16 -0
- package/vendor/raylib/README.md +141 -0
- package/vendor/raylib/ROADMAP.md +76 -0
- package/vendor/raylib/SPONSORS.md +68 -0
- package/vendor/raylib/cmake/AddIfFlagCompiles.cmake +12 -0
- package/vendor/raylib/cmake/BuildOptions.cmake +18 -0
- package/vendor/raylib/cmake/CompileDefinitions.cmake +110 -0
- package/vendor/raylib/cmake/CompilerFlags.cmake +79 -0
- package/vendor/raylib/cmake/EnumOption.cmake +9 -0
- package/vendor/raylib/cmake/GlfwImport.cmake +34 -0
- package/vendor/raylib/cmake/InstallConfigurations.cmake +29 -0
- package/vendor/raylib/cmake/JoinPaths.cmake +26 -0
- package/vendor/raylib/cmake/LibraryConfigurations.cmake +108 -0
- package/vendor/raylib/cmake/LibraryPathToLinkerFlags.cmake +24 -0
- package/vendor/raylib/cmake/PackConfigurations.cmake +13 -0
- package/vendor/raylib/cmake/PopulateConfigVariablesLocally.cmake +11 -0
- package/vendor/raylib/cmake/raylib-config-version.cmake +21 -0
- package/vendor/raylib/cmake/raylib-config.cmake +76 -0
- package/vendor/raylib/examples/CMakeLists.txt +139 -0
- package/vendor/raylib/examples/Makefile +565 -0
- package/vendor/raylib/examples/Makefile.Android +405 -0
- package/vendor/raylib/examples/Makefile.Web +1053 -0
- package/vendor/raylib/examples/README.md +203 -0
- package/vendor/raylib/examples/audio/audio_module_playing.c +146 -0
- package/vendor/raylib/examples/audio/audio_module_playing.png +0 -0
- package/vendor/raylib/examples/audio/audio_multichannel_sound.c +73 -0
- package/vendor/raylib/examples/audio/audio_multichannel_sound.png +0 -0
- package/vendor/raylib/examples/audio/audio_music_stream.c +93 -0
- package/vendor/raylib/examples/audio/audio_music_stream.png +0 -0
- package/vendor/raylib/examples/audio/audio_raw_stream.c +167 -0
- package/vendor/raylib/examples/audio/audio_raw_stream.png +0 -0
- package/vendor/raylib/examples/audio/audio_sound_loading.c +64 -0
- package/vendor/raylib/examples/audio/audio_sound_loading.png +0 -0
- package/vendor/raylib/examples/audio/resources/LICENSE.md +10 -0
- package/vendor/raylib/examples/audio/resources/coin.wav +0 -0
- package/vendor/raylib/examples/audio/resources/country.mp3 +0 -0
- package/vendor/raylib/examples/audio/resources/mini1111.xm +0 -0
- package/vendor/raylib/examples/audio/resources/sound.wav +0 -0
- package/vendor/raylib/examples/audio/resources/spring.wav +0 -0
- package/vendor/raylib/examples/audio/resources/target.flac +0 -0
- package/vendor/raylib/examples/audio/resources/target.ogg +0 -0
- package/vendor/raylib/examples/audio/resources/weird.wav +0 -0
- package/vendor/raylib/examples/build.zig +86 -0
- package/vendor/raylib/examples/core/core_2d_camera.c +132 -0
- package/vendor/raylib/examples/core/core_2d_camera.png +0 -0
- package/vendor/raylib/examples/core/core_2d_camera_platformer.c +293 -0
- package/vendor/raylib/examples/core/core_2d_camera_platformer.png +0 -0
- package/vendor/raylib/examples/core/core_2d_camera_smooth_pixelperfect.png +0 -0
- package/vendor/raylib/examples/core/core_3d_camera_first_person.c +97 -0
- package/vendor/raylib/examples/core/core_3d_camera_first_person.png +0 -0
- package/vendor/raylib/examples/core/core_3d_camera_free.c +83 -0
- package/vendor/raylib/examples/core/core_3d_camera_free.png +0 -0
- package/vendor/raylib/examples/core/core_3d_camera_mode.c +73 -0
- package/vendor/raylib/examples/core/core_3d_camera_mode.png +0 -0
- package/vendor/raylib/examples/core/core_3d_picking.c +107 -0
- package/vendor/raylib/examples/core/core_3d_picking.png +0 -0
- package/vendor/raylib/examples/core/core_basic_screen_manager.c +150 -0
- package/vendor/raylib/examples/core/core_basic_screen_manager.png +0 -0
- package/vendor/raylib/examples/core/core_basic_window.c +62 -0
- package/vendor/raylib/examples/core/core_basic_window.png +0 -0
- package/vendor/raylib/examples/core/core_basic_window_web.c +85 -0
- package/vendor/raylib/examples/core/core_custom_frame_control.c +125 -0
- package/vendor/raylib/examples/core/core_custom_frame_control.png +0 -0
- package/vendor/raylib/examples/core/core_custom_logging.c +84 -0
- package/vendor/raylib/examples/core/core_custom_logging.png +0 -0
- package/vendor/raylib/examples/core/core_drop_files.c +76 -0
- package/vendor/raylib/examples/core/core_drop_files.png +0 -0
- package/vendor/raylib/examples/core/core_input_gamepad.c +195 -0
- package/vendor/raylib/examples/core/core_input_gamepad.png +0 -0
- package/vendor/raylib/examples/core/core_input_gestures.c +115 -0
- package/vendor/raylib/examples/core/core_input_gestures.png +0 -0
- package/vendor/raylib/examples/core/core_input_keys.c +59 -0
- package/vendor/raylib/examples/core/core_input_keys.png +0 -0
- package/vendor/raylib/examples/core/core_input_mouse.c +65 -0
- package/vendor/raylib/examples/core/core_input_mouse.png +0 -0
- package/vendor/raylib/examples/core/core_input_mouse_wheel.c +58 -0
- package/vendor/raylib/examples/core/core_input_mouse_wheel.png +0 -0
- package/vendor/raylib/examples/core/core_input_multitouch.c +70 -0
- package/vendor/raylib/examples/core/core_input_multitouch.png +0 -0
- package/vendor/raylib/examples/core/core_loading_thread.c +147 -0
- package/vendor/raylib/examples/core/core_loading_thread.png +0 -0
- package/vendor/raylib/examples/core/core_quat_conversion.c +132 -0
- package/vendor/raylib/examples/core/core_quat_conversion.png +0 -0
- package/vendor/raylib/examples/core/core_random_values.c +67 -0
- package/vendor/raylib/examples/core/core_random_values.png +0 -0
- package/vendor/raylib/examples/core/core_scissor_test.c +71 -0
- package/vendor/raylib/examples/core/core_scissor_test.png +0 -0
- package/vendor/raylib/examples/core/core_smooth_pixelperfect.c +117 -0
- package/vendor/raylib/examples/core/core_smooth_pixelperfect.png +0 -0
- package/vendor/raylib/examples/core/core_split_screen.c +155 -0
- package/vendor/raylib/examples/core/core_split_screen.png +0 -0
- package/vendor/raylib/examples/core/core_storage_values.c +87 -0
- package/vendor/raylib/examples/core/core_storage_values.png +0 -0
- package/vendor/raylib/examples/core/core_vr_simulator.c +143 -0
- package/vendor/raylib/examples/core/core_vr_simulator.png +0 -0
- package/vendor/raylib/examples/core/core_window_flags.c +191 -0
- package/vendor/raylib/examples/core/core_window_flags.png +0 -0
- package/vendor/raylib/examples/core/core_window_letterbox.c +112 -0
- package/vendor/raylib/examples/core/core_window_letterbox.png +0 -0
- package/vendor/raylib/examples/core/core_world_screen.c +78 -0
- package/vendor/raylib/examples/core/core_world_screen.png +0 -0
- package/vendor/raylib/examples/core/resources/LICENSE.md +4 -0
- package/vendor/raylib/examples/core/resources/distortion100.fs +52 -0
- package/vendor/raylib/examples/core/resources/distortion330.fs +53 -0
- package/vendor/raylib/examples/core/resources/ps3.png +0 -0
- package/vendor/raylib/examples/core/resources/xbox.png +0 -0
- package/vendor/raylib/examples/examples_template.c +100 -0
- package/vendor/raylib/examples/models/models_animation.c +114 -0
- package/vendor/raylib/examples/models/models_animation.png +0 -0
- package/vendor/raylib/examples/models/models_billboard.c +75 -0
- package/vendor/raylib/examples/models/models_billboard.png +0 -0
- package/vendor/raylib/examples/models/models_box_collisions.c +121 -0
- package/vendor/raylib/examples/models/models_box_collisions.png +0 -0
- package/vendor/raylib/examples/models/models_cubicmap.c +87 -0
- package/vendor/raylib/examples/models/models_cubicmap.png +0 -0
- package/vendor/raylib/examples/models/models_first_person_maze.c +122 -0
- package/vendor/raylib/examples/models/models_first_person_maze.png +0 -0
- package/vendor/raylib/examples/models/models_geometric_shapes.c +80 -0
- package/vendor/raylib/examples/models/models_geometric_shapes.png +0 -0
- package/vendor/raylib/examples/models/models_heightmap.c +82 -0
- package/vendor/raylib/examples/models/models_heightmap.png +0 -0
- package/vendor/raylib/examples/models/models_loading.c +146 -0
- package/vendor/raylib/examples/models/models_loading.png +0 -0
- package/vendor/raylib/examples/models/models_loading_gltf.c +105 -0
- package/vendor/raylib/examples/models/models_loading_gltf.png +0 -0
- package/vendor/raylib/examples/models/models_loading_vox.c +130 -0
- package/vendor/raylib/examples/models/models_loading_vox.png +0 -0
- package/vendor/raylib/examples/models/models_mesh_generation.c +179 -0
- package/vendor/raylib/examples/models/models_mesh_generation.png +0 -0
- package/vendor/raylib/examples/models/models_mesh_picking.c +223 -0
- package/vendor/raylib/examples/models/models_mesh_picking.png +0 -0
- package/vendor/raylib/examples/models/models_orthographic_projection.c +99 -0
- package/vendor/raylib/examples/models/models_orthographic_projection.png +0 -0
- package/vendor/raylib/examples/models/models_rlgl_solar_system.c +172 -0
- package/vendor/raylib/examples/models/models_rlgl_solar_system.png +0 -0
- package/vendor/raylib/examples/models/models_skybox.c +262 -0
- package/vendor/raylib/examples/models/models_skybox.png +0 -0
- package/vendor/raylib/examples/models/models_waving_cubes.c +112 -0
- package/vendor/raylib/examples/models/models_waving_cubes.png +0 -0
- package/vendor/raylib/examples/models/models_yaw_pitch_roll.c +117 -0
- package/vendor/raylib/examples/models/models_yaw_pitch_roll.png +0 -0
- package/vendor/raylib/examples/models/resources/LICENSE.md +23 -0
- package/vendor/raylib/examples/models/resources/billboard.png +0 -0
- package/vendor/raylib/examples/models/resources/cubicmap.png +0 -0
- package/vendor/raylib/examples/models/resources/cubicmap_atlas.png +0 -0
- package/vendor/raylib/examples/models/resources/dresden_square_1k.hdr +0 -0
- package/vendor/raylib/examples/models/resources/dresden_square_2k.hdr +0 -0
- package/vendor/raylib/examples/models/resources/heightmap.png +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/AnimatedMorphCube.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/AnimatedTriangle.gltf +118 -0
- package/vendor/raylib/examples/models/resources/models/gltf/BoxAnimated.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/LICENSE +23 -0
- package/vendor/raylib/examples/models/resources/models/gltf/girl.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/raylib_32x32.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/rigged_figure.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/vertex_colored_object.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/guy.blend +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/guy.iqm +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/guyanim.iqm +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/guytex.png +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/vertex_colored_object.iqm +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/bridge.obj +1725 -0
- package/vendor/raylib/examples/models/resources/models/obj/bridge_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/castle.obj +12919 -0
- package/vendor/raylib/examples/models/resources/models/obj/castle_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/cube.obj +68 -0
- package/vendor/raylib/examples/models/resources/models/obj/cube_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/house.obj +4564 -0
- package/vendor/raylib/examples/models/resources/models/obj/house_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/market.obj +7301 -0
- package/vendor/raylib/examples/models/resources/models/obj/market_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/plane.obj +10858 -0
- package/vendor/raylib/examples/models/resources/models/obj/plane_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/turret.obj +1888 -0
- package/vendor/raylib/examples/models/resources/models/obj/turret_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/well.obj +1030 -0
- package/vendor/raylib/examples/models/resources/models/obj/well_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/vox/LICENSE +9 -0
- package/vendor/raylib/examples/models/resources/models/vox/chr_knight.vox +0 -0
- package/vendor/raylib/examples/models/resources/models/vox/chr_sword.vox +0 -0
- package/vendor/raylib/examples/models/resources/models/vox/monu9.vox +0 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl100/cubemap.fs +29 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl100/cubemap.vs +20 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl100/skybox.fs +31 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl100/skybox.vs +24 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl330/cubemap.fs +30 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl330/cubemap.vs +20 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl330/skybox.fs +30 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl330/skybox.vs +24 -0
- package/vendor/raylib/examples/models/resources/skybox.png +0 -0
- package/vendor/raylib/examples/models/rlights.h +183 -0
- package/vendor/raylib/examples/others/easings.h +263 -0
- package/vendor/raylib/examples/others/easings_testbed.c +227 -0
- package/vendor/raylib/examples/others/embedded_files_loading.c +103 -0
- package/vendor/raylib/examples/others/external/include/GLFW/glfw3.h +5538 -0
- package/vendor/raylib/examples/others/external/include/GLFW/glfw3native.h +572 -0
- package/vendor/raylib/examples/others/external/include/glad.h +5466 -0
- package/vendor/raylib/examples/others/external/lib/libglfw3.a +0 -0
- package/vendor/raylib/examples/others/raudio_standalone.c +152 -0
- package/vendor/raylib/examples/others/raylib_opengl_interop.c +152 -0
- package/vendor/raylib/examples/others/raylib_opengl_interop.png +0 -0
- package/vendor/raylib/examples/others/resources/audio/country.mp3 +0 -0
- package/vendor/raylib/examples/others/resources/audio/target.ogg +0 -0
- package/vendor/raylib/examples/others/resources/audio/weird.wav +0 -0
- package/vendor/raylib/examples/others/resources/audio_data.h +4893 -0
- package/vendor/raylib/examples/others/resources/image_data.h +9848 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl100/point_particle.fs +16 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl100/point_particle.vs +24 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl330/point_particle.fs +17 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl330/point_particle.vs +24 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl430/gol.glsl +41 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl430/gol_render.glsl +29 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl430/gol_transfert.glsl +51 -0
- package/vendor/raylib/examples/others/rlgl_compute_shader.c +173 -0
- package/vendor/raylib/examples/others/rlgl_standalone.c +469 -0
- package/vendor/raylib/examples/physics/physics_demo.c +128 -0
- package/vendor/raylib/examples/physics/physics_demo.png +0 -0
- package/vendor/raylib/examples/physics/physics_friction.c +142 -0
- package/vendor/raylib/examples/physics/physics_friction.png +0 -0
- package/vendor/raylib/examples/physics/physics_movement.c +128 -0
- package/vendor/raylib/examples/physics/physics_movement.png +0 -0
- package/vendor/raylib/examples/physics/physics_restitution.c +129 -0
- package/vendor/raylib/examples/physics/physics_restitution.png +0 -0
- package/vendor/raylib/examples/physics/physics_shatter.c +111 -0
- package/vendor/raylib/examples/physics/physics_shatter.png +0 -0
- package/vendor/raylib/examples/raylib_compile_execute.bat +32 -0
- package/vendor/raylib/examples/raylib_makefile_example.bat +27 -0
- package/vendor/raylib/examples/shaders/resources/LICENSE.md +11 -0
- package/vendor/raylib/examples/shaders/resources/fudesumi.png +0 -0
- package/vendor/raylib/examples/shaders/resources/mask.png +0 -0
- package/vendor/raylib/examples/shaders/resources/models/barracks.obj +22251 -0
- package/vendor/raylib/examples/shaders/resources/models/barracks_diffuse.png +0 -0
- package/vendor/raylib/examples/shaders/resources/models/church.obj +5116 -0
- package/vendor/raylib/examples/shaders/resources/models/church_diffuse.png +0 -0
- package/vendor/raylib/examples/shaders/resources/models/watermill.obj +5316 -0
- package/vendor/raylib/examples/shaders/resources/models/watermill_diffuse.png +0 -0
- package/vendor/raylib/examples/shaders/resources/plasma.png +0 -0
- package/vendor/raylib/examples/shaders/resources/raysan.png +0 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base.fs +23 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base.vs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base_lighting.vs +59 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base_lighting_instanced.vs +36 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/bloom.fs +39 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/blur.fs +34 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/color_mix.fs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/cross_hatching.fs +47 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/cross_stitching.fs +57 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/cubes_panning.fs +60 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/depth.fs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/distortion.fs +54 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/dream_vision.fs +37 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/eratosthenes.fs +60 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/fisheye.fs +43 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/fog.fs +94 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/grayscale.fs +25 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/julia_set.fs +83 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/lighting.fs +81 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/mask.fs +24 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/outline.fs +34 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/palette_switch.fs +41 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/pixelizer.fs +32 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/posterization.fs +29 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/predator.fs +31 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/raymarching.fs +431 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/reload.fs +39 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/scanlines.fs +44 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/sobel.fs +40 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/spotlight.fs +77 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/swirl.fs +46 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/wave.fs +36 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/base.fs +22 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/base.vs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/base_lighting.vs +59 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/bloom.fs +37 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/blur.fs +32 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/cross_hatching.fs +45 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/cross_stitching.fs +55 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/distortion.fs +52 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/dream_vision.fs +35 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/fisheye.fs +41 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/fog.fs +92 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/grayscale.fs +23 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/palette_switch.fs +27 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/pixelizer.fs +30 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/posterization.fs +27 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/predator.fs +29 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/scanlines.fs +42 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/sobel.fs +38 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/swirl.fs +44 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base.fs +25 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base.vs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base_lighting.vs +32 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base_lighting_instanced.vs +36 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/bloom.fs +40 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/blur.fs +35 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/color_mix.fs +27 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/cross_hatching.fs +48 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/cross_stitching.fs +59 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/cubes_panning.fs +61 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/depth.fs +27 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/distortion.fs +56 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/dream_vision.fs +34 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/eratosthenes.fs +59 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/fisheye.fs +40 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/fog.fs +95 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/grayscale.fs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/julia_set.fs +81 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/lighting.fs +82 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/mask.fs +22 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/outline.fs +35 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/overdraw.fs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/palette_switch.fs +30 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/pixelizer.fs +33 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/posterization.fs +31 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/predator.fs +32 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/raymarching.fs +430 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/reload.fs +40 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/scanlines.fs +49 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/sobel.fs +41 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/spotlight.fs +65 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/swirl.fs +47 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/wave.fs +37 -0
- package/vendor/raylib/examples/shaders/resources/space.png +0 -0
- package/vendor/raylib/examples/shaders/resources/texel_checker.png +0 -0
- package/vendor/raylib/examples/shaders/rlights.h +183 -0
- package/vendor/raylib/examples/shaders/shaders_basic_lighting.c +152 -0
- package/vendor/raylib/examples/shaders/shaders_basic_lighting.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_custom_uniform.c +127 -0
- package/vendor/raylib/examples/shaders/shaders_custom_uniform.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_eratosthenes.c +92 -0
- package/vendor/raylib/examples/shaders/shaders_eratosthenes.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_fog.c +160 -0
- package/vendor/raylib/examples/shaders/shaders_fog.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_hot_reloading.c +130 -0
- package/vendor/raylib/examples/shaders/shaders_hot_reloading.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_julia_set.c +191 -0
- package/vendor/raylib/examples/shaders/shaders_julia_set.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_mesh_instancing.c +224 -0
- package/vendor/raylib/examples/shaders/shaders_mesh_instancing.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_model_shader.c +103 -0
- package/vendor/raylib/examples/shaders/shaders_model_shader.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_multi_sample2d.c +105 -0
- package/vendor/raylib/examples/shaders/shaders_multi_sample2d.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_palette_switch.c +147 -0
- package/vendor/raylib/examples/shaders/shaders_palette_switch.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_postprocessing.c +170 -0
- package/vendor/raylib/examples/shaders/shaders_postprocessing.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_raymarching.c +113 -0
- package/vendor/raylib/examples/shaders/shaders_raymarching.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_shapes_textures.c +116 -0
- package/vendor/raylib/examples/shaders/shaders_shapes_textures.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_simple_mask.c +144 -0
- package/vendor/raylib/examples/shaders/shaders_simple_mask.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_spotlight.c +254 -0
- package/vendor/raylib/examples/shaders/shaders_spotlight.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_texture_drawing.c +80 -0
- package/vendor/raylib/examples/shaders/shaders_texture_drawing.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_texture_outline.c +97 -0
- package/vendor/raylib/examples/shaders/shaders_texture_outline.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_texture_waves.c +110 -0
- package/vendor/raylib/examples/shaders/shaders_texture_waves.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_basic_shapes.c +78 -0
- package/vendor/raylib/examples/shapes/shapes_basic_shapes.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_bouncing_ball.c +76 -0
- package/vendor/raylib/examples/shapes/shapes_bouncing_ball.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_collision_area.c +108 -0
- package/vendor/raylib/examples/shapes/shapes_collision_area.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_colors_palette.c +99 -0
- package/vendor/raylib/examples/shapes/shapes_colors_palette.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.c +83 -0
- package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.c +89 -0
- package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_draw_ring.c +96 -0
- package/vendor/raylib/examples/shapes/shapes_draw_ring.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.c +110 -0
- package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_easings_box_anim.c +136 -0
- package/vendor/raylib/examples/shapes/shapes_easings_box_anim.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.c +118 -0
- package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_following_eyes.c +104 -0
- package/vendor/raylib/examples/shapes/shapes_following_eyes.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_lines_bezier.c +59 -0
- package/vendor/raylib/examples/shapes/shapes_lines_bezier.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_logo_raylib.c +56 -0
- package/vendor/raylib/examples/shapes/shapes_logo_raylib.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.c +160 -0
- package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.c +94 -0
- package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.png +0 -0
- package/vendor/raylib/examples/text/resources/KAISG.ttf +0 -0
- package/vendor/raylib/examples/text/resources/LICENSE.md +20 -0
- package/vendor/raylib/examples/text/resources/anonymous_pro_bold.ttf +0 -0
- package/vendor/raylib/examples/text/resources/custom_alagard.png +0 -0
- package/vendor/raylib/examples/text/resources/custom_jupiter_crash.png +0 -0
- package/vendor/raylib/examples/text/resources/custom_mecha.png +0 -0
- package/vendor/raylib/examples/text/resources/dejavu.fnt +1115 -0
- package/vendor/raylib/examples/text/resources/dejavu.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/alagard.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/alpha_beta.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/jupiter_crash.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/mecha.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/pixantiqua.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/pixelplay.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/romulus.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/setback.png +0 -0
- package/vendor/raylib/examples/text/resources/noto_cjk.fnt +580 -0
- package/vendor/raylib/examples/text/resources/noto_cjk.png +0 -0
- package/vendor/raylib/examples/text/resources/pixantiqua.fnt +188 -0
- package/vendor/raylib/examples/text/resources/pixantiqua.png +0 -0
- package/vendor/raylib/examples/text/resources/pixantiqua.ttf +0 -0
- package/vendor/raylib/examples/text/resources/shaders/glsl100/alpha_discard.fs +20 -0
- package/vendor/raylib/examples/text/resources/shaders/glsl100/sdf.fs +25 -0
- package/vendor/raylib/examples/text/resources/shaders/glsl330/alpha_discard.fs +19 -0
- package/vendor/raylib/examples/text/resources/shaders/glsl330/sdf.fs +26 -0
- package/vendor/raylib/examples/text/resources/symbola.fnt +191 -0
- package/vendor/raylib/examples/text/resources/symbola.png +0 -0
- package/vendor/raylib/examples/text/text_draw_3d.c +739 -0
- package/vendor/raylib/examples/text/text_draw_3d.png +0 -0
- package/vendor/raylib/examples/text/text_font_filters.c +134 -0
- package/vendor/raylib/examples/text/text_font_filters.png +0 -0
- package/vendor/raylib/examples/text/text_font_loading.c +91 -0
- package/vendor/raylib/examples/text/text_font_loading.png +0 -0
- package/vendor/raylib/examples/text/text_font_sdf.c +141 -0
- package/vendor/raylib/examples/text/text_font_sdf.png +0 -0
- package/vendor/raylib/examples/text/text_font_spritefont.c +85 -0
- package/vendor/raylib/examples/text/text_font_spritefont.png +0 -0
- package/vendor/raylib/examples/text/text_format_text.c +62 -0
- package/vendor/raylib/examples/text/text_format_text.png +0 -0
- package/vendor/raylib/examples/text/text_input_box.c +127 -0
- package/vendor/raylib/examples/text/text_input_box.png +0 -0
- package/vendor/raylib/examples/text/text_raylib_fonts.c +105 -0
- package/vendor/raylib/examples/text/text_raylib_fonts.png +0 -0
- package/vendor/raylib/examples/text/text_rectangle_bounds.c +264 -0
- package/vendor/raylib/examples/text/text_rectangle_bounds.png +0 -0
- package/vendor/raylib/examples/text/text_unicode.c +465 -0
- package/vendor/raylib/examples/text/text_unicode.png +0 -0
- package/vendor/raylib/examples/text/text_writing_anim.c +62 -0
- package/vendor/raylib/examples/text/text_writing_anim.png +0 -0
- package/vendor/raylib/examples/textures/resources/KAISG.ttf +0 -0
- package/vendor/raylib/examples/textures/resources/LICENSE.md +18 -0
- package/vendor/raylib/examples/textures/resources/boom.wav +0 -0
- package/vendor/raylib/examples/textures/resources/button.png +0 -0
- package/vendor/raylib/examples/textures/resources/buttonfx.wav +0 -0
- package/vendor/raylib/examples/textures/resources/cat.png +0 -0
- package/vendor/raylib/examples/textures/resources/custom_jupiter_crash.png +0 -0
- package/vendor/raylib/examples/textures/resources/cyberpunk_street_background.png +0 -0
- package/vendor/raylib/examples/textures/resources/cyberpunk_street_foreground.png +0 -0
- package/vendor/raylib/examples/textures/resources/cyberpunk_street_midground.png +0 -0
- package/vendor/raylib/examples/textures/resources/explosion.png +0 -0
- package/vendor/raylib/examples/textures/resources/fudesumi.png +0 -0
- package/vendor/raylib/examples/textures/resources/fudesumi.raw +0 -0
- package/vendor/raylib/examples/textures/resources/ninepatch_button.png +0 -0
- package/vendor/raylib/examples/textures/resources/parrots.png +0 -0
- package/vendor/raylib/examples/textures/resources/patterns.png +0 -0
- package/vendor/raylib/examples/textures/resources/raylib_logo.png +0 -0
- package/vendor/raylib/examples/textures/resources/scarfy.png +0 -0
- package/vendor/raylib/examples/textures/resources/spark_flame.png +0 -0
- package/vendor/raylib/examples/textures/resources/wabbit_alpha.png +0 -0
- package/vendor/raylib/examples/textures/textures_background_scrolling.c +87 -0
- package/vendor/raylib/examples/textures/textures_background_scrolling.png +0 -0
- package/vendor/raylib/examples/textures/textures_blend_modes.c +93 -0
- package/vendor/raylib/examples/textures/textures_blend_modes.png +0 -0
- package/vendor/raylib/examples/textures/textures_bunnymark.c +120 -0
- package/vendor/raylib/examples/textures/textures_bunnymark.png +0 -0
- package/vendor/raylib/examples/textures/textures_draw_tiled.c +165 -0
- package/vendor/raylib/examples/textures/textures_draw_tiled.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_drawing.c +91 -0
- package/vendor/raylib/examples/textures/textures_image_drawing.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_generation.c +102 -0
- package/vendor/raylib/examples/textures/textures_image_generation.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_loading.c +64 -0
- package/vendor/raylib/examples/textures/textures_image_loading.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_processing.c +169 -0
- package/vendor/raylib/examples/textures/textures_image_processing.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_text.c +83 -0
- package/vendor/raylib/examples/textures/textures_image_text.png +0 -0
- package/vendor/raylib/examples/textures/textures_logo_raylib.c +57 -0
- package/vendor/raylib/examples/textures/textures_logo_raylib.png +0 -0
- package/vendor/raylib/examples/textures/textures_mouse_painting.c +221 -0
- package/vendor/raylib/examples/textures/textures_mouse_painting.png +0 -0
- package/vendor/raylib/examples/textures/textures_npatch_drawing.c +109 -0
- package/vendor/raylib/examples/textures/textures_npatch_drawing.png +0 -0
- package/vendor/raylib/examples/textures/textures_particles_blending.c +135 -0
- package/vendor/raylib/examples/textures/textures_particles_blending.png +0 -0
- package/vendor/raylib/examples/textures/textures_polygon.c +100 -0
- package/vendor/raylib/examples/textures/textures_polygon.png +0 -0
- package/vendor/raylib/examples/textures/textures_raw_data.c +99 -0
- package/vendor/raylib/examples/textures/textures_raw_data.png +0 -0
- package/vendor/raylib/examples/textures/textures_rectangle.c +99 -0
- package/vendor/raylib/examples/textures/textures_rectangle.png +0 -0
- package/vendor/raylib/examples/textures/textures_sprite_button.c +97 -0
- package/vendor/raylib/examples/textures/textures_sprite_button.png +0 -0
- package/vendor/raylib/examples/textures/textures_sprite_explosion.c +120 -0
- package/vendor/raylib/examples/textures/textures_sprite_explosion.png +0 -0
- package/vendor/raylib/examples/textures/textures_srcrec_dstrec.c +82 -0
- package/vendor/raylib/examples/textures/textures_srcrec_dstrec.png +0 -0
- package/vendor/raylib/examples/textures/textures_to_image.c +68 -0
- package/vendor/raylib/examples/textures/textures_to_image.png +0 -0
- package/vendor/raylib/logo/raylib.ico +0 -0
- package/vendor/raylib/logo/raylib_128x128.png +0 -0
- package/vendor/raylib/logo/raylib_144x144.png +0 -0
- package/vendor/raylib/logo/raylib_16x16.png +0 -0
- package/vendor/raylib/logo/raylib_180x180.png +0 -0
- package/vendor/raylib/logo/raylib_24x24.png +0 -0
- package/vendor/raylib/logo/raylib_256x256.png +0 -0
- package/vendor/raylib/logo/raylib_32x32.png +0 -0
- package/vendor/raylib/logo/raylib_36x36.png +0 -0
- package/vendor/raylib/logo/raylib_48x48.png +0 -0
- package/vendor/raylib/logo/raylib_512x512.png +0 -0
- package/vendor/raylib/logo/raylib_64x64.png +0 -0
- package/vendor/raylib/logo/raylib_72x72.png +0 -0
- package/vendor/raylib/logo/raylib_96x96.png +0 -0
- package/vendor/raylib/logo/raylib_logo_animation.gif +0 -0
- package/vendor/raylib/parser/LICENSE +16 -0
- package/vendor/raylib/parser/README.md +63 -0
- package/vendor/raylib/parser/raylib_api.json +6668 -0
- package/vendor/raylib/parser/raylib_api.txt +3568 -0
- package/vendor/raylib/parser/raylib_api.xml +2509 -0
- package/vendor/raylib/parser/raylib_parser.c +1003 -0
- package/vendor/raylib/projects/4coder/Makefile +401 -0
- package/vendor/raylib/projects/4coder/Makefile.Android +300 -0
- package/vendor/raylib/projects/4coder/main.c +39 -0
- package/vendor/raylib/projects/4coder/project.4coder +54 -0
- package/vendor/raylib/projects/Builder/README.md +24 -0
- package/vendor/raylib/projects/Builder/examples/README.md +1 -0
- package/vendor/raylib/projects/Builder/examples/meson.build +25 -0
- package/vendor/raylib/projects/Builder/meson.build +25 -0
- package/vendor/raylib/projects/CMake/CMakeLists.txt +44 -0
- package/vendor/raylib/projects/CMake/core_basic_window.c +62 -0
- package/vendor/raylib/projects/CodeBlocks/README.md +22 -0
- package/vendor/raylib/projects/CodeBlocks/compiler_settings.png +0 -0
- package/vendor/raylib/projects/CodeBlocks/core_basic_window.c +58 -0
- package/vendor/raylib/projects/CodeBlocks/core_basic_window.cbp +137 -0
- package/vendor/raylib/projects/Geany/core_basic_window.c +52 -0
- package/vendor/raylib/projects/Geany/raylib.c.tags +452 -0
- package/vendor/raylib/projects/Geany/raylib_compile_execute.bat +21 -0
- package/vendor/raylib/projects/Geany/raylib_compile_sources.bat +42 -0
- package/vendor/raylib/projects/Geany/raylib_project.geany +41 -0
- package/vendor/raylib/projects/Notepad++/README.md +19 -0
- package/vendor/raylib/projects/Notepad++/c_raylib.xml +3104 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_mingw.txt +0 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_tcc.txt +0 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_w64devkit.txt +0 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_zig.txt +0 -0
- package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp.xml +3060 -0
- package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp_parser.c +150 -0
- package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +631 -0
- package/vendor/raylib/projects/README.md +18 -0
- package/vendor/raylib/projects/SublimeText/README.md +13 -0
- package/vendor/raylib/projects/SublimeText/raylib.sublime-build +13 -0
- package/vendor/raylib/projects/SublimeText/raylib.sublime-project +8 -0
- package/vendor/raylib/projects/VS2019/examples/audio_module_playing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/audio_multichannel_sound.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/audio_music_stream.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/audio_raw_stream.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/audio_sound_loading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_2d_camera.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_2d_camera_platformer.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_3d_camera_first_person.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_3d_camera_free.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_3d_camera_mode.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_3d_picking.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_basic_window.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_custom_logging.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_drop_files.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_input_gamepad.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_input_gestures.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_input_keys.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_input_mouse.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_input_mouse_wheel.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_input_multitouch.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_loading_thread.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_quat_conversion.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_random_values.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_scissor_test.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_split_screen.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_storage_values.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_vr_simulator.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_window_flags.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_window_letterbox.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/core_world_screen.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/easings_testbed.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/embedded_files_loading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_animation.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_billboard.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_box_collisions.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_cubicmap.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_first_person_maze.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_geometric_shapes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_heightmap.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_loading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_loading_gltf.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_loading_vox.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_mesh_generation.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_mesh_picking.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_orthographic_projection.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_rlgl_solar_system.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_skybox.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_waving_cubes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/models_yaw_pitch_roll.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/physics_demo.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/physics_friction.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/physics_movement.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/physics_restitution.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/physics_shatter.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/raudio_standalone.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/rlgl_standalone.vcxproj +391 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_basic_lighting.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_custom_uniform.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_eratosthenes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_fog.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_hot_reloading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_julia_set.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_mesh_instancing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_model_shader.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_multi_sample2d.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_palette_switch.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_postprocessing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_raymarching.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_shapes_textures.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_simple_mask.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_spotlight.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_texture_drawing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shaders_texture_waves.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_basic_shapes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_bouncing_ball.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_collision_area.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_colors_palette.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_draw_circle_sector.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_draw_rectangle_rounded.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_draw_ring.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_easings_ball_anim.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_easings_box_anim.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_easings_rectangle_array.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_following_eyes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_lines_bezier.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_logo_raylib.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_logo_raylib_anim.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/shapes_rectangle_scaling.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/text_font_filters.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/text_font_loading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/text_font_sdf.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/text_font_spritefont.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/text_format_text.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/text_input_box.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/text_raylib_fonts.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/text_rectangle_bounds.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/text_unicode.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/text_writing_anim.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_background_scrolling.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_blend_modes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_bunnymark.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_draw_tiled.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_image_drawing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_image_generation.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_image_loading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_image_processing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_image_text.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_logo_raylib.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_mouse_painting.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_npatch_drawing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_particles_blending.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_raw_data.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_rectangle.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_sprite_button.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_sprite_explosion.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_srcrec_dstrec.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/examples/textures_to_image.vcxproj +387 -0
- package/vendor/raylib/projects/VS2019/raylib/raylib.rc +0 -0
- package/vendor/raylib/projects/VS2019/raylib/raylib.vcxproj +341 -0
- package/vendor/raylib/projects/VS2019/raylib/resource.h +14 -0
- package/vendor/raylib/projects/VS2019/raylib.sln +2274 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/android_native_app_glue.c +437 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/android_native_app_glue.h +344 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c +64 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj +226 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj.filters +10 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj.user +4 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/AndroidManifest.xml +22 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/build.xml +90 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/project.properties +3 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/raylib_android.Packaging.androidproj +134 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/res/values/strings.xml +4 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android.sln +75 -0
- package/vendor/raylib/projects/VSCode/.vscode/c_cpp_properties.json +63 -0
- package/vendor/raylib/projects/VSCode/.vscode/launch.json +60 -0
- package/vendor/raylib/projects/VSCode/.vscode/settings.json +11 -0
- package/vendor/raylib/projects/VSCode/.vscode/tasks.json +71 -0
- package/vendor/raylib/projects/VSCode/Makefile +408 -0
- package/vendor/raylib/projects/VSCode/Makefile.Android +300 -0
- package/vendor/raylib/projects/VSCode/main.c +83 -0
- package/vendor/raylib/projects/VSCode/main.code-workspace +16 -0
- package/vendor/raylib/projects/scripts/README.md +68 -0
- package/vendor/raylib/projects/scripts/build-linux.sh +169 -0
- package/vendor/raylib/projects/scripts/build-osx.sh +171 -0
- package/vendor/raylib/projects/scripts/build-rpi.sh +169 -0
- package/vendor/raylib/projects/scripts/build-windows.bat +219 -0
- package/vendor/raylib/projects/scripts/core_basic_window.c +61 -0
- package/vendor/raylib/raylib.pc.in +13 -0
- package/vendor/raylib/src/CMakeLists.txt +121 -0
- package/vendor/raylib/src/Makefile +696 -0
- package/vendor/raylib/src/build.zig +60 -0
- package/vendor/raylib/src/config.h +230 -0
- package/vendor/raylib/src/external/cgltf.h +6501 -0
- package/vendor/raylib/src/external/dirent.h +183 -0
- package/vendor/raylib/src/external/dr_flac.h +12269 -0
- package/vendor/raylib/src/external/dr_mp3.h +4787 -0
- package/vendor/raylib/src/external/dr_wav.h +8019 -0
- package/vendor/raylib/src/external/glad.h +8640 -0
- package/vendor/raylib/src/external/glfw/.mailmap +10 -0
- package/vendor/raylib/src/external/glfw/CMake/GenerateMappings.cmake +33 -0
- package/vendor/raylib/src/external/glfw/CMake/Info.plist.in +38 -0
- package/vendor/raylib/src/external/glfw/CMake/MacOSXBundleInfo.plist.in +38 -0
- package/vendor/raylib/src/external/glfw/CMake/cmake_uninstall.cmake.in +29 -0
- package/vendor/raylib/src/external/glfw/CMake/glfw3.pc.in +13 -0
- package/vendor/raylib/src/external/glfw/CMake/glfw3Config.cmake.in +3 -0
- package/vendor/raylib/src/external/glfw/CMake/i686-w64-mingw32-clang.cmake +13 -0
- package/vendor/raylib/src/external/glfw/CMake/i686-w64-mingw32.cmake +13 -0
- package/vendor/raylib/src/external/glfw/CMake/modules/FindEpollShim.cmake +17 -0
- package/vendor/raylib/src/external/glfw/CMake/modules/FindOSMesa.cmake +18 -0
- package/vendor/raylib/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake +26 -0
- package/vendor/raylib/src/external/glfw/CMake/modules/FindXKBCommon.cmake +34 -0
- package/vendor/raylib/src/external/glfw/CMake/x86_64-w64-mingw32-clang.cmake +13 -0
- package/vendor/raylib/src/external/glfw/CMake/x86_64-w64-mingw32.cmake +13 -0
- package/vendor/raylib/src/external/glfw/CMakeLists.txt +323 -0
- package/vendor/raylib/src/external/glfw/LICENSE.md +23 -0
- package/vendor/raylib/src/external/glfw/README.md +477 -0
- package/vendor/raylib/src/external/glfw/deps/getopt.c +230 -0
- package/vendor/raylib/src/external/glfw/deps/getopt.h +57 -0
- package/vendor/raylib/src/external/glfw/deps/glad/gl.h +3840 -0
- package/vendor/raylib/src/external/glfw/deps/glad/khrplatform.h +282 -0
- package/vendor/raylib/src/external/glfw/deps/glad/vk_platform.h +92 -0
- package/vendor/raylib/src/external/glfw/deps/glad/vulkan.h +3480 -0
- package/vendor/raylib/src/external/glfw/deps/glad_gl.c +1791 -0
- package/vendor/raylib/src/external/glfw/deps/glad_vulkan.c +593 -0
- package/vendor/raylib/src/external/glfw/deps/mingw/_mingw_dxhelper.h +117 -0
- package/vendor/raylib/src/external/glfw/deps/mingw/dinput.h +2467 -0
- package/vendor/raylib/src/external/glfw/deps/mingw/xinput.h +239 -0
- package/vendor/raylib/src/external/glfw/deps/vs2008/stdint.h +247 -0
- package/vendor/raylib/src/external/glfw/include/GLFW/glfw3.h +6075 -0
- package/vendor/raylib/src/external/glfw/include/GLFW/glfw3native.h +530 -0
- package/vendor/raylib/src/external/glfw/src/CMakeLists.txt +246 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_init.m +620 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_joystick.h +46 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_joystick.m +483 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_monitor.m +631 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_platform.h +206 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_time.c +62 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_window.m +1923 -0
- package/vendor/raylib/src/external/glfw/src/context.c +756 -0
- package/vendor/raylib/src/external/glfw/src/egl_context.c +846 -0
- package/vendor/raylib/src/external/glfw/src/egl_context.h +229 -0
- package/vendor/raylib/src/external/glfw/src/glfw.rc.in +30 -0
- package/vendor/raylib/src/external/glfw/src/glfw_config.h.in +58 -0
- package/vendor/raylib/src/external/glfw/src/glx_context.c +699 -0
- package/vendor/raylib/src/external/glfw/src/glx_context.h +181 -0
- package/vendor/raylib/src/external/glfw/src/init.c +357 -0
- package/vendor/raylib/src/external/glfw/src/input.c +1406 -0
- package/vendor/raylib/src/external/glfw/src/internal.h +799 -0
- package/vendor/raylib/src/external/glfw/src/linux_joystick.c +428 -0
- package/vendor/raylib/src/external/glfw/src/linux_joystick.h +59 -0
- package/vendor/raylib/src/external/glfw/src/mappings.h +1550 -0
- package/vendor/raylib/src/external/glfw/src/mappings.h.in +73 -0
- package/vendor/raylib/src/external/glfw/src/monitor.c +542 -0
- package/vendor/raylib/src/external/glfw/src/nsgl_context.h +66 -0
- package/vendor/raylib/src/external/glfw/src/nsgl_context.m +369 -0
- package/vendor/raylib/src/external/glfw/src/null_init.c +57 -0
- package/vendor/raylib/src/external/glfw/src/null_joystick.c +53 -0
- package/vendor/raylib/src/external/glfw/src/null_joystick.h +31 -0
- package/vendor/raylib/src/external/glfw/src/null_monitor.c +159 -0
- package/vendor/raylib/src/external/glfw/src/null_platform.h +89 -0
- package/vendor/raylib/src/external/glfw/src/null_window.c +670 -0
- package/vendor/raylib/src/external/glfw/src/osmesa_context.c +372 -0
- package/vendor/raylib/src/external/glfw/src/osmesa_context.h +90 -0
- package/vendor/raylib/src/external/glfw/src/posix_thread.c +105 -0
- package/vendor/raylib/src/external/glfw/src/posix_thread.h +51 -0
- package/vendor/raylib/src/external/glfw/src/posix_time.c +90 -0
- package/vendor/raylib/src/external/glfw/src/posix_time.h +44 -0
- package/vendor/raylib/src/external/glfw/src/vulkan.c +332 -0
- package/vendor/raylib/src/external/glfw/src/wgl_context.c +798 -0
- package/vendor/raylib/src/external/glfw/src/wgl_context.h +160 -0
- package/vendor/raylib/src/external/glfw/src/win32_init.c +636 -0
- package/vendor/raylib/src/external/glfw/src/win32_joystick.c +753 -0
- package/vendor/raylib/src/external/glfw/src/win32_joystick.h +53 -0
- package/vendor/raylib/src/external/glfw/src/win32_monitor.c +537 -0
- package/vendor/raylib/src/external/glfw/src/win32_platform.h +462 -0
- package/vendor/raylib/src/external/glfw/src/win32_thread.c +99 -0
- package/vendor/raylib/src/external/glfw/src/win32_time.c +76 -0
- package/vendor/raylib/src/external/glfw/src/win32_window.c +2405 -0
- package/vendor/raylib/src/external/glfw/src/window.c +1114 -0
- package/vendor/raylib/src/external/glfw/src/wl_init.c +1310 -0
- package/vendor/raylib/src/external/glfw/src/wl_monitor.c +231 -0
- package/vendor/raylib/src/external/glfw/src/wl_platform.h +352 -0
- package/vendor/raylib/src/external/glfw/src/wl_window.c +1814 -0
- package/vendor/raylib/src/external/glfw/src/x11_init.c +1500 -0
- package/vendor/raylib/src/external/glfw/src/x11_monitor.c +614 -0
- package/vendor/raylib/src/external/glfw/src/x11_platform.h +798 -0
- package/vendor/raylib/src/external/glfw/src/x11_window.c +3310 -0
- package/vendor/raylib/src/external/glfw/src/xkb_unicode.c +942 -0
- package/vendor/raylib/src/external/glfw/src/xkb_unicode.h +28 -0
- package/vendor/raylib/src/external/jar_mod.h +1596 -0
- package/vendor/raylib/src/external/jar_xm.h +2470 -0
- package/vendor/raylib/src/external/miniaudio.h +70273 -0
- package/vendor/raylib/src/external/msf_gif.h +717 -0
- package/vendor/raylib/src/external/par_shapes.h +2155 -0
- package/vendor/raylib/src/external/sdefl.h +696 -0
- package/vendor/raylib/src/external/sinfl.h +584 -0
- package/vendor/raylib/src/external/stb_image.h +7897 -0
- package/vendor/raylib/src/external/stb_image_resize.h +2634 -0
- package/vendor/raylib/src/external/stb_image_write.h +1724 -0
- package/vendor/raylib/src/external/stb_rect_pack.h +623 -0
- package/vendor/raylib/src/external/stb_truetype.h +5077 -0
- package/vendor/raylib/src/external/stb_vorbis.h +5475 -0
- package/vendor/raylib/src/external/tinyobj_loader_c.h +1589 -0
- package/vendor/raylib/src/external/vox_loader.h +710 -0
- package/vendor/raylib/src/extras/easings.h +263 -0
- package/vendor/raylib/src/extras/physac.h +1977 -0
- package/vendor/raylib/src/extras/raygui.h +4342 -0
- package/vendor/raylib/src/extras/rmem.h +751 -0
- package/vendor/raylib/src/raudio.c +2380 -0
- package/vendor/raylib/src/raudio.h +198 -0
- package/vendor/raylib/src/raylib.dll.rc +27 -0
- package/vendor/raylib/src/raylib.dll.rc.data +0 -0
- package/vendor/raylib/src/raylib.h +1536 -0
- package/vendor/raylib/src/raylib.ico +0 -0
- package/vendor/raylib/src/raylib.rc +27 -0
- package/vendor/raylib/src/raylib.rc.data +0 -0
- package/vendor/raylib/src/raymath.h +1853 -0
- package/vendor/raylib/src/rcamera.h +567 -0
- package/vendor/raylib/src/rcore.c +6772 -0
- package/vendor/raylib/src/rgestures.h +566 -0
- package/vendor/raylib/src/rglfw.c +126 -0
- package/vendor/raylib/src/rlgl.h +4677 -0
- package/vendor/raylib/src/rmodels.c +5041 -0
- package/vendor/raylib/src/rshapes.c +1759 -0
- package/vendor/raylib/src/rtext.c +1790 -0
- package/vendor/raylib/src/rtextures.c +4761 -0
- package/vendor/raylib/src/shell.html +328 -0
- package/vendor/raylib/src/utils.c +433 -0
- package/vendor/raylib/src/utils.h +81 -0
- package/vendor/sqlite3/shell.c +23487 -0
- package/vendor/sqlite3/sqlite3.c +239246 -0
- package/vendor/sqlite3/sqlite3.h +12802 -0
- package/vendor/sqlite3/sqlite3ext.h +689 -0
- package/CMakeLists.txt +0 -60
|
@@ -0,0 +1,1814 @@
|
|
|
1
|
+
//========================================================================
|
|
2
|
+
// GLFW 3.4 Wayland - www.glfw.org
|
|
3
|
+
//------------------------------------------------------------------------
|
|
4
|
+
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
|
5
|
+
//
|
|
6
|
+
// This software is provided 'as-is', without any express or implied
|
|
7
|
+
// warranty. In no event will the authors be held liable for any damages
|
|
8
|
+
// arising from the use of this software.
|
|
9
|
+
//
|
|
10
|
+
// Permission is granted to anyone to use this software for any purpose,
|
|
11
|
+
// including commercial applications, and to alter it and redistribute it
|
|
12
|
+
// freely, subject to the following restrictions:
|
|
13
|
+
//
|
|
14
|
+
// 1. The origin of this software must not be misrepresented; you must not
|
|
15
|
+
// claim that you wrote the original software. If you use this software
|
|
16
|
+
// in a product, an acknowledgment in the product documentation would
|
|
17
|
+
// be appreciated but is not required.
|
|
18
|
+
//
|
|
19
|
+
// 2. Altered source versions must be plainly marked as such, and must not
|
|
20
|
+
// be misrepresented as being the original software.
|
|
21
|
+
//
|
|
22
|
+
// 3. This notice may not be removed or altered from any source
|
|
23
|
+
// distribution.
|
|
24
|
+
//
|
|
25
|
+
//========================================================================
|
|
26
|
+
// It is fine to use C99 in this file because it will not be built with VS
|
|
27
|
+
//========================================================================
|
|
28
|
+
|
|
29
|
+
#define _GNU_SOURCE
|
|
30
|
+
|
|
31
|
+
#include "internal.h"
|
|
32
|
+
|
|
33
|
+
#include <stdio.h>
|
|
34
|
+
#include <stdlib.h>
|
|
35
|
+
#include <errno.h>
|
|
36
|
+
#include <unistd.h>
|
|
37
|
+
#include <string.h>
|
|
38
|
+
#include <fcntl.h>
|
|
39
|
+
#include <sys/mman.h>
|
|
40
|
+
#include <sys/timerfd.h>
|
|
41
|
+
#include <poll.h>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
static int createTmpfileCloexec(char* tmpname)
|
|
45
|
+
{
|
|
46
|
+
int fd;
|
|
47
|
+
|
|
48
|
+
fd = mkostemp(tmpname, O_CLOEXEC);
|
|
49
|
+
if (fd >= 0)
|
|
50
|
+
unlink(tmpname);
|
|
51
|
+
|
|
52
|
+
return fd;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* Create a new, unique, anonymous file of the given size, and
|
|
57
|
+
* return the file descriptor for it. The file descriptor is set
|
|
58
|
+
* CLOEXEC. The file is immediately suitable for mmap()'ing
|
|
59
|
+
* the given size at offset zero.
|
|
60
|
+
*
|
|
61
|
+
* The file should not have a permanent backing store like a disk,
|
|
62
|
+
* but may have if XDG_RUNTIME_DIR is not properly implemented in OS.
|
|
63
|
+
*
|
|
64
|
+
* The file name is deleted from the file system.
|
|
65
|
+
*
|
|
66
|
+
* The file is suitable for buffer sharing between processes by
|
|
67
|
+
* transmitting the file descriptor over Unix sockets using the
|
|
68
|
+
* SCM_RIGHTS methods.
|
|
69
|
+
*
|
|
70
|
+
* posix_fallocate() is used to guarantee that disk space is available
|
|
71
|
+
* for the file at the given size. If disk space is insufficient, errno
|
|
72
|
+
* is set to ENOSPC. If posix_fallocate() is not supported, program may
|
|
73
|
+
* receive SIGBUS on accessing mmap()'ed file contents instead.
|
|
74
|
+
*/
|
|
75
|
+
static int createAnonymousFile(off_t size)
|
|
76
|
+
{
|
|
77
|
+
static const char template[] = "/glfw-shared-XXXXXX";
|
|
78
|
+
const char* path;
|
|
79
|
+
char* name;
|
|
80
|
+
int fd;
|
|
81
|
+
int ret;
|
|
82
|
+
|
|
83
|
+
#ifdef HAVE_MEMFD_CREATE
|
|
84
|
+
fd = memfd_create("glfw-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING);
|
|
85
|
+
if (fd >= 0)
|
|
86
|
+
{
|
|
87
|
+
// We can add this seal before calling posix_fallocate(), as the file
|
|
88
|
+
// is currently zero-sized anyway.
|
|
89
|
+
//
|
|
90
|
+
// There is also no need to check for the return value, we couldn’t do
|
|
91
|
+
// anything with it anyway.
|
|
92
|
+
fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
|
|
93
|
+
}
|
|
94
|
+
else
|
|
95
|
+
#elif defined(SHM_ANON)
|
|
96
|
+
fd = shm_open(SHM_ANON, O_RDWR | O_CLOEXEC, 0600);
|
|
97
|
+
if (fd < 0)
|
|
98
|
+
#endif
|
|
99
|
+
{
|
|
100
|
+
path = getenv("XDG_RUNTIME_DIR");
|
|
101
|
+
if (!path)
|
|
102
|
+
{
|
|
103
|
+
errno = ENOENT;
|
|
104
|
+
return -1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
name = calloc(strlen(path) + sizeof(template), 1);
|
|
108
|
+
strcpy(name, path);
|
|
109
|
+
strcat(name, template);
|
|
110
|
+
|
|
111
|
+
fd = createTmpfileCloexec(name);
|
|
112
|
+
free(name);
|
|
113
|
+
if (fd < 0)
|
|
114
|
+
return -1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
#if defined(SHM_ANON)
|
|
118
|
+
// posix_fallocate does not work on SHM descriptors
|
|
119
|
+
ret = ftruncate(fd, size);
|
|
120
|
+
#else
|
|
121
|
+
ret = posix_fallocate(fd, 0, size);
|
|
122
|
+
#endif
|
|
123
|
+
if (ret != 0)
|
|
124
|
+
{
|
|
125
|
+
close(fd);
|
|
126
|
+
errno = ret;
|
|
127
|
+
return -1;
|
|
128
|
+
}
|
|
129
|
+
return fd;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static struct wl_buffer* createShmBuffer(const GLFWimage* image)
|
|
133
|
+
{
|
|
134
|
+
struct wl_shm_pool* pool;
|
|
135
|
+
struct wl_buffer* buffer;
|
|
136
|
+
int stride = image->width * 4;
|
|
137
|
+
int length = image->width * image->height * 4;
|
|
138
|
+
void* data;
|
|
139
|
+
int fd, i;
|
|
140
|
+
|
|
141
|
+
fd = createAnonymousFile(length);
|
|
142
|
+
if (fd < 0)
|
|
143
|
+
{
|
|
144
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
145
|
+
"Wayland: Creating a buffer file for %d B failed: %s",
|
|
146
|
+
length, strerror(errno));
|
|
147
|
+
return NULL;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
data = mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
|
151
|
+
if (data == MAP_FAILED)
|
|
152
|
+
{
|
|
153
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
154
|
+
"Wayland: mmap failed: %s", strerror(errno));
|
|
155
|
+
close(fd);
|
|
156
|
+
return NULL;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
pool = wl_shm_create_pool(_glfw.wl.shm, fd, length);
|
|
160
|
+
|
|
161
|
+
close(fd);
|
|
162
|
+
unsigned char* source = (unsigned char*) image->pixels;
|
|
163
|
+
unsigned char* target = data;
|
|
164
|
+
for (i = 0; i < image->width * image->height; i++, source += 4)
|
|
165
|
+
{
|
|
166
|
+
unsigned int alpha = source[3];
|
|
167
|
+
|
|
168
|
+
*target++ = (unsigned char) ((source[2] * alpha) / 255);
|
|
169
|
+
*target++ = (unsigned char) ((source[1] * alpha) / 255);
|
|
170
|
+
*target++ = (unsigned char) ((source[0] * alpha) / 255);
|
|
171
|
+
*target++ = (unsigned char) alpha;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
buffer =
|
|
175
|
+
wl_shm_pool_create_buffer(pool, 0,
|
|
176
|
+
image->width,
|
|
177
|
+
image->height,
|
|
178
|
+
stride, WL_SHM_FORMAT_ARGB8888);
|
|
179
|
+
munmap(data, length);
|
|
180
|
+
wl_shm_pool_destroy(pool);
|
|
181
|
+
|
|
182
|
+
return buffer;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
static void createDecoration(_GLFWdecorationWayland* decoration,
|
|
186
|
+
struct wl_surface* parent,
|
|
187
|
+
struct wl_buffer* buffer, GLFWbool opaque,
|
|
188
|
+
int x, int y,
|
|
189
|
+
int width, int height)
|
|
190
|
+
{
|
|
191
|
+
struct wl_region* region;
|
|
192
|
+
|
|
193
|
+
decoration->surface = wl_compositor_create_surface(_glfw.wl.compositor);
|
|
194
|
+
decoration->subsurface =
|
|
195
|
+
wl_subcompositor_get_subsurface(_glfw.wl.subcompositor,
|
|
196
|
+
decoration->surface, parent);
|
|
197
|
+
wl_subsurface_set_position(decoration->subsurface, x, y);
|
|
198
|
+
decoration->viewport = wp_viewporter_get_viewport(_glfw.wl.viewporter,
|
|
199
|
+
decoration->surface);
|
|
200
|
+
wp_viewport_set_destination(decoration->viewport, width, height);
|
|
201
|
+
wl_surface_attach(decoration->surface, buffer, 0, 0);
|
|
202
|
+
|
|
203
|
+
if (opaque)
|
|
204
|
+
{
|
|
205
|
+
region = wl_compositor_create_region(_glfw.wl.compositor);
|
|
206
|
+
wl_region_add(region, 0, 0, width, height);
|
|
207
|
+
wl_surface_set_opaque_region(decoration->surface, region);
|
|
208
|
+
wl_surface_commit(decoration->surface);
|
|
209
|
+
wl_region_destroy(region);
|
|
210
|
+
}
|
|
211
|
+
else
|
|
212
|
+
wl_surface_commit(decoration->surface);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
static void createDecorations(_GLFWwindow* window)
|
|
216
|
+
{
|
|
217
|
+
unsigned char data[] = { 224, 224, 224, 255 };
|
|
218
|
+
const GLFWimage image = { 1, 1, data };
|
|
219
|
+
GLFWbool opaque = (data[3] == 255);
|
|
220
|
+
|
|
221
|
+
if (!_glfw.wl.viewporter || !window->decorated || window->wl.decorations.serverSide)
|
|
222
|
+
return;
|
|
223
|
+
|
|
224
|
+
if (!window->wl.decorations.buffer)
|
|
225
|
+
window->wl.decorations.buffer = createShmBuffer(&image);
|
|
226
|
+
if (!window->wl.decorations.buffer)
|
|
227
|
+
return;
|
|
228
|
+
|
|
229
|
+
createDecoration(&window->wl.decorations.top, window->wl.surface,
|
|
230
|
+
window->wl.decorations.buffer, opaque,
|
|
231
|
+
0, -_GLFW_DECORATION_TOP,
|
|
232
|
+
window->wl.width, _GLFW_DECORATION_TOP);
|
|
233
|
+
createDecoration(&window->wl.decorations.left, window->wl.surface,
|
|
234
|
+
window->wl.decorations.buffer, opaque,
|
|
235
|
+
-_GLFW_DECORATION_WIDTH, -_GLFW_DECORATION_TOP,
|
|
236
|
+
_GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);
|
|
237
|
+
createDecoration(&window->wl.decorations.right, window->wl.surface,
|
|
238
|
+
window->wl.decorations.buffer, opaque,
|
|
239
|
+
window->wl.width, -_GLFW_DECORATION_TOP,
|
|
240
|
+
_GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);
|
|
241
|
+
createDecoration(&window->wl.decorations.bottom, window->wl.surface,
|
|
242
|
+
window->wl.decorations.buffer, opaque,
|
|
243
|
+
-_GLFW_DECORATION_WIDTH, window->wl.height,
|
|
244
|
+
window->wl.width + _GLFW_DECORATION_HORIZONTAL, _GLFW_DECORATION_WIDTH);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
static void destroyDecoration(_GLFWdecorationWayland* decoration)
|
|
248
|
+
{
|
|
249
|
+
if (decoration->subsurface)
|
|
250
|
+
wl_subsurface_destroy(decoration->subsurface);
|
|
251
|
+
if (decoration->surface)
|
|
252
|
+
wl_surface_destroy(decoration->surface);
|
|
253
|
+
if (decoration->viewport)
|
|
254
|
+
wp_viewport_destroy(decoration->viewport);
|
|
255
|
+
decoration->surface = NULL;
|
|
256
|
+
decoration->subsurface = NULL;
|
|
257
|
+
decoration->viewport = NULL;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
static void destroyDecorations(_GLFWwindow* window)
|
|
261
|
+
{
|
|
262
|
+
destroyDecoration(&window->wl.decorations.top);
|
|
263
|
+
destroyDecoration(&window->wl.decorations.left);
|
|
264
|
+
destroyDecoration(&window->wl.decorations.right);
|
|
265
|
+
destroyDecoration(&window->wl.decorations.bottom);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
static void xdgDecorationHandleConfigure(void* data,
|
|
269
|
+
struct zxdg_toplevel_decoration_v1* decoration,
|
|
270
|
+
uint32_t mode)
|
|
271
|
+
{
|
|
272
|
+
_GLFWwindow* window = data;
|
|
273
|
+
|
|
274
|
+
window->wl.decorations.serverSide = (mode == ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
|
275
|
+
|
|
276
|
+
if (!window->wl.decorations.serverSide)
|
|
277
|
+
createDecorations(window);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
static const struct zxdg_toplevel_decoration_v1_listener xdgDecorationListener = {
|
|
281
|
+
xdgDecorationHandleConfigure,
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
// Makes the surface considered as XRGB instead of ARGB.
|
|
285
|
+
static void setOpaqueRegion(_GLFWwindow* window)
|
|
286
|
+
{
|
|
287
|
+
struct wl_region* region;
|
|
288
|
+
|
|
289
|
+
region = wl_compositor_create_region(_glfw.wl.compositor);
|
|
290
|
+
if (!region)
|
|
291
|
+
return;
|
|
292
|
+
|
|
293
|
+
wl_region_add(region, 0, 0, window->wl.width, window->wl.height);
|
|
294
|
+
wl_surface_set_opaque_region(window->wl.surface, region);
|
|
295
|
+
wl_surface_commit(window->wl.surface);
|
|
296
|
+
wl_region_destroy(region);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
static void resizeWindow(_GLFWwindow* window)
|
|
301
|
+
{
|
|
302
|
+
int scale = window->wl.scale;
|
|
303
|
+
int scaledWidth = window->wl.width * scale;
|
|
304
|
+
int scaledHeight = window->wl.height * scale;
|
|
305
|
+
wl_egl_window_resize(window->wl.native, scaledWidth, scaledHeight, 0, 0);
|
|
306
|
+
if (!window->wl.transparent)
|
|
307
|
+
setOpaqueRegion(window);
|
|
308
|
+
_glfwInputFramebufferSize(window, scaledWidth, scaledHeight);
|
|
309
|
+
_glfwInputWindowContentScale(window, scale, scale);
|
|
310
|
+
|
|
311
|
+
if (!window->wl.decorations.top.surface)
|
|
312
|
+
return;
|
|
313
|
+
|
|
314
|
+
// Top decoration.
|
|
315
|
+
wp_viewport_set_destination(window->wl.decorations.top.viewport,
|
|
316
|
+
window->wl.width, _GLFW_DECORATION_TOP);
|
|
317
|
+
wl_surface_commit(window->wl.decorations.top.surface);
|
|
318
|
+
|
|
319
|
+
// Left decoration.
|
|
320
|
+
wp_viewport_set_destination(window->wl.decorations.left.viewport,
|
|
321
|
+
_GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);
|
|
322
|
+
wl_surface_commit(window->wl.decorations.left.surface);
|
|
323
|
+
|
|
324
|
+
// Right decoration.
|
|
325
|
+
wl_subsurface_set_position(window->wl.decorations.right.subsurface,
|
|
326
|
+
window->wl.width, -_GLFW_DECORATION_TOP);
|
|
327
|
+
wp_viewport_set_destination(window->wl.decorations.right.viewport,
|
|
328
|
+
_GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);
|
|
329
|
+
wl_surface_commit(window->wl.decorations.right.surface);
|
|
330
|
+
|
|
331
|
+
// Bottom decoration.
|
|
332
|
+
wl_subsurface_set_position(window->wl.decorations.bottom.subsurface,
|
|
333
|
+
-_GLFW_DECORATION_WIDTH, window->wl.height);
|
|
334
|
+
wp_viewport_set_destination(window->wl.decorations.bottom.viewport,
|
|
335
|
+
window->wl.width + _GLFW_DECORATION_HORIZONTAL, _GLFW_DECORATION_WIDTH);
|
|
336
|
+
wl_surface_commit(window->wl.decorations.bottom.surface);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
static void checkScaleChange(_GLFWwindow* window)
|
|
340
|
+
{
|
|
341
|
+
int scale = 1;
|
|
342
|
+
int i;
|
|
343
|
+
int monitorScale;
|
|
344
|
+
|
|
345
|
+
// Check if we will be able to set the buffer scale or not.
|
|
346
|
+
if (_glfw.wl.compositorVersion < 3)
|
|
347
|
+
return;
|
|
348
|
+
|
|
349
|
+
// Get the scale factor from the highest scale monitor.
|
|
350
|
+
for (i = 0; i < window->wl.monitorsCount; ++i)
|
|
351
|
+
{
|
|
352
|
+
monitorScale = window->wl.monitors[i]->wl.scale;
|
|
353
|
+
if (scale < monitorScale)
|
|
354
|
+
scale = monitorScale;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Only change the framebuffer size if the scale changed.
|
|
358
|
+
if (scale != window->wl.scale)
|
|
359
|
+
{
|
|
360
|
+
window->wl.scale = scale;
|
|
361
|
+
wl_surface_set_buffer_scale(window->wl.surface, scale);
|
|
362
|
+
resizeWindow(window);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
static void surfaceHandleEnter(void *data,
|
|
367
|
+
struct wl_surface *surface,
|
|
368
|
+
struct wl_output *output)
|
|
369
|
+
{
|
|
370
|
+
_GLFWwindow* window = data;
|
|
371
|
+
_GLFWmonitor* monitor = wl_output_get_user_data(output);
|
|
372
|
+
|
|
373
|
+
if (window->wl.monitorsCount + 1 > window->wl.monitorsSize)
|
|
374
|
+
{
|
|
375
|
+
++window->wl.monitorsSize;
|
|
376
|
+
window->wl.monitors =
|
|
377
|
+
realloc(window->wl.monitors,
|
|
378
|
+
window->wl.monitorsSize * sizeof(_GLFWmonitor*));
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
window->wl.monitors[window->wl.monitorsCount++] = monitor;
|
|
382
|
+
|
|
383
|
+
checkScaleChange(window);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
static void surfaceHandleLeave(void *data,
|
|
387
|
+
struct wl_surface *surface,
|
|
388
|
+
struct wl_output *output)
|
|
389
|
+
{
|
|
390
|
+
_GLFWwindow* window = data;
|
|
391
|
+
_GLFWmonitor* monitor = wl_output_get_user_data(output);
|
|
392
|
+
GLFWbool found;
|
|
393
|
+
int i;
|
|
394
|
+
|
|
395
|
+
for (i = 0, found = GLFW_FALSE; i < window->wl.monitorsCount - 1; ++i)
|
|
396
|
+
{
|
|
397
|
+
if (monitor == window->wl.monitors[i])
|
|
398
|
+
found = GLFW_TRUE;
|
|
399
|
+
if (found)
|
|
400
|
+
window->wl.monitors[i] = window->wl.monitors[i + 1];
|
|
401
|
+
}
|
|
402
|
+
window->wl.monitors[--window->wl.monitorsCount] = NULL;
|
|
403
|
+
|
|
404
|
+
checkScaleChange(window);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
static const struct wl_surface_listener surfaceListener = {
|
|
408
|
+
surfaceHandleEnter,
|
|
409
|
+
surfaceHandleLeave
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
static void setIdleInhibitor(_GLFWwindow* window, GLFWbool enable)
|
|
413
|
+
{
|
|
414
|
+
if (enable && !window->wl.idleInhibitor && _glfw.wl.idleInhibitManager)
|
|
415
|
+
{
|
|
416
|
+
window->wl.idleInhibitor =
|
|
417
|
+
zwp_idle_inhibit_manager_v1_create_inhibitor(
|
|
418
|
+
_glfw.wl.idleInhibitManager, window->wl.surface);
|
|
419
|
+
if (!window->wl.idleInhibitor)
|
|
420
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
421
|
+
"Wayland: Idle inhibitor creation failed");
|
|
422
|
+
}
|
|
423
|
+
else if (!enable && window->wl.idleInhibitor)
|
|
424
|
+
{
|
|
425
|
+
zwp_idle_inhibitor_v1_destroy(window->wl.idleInhibitor);
|
|
426
|
+
window->wl.idleInhibitor = NULL;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
static GLFWbool createSurface(_GLFWwindow* window,
|
|
431
|
+
const _GLFWwndconfig* wndconfig)
|
|
432
|
+
{
|
|
433
|
+
window->wl.surface = wl_compositor_create_surface(_glfw.wl.compositor);
|
|
434
|
+
if (!window->wl.surface)
|
|
435
|
+
return GLFW_FALSE;
|
|
436
|
+
|
|
437
|
+
wl_surface_add_listener(window->wl.surface,
|
|
438
|
+
&surfaceListener,
|
|
439
|
+
window);
|
|
440
|
+
|
|
441
|
+
wl_surface_set_user_data(window->wl.surface, window);
|
|
442
|
+
|
|
443
|
+
window->wl.native = wl_egl_window_create(window->wl.surface,
|
|
444
|
+
wndconfig->width,
|
|
445
|
+
wndconfig->height);
|
|
446
|
+
if (!window->wl.native)
|
|
447
|
+
return GLFW_FALSE;
|
|
448
|
+
|
|
449
|
+
window->wl.width = wndconfig->width;
|
|
450
|
+
window->wl.height = wndconfig->height;
|
|
451
|
+
window->wl.scale = 1;
|
|
452
|
+
|
|
453
|
+
if (!window->wl.transparent)
|
|
454
|
+
setOpaqueRegion(window);
|
|
455
|
+
|
|
456
|
+
return GLFW_TRUE;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
static void setFullscreen(_GLFWwindow* window, _GLFWmonitor* monitor,
|
|
460
|
+
int refreshRate)
|
|
461
|
+
{
|
|
462
|
+
if (window->wl.xdg.toplevel)
|
|
463
|
+
{
|
|
464
|
+
xdg_toplevel_set_fullscreen(
|
|
465
|
+
window->wl.xdg.toplevel,
|
|
466
|
+
monitor->wl.output);
|
|
467
|
+
}
|
|
468
|
+
setIdleInhibitor(window, GLFW_TRUE);
|
|
469
|
+
if (!window->wl.decorations.serverSide)
|
|
470
|
+
destroyDecorations(window);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
static void xdgToplevelHandleConfigure(void* data,
|
|
474
|
+
struct xdg_toplevel* toplevel,
|
|
475
|
+
int32_t width,
|
|
476
|
+
int32_t height,
|
|
477
|
+
struct wl_array* states)
|
|
478
|
+
{
|
|
479
|
+
_GLFWwindow* window = data;
|
|
480
|
+
float aspectRatio;
|
|
481
|
+
float targetRatio;
|
|
482
|
+
uint32_t* state;
|
|
483
|
+
GLFWbool maximized = GLFW_FALSE;
|
|
484
|
+
GLFWbool fullscreen = GLFW_FALSE;
|
|
485
|
+
GLFWbool activated = GLFW_FALSE;
|
|
486
|
+
|
|
487
|
+
wl_array_for_each(state, states)
|
|
488
|
+
{
|
|
489
|
+
switch (*state)
|
|
490
|
+
{
|
|
491
|
+
case XDG_TOPLEVEL_STATE_MAXIMIZED:
|
|
492
|
+
maximized = GLFW_TRUE;
|
|
493
|
+
break;
|
|
494
|
+
case XDG_TOPLEVEL_STATE_FULLSCREEN:
|
|
495
|
+
fullscreen = GLFW_TRUE;
|
|
496
|
+
break;
|
|
497
|
+
case XDG_TOPLEVEL_STATE_RESIZING:
|
|
498
|
+
break;
|
|
499
|
+
case XDG_TOPLEVEL_STATE_ACTIVATED:
|
|
500
|
+
activated = GLFW_TRUE;
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
if (width != 0 && height != 0)
|
|
506
|
+
{
|
|
507
|
+
if (!maximized && !fullscreen)
|
|
508
|
+
{
|
|
509
|
+
if (window->numer != GLFW_DONT_CARE && window->denom != GLFW_DONT_CARE)
|
|
510
|
+
{
|
|
511
|
+
aspectRatio = (float)width / (float)height;
|
|
512
|
+
targetRatio = (float)window->numer / (float)window->denom;
|
|
513
|
+
if (aspectRatio < targetRatio)
|
|
514
|
+
height = width / targetRatio;
|
|
515
|
+
else if (aspectRatio > targetRatio)
|
|
516
|
+
width = height * targetRatio;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
_glfwInputWindowSize(window, width, height);
|
|
521
|
+
_glfwPlatformSetWindowSize(window, width, height);
|
|
522
|
+
_glfwInputWindowDamage(window);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
if (window->wl.wasFullscreen && window->autoIconify)
|
|
526
|
+
{
|
|
527
|
+
if (!activated || !fullscreen)
|
|
528
|
+
{
|
|
529
|
+
_glfwPlatformIconifyWindow(window);
|
|
530
|
+
window->wl.wasFullscreen = GLFW_FALSE;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
if (fullscreen && activated)
|
|
534
|
+
window->wl.wasFullscreen = GLFW_TRUE;
|
|
535
|
+
_glfwInputWindowFocus(window, activated);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
static void xdgToplevelHandleClose(void* data,
|
|
539
|
+
struct xdg_toplevel* toplevel)
|
|
540
|
+
{
|
|
541
|
+
_GLFWwindow* window = data;
|
|
542
|
+
_glfwInputWindowCloseRequest(window);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
static const struct xdg_toplevel_listener xdgToplevelListener = {
|
|
546
|
+
xdgToplevelHandleConfigure,
|
|
547
|
+
xdgToplevelHandleClose
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
static void xdgSurfaceHandleConfigure(void* data,
|
|
551
|
+
struct xdg_surface* surface,
|
|
552
|
+
uint32_t serial)
|
|
553
|
+
{
|
|
554
|
+
xdg_surface_ack_configure(surface, serial);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
static const struct xdg_surface_listener xdgSurfaceListener = {
|
|
558
|
+
xdgSurfaceHandleConfigure
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
static void setXdgDecorations(_GLFWwindow* window)
|
|
562
|
+
{
|
|
563
|
+
if (_glfw.wl.decorationManager)
|
|
564
|
+
{
|
|
565
|
+
window->wl.xdg.decoration =
|
|
566
|
+
zxdg_decoration_manager_v1_get_toplevel_decoration(
|
|
567
|
+
_glfw.wl.decorationManager, window->wl.xdg.toplevel);
|
|
568
|
+
zxdg_toplevel_decoration_v1_add_listener(window->wl.xdg.decoration,
|
|
569
|
+
&xdgDecorationListener,
|
|
570
|
+
window);
|
|
571
|
+
zxdg_toplevel_decoration_v1_set_mode(
|
|
572
|
+
window->wl.xdg.decoration,
|
|
573
|
+
ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
|
574
|
+
}
|
|
575
|
+
else
|
|
576
|
+
{
|
|
577
|
+
window->wl.decorations.serverSide = GLFW_FALSE;
|
|
578
|
+
createDecorations(window);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
static GLFWbool createXdgSurface(_GLFWwindow* window)
|
|
583
|
+
{
|
|
584
|
+
window->wl.xdg.surface = xdg_wm_base_get_xdg_surface(_glfw.wl.wmBase,
|
|
585
|
+
window->wl.surface);
|
|
586
|
+
if (!window->wl.xdg.surface)
|
|
587
|
+
{
|
|
588
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
589
|
+
"Wayland: xdg-surface creation failed");
|
|
590
|
+
return GLFW_FALSE;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
xdg_surface_add_listener(window->wl.xdg.surface,
|
|
594
|
+
&xdgSurfaceListener,
|
|
595
|
+
window);
|
|
596
|
+
|
|
597
|
+
window->wl.xdg.toplevel = xdg_surface_get_toplevel(window->wl.xdg.surface);
|
|
598
|
+
if (!window->wl.xdg.toplevel)
|
|
599
|
+
{
|
|
600
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
601
|
+
"Wayland: xdg-toplevel creation failed");
|
|
602
|
+
return GLFW_FALSE;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
xdg_toplevel_add_listener(window->wl.xdg.toplevel,
|
|
606
|
+
&xdgToplevelListener,
|
|
607
|
+
window);
|
|
608
|
+
|
|
609
|
+
if (window->wl.title)
|
|
610
|
+
xdg_toplevel_set_title(window->wl.xdg.toplevel, window->wl.title);
|
|
611
|
+
|
|
612
|
+
if (window->minwidth != GLFW_DONT_CARE && window->minheight != GLFW_DONT_CARE)
|
|
613
|
+
xdg_toplevel_set_min_size(window->wl.xdg.toplevel,
|
|
614
|
+
window->minwidth, window->minheight);
|
|
615
|
+
if (window->maxwidth != GLFW_DONT_CARE && window->maxheight != GLFW_DONT_CARE)
|
|
616
|
+
xdg_toplevel_set_max_size(window->wl.xdg.toplevel,
|
|
617
|
+
window->maxwidth, window->maxheight);
|
|
618
|
+
|
|
619
|
+
if (window->monitor)
|
|
620
|
+
{
|
|
621
|
+
xdg_toplevel_set_fullscreen(window->wl.xdg.toplevel,
|
|
622
|
+
window->monitor->wl.output);
|
|
623
|
+
setIdleInhibitor(window, GLFW_TRUE);
|
|
624
|
+
}
|
|
625
|
+
else if (window->wl.maximized)
|
|
626
|
+
{
|
|
627
|
+
xdg_toplevel_set_maximized(window->wl.xdg.toplevel);
|
|
628
|
+
setIdleInhibitor(window, GLFW_FALSE);
|
|
629
|
+
setXdgDecorations(window);
|
|
630
|
+
}
|
|
631
|
+
else
|
|
632
|
+
{
|
|
633
|
+
setIdleInhibitor(window, GLFW_FALSE);
|
|
634
|
+
setXdgDecorations(window);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
wl_surface_commit(window->wl.surface);
|
|
638
|
+
wl_display_roundtrip(_glfw.wl.display);
|
|
639
|
+
|
|
640
|
+
return GLFW_TRUE;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
static void setCursorImage(_GLFWwindow* window,
|
|
644
|
+
_GLFWcursorWayland* cursorWayland)
|
|
645
|
+
{
|
|
646
|
+
struct itimerspec timer = {};
|
|
647
|
+
struct wl_cursor* wlCursor = cursorWayland->cursor;
|
|
648
|
+
struct wl_cursor_image* image;
|
|
649
|
+
struct wl_buffer* buffer;
|
|
650
|
+
struct wl_surface* surface = _glfw.wl.cursorSurface;
|
|
651
|
+
int scale = 1;
|
|
652
|
+
|
|
653
|
+
if (!wlCursor)
|
|
654
|
+
buffer = cursorWayland->buffer;
|
|
655
|
+
else
|
|
656
|
+
{
|
|
657
|
+
if (window->wl.scale > 1 && cursorWayland->cursorHiDPI)
|
|
658
|
+
{
|
|
659
|
+
wlCursor = cursorWayland->cursorHiDPI;
|
|
660
|
+
scale = 2;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
image = wlCursor->images[cursorWayland->currentImage];
|
|
664
|
+
buffer = wl_cursor_image_get_buffer(image);
|
|
665
|
+
if (!buffer)
|
|
666
|
+
return;
|
|
667
|
+
|
|
668
|
+
timer.it_value.tv_sec = image->delay / 1000;
|
|
669
|
+
timer.it_value.tv_nsec = (image->delay % 1000) * 1000000;
|
|
670
|
+
timerfd_settime(_glfw.wl.cursorTimerfd, 0, &timer, NULL);
|
|
671
|
+
|
|
672
|
+
cursorWayland->width = image->width;
|
|
673
|
+
cursorWayland->height = image->height;
|
|
674
|
+
cursorWayland->xhot = image->hotspot_x;
|
|
675
|
+
cursorWayland->yhot = image->hotspot_y;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial,
|
|
679
|
+
surface,
|
|
680
|
+
cursorWayland->xhot / scale,
|
|
681
|
+
cursorWayland->yhot / scale);
|
|
682
|
+
wl_surface_set_buffer_scale(surface, scale);
|
|
683
|
+
wl_surface_attach(surface, buffer, 0, 0);
|
|
684
|
+
wl_surface_damage(surface, 0, 0,
|
|
685
|
+
cursorWayland->width, cursorWayland->height);
|
|
686
|
+
wl_surface_commit(surface);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
static void incrementCursorImage(_GLFWwindow* window)
|
|
690
|
+
{
|
|
691
|
+
_GLFWcursor* cursor;
|
|
692
|
+
|
|
693
|
+
if (!window || window->wl.decorations.focus != mainWindow)
|
|
694
|
+
return;
|
|
695
|
+
|
|
696
|
+
cursor = window->wl.currentCursor;
|
|
697
|
+
if (cursor && cursor->wl.cursor)
|
|
698
|
+
{
|
|
699
|
+
cursor->wl.currentImage += 1;
|
|
700
|
+
cursor->wl.currentImage %= cursor->wl.cursor->image_count;
|
|
701
|
+
setCursorImage(window, &cursor->wl);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
static void handleEvents(int timeout)
|
|
706
|
+
{
|
|
707
|
+
struct wl_display* display = _glfw.wl.display;
|
|
708
|
+
struct pollfd fds[] = {
|
|
709
|
+
{ wl_display_get_fd(display), POLLIN },
|
|
710
|
+
{ _glfw.wl.timerfd, POLLIN },
|
|
711
|
+
{ _glfw.wl.cursorTimerfd, POLLIN },
|
|
712
|
+
};
|
|
713
|
+
ssize_t read_ret;
|
|
714
|
+
uint64_t repeats, i;
|
|
715
|
+
|
|
716
|
+
while (wl_display_prepare_read(display) != 0)
|
|
717
|
+
wl_display_dispatch_pending(display);
|
|
718
|
+
|
|
719
|
+
// If an error different from EAGAIN happens, we have likely been
|
|
720
|
+
// disconnected from the Wayland session, try to handle that the best we
|
|
721
|
+
// can.
|
|
722
|
+
if (wl_display_flush(display) < 0 && errno != EAGAIN)
|
|
723
|
+
{
|
|
724
|
+
_GLFWwindow* window = _glfw.windowListHead;
|
|
725
|
+
while (window)
|
|
726
|
+
{
|
|
727
|
+
_glfwInputWindowCloseRequest(window);
|
|
728
|
+
window = window->next;
|
|
729
|
+
}
|
|
730
|
+
wl_display_cancel_read(display);
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
if (poll(fds, 3, timeout) > 0)
|
|
735
|
+
{
|
|
736
|
+
if (fds[0].revents & POLLIN)
|
|
737
|
+
{
|
|
738
|
+
wl_display_read_events(display);
|
|
739
|
+
wl_display_dispatch_pending(display);
|
|
740
|
+
}
|
|
741
|
+
else
|
|
742
|
+
{
|
|
743
|
+
wl_display_cancel_read(display);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
if (fds[1].revents & POLLIN)
|
|
747
|
+
{
|
|
748
|
+
read_ret = read(_glfw.wl.timerfd, &repeats, sizeof(repeats));
|
|
749
|
+
if (read_ret != 8)
|
|
750
|
+
return;
|
|
751
|
+
|
|
752
|
+
if (_glfw.wl.keyboardFocus)
|
|
753
|
+
{
|
|
754
|
+
for (i = 0; i < repeats; ++i)
|
|
755
|
+
{
|
|
756
|
+
_glfwInputKey(_glfw.wl.keyboardFocus,
|
|
757
|
+
_glfw.wl.keyboardLastKey,
|
|
758
|
+
_glfw.wl.keyboardLastScancode,
|
|
759
|
+
GLFW_REPEAT,
|
|
760
|
+
_glfw.wl.xkb.modifiers);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
if (fds[2].revents & POLLIN)
|
|
766
|
+
{
|
|
767
|
+
read_ret = read(_glfw.wl.cursorTimerfd, &repeats, sizeof(repeats));
|
|
768
|
+
if (read_ret != 8)
|
|
769
|
+
return;
|
|
770
|
+
|
|
771
|
+
incrementCursorImage(_glfw.wl.pointerFocus);
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
else
|
|
775
|
+
{
|
|
776
|
+
wl_display_cancel_read(display);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
//////////////////////////////////////////////////////////////////////////
|
|
781
|
+
////// GLFW platform API //////
|
|
782
|
+
//////////////////////////////////////////////////////////////////////////
|
|
783
|
+
|
|
784
|
+
int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|
785
|
+
const _GLFWwndconfig* wndconfig,
|
|
786
|
+
const _GLFWctxconfig* ctxconfig,
|
|
787
|
+
const _GLFWfbconfig* fbconfig)
|
|
788
|
+
{
|
|
789
|
+
window->wl.transparent = fbconfig->transparent;
|
|
790
|
+
|
|
791
|
+
if (!createSurface(window, wndconfig))
|
|
792
|
+
return GLFW_FALSE;
|
|
793
|
+
|
|
794
|
+
if (ctxconfig->client != GLFW_NO_API)
|
|
795
|
+
{
|
|
796
|
+
if (ctxconfig->source == GLFW_EGL_CONTEXT_API ||
|
|
797
|
+
ctxconfig->source == GLFW_NATIVE_CONTEXT_API)
|
|
798
|
+
{
|
|
799
|
+
if (!_glfwInitEGL())
|
|
800
|
+
return GLFW_FALSE;
|
|
801
|
+
if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))
|
|
802
|
+
return GLFW_FALSE;
|
|
803
|
+
}
|
|
804
|
+
else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
|
|
805
|
+
{
|
|
806
|
+
if (!_glfwInitOSMesa())
|
|
807
|
+
return GLFW_FALSE;
|
|
808
|
+
if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))
|
|
809
|
+
return GLFW_FALSE;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
if (wndconfig->title)
|
|
814
|
+
window->wl.title = _glfw_strdup(wndconfig->title);
|
|
815
|
+
|
|
816
|
+
if (wndconfig->visible)
|
|
817
|
+
{
|
|
818
|
+
if (!createXdgSurface(window))
|
|
819
|
+
return GLFW_FALSE;
|
|
820
|
+
|
|
821
|
+
window->wl.visible = GLFW_TRUE;
|
|
822
|
+
}
|
|
823
|
+
else
|
|
824
|
+
{
|
|
825
|
+
window->wl.xdg.surface = NULL;
|
|
826
|
+
window->wl.xdg.toplevel = NULL;
|
|
827
|
+
window->wl.visible = GLFW_FALSE;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
window->wl.currentCursor = NULL;
|
|
831
|
+
|
|
832
|
+
window->wl.monitors = calloc(1, sizeof(_GLFWmonitor*));
|
|
833
|
+
window->wl.monitorsCount = 0;
|
|
834
|
+
window->wl.monitorsSize = 1;
|
|
835
|
+
|
|
836
|
+
return GLFW_TRUE;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
|
840
|
+
{
|
|
841
|
+
if (window == _glfw.wl.pointerFocus)
|
|
842
|
+
{
|
|
843
|
+
_glfw.wl.pointerFocus = NULL;
|
|
844
|
+
_glfwInputCursorEnter(window, GLFW_FALSE);
|
|
845
|
+
}
|
|
846
|
+
if (window == _glfw.wl.keyboardFocus)
|
|
847
|
+
{
|
|
848
|
+
_glfw.wl.keyboardFocus = NULL;
|
|
849
|
+
_glfwInputWindowFocus(window, GLFW_FALSE);
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
if (window->wl.idleInhibitor)
|
|
853
|
+
zwp_idle_inhibitor_v1_destroy(window->wl.idleInhibitor);
|
|
854
|
+
|
|
855
|
+
if (window->context.destroy)
|
|
856
|
+
window->context.destroy(window);
|
|
857
|
+
|
|
858
|
+
destroyDecorations(window);
|
|
859
|
+
if (window->wl.xdg.decoration)
|
|
860
|
+
zxdg_toplevel_decoration_v1_destroy(window->wl.xdg.decoration);
|
|
861
|
+
|
|
862
|
+
if (window->wl.decorations.buffer)
|
|
863
|
+
wl_buffer_destroy(window->wl.decorations.buffer);
|
|
864
|
+
|
|
865
|
+
if (window->wl.native)
|
|
866
|
+
wl_egl_window_destroy(window->wl.native);
|
|
867
|
+
|
|
868
|
+
if (window->wl.xdg.toplevel)
|
|
869
|
+
xdg_toplevel_destroy(window->wl.xdg.toplevel);
|
|
870
|
+
|
|
871
|
+
if (window->wl.xdg.surface)
|
|
872
|
+
xdg_surface_destroy(window->wl.xdg.surface);
|
|
873
|
+
|
|
874
|
+
if (window->wl.surface)
|
|
875
|
+
wl_surface_destroy(window->wl.surface);
|
|
876
|
+
|
|
877
|
+
free(window->wl.title);
|
|
878
|
+
free(window->wl.monitors);
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
|
|
882
|
+
{
|
|
883
|
+
if (window->wl.title)
|
|
884
|
+
free(window->wl.title);
|
|
885
|
+
window->wl.title = _glfw_strdup(title);
|
|
886
|
+
if (window->wl.xdg.toplevel)
|
|
887
|
+
xdg_toplevel_set_title(window->wl.xdg.toplevel, title);
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
void _glfwPlatformSetWindowIcon(_GLFWwindow* window,
|
|
891
|
+
int count, const GLFWimage* images)
|
|
892
|
+
{
|
|
893
|
+
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
|
894
|
+
"Wayland: The platform does not support setting the window icon");
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
|
|
898
|
+
{
|
|
899
|
+
// A Wayland client is not aware of its position, so just warn and leave it
|
|
900
|
+
// as (0, 0)
|
|
901
|
+
|
|
902
|
+
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
|
903
|
+
"Wayland: The platform does not provide the window position");
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
|
|
907
|
+
{
|
|
908
|
+
// A Wayland client can not set its position, so just warn
|
|
909
|
+
|
|
910
|
+
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
|
911
|
+
"Wayland: The platform does not support setting the window position");
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
|
|
915
|
+
{
|
|
916
|
+
if (width)
|
|
917
|
+
*width = window->wl.width;
|
|
918
|
+
if (height)
|
|
919
|
+
*height = window->wl.height;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
|
|
923
|
+
{
|
|
924
|
+
window->wl.width = width;
|
|
925
|
+
window->wl.height = height;
|
|
926
|
+
resizeWindow(window);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
|
|
930
|
+
int minwidth, int minheight,
|
|
931
|
+
int maxwidth, int maxheight)
|
|
932
|
+
{
|
|
933
|
+
if (window->wl.xdg.toplevel)
|
|
934
|
+
{
|
|
935
|
+
if (minwidth == GLFW_DONT_CARE || minheight == GLFW_DONT_CARE)
|
|
936
|
+
minwidth = minheight = 0;
|
|
937
|
+
if (maxwidth == GLFW_DONT_CARE || maxheight == GLFW_DONT_CARE)
|
|
938
|
+
maxwidth = maxheight = 0;
|
|
939
|
+
xdg_toplevel_set_min_size(window->wl.xdg.toplevel, minwidth, minheight);
|
|
940
|
+
xdg_toplevel_set_max_size(window->wl.xdg.toplevel, maxwidth, maxheight);
|
|
941
|
+
wl_surface_commit(window->wl.surface);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window,
|
|
946
|
+
int numer, int denom)
|
|
947
|
+
{
|
|
948
|
+
// TODO: find out how to trigger a resize.
|
|
949
|
+
// The actual limits are checked in the xdg_toplevel::configure handler.
|
|
950
|
+
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED,
|
|
951
|
+
"Wayland: Window aspect ratio not yet implemented");
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
void _glfwPlatformGetFramebufferSize(_GLFWwindow* window,
|
|
955
|
+
int* width, int* height)
|
|
956
|
+
{
|
|
957
|
+
_glfwPlatformGetWindowSize(window, width, height);
|
|
958
|
+
if (width)
|
|
959
|
+
*width *= window->wl.scale;
|
|
960
|
+
if (height)
|
|
961
|
+
*height *= window->wl.scale;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
|
|
965
|
+
int* left, int* top,
|
|
966
|
+
int* right, int* bottom)
|
|
967
|
+
{
|
|
968
|
+
if (window->decorated && !window->monitor && !window->wl.decorations.serverSide)
|
|
969
|
+
{
|
|
970
|
+
if (top)
|
|
971
|
+
*top = _GLFW_DECORATION_TOP;
|
|
972
|
+
if (left)
|
|
973
|
+
*left = _GLFW_DECORATION_WIDTH;
|
|
974
|
+
if (right)
|
|
975
|
+
*right = _GLFW_DECORATION_WIDTH;
|
|
976
|
+
if (bottom)
|
|
977
|
+
*bottom = _GLFW_DECORATION_WIDTH;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
|
|
982
|
+
float* xscale, float* yscale)
|
|
983
|
+
{
|
|
984
|
+
if (xscale)
|
|
985
|
+
*xscale = (float) window->wl.scale;
|
|
986
|
+
if (yscale)
|
|
987
|
+
*yscale = (float) window->wl.scale;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
void _glfwPlatformIconifyWindow(_GLFWwindow* window)
|
|
991
|
+
{
|
|
992
|
+
if (window->wl.xdg.toplevel)
|
|
993
|
+
xdg_toplevel_set_minimized(window->wl.xdg.toplevel);
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
void _glfwPlatformRestoreWindow(_GLFWwindow* window)
|
|
997
|
+
{
|
|
998
|
+
if (window->wl.xdg.toplevel)
|
|
999
|
+
{
|
|
1000
|
+
if (window->monitor)
|
|
1001
|
+
xdg_toplevel_unset_fullscreen(window->wl.xdg.toplevel);
|
|
1002
|
+
if (window->wl.maximized)
|
|
1003
|
+
xdg_toplevel_unset_maximized(window->wl.xdg.toplevel);
|
|
1004
|
+
// There is no way to unset minimized, or even to know if we are
|
|
1005
|
+
// minimized, so there is nothing to do in this case.
|
|
1006
|
+
}
|
|
1007
|
+
_glfwInputWindowMonitor(window, NULL);
|
|
1008
|
+
window->wl.maximized = GLFW_FALSE;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
|
|
1012
|
+
{
|
|
1013
|
+
if (window->wl.xdg.toplevel)
|
|
1014
|
+
{
|
|
1015
|
+
xdg_toplevel_set_maximized(window->wl.xdg.toplevel);
|
|
1016
|
+
}
|
|
1017
|
+
window->wl.maximized = GLFW_TRUE;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
void _glfwPlatformShowWindow(_GLFWwindow* window)
|
|
1021
|
+
{
|
|
1022
|
+
if (!window->wl.visible)
|
|
1023
|
+
{
|
|
1024
|
+
createXdgSurface(window);
|
|
1025
|
+
window->wl.visible = GLFW_TRUE;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
void _glfwPlatformHideWindow(_GLFWwindow* window)
|
|
1030
|
+
{
|
|
1031
|
+
if (window->wl.xdg.toplevel)
|
|
1032
|
+
{
|
|
1033
|
+
xdg_toplevel_destroy(window->wl.xdg.toplevel);
|
|
1034
|
+
xdg_surface_destroy(window->wl.xdg.surface);
|
|
1035
|
+
window->wl.xdg.toplevel = NULL;
|
|
1036
|
+
window->wl.xdg.surface = NULL;
|
|
1037
|
+
}
|
|
1038
|
+
window->wl.visible = GLFW_FALSE;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
void _glfwPlatformRequestWindowAttention(_GLFWwindow* window)
|
|
1042
|
+
{
|
|
1043
|
+
// TODO
|
|
1044
|
+
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED,
|
|
1045
|
+
"Wayland: Window attention request not implemented yet");
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
void _glfwPlatformFocusWindow(_GLFWwindow* window)
|
|
1049
|
+
{
|
|
1050
|
+
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
|
1051
|
+
"Wayland: The platform does not support setting the input focus");
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
|
|
1055
|
+
_GLFWmonitor* monitor,
|
|
1056
|
+
int xpos, int ypos,
|
|
1057
|
+
int width, int height,
|
|
1058
|
+
int refreshRate)
|
|
1059
|
+
{
|
|
1060
|
+
if (monitor)
|
|
1061
|
+
{
|
|
1062
|
+
setFullscreen(window, monitor, refreshRate);
|
|
1063
|
+
}
|
|
1064
|
+
else
|
|
1065
|
+
{
|
|
1066
|
+
if (window->wl.xdg.toplevel)
|
|
1067
|
+
xdg_toplevel_unset_fullscreen(window->wl.xdg.toplevel);
|
|
1068
|
+
setIdleInhibitor(window, GLFW_FALSE);
|
|
1069
|
+
if (!_glfw.wl.decorationManager)
|
|
1070
|
+
createDecorations(window);
|
|
1071
|
+
}
|
|
1072
|
+
_glfwInputWindowMonitor(window, monitor);
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
int _glfwPlatformWindowFocused(_GLFWwindow* window)
|
|
1076
|
+
{
|
|
1077
|
+
return _glfw.wl.keyboardFocus == window;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
int _glfwPlatformWindowIconified(_GLFWwindow* window)
|
|
1081
|
+
{
|
|
1082
|
+
// xdg-shell doesn’t give any way to request whether a surface is
|
|
1083
|
+
// iconified.
|
|
1084
|
+
return GLFW_FALSE;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
int _glfwPlatformWindowVisible(_GLFWwindow* window)
|
|
1088
|
+
{
|
|
1089
|
+
return window->wl.visible;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
int _glfwPlatformWindowMaximized(_GLFWwindow* window)
|
|
1093
|
+
{
|
|
1094
|
+
return window->wl.maximized;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
int _glfwPlatformWindowHovered(_GLFWwindow* window)
|
|
1098
|
+
{
|
|
1099
|
+
return window->wl.hovered;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
int _glfwPlatformFramebufferTransparent(_GLFWwindow* window)
|
|
1103
|
+
{
|
|
1104
|
+
return window->wl.transparent;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)
|
|
1108
|
+
{
|
|
1109
|
+
// TODO
|
|
1110
|
+
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED,
|
|
1111
|
+
"Wayland: Window attribute setting not implemented yet");
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
|
|
1115
|
+
{
|
|
1116
|
+
if (!window->monitor)
|
|
1117
|
+
{
|
|
1118
|
+
if (enabled)
|
|
1119
|
+
createDecorations(window);
|
|
1120
|
+
else
|
|
1121
|
+
destroyDecorations(window);
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
|
|
1126
|
+
{
|
|
1127
|
+
// TODO
|
|
1128
|
+
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED,
|
|
1129
|
+
"Wayland: Window attribute setting not implemented yet");
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
void _glfwPlatformSetWindowMousePassthrough(_GLFWwindow* window, GLFWbool enabled)
|
|
1133
|
+
{
|
|
1134
|
+
if (enabled)
|
|
1135
|
+
{
|
|
1136
|
+
struct wl_region* region = wl_compositor_create_region(_glfw.wl.compositor);
|
|
1137
|
+
wl_surface_set_input_region(window->wl.surface, region);
|
|
1138
|
+
wl_region_destroy(region);
|
|
1139
|
+
}
|
|
1140
|
+
else
|
|
1141
|
+
wl_surface_set_input_region(window->wl.surface, 0);
|
|
1142
|
+
wl_surface_commit(window->wl.surface);
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
float _glfwPlatformGetWindowOpacity(_GLFWwindow* window)
|
|
1146
|
+
{
|
|
1147
|
+
return 1.f;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
|
|
1151
|
+
{
|
|
1152
|
+
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
|
1153
|
+
"Wayland: The platform does not support setting the window opacity");
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)
|
|
1157
|
+
{
|
|
1158
|
+
// This is handled in relativePointerHandleRelativeMotion
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
GLFWbool _glfwPlatformRawMouseMotionSupported(void)
|
|
1162
|
+
{
|
|
1163
|
+
return GLFW_TRUE;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
void _glfwPlatformPollEvents(void)
|
|
1167
|
+
{
|
|
1168
|
+
handleEvents(0);
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
void _glfwPlatformWaitEvents(void)
|
|
1172
|
+
{
|
|
1173
|
+
handleEvents(-1);
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
void _glfwPlatformWaitEventsTimeout(double timeout)
|
|
1177
|
+
{
|
|
1178
|
+
handleEvents((int) (timeout * 1e3));
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
void _glfwPlatformPostEmptyEvent(void)
|
|
1182
|
+
{
|
|
1183
|
+
wl_display_sync(_glfw.wl.display);
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)
|
|
1187
|
+
{
|
|
1188
|
+
if (xpos)
|
|
1189
|
+
*xpos = window->wl.cursorPosX;
|
|
1190
|
+
if (ypos)
|
|
1191
|
+
*ypos = window->wl.cursorPosY;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
static GLFWbool isPointerLocked(_GLFWwindow* window);
|
|
1195
|
+
|
|
1196
|
+
void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
|
|
1197
|
+
{
|
|
1198
|
+
if (isPointerLocked(window))
|
|
1199
|
+
{
|
|
1200
|
+
zwp_locked_pointer_v1_set_cursor_position_hint(
|
|
1201
|
+
window->wl.pointerLock.lockedPointer,
|
|
1202
|
+
wl_fixed_from_double(x), wl_fixed_from_double(y));
|
|
1203
|
+
wl_surface_commit(window->wl.surface);
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
|
|
1208
|
+
{
|
|
1209
|
+
_glfwPlatformSetCursor(window, window->wl.currentCursor);
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
const char* _glfwPlatformGetScancodeName(int scancode)
|
|
1213
|
+
{
|
|
1214
|
+
// TODO
|
|
1215
|
+
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED,
|
|
1216
|
+
"Wayland: Key names not yet implemented");
|
|
1217
|
+
return NULL;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
int _glfwPlatformGetKeyScancode(int key)
|
|
1221
|
+
{
|
|
1222
|
+
return _glfw.wl.scancodes[key];
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
|
|
1226
|
+
const GLFWimage* image,
|
|
1227
|
+
int xhot, int yhot)
|
|
1228
|
+
{
|
|
1229
|
+
cursor->wl.buffer = createShmBuffer(image);
|
|
1230
|
+
if (!cursor->wl.buffer)
|
|
1231
|
+
return GLFW_FALSE;
|
|
1232
|
+
|
|
1233
|
+
cursor->wl.width = image->width;
|
|
1234
|
+
cursor->wl.height = image->height;
|
|
1235
|
+
cursor->wl.xhot = xhot;
|
|
1236
|
+
cursor->wl.yhot = yhot;
|
|
1237
|
+
return GLFW_TRUE;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
|
|
1241
|
+
{
|
|
1242
|
+
const char* name = NULL;
|
|
1243
|
+
|
|
1244
|
+
// Try the XDG names first
|
|
1245
|
+
switch (shape)
|
|
1246
|
+
{
|
|
1247
|
+
case GLFW_ARROW_CURSOR:
|
|
1248
|
+
name = "default";
|
|
1249
|
+
break;
|
|
1250
|
+
case GLFW_IBEAM_CURSOR:
|
|
1251
|
+
name = "text";
|
|
1252
|
+
break;
|
|
1253
|
+
case GLFW_CROSSHAIR_CURSOR:
|
|
1254
|
+
name = "crosshair";
|
|
1255
|
+
break;
|
|
1256
|
+
case GLFW_POINTING_HAND_CURSOR:
|
|
1257
|
+
name = "pointer";
|
|
1258
|
+
break;
|
|
1259
|
+
case GLFW_RESIZE_EW_CURSOR:
|
|
1260
|
+
name = "ew-resize";
|
|
1261
|
+
break;
|
|
1262
|
+
case GLFW_RESIZE_NS_CURSOR:
|
|
1263
|
+
name = "ns-resize";
|
|
1264
|
+
break;
|
|
1265
|
+
case GLFW_RESIZE_NWSE_CURSOR:
|
|
1266
|
+
name = "nwse-resize";
|
|
1267
|
+
break;
|
|
1268
|
+
case GLFW_RESIZE_NESW_CURSOR:
|
|
1269
|
+
name = "nesw-resize";
|
|
1270
|
+
break;
|
|
1271
|
+
case GLFW_RESIZE_ALL_CURSOR:
|
|
1272
|
+
name = "all-scroll";
|
|
1273
|
+
break;
|
|
1274
|
+
case GLFW_NOT_ALLOWED_CURSOR:
|
|
1275
|
+
name = "not-allowed";
|
|
1276
|
+
break;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
cursor->wl.cursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme, name);
|
|
1280
|
+
|
|
1281
|
+
if (_glfw.wl.cursorThemeHiDPI)
|
|
1282
|
+
{
|
|
1283
|
+
cursor->wl.cursorHiDPI =
|
|
1284
|
+
wl_cursor_theme_get_cursor(_glfw.wl.cursorThemeHiDPI, name);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
if (!cursor->wl.cursor)
|
|
1288
|
+
{
|
|
1289
|
+
// Fall back to the core X11 names
|
|
1290
|
+
switch (shape)
|
|
1291
|
+
{
|
|
1292
|
+
case GLFW_ARROW_CURSOR:
|
|
1293
|
+
name = "left_ptr";
|
|
1294
|
+
case GLFW_IBEAM_CURSOR:
|
|
1295
|
+
name = "xterm";
|
|
1296
|
+
case GLFW_CROSSHAIR_CURSOR:
|
|
1297
|
+
name = "crosshair";
|
|
1298
|
+
case GLFW_POINTING_HAND_CURSOR:
|
|
1299
|
+
name = "hand2";
|
|
1300
|
+
case GLFW_RESIZE_EW_CURSOR:
|
|
1301
|
+
name = "sb_h_double_arrow";
|
|
1302
|
+
case GLFW_RESIZE_NS_CURSOR:
|
|
1303
|
+
name = "sb_v_double_arrow";
|
|
1304
|
+
case GLFW_RESIZE_ALL_CURSOR:
|
|
1305
|
+
name = "fleur";
|
|
1306
|
+
default:
|
|
1307
|
+
_glfwInputError(GLFW_CURSOR_UNAVAILABLE,
|
|
1308
|
+
"Wayland: Standard cursor shape unavailable");
|
|
1309
|
+
return GLFW_FALSE;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
cursor->wl.cursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme, name);
|
|
1313
|
+
if (!cursor->wl.cursor)
|
|
1314
|
+
{
|
|
1315
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1316
|
+
"Wayland: Failed to create standard cursor \"%s\"",
|
|
1317
|
+
name);
|
|
1318
|
+
return GLFW_FALSE;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
if (_glfw.wl.cursorThemeHiDPI)
|
|
1322
|
+
{
|
|
1323
|
+
if (!cursor->wl.cursorHiDPI)
|
|
1324
|
+
{
|
|
1325
|
+
cursor->wl.cursorHiDPI =
|
|
1326
|
+
wl_cursor_theme_get_cursor(_glfw.wl.cursorThemeHiDPI, name);
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
return GLFW_TRUE;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
|
|
1335
|
+
{
|
|
1336
|
+
// If it's a standard cursor we don't need to do anything here
|
|
1337
|
+
if (cursor->wl.cursor)
|
|
1338
|
+
return;
|
|
1339
|
+
|
|
1340
|
+
if (cursor->wl.buffer)
|
|
1341
|
+
wl_buffer_destroy(cursor->wl.buffer);
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
static void relativePointerHandleRelativeMotion(void* data,
|
|
1345
|
+
struct zwp_relative_pointer_v1* pointer,
|
|
1346
|
+
uint32_t timeHi,
|
|
1347
|
+
uint32_t timeLo,
|
|
1348
|
+
wl_fixed_t dx,
|
|
1349
|
+
wl_fixed_t dy,
|
|
1350
|
+
wl_fixed_t dxUnaccel,
|
|
1351
|
+
wl_fixed_t dyUnaccel)
|
|
1352
|
+
{
|
|
1353
|
+
_GLFWwindow* window = data;
|
|
1354
|
+
double xpos = window->virtualCursorPosX;
|
|
1355
|
+
double ypos = window->virtualCursorPosY;
|
|
1356
|
+
|
|
1357
|
+
if (window->cursorMode != GLFW_CURSOR_DISABLED)
|
|
1358
|
+
return;
|
|
1359
|
+
|
|
1360
|
+
if (window->rawMouseMotion)
|
|
1361
|
+
{
|
|
1362
|
+
xpos += wl_fixed_to_double(dxUnaccel);
|
|
1363
|
+
ypos += wl_fixed_to_double(dyUnaccel);
|
|
1364
|
+
}
|
|
1365
|
+
else
|
|
1366
|
+
{
|
|
1367
|
+
xpos += wl_fixed_to_double(dx);
|
|
1368
|
+
ypos += wl_fixed_to_double(dy);
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
_glfwInputCursorPos(window, xpos, ypos);
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
static const struct zwp_relative_pointer_v1_listener relativePointerListener = {
|
|
1375
|
+
relativePointerHandleRelativeMotion
|
|
1376
|
+
};
|
|
1377
|
+
|
|
1378
|
+
static void lockedPointerHandleLocked(void* data,
|
|
1379
|
+
struct zwp_locked_pointer_v1* lockedPointer)
|
|
1380
|
+
{
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
static void unlockPointer(_GLFWwindow* window)
|
|
1384
|
+
{
|
|
1385
|
+
struct zwp_relative_pointer_v1* relativePointer =
|
|
1386
|
+
window->wl.pointerLock.relativePointer;
|
|
1387
|
+
struct zwp_locked_pointer_v1* lockedPointer =
|
|
1388
|
+
window->wl.pointerLock.lockedPointer;
|
|
1389
|
+
|
|
1390
|
+
zwp_relative_pointer_v1_destroy(relativePointer);
|
|
1391
|
+
zwp_locked_pointer_v1_destroy(lockedPointer);
|
|
1392
|
+
|
|
1393
|
+
window->wl.pointerLock.relativePointer = NULL;
|
|
1394
|
+
window->wl.pointerLock.lockedPointer = NULL;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
static void lockPointer(_GLFWwindow* window);
|
|
1398
|
+
|
|
1399
|
+
static void lockedPointerHandleUnlocked(void* data,
|
|
1400
|
+
struct zwp_locked_pointer_v1* lockedPointer)
|
|
1401
|
+
{
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
static const struct zwp_locked_pointer_v1_listener lockedPointerListener = {
|
|
1405
|
+
lockedPointerHandleLocked,
|
|
1406
|
+
lockedPointerHandleUnlocked
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
static void lockPointer(_GLFWwindow* window)
|
|
1410
|
+
{
|
|
1411
|
+
struct zwp_relative_pointer_v1* relativePointer;
|
|
1412
|
+
struct zwp_locked_pointer_v1* lockedPointer;
|
|
1413
|
+
|
|
1414
|
+
if (!_glfw.wl.relativePointerManager)
|
|
1415
|
+
{
|
|
1416
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1417
|
+
"Wayland: no relative pointer manager");
|
|
1418
|
+
return;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
relativePointer =
|
|
1422
|
+
zwp_relative_pointer_manager_v1_get_relative_pointer(
|
|
1423
|
+
_glfw.wl.relativePointerManager,
|
|
1424
|
+
_glfw.wl.pointer);
|
|
1425
|
+
zwp_relative_pointer_v1_add_listener(relativePointer,
|
|
1426
|
+
&relativePointerListener,
|
|
1427
|
+
window);
|
|
1428
|
+
|
|
1429
|
+
lockedPointer =
|
|
1430
|
+
zwp_pointer_constraints_v1_lock_pointer(
|
|
1431
|
+
_glfw.wl.pointerConstraints,
|
|
1432
|
+
window->wl.surface,
|
|
1433
|
+
_glfw.wl.pointer,
|
|
1434
|
+
NULL,
|
|
1435
|
+
ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT);
|
|
1436
|
+
zwp_locked_pointer_v1_add_listener(lockedPointer,
|
|
1437
|
+
&lockedPointerListener,
|
|
1438
|
+
window);
|
|
1439
|
+
|
|
1440
|
+
window->wl.pointerLock.relativePointer = relativePointer;
|
|
1441
|
+
window->wl.pointerLock.lockedPointer = lockedPointer;
|
|
1442
|
+
|
|
1443
|
+
wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial,
|
|
1444
|
+
NULL, 0, 0);
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
static GLFWbool isPointerLocked(_GLFWwindow* window)
|
|
1448
|
+
{
|
|
1449
|
+
return window->wl.pointerLock.lockedPointer != NULL;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
|
|
1453
|
+
{
|
|
1454
|
+
struct wl_cursor* defaultCursor;
|
|
1455
|
+
struct wl_cursor* defaultCursorHiDPI = NULL;
|
|
1456
|
+
|
|
1457
|
+
if (!_glfw.wl.pointer)
|
|
1458
|
+
return;
|
|
1459
|
+
|
|
1460
|
+
window->wl.currentCursor = cursor;
|
|
1461
|
+
|
|
1462
|
+
// If we're not in the correct window just save the cursor
|
|
1463
|
+
// the next time the pointer enters the window the cursor will change
|
|
1464
|
+
if (window != _glfw.wl.pointerFocus || window->wl.decorations.focus != mainWindow)
|
|
1465
|
+
return;
|
|
1466
|
+
|
|
1467
|
+
// Unlock possible pointer lock if no longer disabled.
|
|
1468
|
+
if (window->cursorMode != GLFW_CURSOR_DISABLED && isPointerLocked(window))
|
|
1469
|
+
unlockPointer(window);
|
|
1470
|
+
|
|
1471
|
+
if (window->cursorMode == GLFW_CURSOR_NORMAL)
|
|
1472
|
+
{
|
|
1473
|
+
if (cursor)
|
|
1474
|
+
setCursorImage(window, &cursor->wl);
|
|
1475
|
+
else
|
|
1476
|
+
{
|
|
1477
|
+
defaultCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme,
|
|
1478
|
+
"left_ptr");
|
|
1479
|
+
if (!defaultCursor)
|
|
1480
|
+
{
|
|
1481
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1482
|
+
"Wayland: Standard cursor not found");
|
|
1483
|
+
return;
|
|
1484
|
+
}
|
|
1485
|
+
if (_glfw.wl.cursorThemeHiDPI)
|
|
1486
|
+
defaultCursorHiDPI =
|
|
1487
|
+
wl_cursor_theme_get_cursor(_glfw.wl.cursorThemeHiDPI,
|
|
1488
|
+
"left_ptr");
|
|
1489
|
+
_GLFWcursorWayland cursorWayland = {
|
|
1490
|
+
defaultCursor,
|
|
1491
|
+
defaultCursorHiDPI,
|
|
1492
|
+
NULL,
|
|
1493
|
+
0, 0,
|
|
1494
|
+
0, 0,
|
|
1495
|
+
0
|
|
1496
|
+
};
|
|
1497
|
+
setCursorImage(window, &cursorWayland);
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
else if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
|
1501
|
+
{
|
|
1502
|
+
if (!isPointerLocked(window))
|
|
1503
|
+
lockPointer(window);
|
|
1504
|
+
}
|
|
1505
|
+
else if (window->cursorMode == GLFW_CURSOR_HIDDEN)
|
|
1506
|
+
{
|
|
1507
|
+
wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial, NULL, 0, 0);
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
static void dataSourceHandleTarget(void* data,
|
|
1512
|
+
struct wl_data_source* dataSource,
|
|
1513
|
+
const char* mimeType)
|
|
1514
|
+
{
|
|
1515
|
+
if (_glfw.wl.dataSource != dataSource)
|
|
1516
|
+
{
|
|
1517
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1518
|
+
"Wayland: Unknown clipboard data source");
|
|
1519
|
+
return;
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
static void dataSourceHandleSend(void* data,
|
|
1524
|
+
struct wl_data_source* dataSource,
|
|
1525
|
+
const char* mimeType,
|
|
1526
|
+
int fd)
|
|
1527
|
+
{
|
|
1528
|
+
const char* string = _glfw.wl.clipboardSendString;
|
|
1529
|
+
size_t len = _glfw.wl.clipboardSendSize;
|
|
1530
|
+
int ret;
|
|
1531
|
+
|
|
1532
|
+
if (_glfw.wl.dataSource != dataSource)
|
|
1533
|
+
{
|
|
1534
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1535
|
+
"Wayland: Unknown clipboard data source");
|
|
1536
|
+
return;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
if (!string)
|
|
1540
|
+
{
|
|
1541
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1542
|
+
"Wayland: Copy requested from an invalid string");
|
|
1543
|
+
return;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
if (strcmp(mimeType, "text/plain;charset=utf-8") != 0)
|
|
1547
|
+
{
|
|
1548
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1549
|
+
"Wayland: Wrong MIME type asked from clipboard");
|
|
1550
|
+
close(fd);
|
|
1551
|
+
return;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
while (len > 0)
|
|
1555
|
+
{
|
|
1556
|
+
ret = write(fd, string, len);
|
|
1557
|
+
if (ret == -1 && errno == EINTR)
|
|
1558
|
+
continue;
|
|
1559
|
+
if (ret == -1)
|
|
1560
|
+
{
|
|
1561
|
+
// TODO: also report errno maybe.
|
|
1562
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1563
|
+
"Wayland: Error while writing the clipboard");
|
|
1564
|
+
close(fd);
|
|
1565
|
+
return;
|
|
1566
|
+
}
|
|
1567
|
+
len -= ret;
|
|
1568
|
+
}
|
|
1569
|
+
close(fd);
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
static void dataSourceHandleCancelled(void* data,
|
|
1573
|
+
struct wl_data_source* dataSource)
|
|
1574
|
+
{
|
|
1575
|
+
wl_data_source_destroy(dataSource);
|
|
1576
|
+
|
|
1577
|
+
if (_glfw.wl.dataSource != dataSource)
|
|
1578
|
+
{
|
|
1579
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1580
|
+
"Wayland: Unknown clipboard data source");
|
|
1581
|
+
return;
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
_glfw.wl.dataSource = NULL;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
static const struct wl_data_source_listener dataSourceListener = {
|
|
1588
|
+
dataSourceHandleTarget,
|
|
1589
|
+
dataSourceHandleSend,
|
|
1590
|
+
dataSourceHandleCancelled,
|
|
1591
|
+
};
|
|
1592
|
+
|
|
1593
|
+
void _glfwPlatformSetClipboardString(const char* string)
|
|
1594
|
+
{
|
|
1595
|
+
if (_glfw.wl.dataSource)
|
|
1596
|
+
{
|
|
1597
|
+
wl_data_source_destroy(_glfw.wl.dataSource);
|
|
1598
|
+
_glfw.wl.dataSource = NULL;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
if (_glfw.wl.clipboardSendString)
|
|
1602
|
+
{
|
|
1603
|
+
free(_glfw.wl.clipboardSendString);
|
|
1604
|
+
_glfw.wl.clipboardSendString = NULL;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
_glfw.wl.clipboardSendString = strdup(string);
|
|
1608
|
+
if (!_glfw.wl.clipboardSendString)
|
|
1609
|
+
{
|
|
1610
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1611
|
+
"Wayland: Impossible to allocate clipboard string");
|
|
1612
|
+
return;
|
|
1613
|
+
}
|
|
1614
|
+
_glfw.wl.clipboardSendSize = strlen(string);
|
|
1615
|
+
_glfw.wl.dataSource =
|
|
1616
|
+
wl_data_device_manager_create_data_source(_glfw.wl.dataDeviceManager);
|
|
1617
|
+
if (!_glfw.wl.dataSource)
|
|
1618
|
+
{
|
|
1619
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1620
|
+
"Wayland: Impossible to create clipboard source");
|
|
1621
|
+
free(_glfw.wl.clipboardSendString);
|
|
1622
|
+
return;
|
|
1623
|
+
}
|
|
1624
|
+
wl_data_source_add_listener(_glfw.wl.dataSource,
|
|
1625
|
+
&dataSourceListener,
|
|
1626
|
+
NULL);
|
|
1627
|
+
wl_data_source_offer(_glfw.wl.dataSource, "text/plain;charset=utf-8");
|
|
1628
|
+
wl_data_device_set_selection(_glfw.wl.dataDevice,
|
|
1629
|
+
_glfw.wl.dataSource,
|
|
1630
|
+
_glfw.wl.serial);
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
static GLFWbool growClipboardString(void)
|
|
1634
|
+
{
|
|
1635
|
+
char* clipboard = _glfw.wl.clipboardString;
|
|
1636
|
+
|
|
1637
|
+
clipboard = realloc(clipboard, _glfw.wl.clipboardSize * 2);
|
|
1638
|
+
if (!clipboard)
|
|
1639
|
+
{
|
|
1640
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1641
|
+
"Wayland: Impossible to grow clipboard string");
|
|
1642
|
+
return GLFW_FALSE;
|
|
1643
|
+
}
|
|
1644
|
+
_glfw.wl.clipboardString = clipboard;
|
|
1645
|
+
_glfw.wl.clipboardSize = _glfw.wl.clipboardSize * 2;
|
|
1646
|
+
return GLFW_TRUE;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
const char* _glfwPlatformGetClipboardString(void)
|
|
1650
|
+
{
|
|
1651
|
+
int fds[2];
|
|
1652
|
+
int ret;
|
|
1653
|
+
size_t len = 0;
|
|
1654
|
+
|
|
1655
|
+
if (!_glfw.wl.dataOffer)
|
|
1656
|
+
{
|
|
1657
|
+
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
|
1658
|
+
"No clipboard data has been sent yet");
|
|
1659
|
+
return NULL;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
ret = pipe2(fds, O_CLOEXEC);
|
|
1663
|
+
if (ret < 0)
|
|
1664
|
+
{
|
|
1665
|
+
// TODO: also report errno maybe?
|
|
1666
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1667
|
+
"Wayland: Impossible to create clipboard pipe fds");
|
|
1668
|
+
return NULL;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
wl_data_offer_receive(_glfw.wl.dataOffer, "text/plain;charset=utf-8", fds[1]);
|
|
1672
|
+
close(fds[1]);
|
|
1673
|
+
|
|
1674
|
+
// XXX: this is a huge hack, this function shouldn’t be synchronous!
|
|
1675
|
+
handleEvents(-1);
|
|
1676
|
+
|
|
1677
|
+
while (1)
|
|
1678
|
+
{
|
|
1679
|
+
// Grow the clipboard if we need to paste something bigger, there is no
|
|
1680
|
+
// shrink operation yet.
|
|
1681
|
+
if (len + 4096 > _glfw.wl.clipboardSize)
|
|
1682
|
+
{
|
|
1683
|
+
if (!growClipboardString())
|
|
1684
|
+
{
|
|
1685
|
+
close(fds[0]);
|
|
1686
|
+
return NULL;
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
// Then read from the fd to the clipboard, handling all known errors.
|
|
1691
|
+
ret = read(fds[0], _glfw.wl.clipboardString + len, 4096);
|
|
1692
|
+
if (ret == 0)
|
|
1693
|
+
break;
|
|
1694
|
+
if (ret == -1 && errno == EINTR)
|
|
1695
|
+
continue;
|
|
1696
|
+
if (ret == -1)
|
|
1697
|
+
{
|
|
1698
|
+
// TODO: also report errno maybe.
|
|
1699
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1700
|
+
"Wayland: Impossible to read from clipboard fd");
|
|
1701
|
+
close(fds[0]);
|
|
1702
|
+
return NULL;
|
|
1703
|
+
}
|
|
1704
|
+
len += ret;
|
|
1705
|
+
}
|
|
1706
|
+
close(fds[0]);
|
|
1707
|
+
if (len + 1 > _glfw.wl.clipboardSize)
|
|
1708
|
+
{
|
|
1709
|
+
if (!growClipboardString())
|
|
1710
|
+
return NULL;
|
|
1711
|
+
}
|
|
1712
|
+
_glfw.wl.clipboardString[len] = '\0';
|
|
1713
|
+
return _glfw.wl.clipboardString;
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
EGLenum _glfwPlatformGetEGLPlatform(EGLint** attribs)
|
|
1717
|
+
{
|
|
1718
|
+
if (_glfw.egl.EXT_platform_base && _glfw.egl.EXT_platform_wayland)
|
|
1719
|
+
return EGL_PLATFORM_WAYLAND_EXT;
|
|
1720
|
+
else
|
|
1721
|
+
return 0;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
EGLNativeDisplayType _glfwPlatformGetEGLNativeDisplay(void)
|
|
1725
|
+
{
|
|
1726
|
+
return _glfw.wl.display;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
EGLNativeWindowType _glfwPlatformGetEGLNativeWindow(_GLFWwindow* window)
|
|
1730
|
+
{
|
|
1731
|
+
return window->wl.native;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
void _glfwPlatformGetRequiredInstanceExtensions(char** extensions)
|
|
1735
|
+
{
|
|
1736
|
+
if (!_glfw.vk.KHR_surface || !_glfw.vk.KHR_wayland_surface)
|
|
1737
|
+
return;
|
|
1738
|
+
|
|
1739
|
+
extensions[0] = "VK_KHR_surface";
|
|
1740
|
+
extensions[1] = "VK_KHR_wayland_surface";
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
|
1744
|
+
VkPhysicalDevice device,
|
|
1745
|
+
uint32_t queuefamily)
|
|
1746
|
+
{
|
|
1747
|
+
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR
|
|
1748
|
+
vkGetPhysicalDeviceWaylandPresentationSupportKHR =
|
|
1749
|
+
(PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)
|
|
1750
|
+
vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR");
|
|
1751
|
+
if (!vkGetPhysicalDeviceWaylandPresentationSupportKHR)
|
|
1752
|
+
{
|
|
1753
|
+
_glfwInputError(GLFW_API_UNAVAILABLE,
|
|
1754
|
+
"Wayland: Vulkan instance missing VK_KHR_wayland_surface extension");
|
|
1755
|
+
return VK_NULL_HANDLE;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
return vkGetPhysicalDeviceWaylandPresentationSupportKHR(device,
|
|
1759
|
+
queuefamily,
|
|
1760
|
+
_glfw.wl.display);
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
VkResult _glfwPlatformCreateWindowSurface(VkInstance instance,
|
|
1764
|
+
_GLFWwindow* window,
|
|
1765
|
+
const VkAllocationCallbacks* allocator,
|
|
1766
|
+
VkSurfaceKHR* surface)
|
|
1767
|
+
{
|
|
1768
|
+
VkResult err;
|
|
1769
|
+
VkWaylandSurfaceCreateInfoKHR sci;
|
|
1770
|
+
PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR;
|
|
1771
|
+
|
|
1772
|
+
vkCreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR)
|
|
1773
|
+
vkGetInstanceProcAddr(instance, "vkCreateWaylandSurfaceKHR");
|
|
1774
|
+
if (!vkCreateWaylandSurfaceKHR)
|
|
1775
|
+
{
|
|
1776
|
+
_glfwInputError(GLFW_API_UNAVAILABLE,
|
|
1777
|
+
"Wayland: Vulkan instance missing VK_KHR_wayland_surface extension");
|
|
1778
|
+
return VK_ERROR_EXTENSION_NOT_PRESENT;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
memset(&sci, 0, sizeof(sci));
|
|
1782
|
+
sci.sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR;
|
|
1783
|
+
sci.display = _glfw.wl.display;
|
|
1784
|
+
sci.surface = window->wl.surface;
|
|
1785
|
+
|
|
1786
|
+
err = vkCreateWaylandSurfaceKHR(instance, &sci, allocator, surface);
|
|
1787
|
+
if (err)
|
|
1788
|
+
{
|
|
1789
|
+
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
1790
|
+
"Wayland: Failed to create Vulkan surface: %s",
|
|
1791
|
+
_glfwGetVulkanResultString(err));
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
return err;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
|
|
1798
|
+
//////////////////////////////////////////////////////////////////////////
|
|
1799
|
+
////// GLFW native API //////
|
|
1800
|
+
//////////////////////////////////////////////////////////////////////////
|
|
1801
|
+
|
|
1802
|
+
GLFWAPI struct wl_display* glfwGetWaylandDisplay(void)
|
|
1803
|
+
{
|
|
1804
|
+
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
|
1805
|
+
return _glfw.wl.display;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* handle)
|
|
1809
|
+
{
|
|
1810
|
+
_GLFWwindow* window = (_GLFWwindow*) handle;
|
|
1811
|
+
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
|
1812
|
+
return window->wl.surface;
|
|
1813
|
+
}
|
|
1814
|
+
|