sfml.js 0.0.1-preview.8 → 0.0.1
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/README.md +56 -7
- package/binding.gyp +118 -17
- package/index.d.ts +1 -0
- package/lib/clock.d.ts +2 -4
- package/lib/clock.js +3 -1
- package/lib/color.d.ts +2 -2
- package/lib/color.js +58 -3
- package/lib/common.js +33 -7
- package/lib/drawable/circle_shape.d.ts +2 -2
- package/lib/drawable/circle_shape.js +3 -3
- package/lib/drawable/convex_shape.d.ts +5 -0
- package/lib/drawable/convex_shape.js +35 -0
- package/lib/drawable/drawable.d.ts +6 -0
- package/lib/drawable/{base.js → drawable.js} +7 -4
- package/lib/drawable/plugin_package.d.ts +31 -0
- package/lib/drawable/plugin_package.js +102 -0
- package/lib/drawable/rectangle_shape.d.ts +6 -3
- package/lib/drawable/rectangle_shape.js +14 -2
- package/lib/drawable/shape.d.ts +8 -32
- package/lib/drawable/shape.js +16 -115
- package/lib/drawable/sprite.d.ts +17 -0
- package/lib/drawable/sprite.js +53 -0
- package/lib/drawable/text.d.ts +26 -0
- package/lib/drawable/text.js +88 -0
- package/lib/drawable/transformable.d.ts +28 -0
- package/lib/drawable/transformable.js +113 -0
- package/lib/drawable/vertex_array.d.ts +40 -0
- package/lib/drawable/vertex_array.js +128 -0
- package/lib/font.d.ts +24 -0
- package/lib/font.js +137 -0
- package/lib/image.d.ts +26 -0
- package/lib/image.js +147 -0
- package/lib/joystick.d.ts +21 -0
- package/lib/joystick.js +72 -0
- package/lib/keyboard.d.ts +113 -0
- package/lib/keyboard.js +17 -0
- package/lib/mouse.d.ts +6 -0
- package/lib/mouse.js +39 -0
- package/lib/poll_event.d.ts +72 -10
- package/lib/rect.d.ts +2 -2
- package/lib/rect.js +29 -9
- package/lib/render_window.d.ts +54 -15
- package/lib/render_window.js +137 -7
- package/lib/sensor.d.ts +12 -0
- package/lib/sensor.js +34 -0
- package/lib/sfml.d.ts +32 -0
- package/lib/sfml.js +26 -9
- package/lib/sound/base.d.ts +33 -0
- package/lib/sound/base.js +109 -0
- package/lib/sound/music.d.ts +15 -0
- package/lib/sound/music.js +65 -0
- package/lib/sound/sound.d.ts +16 -0
- package/lib/sound/sound.js +55 -0
- package/lib/sound/sound_buffer.d.ts +14 -0
- package/lib/sound/sound_buffer.js +78 -0
- package/lib/texture.d.ts +21 -0
- package/lib/texture.js +127 -0
- package/lib/time.d.ts +2 -2
- package/lib/touch.d.ts +7 -0
- package/lib/touch.js +34 -0
- package/lib/vector2.d.ts +24 -0
- package/lib/vector2.js +85 -16
- package/lib/vector3.d.ts +47 -0
- package/lib/vector3.js +154 -0
- package/lib/vertex.d.ts +14 -0
- package/lib/vertex.js +177 -0
- package/lib/video_mode.d.ts +2 -4
- package/lib/video_mode.js +15 -5
- package/package.json +26 -26
- package/src/base_class_with_loading.h +21 -0
- package/src/clock.cc +12 -3
- package/src/clock.h +5 -2
- package/src/color.cc +18 -13
- package/src/color.h +9 -3
- package/src/drawable/circle_shape.cc +9 -9
- package/src/drawable/circle_shape.h +4 -1
- package/src/drawable/convex_shape.cc +57 -0
- package/src/drawable/convex_shape.h +29 -0
- package/src/drawable/drawable-inl.h +29 -0
- package/src/drawable/drawable.cc +41 -0
- package/src/drawable/drawable.h +26 -38
- package/src/drawable/package_plugin-inl.h +191 -0
- package/src/drawable/package_plugin.h +60 -0
- package/src/drawable/rectangle_shape.cc +43 -7
- package/src/drawable/rectangle_shape.h +7 -1
- package/src/drawable/shape.cc +67 -0
- package/src/drawable/shape.h +13 -28
- package/src/drawable/sprite.cc +122 -0
- package/src/drawable/sprite.h +45 -0
- package/src/drawable/text.cc +133 -0
- package/src/drawable/text.h +54 -0
- package/src/drawable/vertex_array.cc +248 -0
- package/src/drawable/vertex_array.h +46 -0
- package/src/font.cc +214 -0
- package/src/font.h +44 -0
- package/src/gen/joystick_axis.cc +30 -0
- package/src/gen/keycode.cc +12 -4
- package/src/gen/sensor_type.cc +26 -0
- package/src/image.cc +379 -0
- package/src/image.h +72 -0
- package/src/joystick.cc +132 -0
- package/src/joystick.h +32 -0
- package/src/keyboard.cc +50 -0
- package/src/keyboard.h +8 -1
- package/src/mouse.cc +80 -0
- package/src/mouse.h +9 -1
- package/src/plugins/transformable_plugin-inl.h +121 -0
- package/src/plugins/transformable_plugin.h +42 -0
- package/src/poll_event.cc +74 -1
- package/src/poll_event.h +2 -1
- package/src/rect-inl.h +21 -16
- package/src/rect.h +10 -8
- package/src/render_window.cc +249 -6
- package/src/render_window.h +70 -2
- package/src/render_window_async_display.cc +49 -0
- package/src/render_window_async_draw.cc +56 -0
- package/src/resizable_buffer.h +104 -0
- package/src/sensor.cc +82 -0
- package/src/sensor.h +28 -0
- package/src/sfml.cc +41 -0
- package/src/sound/music.cc +113 -0
- package/src/sound/music.h +35 -0
- package/src/sound/sound.cc +116 -0
- package/src/sound/sound.h +41 -0
- package/src/sound/sound_buffer.cc +226 -0
- package/src/sound/sound_buffer.h +46 -0
- package/src/sound/sound_source.cc +124 -0
- package/src/sound/sound_source.h +80 -0
- package/src/texture.cc +246 -0
- package/src/texture.h +47 -0
- package/src/time.cc +1 -1
- package/src/time.h +2 -1
- package/src/touch.cc +54 -0
- package/src/touch.h +23 -0
- package/src/utils-inl.h +19 -0
- package/src/utils.h +6 -0
- package/src/vector2-inl.h +101 -17
- package/src/vector2.cc +4 -3
- package/src/vector2.h +42 -12
- package/src/vector3-inl.h +200 -0
- package/src/vector3.cc +36 -0
- package/src/vector3.h +134 -0
- package/src/vertex.cc +238 -0
- package/src/vertex.h +114 -0
- package/src/video_mode.cc +9 -9
- package/src/video_mode.h +9 -2
- package/src/workers/load_from_file_worker.h +79 -0
- package/src/workers/save_to_file_worker.h +79 -0
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/AlResource.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/Export.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/InputSoundFile.hpp +17 -12
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/Listener.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/Music.hpp +10 -10
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/OutputSoundFile.hpp +4 -4
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/Sound.hpp +2 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/SoundBuffer.hpp +6 -6
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/SoundBufferRecorder.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/SoundFileFactory.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/SoundFileFactory.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/SoundFileReader.hpp +4 -4
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/SoundFileWriter.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/SoundRecorder.hpp +12 -10
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/SoundSource.hpp +5 -5
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/SoundStream.hpp +34 -19
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Config.hpp +16 -4
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/GpuPreference.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/BlendMode.hpp +28 -24
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/CircleShape.hpp +3 -3
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Color.hpp +14 -14
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/ConvexShape.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Drawable.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Export.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Font.hpp +81 -24
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Glsl.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Glsl.inl +6 -6
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Glyph.hpp +7 -5
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Image.hpp +34 -12
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/PrimitiveType.hpp +11 -11
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Rect.hpp +25 -5
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Rect.inl +13 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/RectangleShape.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/RenderStates.hpp +6 -6
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/RenderTarget.hpp +21 -13
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/RenderTexture.hpp +23 -3
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/RenderWindow.hpp +13 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Shader.hpp +8 -8
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Shape.hpp +10 -10
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Sprite.hpp +4 -4
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Text.hpp +20 -20
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Texture.hpp +13 -13
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Transform.hpp +23 -5
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Transformable.hpp +9 -9
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Vertex.hpp +4 -4
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/VertexArray.hpp +3 -3
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/VertexBuffer.hpp +8 -8
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/View.hpp +9 -9
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Main.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/Export.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/Ftp.hpp +53 -53
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/Http.hpp +44 -44
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/IpAddress.hpp +7 -7
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Network/Packet.hpp +18 -5
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/Socket.hpp +12 -12
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Network/SocketHandle.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/SocketSelector.hpp +2 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Network/TcpListener.hpp +5 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/TcpSocket.hpp +6 -6
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Network/UdpSocket.hpp +7 -6
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Network.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/OpenGL.hpp +2 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Clock.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Err.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Export.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/FileInputStream.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/InputStream.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Lock.hpp +2 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/MemoryInputStream.hpp +4 -4
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Mutex.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/NativeActivity.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/NonCopyable.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Sleep.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/String.hpp +5 -5
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/String.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Thread.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Thread.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/ThreadLocal.hpp +2 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/ThreadLocalPtr.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/ThreadLocalPtr.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Time.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Utf.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Utf.inl +12 -12
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Vector2.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Vector2.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Vector3.hpp +4 -4
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Vector3.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Window/Clipboard.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Context.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/ContextSettings.hpp +11 -11
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Cursor.hpp +36 -17
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Event.hpp +72 -71
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Export.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Window/GlResource.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Window/Joystick.hpp +15 -15
- package/third_party/sfml/include/SFML/Window/Keyboard.hpp +491 -0
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Window/Mouse.hpp +15 -12
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Window/Sensor.hpp +8 -8
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Touch.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/VideoMode.hpp +4 -4
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/GlResource.hpp → sfml/include/SFML/Window/Vulkan.hpp} +51 -45
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Window.hpp +35 -303
- package/third_party/{SFML-2.5.1/include/SFML/Window/Window.hpp → sfml/include/SFML/Window/WindowBase.hpp} +60 -164
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/WindowHandle.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/WindowStyle.hpp +7 -7
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window.hpp +1 -1
- package/tools/clang_format.js +9 -0
- package/tools/copier/linux.js +21 -0
- package/tools/copier/macos.js +34 -0
- package/tools/copier/windows.js +33 -0
- package/tools/joystick_axis.js +63 -0
- package/tools/keycode.js +62 -19
- package/tools/lib_downloader.js +107 -0
- package/tools/lib_downloader_urls.js +59 -0
- package/tools/mouse_button.js +60 -37
- package/tools/sensor_type.js +63 -0
- package/tsconfig.json +8 -0
- package/lib/drawable/base.d.ts +0 -3
- package/src/drawable/shape-inl.h +0 -231
- package/third_party/SFML-2.5.1/include/SFML/Audio/Music.hpp +0 -337
- package/third_party/SFML-2.5.1/include/SFML/Audio/SoundFileFactory.hpp +0 -197
- package/third_party/SFML-2.5.1/include/SFML/Audio/SoundFileFactory.inl +0 -100
- package/third_party/SFML-2.5.1/include/SFML/Audio/SoundFileWriter.hpp +0 -125
- package/third_party/SFML-2.5.1/include/SFML/Audio/SoundRecorder.hpp +0 -408
- package/third_party/SFML-2.5.1/include/SFML/Audio/SoundSource.hpp +0 -332
- package/third_party/SFML-2.5.1/include/SFML/Audio.hpp +0 -56
- package/third_party/SFML-2.5.1/include/SFML/Config.hpp +0 -236
- package/third_party/SFML-2.5.1/include/SFML/GpuPreference.hpp +0 -74
- package/third_party/SFML-2.5.1/include/SFML/Graphics/BlendMode.hpp +0 -215
- package/third_party/SFML-2.5.1/include/SFML/Graphics/ConvexShape.hpp +0 -153
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Drawable.hpp +0 -126
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Export.hpp +0 -48
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Font.hpp +0 -439
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Glsl.hpp +0 -227
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Rect.hpp +0 -254
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Rect.inl +0 -159
- package/third_party/SFML-2.5.1/include/SFML/Graphics/RectangleShape.hpp +0 -132
- package/third_party/SFML-2.5.1/include/SFML/Graphics/RenderStates.hpp +0 -174
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Shape.hpp +0 -355
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Sprite.hpp +0 -279
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Texture.hpp +0 -733
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Transform.hpp +0 -479
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Vertex.hpp +0 -148
- package/third_party/SFML-2.5.1/include/SFML/Graphics/VertexArray.hpp +0 -223
- package/third_party/SFML-2.5.1/include/SFML/Graphics.hpp +0 -68
- package/third_party/SFML-2.5.1/include/SFML/Network/Export.hpp +0 -48
- package/third_party/SFML-2.5.1/include/SFML/Network/Ftp.hpp +0 -616
- package/third_party/SFML-2.5.1/include/SFML/Network/Http.hpp +0 -482
- package/third_party/SFML-2.5.1/include/SFML/Network/IpAddress.hpp +0 -328
- package/third_party/SFML-2.5.1/include/SFML/Network/Socket.hpp +0 -219
- package/third_party/SFML-2.5.1/include/SFML/Network/SocketSelector.hpp +0 -263
- package/third_party/SFML-2.5.1/include/SFML/Network/TcpSocket.hpp +0 -316
- package/third_party/SFML-2.5.1/include/SFML/System/Err.hpp +0 -80
- package/third_party/SFML-2.5.1/include/SFML/System/InputStream.hpp +0 -152
- package/third_party/SFML-2.5.1/include/SFML/System/NativeActivity.hpp +0 -62
- package/third_party/SFML-2.5.1/include/SFML/System/NonCopyable.hpp +0 -129
- package/third_party/SFML-2.5.1/include/SFML/System/String.hpp +0 -669
- package/third_party/SFML-2.5.1/include/SFML/System/Thread.inl +0 -90
- package/third_party/SFML-2.5.1/include/SFML/System/ThreadLocalPtr.inl +0 -77
- package/third_party/SFML-2.5.1/include/SFML/System/Utf.hpp +0 -763
- package/third_party/SFML-2.5.1/include/SFML/System/Utf.inl +0 -752
- package/third_party/SFML-2.5.1/include/SFML/System/Vector2.hpp +0 -301
- package/third_party/SFML-2.5.1/include/SFML/System/Vector2.inl +0 -161
- package/third_party/SFML-2.5.1/include/SFML/Window/Context.hpp +0 -195
- package/third_party/SFML-2.5.1/include/SFML/Window/ContextSettings.hpp +0 -149
- package/third_party/SFML-2.5.1/include/SFML/Window/Cursor.hpp +0 -222
- package/third_party/SFML-2.5.1/include/SFML/Window/Event.hpp +0 -284
- package/third_party/SFML-2.5.1/include/SFML/Window/Export.hpp +0 -48
- package/third_party/SFML-2.5.1/include/SFML/Window/Keyboard.hpp +0 -232
- package/third_party/SFML-2.5.1/include/SFML/Window/Touch.hpp +0 -137
- package/third_party/SFML-2.5.1/include/SFML/Window/VideoMode.hpp +0 -228
- package/third_party/SFML-2.5.1/include/SFML/Window/WindowHandle.hpp +0 -101
- package/third_party/SFML-2.5.1/include/SFML/Window/WindowStyle.hpp +0 -53
- package/third_party/SFML-2.5.1/include/SFML/Window.hpp +0 -58
- package/third_party/SFML-2.5.1/lib/libsfml-audio.so.2.5.1 +0 -0
- package/third_party/SFML-2.5.1/lib/libsfml-graphics.so.2.5.1 +0 -0
- package/third_party/SFML-2.5.1/lib/libsfml-network.so.2.5.1 +0 -0
- package/third_party/SFML-2.5.1/lib/libsfml-system.so.2.5.1 +0 -0
- package/third_party/SFML-2.5.1/lib/libsfml-window.so.2.5.1 +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/FLAC.framework/Versions/A/FLAC +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/FLAC.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/OpenAL.framework/Versions/A/OpenAL +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/OpenAL.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/AlResource.hpp +0 -70
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/Export.hpp +0 -48
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/InputSoundFile.hpp +0 -263
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/Listener.hpp +0 -234
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/OutputSoundFile.hpp +0 -133
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/Sound.hpp +0 -264
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/SoundBuffer.hpp +0 -352
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/SoundBufferRecorder.hpp +0 -144
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/SoundFileReader.hpp +0 -165
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/SoundStream.hpp +0 -405
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/CircleShape.hpp +0 -154
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Color.hpp +0 -275
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Glsl.inl +0 -155
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Glyph.hpp +0 -79
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Image.hpp +0 -324
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/PrimitiveType.hpp +0 -58
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/RenderTarget.hpp +0 -510
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/RenderTexture.hpp +0 -314
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/RenderWindow.hpp +0 -284
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Shader.hpp +0 -875
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Text.hpp +0 -513
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Transformable.hpp +0 -429
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/VertexBuffer.hpp +0 -408
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/View.hpp +0 -343
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Main.hpp +0 -43
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Network/Packet.hpp +0 -532
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Network/SocketHandle.hpp +0 -57
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Network/TcpListener.hpp +0 -166
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Network/UdpSocket.hpp +0 -291
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Network.hpp +0 -53
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/OpenGL.hpp +0 -78
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Clock.hpp +0 -117
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Export.hpp +0 -48
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/FileInputStream.hpp +0 -169
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Lock.hpp +0 -139
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/MemoryInputStream.hpp +0 -148
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Mutex.hpp +0 -148
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Sleep.hpp +0 -52
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/String.inl +0 -53
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Thread.hpp +0 -282
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/ThreadLocal.hpp +0 -103
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/ThreadLocalPtr.hpp +0 -158
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Time.hpp +0 -488
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Vector3.hpp +0 -302
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Vector3.inl +0 -168
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System.hpp +0 -60
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/Clipboard.hpp +0 -119
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/Joystick.hpp +0 -227
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/Keyboard.hpp +0 -232
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/Mouse.hpp +0 -177
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/Sensor.hpp +0 -150
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake/SFMLConfig.cmake +0 -148
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake/SFMLConfigDependencies.cmake +0 -86
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake/SFMLConfigVersion.cmake +0 -46
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake/SFMLSharedTargets-release.cmake +0 -59
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake/SFMLSharedTargets.cmake +0 -158
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/SFML +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/freetype.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/freetype.framework/Versions/A/freetype +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/ogg.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/ogg.framework/Versions/A/ogg +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-audio.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-audio.framework/Versions/2.5.1/sfml-audio +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-graphics.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-graphics.framework/Versions/2.5.1/sfml-graphics +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-network.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-network.framework/Versions/2.5.1/sfml-network +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-system.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-window.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-window.framework/Versions/2.5.1/sfml-window +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbis.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbis.framework/Versions/A/vorbis +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbisenc.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbisenc.framework/Versions/A/vorbisenc +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbisfile.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbisfile.framework/Versions/A/vorbisfile +0 -0
- package/third_party/SFML-2.5.1/macOS/lib/libsfml-audio.2.5.1.dylib +0 -0
- package/third_party/SFML-2.5.1/macOS/lib/libsfml-graphics.2.5.1.dylib +0 -0
- package/third_party/SFML-2.5.1/macOS/lib/libsfml-network.2.5.1.dylib +0 -0
- package/third_party/SFML-2.5.1/macOS/lib/libsfml-system.2.5.1.dylib +0 -0
- package/third_party/SFML-2.5.1/macOS/lib/libsfml-window.2.5.1.dylib +0 -0
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
////////////////////////////////////////////////////////////
|
|
2
|
+
//
|
|
3
|
+
// SFML - Simple and Fast Multimedia Library
|
|
4
|
+
// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
|
|
5
|
+
//
|
|
6
|
+
// This software is provided 'as-is', without any express or implied warranty.
|
|
7
|
+
// In no event will the authors be held liable for any damages arising from the use of this software.
|
|
8
|
+
//
|
|
9
|
+
// Permission is granted to anyone to use this software for any purpose,
|
|
10
|
+
// including commercial applications, and to alter it and redistribute it freely,
|
|
11
|
+
// subject to the following restrictions:
|
|
12
|
+
//
|
|
13
|
+
// 1. The origin of this software must not be misrepresented;
|
|
14
|
+
// you must not claim that you wrote the original software.
|
|
15
|
+
// If you use this software in a product, an acknowledgment
|
|
16
|
+
// in the product documentation would be appreciated but is not required.
|
|
17
|
+
//
|
|
18
|
+
// 2. Altered source versions must be plainly marked as such,
|
|
19
|
+
// and must not be misrepresented as being the original software.
|
|
20
|
+
//
|
|
21
|
+
// 3. This notice may not be removed or altered from any source distribution.
|
|
22
|
+
//
|
|
23
|
+
////////////////////////////////////////////////////////////
|
|
24
|
+
|
|
25
|
+
#ifndef SFML_KEYBOARD_HPP
|
|
26
|
+
#define SFML_KEYBOARD_HPP
|
|
27
|
+
|
|
28
|
+
////////////////////////////////////////////////////////////
|
|
29
|
+
// Headers
|
|
30
|
+
////////////////////////////////////////////////////////////
|
|
31
|
+
#include <SFML/Window/Export.hpp>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
namespace sf
|
|
35
|
+
{
|
|
36
|
+
class String;
|
|
37
|
+
|
|
38
|
+
////////////////////////////////////////////////////////////
|
|
39
|
+
/// \brief Give access to the real-time state of the keyboard
|
|
40
|
+
///
|
|
41
|
+
////////////////////////////////////////////////////////////
|
|
42
|
+
class SFML_WINDOW_API Keyboard
|
|
43
|
+
{
|
|
44
|
+
public:
|
|
45
|
+
|
|
46
|
+
////////////////////////////////////////////////////////////
|
|
47
|
+
/// \brief Key codes
|
|
48
|
+
///
|
|
49
|
+
/// The enumerators refer to the "localized" key; i.e. depending
|
|
50
|
+
/// on the layout set by the operating system, a key can be mapped
|
|
51
|
+
/// to `Y` or `Z`.
|
|
52
|
+
///
|
|
53
|
+
////////////////////////////////////////////////////////////
|
|
54
|
+
enum Key
|
|
55
|
+
{
|
|
56
|
+
Unknown = -1, //!< Unhandled key
|
|
57
|
+
A = 0, //!< The A key
|
|
58
|
+
B, //!< The B key
|
|
59
|
+
C, //!< The C key
|
|
60
|
+
D, //!< The D key
|
|
61
|
+
E, //!< The E key
|
|
62
|
+
F, //!< The F key
|
|
63
|
+
G, //!< The G key
|
|
64
|
+
H, //!< The H key
|
|
65
|
+
I, //!< The I key
|
|
66
|
+
J, //!< The J key
|
|
67
|
+
K, //!< The K key
|
|
68
|
+
L, //!< The L key
|
|
69
|
+
M, //!< The M key
|
|
70
|
+
N, //!< The N key
|
|
71
|
+
O, //!< The O key
|
|
72
|
+
P, //!< The P key
|
|
73
|
+
Q, //!< The Q key
|
|
74
|
+
R, //!< The R key
|
|
75
|
+
S, //!< The S key
|
|
76
|
+
T, //!< The T key
|
|
77
|
+
U, //!< The U key
|
|
78
|
+
V, //!< The V key
|
|
79
|
+
W, //!< The W key
|
|
80
|
+
X, //!< The X key
|
|
81
|
+
Y, //!< The Y key
|
|
82
|
+
Z, //!< The Z key
|
|
83
|
+
Num0, //!< The 0 key
|
|
84
|
+
Num1, //!< The 1 key
|
|
85
|
+
Num2, //!< The 2 key
|
|
86
|
+
Num3, //!< The 3 key
|
|
87
|
+
Num4, //!< The 4 key
|
|
88
|
+
Num5, //!< The 5 key
|
|
89
|
+
Num6, //!< The 6 key
|
|
90
|
+
Num7, //!< The 7 key
|
|
91
|
+
Num8, //!< The 8 key
|
|
92
|
+
Num9, //!< The 9 key
|
|
93
|
+
Escape, //!< The Escape key
|
|
94
|
+
LControl, //!< The left Control key
|
|
95
|
+
LShift, //!< The left Shift key
|
|
96
|
+
LAlt, //!< The left Alt key
|
|
97
|
+
LSystem, //!< The left OS specific key: window (Windows and Linux), apple (macOS), ...
|
|
98
|
+
RControl, //!< The right Control key
|
|
99
|
+
RShift, //!< The right Shift key
|
|
100
|
+
RAlt, //!< The right Alt key
|
|
101
|
+
RSystem, //!< The right OS specific key: window (Windows and Linux), apple (macOS), ...
|
|
102
|
+
Menu, //!< The Menu key
|
|
103
|
+
LBracket, //!< The [ key
|
|
104
|
+
RBracket, //!< The ] key
|
|
105
|
+
Semicolon, //!< The ; key
|
|
106
|
+
Comma, //!< The , key
|
|
107
|
+
Period, //!< The . key
|
|
108
|
+
Apostrophe, //!< The ' key
|
|
109
|
+
Slash, //!< The / key
|
|
110
|
+
Backslash, //!< The \ key
|
|
111
|
+
Grave, //!< The ` key
|
|
112
|
+
Equal, //!< The = key
|
|
113
|
+
Hyphen, //!< The - key (hyphen)
|
|
114
|
+
Space, //!< The Space key
|
|
115
|
+
Enter, //!< The Enter/Return keys
|
|
116
|
+
Backspace, //!< The Backspace key
|
|
117
|
+
Tab, //!< The Tabulation key
|
|
118
|
+
PageUp, //!< The Page up key
|
|
119
|
+
PageDown, //!< The Page down key
|
|
120
|
+
End, //!< The End key
|
|
121
|
+
Home, //!< The Home key
|
|
122
|
+
Insert, //!< The Insert key
|
|
123
|
+
Delete, //!< The Delete key
|
|
124
|
+
Add, //!< The + key
|
|
125
|
+
Subtract, //!< The - key (minus, usually from numpad)
|
|
126
|
+
Multiply, //!< The * key
|
|
127
|
+
Divide, //!< The / key
|
|
128
|
+
Left, //!< Left arrow
|
|
129
|
+
Right, //!< Right arrow
|
|
130
|
+
Up, //!< Up arrow
|
|
131
|
+
Down, //!< Down arrow
|
|
132
|
+
Numpad0, //!< The numpad 0 key
|
|
133
|
+
Numpad1, //!< The numpad 1 key
|
|
134
|
+
Numpad2, //!< The numpad 2 key
|
|
135
|
+
Numpad3, //!< The numpad 3 key
|
|
136
|
+
Numpad4, //!< The numpad 4 key
|
|
137
|
+
Numpad5, //!< The numpad 5 key
|
|
138
|
+
Numpad6, //!< The numpad 6 key
|
|
139
|
+
Numpad7, //!< The numpad 7 key
|
|
140
|
+
Numpad8, //!< The numpad 8 key
|
|
141
|
+
Numpad9, //!< The numpad 9 key
|
|
142
|
+
F1, //!< The F1 key
|
|
143
|
+
F2, //!< The F2 key
|
|
144
|
+
F3, //!< The F3 key
|
|
145
|
+
F4, //!< The F4 key
|
|
146
|
+
F5, //!< The F5 key
|
|
147
|
+
F6, //!< The F6 key
|
|
148
|
+
F7, //!< The F7 key
|
|
149
|
+
F8, //!< The F8 key
|
|
150
|
+
F9, //!< The F9 key
|
|
151
|
+
F10, //!< The F10 key
|
|
152
|
+
F11, //!< The F11 key
|
|
153
|
+
F12, //!< The F12 key
|
|
154
|
+
F13, //!< The F13 key
|
|
155
|
+
F14, //!< The F14 key
|
|
156
|
+
F15, //!< The F15 key
|
|
157
|
+
Pause, //!< The Pause key
|
|
158
|
+
|
|
159
|
+
KeyCount, //!< Keep last -- the total number of keyboard keys
|
|
160
|
+
|
|
161
|
+
// Deprecated values:
|
|
162
|
+
|
|
163
|
+
Tilde = Grave, //!< \deprecated Use Grave instead
|
|
164
|
+
Dash = Hyphen, //!< \deprecated Use Hyphen instead
|
|
165
|
+
BackSpace = Backspace, //!< \deprecated Use Backspace instead
|
|
166
|
+
BackSlash = Backslash, //!< \deprecated Use Backslash instead
|
|
167
|
+
SemiColon = Semicolon, //!< \deprecated Use Semicolon instead
|
|
168
|
+
Return = Enter, //!< \deprecated Use Enter instead
|
|
169
|
+
Quote = Apostrophe //!< \deprecated Use Apostrophe instead
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
////////////////////////////////////////////////////////////
|
|
173
|
+
/// \brief Scancodes
|
|
174
|
+
///
|
|
175
|
+
/// The enumerators are bound to a physical key and do not depend on
|
|
176
|
+
/// the keyboard layout used by the operating system. Usually, the AT-101
|
|
177
|
+
/// keyboard can be used as reference for the physical position of the keys.
|
|
178
|
+
///
|
|
179
|
+
////////////////////////////////////////////////////////////
|
|
180
|
+
struct Scan
|
|
181
|
+
{
|
|
182
|
+
// TODO: replace with enum class in SFML 3.
|
|
183
|
+
// Clang warns us rightfully that Scancode names shadow Key names.
|
|
184
|
+
// A safer solution would be to use a C++11 scoped enumeration (enum class),
|
|
185
|
+
// but it is not possible in SFML 2 which uses C++03.
|
|
186
|
+
// For now, we just ignore those warnings.
|
|
187
|
+
#if defined(__clang__)
|
|
188
|
+
#pragma clang diagnostic push
|
|
189
|
+
#pragma clang diagnostic ignored "-Wshadow"
|
|
190
|
+
#endif
|
|
191
|
+
|
|
192
|
+
enum Scancode
|
|
193
|
+
{
|
|
194
|
+
Unknown = -1, //!< Represents any scancode not present in this enum
|
|
195
|
+
A = 0, //!< Keyboard a and A key
|
|
196
|
+
B, //!< Keyboard b and B key
|
|
197
|
+
C, //!< Keyboard c and C key
|
|
198
|
+
D, //!< Keyboard d and D key
|
|
199
|
+
E, //!< Keyboard e and E key
|
|
200
|
+
F, //!< Keyboard f and F key
|
|
201
|
+
G, //!< Keyboard g and G key
|
|
202
|
+
H, //!< Keyboard h and H key
|
|
203
|
+
I, //!< Keyboard i and I key
|
|
204
|
+
J, //!< Keyboard j and J key
|
|
205
|
+
K, //!< Keyboard k and K key
|
|
206
|
+
L, //!< Keyboard l and L key
|
|
207
|
+
M, //!< Keyboard m and M key
|
|
208
|
+
N, //!< Keyboard n and N key
|
|
209
|
+
O, //!< Keyboard o and O key
|
|
210
|
+
P, //!< Keyboard p and P key
|
|
211
|
+
Q, //!< Keyboard q and Q key
|
|
212
|
+
R, //!< Keyboard r and R key
|
|
213
|
+
S, //!< Keyboard s and S key
|
|
214
|
+
T, //!< Keyboard t and T key
|
|
215
|
+
U, //!< Keyboard u and U key
|
|
216
|
+
V, //!< Keyboard v and V key
|
|
217
|
+
W, //!< Keyboard w and W key
|
|
218
|
+
X, //!< Keyboard x and X key
|
|
219
|
+
Y, //!< Keyboard y and Y key
|
|
220
|
+
Z, //!< Keyboard z and Z key
|
|
221
|
+
Num1, //!< Keyboard 1 and ! key
|
|
222
|
+
Num2, //!< Keyboard 2 and @ key
|
|
223
|
+
Num3, //!< Keyboard 3 and # key
|
|
224
|
+
Num4, //!< Keyboard 4 and $ key
|
|
225
|
+
Num5, //!< Keyboard 5 and % key
|
|
226
|
+
Num6, //!< Keyboard 6 and ^ key
|
|
227
|
+
Num7, //!< Keyboard 7 and & key
|
|
228
|
+
Num8, //!< Keyboard 8 and * key
|
|
229
|
+
Num9, //!< Keyboard 9 and ) key
|
|
230
|
+
Num0, //!< Keyboard 0 and ) key
|
|
231
|
+
Enter, //!< Keyboard Enter/Return key
|
|
232
|
+
Escape, //!< Keyboard Escape key
|
|
233
|
+
Backspace, //!< Keyboard Backspace key
|
|
234
|
+
Tab, //!< Keyboard Tab key
|
|
235
|
+
Space, //!< Keyboard Space key
|
|
236
|
+
Hyphen, //!< Keyboard - and _ key
|
|
237
|
+
Equal, //!< Keyboard = and +
|
|
238
|
+
LBracket, //!< Keyboard [ and { key
|
|
239
|
+
RBracket, //!< Keyboard ] and } key
|
|
240
|
+
// For US keyboards mapped to key 29 (Microsoft Keyboard Scan Code Specification)
|
|
241
|
+
// For Non-US keyboards mapped to key 42 (Microsoft Keyboard Scan Code Specification)
|
|
242
|
+
// Typical language mappings: Belg:£µ` FrCa:<>} Dan:*' Dutch:`´ Fren:µ* Ger:'# Ital:§ù LatAm:[}` Nor:*@ Span:ç} Swed:*' Swiss:$£} UK:~# Brazil:}]
|
|
243
|
+
Backslash, //!< Keyboard \ and | key OR various keys for Non-US keyboards
|
|
244
|
+
Semicolon, //!< Keyboard ; and : key
|
|
245
|
+
Apostrophe, //!< Keyboard ' and " key
|
|
246
|
+
Grave, //!< Keyboard ` and ~ key
|
|
247
|
+
Comma, //!< Keyboard , and < key
|
|
248
|
+
Period, //!< Keyboard . and > key
|
|
249
|
+
Slash, //!< Keyboard / and ? key
|
|
250
|
+
F1, //!< Keyboard F1 key
|
|
251
|
+
F2, //!< Keyboard F2 key
|
|
252
|
+
F3, //!< Keyboard F3 key
|
|
253
|
+
F4, //!< Keyboard F4 key
|
|
254
|
+
F5, //!< Keyboard F5 key
|
|
255
|
+
F6, //!< Keyboard F6 key
|
|
256
|
+
F7, //!< Keyboard F7 key
|
|
257
|
+
F8, //!< Keyboard F8 key
|
|
258
|
+
F9, //!< Keyboard F9 key
|
|
259
|
+
F10, //!< Keyboard F10 key
|
|
260
|
+
F11, //!< Keyboard F11 key
|
|
261
|
+
F12, //!< Keyboard F12 key
|
|
262
|
+
F13, //!< Keyboard F13 key
|
|
263
|
+
F14, //!< Keyboard F14 key
|
|
264
|
+
F15, //!< Keyboard F15 key
|
|
265
|
+
F16, //!< Keyboard F16 key
|
|
266
|
+
F17, //!< Keyboard F17 key
|
|
267
|
+
F18, //!< Keyboard F18 key
|
|
268
|
+
F19, //!< Keyboard F19 key
|
|
269
|
+
F20, //!< Keyboard F20 key
|
|
270
|
+
F21, //!< Keyboard F21 key
|
|
271
|
+
F22, //!< Keyboard F22 key
|
|
272
|
+
F23, //!< Keyboard F23 key
|
|
273
|
+
F24, //!< Keyboard F24 key
|
|
274
|
+
CapsLock, //!< Keyboard Caps %Lock key
|
|
275
|
+
PrintScreen, //!< Keyboard Print Screen key
|
|
276
|
+
ScrollLock, //!< Keyboard Scroll %Lock key
|
|
277
|
+
Pause, //!< Keyboard Pause key
|
|
278
|
+
Insert, //!< Keyboard Insert key
|
|
279
|
+
Home, //!< Keyboard Home key
|
|
280
|
+
PageUp, //!< Keyboard Page Up key
|
|
281
|
+
Delete, //!< Keyboard Delete Forward key
|
|
282
|
+
End, //!< Keyboard End key
|
|
283
|
+
PageDown, //!< Keyboard Page Down key
|
|
284
|
+
Right, //!< Keyboard Right Arrow key
|
|
285
|
+
Left, //!< Keyboard Left Arrow key
|
|
286
|
+
Down, //!< Keyboard Down Arrow key
|
|
287
|
+
Up, //!< Keyboard Up Arrow key
|
|
288
|
+
NumLock, //!< Keypad Num %Lock and Clear key
|
|
289
|
+
NumpadDivide, //!< Keypad / key
|
|
290
|
+
NumpadMultiply, //!< Keypad * key
|
|
291
|
+
NumpadMinus, //!< Keypad - key
|
|
292
|
+
NumpadPlus, //!< Keypad + key
|
|
293
|
+
NumpadEqual, //!< keypad = key
|
|
294
|
+
NumpadEnter, //!< Keypad Enter/Return key
|
|
295
|
+
NumpadDecimal, //!< Keypad . and Delete key
|
|
296
|
+
Numpad1, //!< Keypad 1 and End key
|
|
297
|
+
Numpad2, //!< Keypad 2 and Down Arrow key
|
|
298
|
+
Numpad3, //!< Keypad 3 and Page Down key
|
|
299
|
+
Numpad4, //!< Keypad 4 and Left Arrow key
|
|
300
|
+
Numpad5, //!< Keypad 5 key
|
|
301
|
+
Numpad6, //!< Keypad 6 and Right Arrow key
|
|
302
|
+
Numpad7, //!< Keypad 7 and Home key
|
|
303
|
+
Numpad8, //!< Keypad 8 and Up Arrow key
|
|
304
|
+
Numpad9, //!< Keypad 9 and Page Up key
|
|
305
|
+
Numpad0, //!< Keypad 0 and Insert key
|
|
306
|
+
// For US keyboards doesn't exist
|
|
307
|
+
// For Non-US keyboards mapped to key 45 (Microsoft Keyboard Scan Code Specification)
|
|
308
|
+
// Typical language mappings: Belg:<\> FrCa:«°» Dan:<\> Dutch:]|[ Fren:<> Ger:<|> Ital:<> LatAm:<> Nor:<> Span:<> Swed:<|> Swiss:<\> UK:\| Brazil: \|.
|
|
309
|
+
NonUsBackslash, //!< Keyboard Non-US \ and | key
|
|
310
|
+
Application, //!< Keyboard Application key
|
|
311
|
+
Execute, //!< Keyboard Execute key
|
|
312
|
+
ModeChange, //!< Keyboard Mode Change key
|
|
313
|
+
Help, //!< Keyboard Help key
|
|
314
|
+
Menu, //!< Keyboard Menu key
|
|
315
|
+
Select, //!< Keyboard Select key
|
|
316
|
+
Redo, //!< Keyboard Redo key
|
|
317
|
+
Undo, //!< Keyboard Undo key
|
|
318
|
+
Cut, //!< Keyboard Cut key
|
|
319
|
+
Copy, //!< Keyboard Copy key
|
|
320
|
+
Paste, //!< Keyboard Paste key
|
|
321
|
+
VolumeMute, //!< Keyboard Volume Mute key
|
|
322
|
+
VolumeUp, //!< Keyboard Volume Up key
|
|
323
|
+
VolumeDown, //!< Keyboard Volume Down key
|
|
324
|
+
MediaPlayPause, //!< Keyboard Media Play Pause key
|
|
325
|
+
MediaStop, //!< Keyboard Media Stop key
|
|
326
|
+
MediaNextTrack, //!< Keyboard Media Next Track key
|
|
327
|
+
MediaPreviousTrack, //!< Keyboard Media Previous Track key
|
|
328
|
+
LControl, //!< Keyboard Left Control key
|
|
329
|
+
LShift, //!< Keyboard Left Shift key
|
|
330
|
+
LAlt, //!< Keyboard Left Alt key
|
|
331
|
+
LSystem, //!< Keyboard Left System key
|
|
332
|
+
RControl, //!< Keyboard Right Control key
|
|
333
|
+
RShift, //!< Keyboard Right Shift key
|
|
334
|
+
RAlt, //!< Keyboard Right Alt key
|
|
335
|
+
RSystem, //!< Keyboard Right System key
|
|
336
|
+
Back, //!< Keyboard Back key
|
|
337
|
+
Forward, //!< Keyboard Forward key
|
|
338
|
+
Refresh, //!< Keyboard Refresh key
|
|
339
|
+
Stop, //!< Keyboard Stop key
|
|
340
|
+
Search, //!< Keyboard Search key
|
|
341
|
+
Favorites, //!< Keyboard Favorites key
|
|
342
|
+
HomePage, //!< Keyboard Home Page key
|
|
343
|
+
LaunchApplication1, //!< Keyboard Launch Application 1 key
|
|
344
|
+
LaunchApplication2, //!< Keyboard Launch Application 2 key
|
|
345
|
+
LaunchMail, //!< Keyboard Launch Mail key
|
|
346
|
+
LaunchMediaSelect, //!< Keyboard Launch Media Select key
|
|
347
|
+
|
|
348
|
+
ScancodeCount //!< Keep last -- the total number of scancodes
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
#if defined(__clang__)
|
|
352
|
+
#pragma clang diagnostic pop
|
|
353
|
+
#endif
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
typedef Scan::Scancode Scancode;
|
|
357
|
+
|
|
358
|
+
////////////////////////////////////////////////////////////
|
|
359
|
+
/// \brief Check if a key is pressed
|
|
360
|
+
///
|
|
361
|
+
/// \param key Key to check
|
|
362
|
+
///
|
|
363
|
+
/// \return True if the key is pressed, false otherwise
|
|
364
|
+
///
|
|
365
|
+
////////////////////////////////////////////////////////////
|
|
366
|
+
static bool isKeyPressed(Key key);
|
|
367
|
+
|
|
368
|
+
////////////////////////////////////////////////////////////
|
|
369
|
+
/// \brief Check if a key is pressed
|
|
370
|
+
///
|
|
371
|
+
/// \param code Scancode to check
|
|
372
|
+
///
|
|
373
|
+
/// \return True if the physical key is pressed, false otherwise
|
|
374
|
+
///
|
|
375
|
+
////////////////////////////////////////////////////////////
|
|
376
|
+
static bool isKeyPressed(Scancode code);
|
|
377
|
+
|
|
378
|
+
////////////////////////////////////////////////////////////
|
|
379
|
+
/// \brief Localize a physical key to a logical one
|
|
380
|
+
///
|
|
381
|
+
/// \param code Scancode to localize
|
|
382
|
+
///
|
|
383
|
+
/// \return The key corresponding to the scancode under the current
|
|
384
|
+
/// keyboard layout used by the operating system, or
|
|
385
|
+
/// sf::Keyboard::Unknown when the scancode cannot be mapped
|
|
386
|
+
/// to a Key.
|
|
387
|
+
///
|
|
388
|
+
/// \see delocalize
|
|
389
|
+
///
|
|
390
|
+
////////////////////////////////////////////////////////////
|
|
391
|
+
static Key localize(Scancode code);
|
|
392
|
+
|
|
393
|
+
////////////////////////////////////////////////////////////
|
|
394
|
+
/// \brief Identify the physical key corresponding to a logical one
|
|
395
|
+
///
|
|
396
|
+
/// \param key Key to "delocalize"
|
|
397
|
+
///
|
|
398
|
+
/// \return The scancode corresponding to the key under the current
|
|
399
|
+
/// keyboard layout used by the operating system, or
|
|
400
|
+
/// sf::Keyboard::Scan::Unknown when the key cannot be mapped
|
|
401
|
+
/// to a sf::Keyboard::Scancode.
|
|
402
|
+
///
|
|
403
|
+
/// \see localize
|
|
404
|
+
///
|
|
405
|
+
////////////////////////////////////////////////////////////
|
|
406
|
+
static Scancode delocalize(Key key);
|
|
407
|
+
|
|
408
|
+
////////////////////////////////////////////////////////////
|
|
409
|
+
/// \brief Provide a string representation for a given scancode
|
|
410
|
+
///
|
|
411
|
+
/// The returned string is a short, non-technical description of
|
|
412
|
+
/// the key represented with the given scancode. Most effectively
|
|
413
|
+
/// used in user interfaces, as the description for the key takes
|
|
414
|
+
/// the users keyboard layout into consideration.
|
|
415
|
+
///
|
|
416
|
+
/// \warning The result is OS-dependent: for example, sf::Keyboard::Scan::LSystem
|
|
417
|
+
/// is "Left Meta" on Linux, "Left Windows" on Windows and
|
|
418
|
+
/// "Left Command" on macOS.
|
|
419
|
+
///
|
|
420
|
+
/// The current keyboard layout set by the operating system is used to
|
|
421
|
+
/// interpret the scancode: for example, sf::Keyboard::Semicolon is
|
|
422
|
+
/// mapped to ";" for layout and to "é" for others.
|
|
423
|
+
///
|
|
424
|
+
/// \return The localized description of the code
|
|
425
|
+
///
|
|
426
|
+
////////////////////////////////////////////////////////////
|
|
427
|
+
static String getDescription(Scancode code);
|
|
428
|
+
|
|
429
|
+
////////////////////////////////////////////////////////////
|
|
430
|
+
/// \brief Show or hide the virtual keyboard
|
|
431
|
+
///
|
|
432
|
+
/// \warning The virtual keyboard is not supported on all
|
|
433
|
+
/// systems. It will typically be implemented on mobile OSes
|
|
434
|
+
/// (Android, iOS) but not on desktop OSes (Windows, Linux, ...).
|
|
435
|
+
///
|
|
436
|
+
/// If the virtual keyboard is not available, this function does
|
|
437
|
+
/// nothing.
|
|
438
|
+
///
|
|
439
|
+
/// \param visible True to show, false to hide
|
|
440
|
+
///
|
|
441
|
+
////////////////////////////////////////////////////////////
|
|
442
|
+
static void setVirtualKeyboardVisible(bool visible);
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
} // namespace sf
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
#endif // SFML_KEYBOARD_HPP
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
////////////////////////////////////////////////////////////
|
|
452
|
+
/// \class sf::Keyboard
|
|
453
|
+
/// \ingroup window
|
|
454
|
+
///
|
|
455
|
+
/// sf::Keyboard provides an interface to the state of the
|
|
456
|
+
/// keyboard. It only contains static functions (a single
|
|
457
|
+
/// keyboard is assumed), so it's not meant to be instantiated.
|
|
458
|
+
///
|
|
459
|
+
/// This class allows users to query the keyboard state at any
|
|
460
|
+
/// time and directly, without having to deal with a window and
|
|
461
|
+
/// its events. Compared to the KeyPressed and KeyReleased events,
|
|
462
|
+
/// sf::Keyboard can retrieve the state of a key at any time
|
|
463
|
+
/// (you don't need to store and update a boolean on your side
|
|
464
|
+
/// in order to know if a key is pressed or released), and you
|
|
465
|
+
/// always get the real state of the keyboard, even if keys are
|
|
466
|
+
/// pressed or released when your window is out of focus and no
|
|
467
|
+
/// event is triggered.
|
|
468
|
+
///
|
|
469
|
+
/// Usage example:
|
|
470
|
+
/// \code
|
|
471
|
+
/// if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
|
|
472
|
+
/// {
|
|
473
|
+
/// // move left...
|
|
474
|
+
/// }
|
|
475
|
+
/// else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
|
|
476
|
+
/// {
|
|
477
|
+
/// // move right...
|
|
478
|
+
/// }
|
|
479
|
+
/// else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
|
|
480
|
+
/// {
|
|
481
|
+
/// // quit...
|
|
482
|
+
/// }
|
|
483
|
+
/// else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Scan::Grave))
|
|
484
|
+
/// {
|
|
485
|
+
/// // open in-game command line (if it's not already open)
|
|
486
|
+
/// }
|
|
487
|
+
/// \endcode
|
|
488
|
+
///
|
|
489
|
+
/// \see sf::Joystick, sf::Mouse, sf::Touch
|
|
490
|
+
///
|
|
491
|
+
////////////////////////////////////////////////////////////
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
////////////////////////////////////////////////////////////
|
|
2
2
|
//
|
|
3
3
|
// SFML - Simple and Fast Multimedia Library
|
|
4
|
-
// Copyright (C) 2007-
|
|
4
|
+
// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
|
|
5
5
|
//
|
|
6
6
|
// This software is provided 'as-is', without any express or implied warranty.
|
|
7
7
|
// In no event will the authors be held liable for any damages arising from the use of this software.
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
namespace sf
|
|
36
36
|
{
|
|
37
|
-
class
|
|
37
|
+
class WindowBase;
|
|
38
38
|
|
|
39
39
|
////////////////////////////////////////////////////////////
|
|
40
40
|
/// \brief Give access to the real-time state of the mouse
|
|
@@ -50,13 +50,13 @@ public:
|
|
|
50
50
|
////////////////////////////////////////////////////////////
|
|
51
51
|
enum Button
|
|
52
52
|
{
|
|
53
|
-
Left,
|
|
54
|
-
Right,
|
|
55
|
-
Middle,
|
|
56
|
-
XButton1,
|
|
57
|
-
XButton2,
|
|
53
|
+
Left, //!< The left mouse button
|
|
54
|
+
Right, //!< The right mouse button
|
|
55
|
+
Middle, //!< The middle (wheel) mouse button
|
|
56
|
+
XButton1, //!< The first extra mouse button
|
|
57
|
+
XButton2, //!< The second extra mouse button
|
|
58
58
|
|
|
59
|
-
ButtonCount
|
|
59
|
+
ButtonCount //!< Keep last -- the total number of mouse buttons
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
////////////////////////////////////////////////////////////
|
|
@@ -65,13 +65,16 @@ public:
|
|
|
65
65
|
////////////////////////////////////////////////////////////
|
|
66
66
|
enum Wheel
|
|
67
67
|
{
|
|
68
|
-
VerticalWheel,
|
|
69
|
-
HorizontalWheel
|
|
68
|
+
VerticalWheel, //!< The vertical mouse wheel
|
|
69
|
+
HorizontalWheel //!< The horizontal mouse wheel
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
////////////////////////////////////////////////////////////
|
|
73
73
|
/// \brief Check if a mouse button is pressed
|
|
74
74
|
///
|
|
75
|
+
/// \warning Checking the state of buttons Mouse::XButton1 and
|
|
76
|
+
/// Mouse::XButton2 is not supported on Linux with X11.
|
|
77
|
+
///
|
|
75
78
|
/// \param button Button to check
|
|
76
79
|
///
|
|
77
80
|
/// \return True if the button is pressed, false otherwise
|
|
@@ -101,7 +104,7 @@ public:
|
|
|
101
104
|
/// \return Current position of the mouse
|
|
102
105
|
///
|
|
103
106
|
////////////////////////////////////////////////////////////
|
|
104
|
-
static Vector2i getPosition(const
|
|
107
|
+
static Vector2i getPosition(const WindowBase& relativeTo);
|
|
105
108
|
|
|
106
109
|
////////////////////////////////////////////////////////////
|
|
107
110
|
/// \brief Set the current position of the mouse in desktop coordinates
|
|
@@ -124,7 +127,7 @@ public:
|
|
|
124
127
|
/// \param relativeTo Reference window
|
|
125
128
|
///
|
|
126
129
|
////////////////////////////////////////////////////////////
|
|
127
|
-
static void setPosition(const Vector2i& position, const
|
|
130
|
+
static void setPosition(const Vector2i& position, const WindowBase& relativeTo);
|
|
128
131
|
};
|
|
129
132
|
|
|
130
133
|
} // namespace sf
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
////////////////////////////////////////////////////////////
|
|
2
2
|
//
|
|
3
3
|
// SFML - Simple and Fast Multimedia Library
|
|
4
|
-
// Copyright (C) 2007-
|
|
4
|
+
// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
|
|
5
5
|
//
|
|
6
6
|
// This software is provided 'as-is', without any express or implied warranty.
|
|
7
7
|
// In no event will the authors be held liable for any damages arising from the use of this software.
|
|
@@ -49,14 +49,14 @@ public:
|
|
|
49
49
|
////////////////////////////////////////////////////////////
|
|
50
50
|
enum Type
|
|
51
51
|
{
|
|
52
|
-
Accelerometer,
|
|
53
|
-
Gyroscope,
|
|
54
|
-
Magnetometer,
|
|
55
|
-
Gravity,
|
|
56
|
-
UserAcceleration,
|
|
57
|
-
Orientation,
|
|
52
|
+
Accelerometer, //!< Measures the raw acceleration (m/s^2)
|
|
53
|
+
Gyroscope, //!< Measures the raw rotation rates (degrees/s)
|
|
54
|
+
Magnetometer, //!< Measures the ambient magnetic field (micro-teslas)
|
|
55
|
+
Gravity, //!< Measures the direction and intensity of gravity, independent of device acceleration (m/s^2)
|
|
56
|
+
UserAcceleration, //!< Measures the direction and intensity of device acceleration, independent of the gravity (m/s^2)
|
|
57
|
+
Orientation, //!< Measures the absolute 3D orientation (degrees)
|
|
58
58
|
|
|
59
|
-
Count
|
|
59
|
+
Count //!< Keep last -- the total number of sensor types
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
////////////////////////////////////////////////////////////
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
////////////////////////////////////////////////////////////
|
|
2
2
|
//
|
|
3
3
|
// SFML - Simple and Fast Multimedia Library
|
|
4
|
-
// Copyright (C) 2007-
|
|
4
|
+
// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
|
|
5
5
|
//
|
|
6
6
|
// This software is provided 'as-is', without any express or implied warranty.
|
|
7
7
|
// In no event will the authors be held liable for any damages arising from the use of this software.
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
namespace sf
|
|
36
36
|
{
|
|
37
|
-
class
|
|
37
|
+
class WindowBase;
|
|
38
38
|
|
|
39
39
|
////////////////////////////////////////////////////////////
|
|
40
40
|
/// \brief Give access to the real-time state of the touches
|
|
@@ -79,7 +79,7 @@ public:
|
|
|
79
79
|
/// \return Current position of \a finger, or undefined if it's not down
|
|
80
80
|
///
|
|
81
81
|
////////////////////////////////////////////////////////////
|
|
82
|
-
static Vector2i getPosition(unsigned int finger, const
|
|
82
|
+
static Vector2i getPosition(unsigned int finger, const WindowBase& relativeTo);
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
} // namespace sf
|