reflexion 0.3.4 → 0.3.6
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.
- checksums.yaml +4 -4
- data/.doc/ext/reflex/application.cpp +16 -0
- data/.doc/ext/reflex/device.cpp +46 -3
- data/.doc/ext/reflex/device_event.cpp +62 -0
- data/.doc/ext/reflex/key_event.cpp +50 -0
- data/.doc/ext/reflex/native.cpp +6 -4
- data/.doc/ext/reflex/reflex.cpp +24 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +12 -0
- data/CONTRIBUTING.md +7 -0
- data/ChangeLog.md +20 -0
- data/README.md +46 -2
- data/VERSION +1 -1
- data/ext/reflex/application.cpp +18 -0
- data/ext/reflex/device.cpp +48 -3
- data/ext/reflex/device_event.cpp +65 -0
- data/ext/reflex/extconf.rb +3 -3
- data/ext/reflex/key_event.cpp +50 -0
- data/ext/reflex/native.cpp +6 -4
- data/ext/reflex/reflex.cpp +24 -0
- data/include/reflex/application.h +4 -0
- data/include/reflex/defs.h +60 -0
- data/include/reflex/device.h +22 -0
- data/include/reflex/event.h +25 -0
- data/include/reflex/gamepad.h +175 -0
- data/include/reflex/ruby/application.h +18 -0
- data/include/reflex/ruby/device.h +40 -0
- data/include/reflex/ruby/event.h +11 -0
- data/reflex.gemspec +3 -3
- data/src/application.cpp +67 -0
- data/src/application.h +9 -0
- data/src/device.cpp +24 -0
- data/src/event.cpp +38 -0
- data/src/gamepad.cpp +176 -0
- data/src/gamepad.h +74 -0
- data/src/ios/app_delegate.mm +2 -2
- data/src/ios/application.mm +0 -25
- data/src/ios/event.mm +2 -3
- data/src/ios/gamepad.mm +313 -0
- data/src/osx/app_delegate.mm +2 -2
- data/src/osx/application.mm +0 -25
- data/src/osx/event.h +3 -0
- data/src/osx/event.mm +11 -3
- data/src/osx/gamepad.mm +40 -0
- data/src/osx/gamepad_gc.mm +299 -0
- data/src/osx/gamepad_hid.mm +567 -0
- data/src/view.cpp +52 -18
- data/src/win32/application.cpp +5 -26
- data/src/win32/event.cpp +8 -7
- data/src/win32/event.h +5 -0
- data/src/win32/gamepad.cpp +110 -0
- data/src/win32/gamepad.h +20 -0
- data/src/win32/window.cpp +9 -1
- data/src/window.cpp +15 -0
- data/src/window.h +9 -0
- metadata +30 -14
    
        data/src/win32/application.cpp
    CHANGED
    
    | @@ -42,7 +42,7 @@ namespace Reflex | |
| 42 42 | 
             
            	Application::start ()
         | 
| 43 43 | 
             
            	{
         | 
| 44 44 | 
             
            		Event e;
         | 
| 45 | 
            -
            		 | 
| 45 | 
            +
            		Application_call_start(this, &e);
         | 
| 46 46 |  | 
| 47 47 | 
             
            		timeBeginPeriod(1);
         | 
| 48 48 |  | 
| @@ -84,27 +84,11 @@ namespace Reflex | |
| 84 84 | 
             
            	void
         | 
| 85 85 | 
             
            	Application::quit ()
         | 
| 86 86 | 
             
            	{
         | 
| 87 | 
            -
            		 | 
| 88 | 
            -
             | 
| 89 | 
            -
             | 
| 90 | 
            -
            	void
         | 
| 91 | 
            -
            	Application::on_start (Event* e)
         | 
| 92 | 
            -
            	{
         | 
| 93 | 
            -
            	}
         | 
| 94 | 
            -
             | 
| 95 | 
            -
            	void
         | 
| 96 | 
            -
            	Application::on_quit (Event* e)
         | 
| 97 | 
            -
            	{
         | 
| 98 | 
            -
            	}
         | 
| 99 | 
            -
             | 
| 100 | 
            -
            	void
         | 
| 101 | 
            -
            	Application::on_motion (MotionEvent* e)
         | 
| 102 | 
            -
            	{
         | 
| 103 | 
            -
            	}
         | 
| 87 | 
            +
            		Event e;
         | 
| 88 | 
            +
            		Application_call_quit(this, &e);
         | 
| 89 | 
            +
            		if (e.is_blocked()) return;
         | 
| 104 90 |  | 
| 105 | 
            -
             | 
| 106 | 
            -
            	Application::on_preference (Event* e)
         | 
| 107 | 
            -
            	{
         | 
| 91 | 
            +
            		PostQuitMessage(0);
         | 
| 108 92 | 
             
            	}
         | 
| 109 93 |  | 
| 110 94 | 
             
            	void
         | 
| @@ -112,10 +96,5 @@ namespace Reflex | |
| 112 96 | 
             
            	{
         | 
| 113 97 | 
             
            	}
         | 
| 114 98 |  | 
| 115 | 
            -
            	Application::operator bool () const
         | 
| 116 | 
            -
            	{
         | 
| 117 | 
            -
            		return true;
         | 
| 118 | 
            -
            	}
         | 
| 119 | 
            -
             | 
| 120 99 |  | 
| 121 100 | 
             
            }// Reflex
         | 
    
        data/src/win32/event.cpp
    CHANGED
    
    | @@ -3,15 +3,16 @@ | |
| 3 3 |  | 
| 4 4 | 
             
            #include <xot/time.h>
         | 
| 5 5 | 
             
            #include "reflex/exception.h"
         | 
| 6 | 
            -
            #include " | 
| 6 | 
            +
            #include "reflex/debug.h"
         | 
| 7 | 
            +
            #include "window.h"
         | 
| 7 8 |  | 
| 8 9 |  | 
| 9 10 | 
             
            namespace Reflex
         | 
| 10 11 | 
             
            {
         | 
| 11 12 |  | 
| 12 13 |  | 
| 13 | 
            -
            	 | 
| 14 | 
            -
            	 | 
| 14 | 
            +
            	uint
         | 
| 15 | 
            +
            	get_key_modifiers ()
         | 
| 15 16 | 
             
            	{
         | 
| 16 17 | 
             
            		return
         | 
| 17 18 | 
             
            			(GetKeyState(VK_SHIFT)   & 0x8000 ? MOD_SHIFT   : 0) |
         | 
| @@ -36,7 +37,7 @@ namespace Reflex | |
| 36 37 | 
             
            	}
         | 
| 37 38 |  | 
| 38 39 | 
             
            	NativeKeyEvent::NativeKeyEvent (UINT msg, WPARAM wp, LPARAM lp, const char* chars)
         | 
| 39 | 
            -
            	:	KeyEvent(get_key_action(msg), chars, (int) wp,  | 
| 40 | 
            +
            	:	KeyEvent(get_key_action(msg), chars, (int) wp, get_key_modifiers(), lp & 0xFF)
         | 
| 40 41 | 
             
            	{
         | 
| 41 42 | 
             
            	}
         | 
| 42 43 |  | 
| @@ -134,7 +135,7 @@ namespace Reflex | |
| 134 135 | 
             
            			get_mouse_type(msg, wp),
         | 
| 135 136 | 
             
            			get_mouse_action(msg),
         | 
| 136 137 | 
             
            			Point(GET_X_LPARAM(lp), GET_Y_LPARAM(lp)),
         | 
| 137 | 
            -
            			 | 
| 138 | 
            +
            			get_key_modifiers(),
         | 
| 138 139 | 
             
            			get_mouse_click_count(msg),
         | 
| 139 140 | 
             
            			is_mouse_dragging(msg, wp),
         | 
| 140 141 | 
             
            			Xot::time()));
         | 
| @@ -195,7 +196,7 @@ namespace Reflex | |
| 195 196 | 
             
            				get_touch_type(touch),
         | 
| 196 197 | 
             
            				action,
         | 
| 197 198 | 
             
            				get_touch_position(hwnd, touch),
         | 
| 198 | 
            -
            				 | 
| 199 | 
            +
            				get_key_modifiers(),
         | 
| 199 200 | 
             
            				action == Pointer::DOWN ? 1 : 0,
         | 
| 200 201 | 
             
            				action == Pointer::MOVE,
         | 
| 201 202 | 
             
            				get_touch_time(touch));
         | 
| @@ -211,7 +212,7 @@ namespace Reflex | |
| 211 212 | 
             
            	:	WheelEvent(
         | 
| 212 213 | 
             
            			GET_X_LPARAM(lp),              GET_Y_LPARAM(lp),             0,
         | 
| 213 214 | 
             
            			GET_WHEEL_DELTA_WPARAM(wp_x), -GET_WHEEL_DELTA_WPARAM(wp_y), 0,
         | 
| 214 | 
            -
            			 | 
| 215 | 
            +
            			get_key_modifiers())
         | 
| 215 216 | 
             
            	{
         | 
| 216 217 | 
             
            	}
         | 
| 217 218 |  | 
    
        data/src/win32/event.h
    CHANGED
    
    
| @@ -0,0 +1,110 @@ | |
| 1 | 
            +
            #include "gamepad.h"
         | 
| 2 | 
            +
             | 
| 3 | 
            +
             | 
| 4 | 
            +
            #include <xot/windows.h>
         | 
| 5 | 
            +
            #include <xinput.h>
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            #include "reflex/exception.h"
         | 
| 8 | 
            +
            #include "reflex/debug.h"
         | 
| 9 | 
            +
            #include "window.h"
         | 
| 10 | 
            +
            #include "event.h"
         | 
| 11 | 
            +
             | 
| 12 | 
            +
             | 
| 13 | 
            +
            namespace Reflex
         | 
| 14 | 
            +
            {
         | 
| 15 | 
            +
             | 
| 16 | 
            +
             | 
| 17 | 
            +
            	static void
         | 
| 18 | 
            +
            	call_gamepad_event (Window* win, int code, bool pressed)
         | 
| 19 | 
            +
            	{
         | 
| 20 | 
            +
            		auto action = pressed ? KeyEvent::DOWN : KeyEvent::UP;
         | 
| 21 | 
            +
            		KeyEvent e(action, NULL, code, get_key_modifiers(), 0);
         | 
| 22 | 
            +
            		Window_call_key_event(win, &e);
         | 
| 23 | 
            +
            	}
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            	static void
         | 
| 26 | 
            +
            	handle_gamepad_button_event (
         | 
| 27 | 
            +
            		Window* win, const XINPUT_STATE& state, const XINPUT_STATE& prev_state,
         | 
| 28 | 
            +
            		WORD mask, int code)
         | 
| 29 | 
            +
            	{
         | 
| 30 | 
            +
            		WORD pressed =      state.Gamepad.wButtons & mask;
         | 
| 31 | 
            +
            		WORD prev    = prev_state.Gamepad.wButtons & mask;
         | 
| 32 | 
            +
            		if (pressed == prev) return;
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            		call_gamepad_event(win, code, pressed);
         | 
| 35 | 
            +
            	}
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            	static void
         | 
| 38 | 
            +
            	handle_gamepad_trigger_event (Window* win, BYTE value, BYTE prev_value, int code)
         | 
| 39 | 
            +
            	{
         | 
| 40 | 
            +
            		WORD pressed =      value > XINPUT_GAMEPAD_TRIGGER_THRESHOLD;
         | 
| 41 | 
            +
            		WORD prev    = prev_value > XINPUT_GAMEPAD_TRIGGER_THRESHOLD;
         | 
| 42 | 
            +
            		if (pressed == prev) return;
         | 
| 43 | 
            +
             | 
| 44 | 
            +
            		call_gamepad_event(win, code, pressed);
         | 
| 45 | 
            +
            	}
         | 
| 46 | 
            +
             | 
| 47 | 
            +
            	static void
         | 
| 48 | 
            +
            	handle_gamepad_events (const XINPUT_STATE& state, const XINPUT_STATE& prev_state)
         | 
| 49 | 
            +
            	{
         | 
| 50 | 
            +
            		Window* win = Window_get_active();
         | 
| 51 | 
            +
            		if (!win) return;
         | 
| 52 | 
            +
             | 
| 53 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_DPAD_LEFT,  KEY_GAMEPAD_LEFT);
         | 
| 54 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_DPAD_RIGHT, KEY_GAMEPAD_RIGHT);
         | 
| 55 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_DPAD_UP,    KEY_GAMEPAD_UP);
         | 
| 56 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_DPAD_DOWN,  KEY_GAMEPAD_DOWN);
         | 
| 57 | 
            +
             | 
| 58 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_A, KEY_GAMEPAD_A);
         | 
| 59 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_B, KEY_GAMEPAD_B);
         | 
| 60 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_X, KEY_GAMEPAD_X);
         | 
| 61 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_Y, KEY_GAMEPAD_Y);
         | 
| 62 | 
            +
             | 
| 63 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_LEFT_SHOULDER,  KEY_GAMEPAD_LSHOULDER);
         | 
| 64 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_RIGHT_SHOULDER, KEY_GAMEPAD_RSHOULDER);
         | 
| 65 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_LEFT_THUMB,     KEY_GAMEPAD_LTHUMB);
         | 
| 66 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_RIGHT_THUMB,    KEY_GAMEPAD_RTHUMB);
         | 
| 67 | 
            +
             | 
| 68 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_START, KEY_GAMEPAD_START);
         | 
| 69 | 
            +
            		handle_gamepad_button_event(win, state, prev_state, XINPUT_GAMEPAD_BACK,  KEY_GAMEPAD_SELECT);
         | 
| 70 | 
            +
             | 
| 71 | 
            +
            		handle_gamepad_trigger_event(win, state.Gamepad.bLeftTrigger,  prev_state.Gamepad.bLeftTrigger,  KEY_GAMEPAD_LTRIGGER);
         | 
| 72 | 
            +
            		handle_gamepad_trigger_event(win, state.Gamepad.bRightTrigger, prev_state.Gamepad.bRightTrigger, KEY_GAMEPAD_RTRIGGER);
         | 
| 73 | 
            +
            	}
         | 
| 74 | 
            +
             | 
| 75 | 
            +
            	void
         | 
| 76 | 
            +
            	Gamepad_init (Application* app)
         | 
| 77 | 
            +
            	{
         | 
| 78 | 
            +
            	}
         | 
| 79 | 
            +
             | 
| 80 | 
            +
            	void
         | 
| 81 | 
            +
            	Gamepad_fin (Application* app)
         | 
| 82 | 
            +
            	{
         | 
| 83 | 
            +
            		Gamepad_remove_all(app);
         | 
| 84 | 
            +
            	}
         | 
| 85 | 
            +
             | 
| 86 | 
            +
            	void
         | 
| 87 | 
            +
            	Gamepad_poll ()
         | 
| 88 | 
            +
            	{
         | 
| 89 | 
            +
            		static XINPUT_STATE prev_state;
         | 
| 90 | 
            +
            		static bool prev_detected = false;
         | 
| 91 | 
            +
             | 
| 92 | 
            +
            		XINPUT_STATE state = {0};
         | 
| 93 | 
            +
            		bool detected      = XInputGetState(0, &state) == ERROR_SUCCESS;
         | 
| 94 | 
            +
             | 
| 95 | 
            +
            		if (detected != prev_detected)
         | 
| 96 | 
            +
            		{
         | 
| 97 | 
            +
            			prev_detected = detected;
         | 
| 98 | 
            +
            			if (detected) prev_state = {0};
         | 
| 99 | 
            +
            		}
         | 
| 100 | 
            +
             | 
| 101 | 
            +
            		if (!detected) return;
         | 
| 102 | 
            +
             | 
| 103 | 
            +
            		if (state.dwPacketNumber != prev_state.dwPacketNumber)
         | 
| 104 | 
            +
            			handle_gamepad_events(state, prev_state);
         | 
| 105 | 
            +
             | 
| 106 | 
            +
            		prev_state = state;
         | 
| 107 | 
            +
            	}
         | 
| 108 | 
            +
             | 
| 109 | 
            +
             | 
| 110 | 
            +
            }// Reflex
         | 
    
        data/src/win32/gamepad.h
    ADDED
    
    | @@ -0,0 +1,20 @@ | |
| 1 | 
            +
            // -*- c++ -*-
         | 
| 2 | 
            +
            #pragma once
         | 
| 3 | 
            +
            #ifndef __REFLEX_SRC_WIN32_GAMEPAD_H__
         | 
| 4 | 
            +
            #define __REFLEX_SRC_WIN32_GAMEPAD_H__
         | 
| 5 | 
            +
             | 
| 6 | 
            +
             | 
| 7 | 
            +
            #include "../gamepad.h"
         | 
| 8 | 
            +
             | 
| 9 | 
            +
             | 
| 10 | 
            +
            namespace Reflex
         | 
| 11 | 
            +
            {
         | 
| 12 | 
            +
             | 
| 13 | 
            +
             | 
| 14 | 
            +
            	void Gamepad_poll ();
         | 
| 15 | 
            +
             | 
| 16 | 
            +
             | 
| 17 | 
            +
            }// Reflex
         | 
| 18 | 
            +
             | 
| 19 | 
            +
             | 
| 20 | 
            +
            #endif//EOH
         | 
    
        data/src/win32/window.cpp
    CHANGED
    
    | @@ -12,6 +12,7 @@ | |
| 12 12 | 
             
            #include "reflex/debug.h"
         | 
| 13 13 | 
             
            #include "../view.h"
         | 
| 14 14 | 
             
            #include "event.h"
         | 
| 15 | 
            +
            #include "gamepad.h"
         | 
| 15 16 | 
             
            #include "screen.h"
         | 
| 16 17 | 
             
            #include "opengl.h"
         | 
| 17 18 |  | 
| @@ -154,6 +155,8 @@ namespace Reflex | |
| 154 155 | 
             
            	{
         | 
| 155 156 | 
             
            		WindowData* self = get_data(win);
         | 
| 156 157 |  | 
| 158 | 
            +
            		Gamepad_poll();
         | 
| 159 | 
            +
             | 
| 157 160 | 
             
            		Window_call_update_event(win);
         | 
| 158 161 |  | 
| 159 162 | 
             
            		if (self->redraw)
         | 
| @@ -341,8 +344,13 @@ namespace Reflex | |
| 341 344 | 
             
            		{
         | 
| 342 345 | 
             
            			case WM_ACTIVATE:
         | 
| 343 346 | 
             
            			{
         | 
| 344 | 
            -
            				if ((wp | 
| 347 | 
            +
            				if (LOWORD(wp) == WA_INACTIVE)
         | 
| 348 | 
            +
            				{
         | 
| 349 | 
            +
            					Window_call_deactivate_event(win);
         | 
| 345 350 | 
             
            					self->pressing_keys.clear();
         | 
| 351 | 
            +
            				}
         | 
| 352 | 
            +
            				else
         | 
| 353 | 
            +
            					Window_call_activate_event(win);
         | 
| 346 354 | 
             
            				break;
         | 
| 347 355 | 
             
            			}
         | 
| 348 356 |  | 
    
        data/src/window.cpp
    CHANGED
    
    | @@ -52,6 +52,17 @@ namespace Reflex | |
| 52 52 | 
             
            		return windows;
         | 
| 53 53 | 
             
            	}
         | 
| 54 54 |  | 
| 55 | 
            +
            	Window*
         | 
| 56 | 
            +
            	Window_get_active ()
         | 
| 57 | 
            +
            	{
         | 
| 58 | 
            +
            		for (auto& w : Window_all())
         | 
| 59 | 
            +
            		{
         | 
| 60 | 
            +
            			if (Xot::has_flag(w->self->flags, Window::Data::ACTIVE))
         | 
| 61 | 
            +
            				return w;
         | 
| 62 | 
            +
            		}
         | 
| 63 | 
            +
            		return NULL;
         | 
| 64 | 
            +
            	}
         | 
| 65 | 
            +
             | 
| 55 66 |  | 
| 56 67 | 
             
            	Window::Data::Data ()
         | 
| 57 68 | 
             
            	:	flags(Window_default_flags())
         | 
| @@ -167,6 +178,8 @@ namespace Reflex | |
| 167 178 | 
             
            	{
         | 
| 168 179 | 
             
            		if (!window) return;
         | 
| 169 180 |  | 
| 181 | 
            +
            		Xot::add_flag(&window->self->flags, Window::Data::ACTIVE);
         | 
| 182 | 
            +
             | 
| 170 183 | 
             
            		Event e;
         | 
| 171 184 | 
             
            		window->on_activate(&e);
         | 
| 172 185 | 
             
            	}
         | 
| @@ -178,6 +191,8 @@ namespace Reflex | |
| 178 191 |  | 
| 179 192 | 
             
            		Event e;
         | 
| 180 193 | 
             
            		window->on_deactivate(&e);
         | 
| 194 | 
            +
             | 
| 195 | 
            +
            		Xot::remove_flag(&window->self->flags, Window::Data::ACTIVE);
         | 
| 181 196 | 
             
            	}
         | 
| 182 197 |  | 
| 183 198 | 
             
            	void
         | 
    
        data/src/window.h
    CHANGED
    
    | @@ -33,6 +33,13 @@ namespace Reflex | |
| 33 33 |  | 
| 34 34 | 
             
            		typedef std::map<View::Ref, CaptureTargetIDList> CaptureMap;
         | 
| 35 35 |  | 
| 36 | 
            +
            		enum Flag
         | 
| 37 | 
            +
            		{
         | 
| 38 | 
            +
             | 
| 39 | 
            +
            			ACTIVE = Xot::bit(1, FLAG_LAST),
         | 
| 40 | 
            +
             | 
| 41 | 
            +
            		};// Flag
         | 
| 42 | 
            +
             | 
| 36 43 | 
             
            		int hide_count = 1;
         | 
| 37 44 |  | 
| 38 45 | 
             
            		bool redraw    = true;
         | 
| @@ -82,6 +89,8 @@ namespace Reflex | |
| 82 89 |  | 
| 83 90 | 
             
            	Application::WindowList& Window_all ();
         | 
| 84 91 |  | 
| 92 | 
            +
            	Window* Window_get_active ();
         | 
| 93 | 
            +
             | 
| 85 94 |  | 
| 86 95 | 
             
            	uint Window_default_flags ();
         | 
| 87 96 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: reflexion
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.3. | 
| 4 | 
            +
              version: 0.3.6
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - xordog
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2025- | 
| 11 | 
            +
            date: 2025-04-08 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: xot
         | 
| @@ -16,60 +16,60 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - "~>"
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: 0.3. | 
| 19 | 
            +
                    version: 0.3.6
         | 
| 20 20 | 
             
                - - ">="
         | 
| 21 21 | 
             
                  - !ruby/object:Gem::Version
         | 
| 22 | 
            -
                    version: 0.3. | 
| 22 | 
            +
                    version: 0.3.6
         | 
| 23 23 | 
             
              type: :runtime
         | 
| 24 24 | 
             
              prerelease: false
         | 
| 25 25 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 26 26 | 
             
                requirements:
         | 
| 27 27 | 
             
                - - "~>"
         | 
| 28 28 | 
             
                  - !ruby/object:Gem::Version
         | 
| 29 | 
            -
                    version: 0.3. | 
| 29 | 
            +
                    version: 0.3.6
         | 
| 30 30 | 
             
                - - ">="
         | 
| 31 31 | 
             
                  - !ruby/object:Gem::Version
         | 
| 32 | 
            -
                    version: 0.3. | 
| 32 | 
            +
                    version: 0.3.6
         | 
| 33 33 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 34 34 | 
             
              name: rucy
         | 
| 35 35 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 36 36 | 
             
                requirements:
         | 
| 37 37 | 
             
                - - "~>"
         | 
| 38 38 | 
             
                  - !ruby/object:Gem::Version
         | 
| 39 | 
            -
                    version: 0.3. | 
| 39 | 
            +
                    version: 0.3.6
         | 
| 40 40 | 
             
                - - ">="
         | 
| 41 41 | 
             
                  - !ruby/object:Gem::Version
         | 
| 42 | 
            -
                    version: 0.3. | 
| 42 | 
            +
                    version: 0.3.6
         | 
| 43 43 | 
             
              type: :runtime
         | 
| 44 44 | 
             
              prerelease: false
         | 
| 45 45 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 46 46 | 
             
                requirements:
         | 
| 47 47 | 
             
                - - "~>"
         | 
| 48 48 | 
             
                  - !ruby/object:Gem::Version
         | 
| 49 | 
            -
                    version: 0.3. | 
| 49 | 
            +
                    version: 0.3.6
         | 
| 50 50 | 
             
                - - ">="
         | 
| 51 51 | 
             
                  - !ruby/object:Gem::Version
         | 
| 52 | 
            -
                    version: 0.3. | 
| 52 | 
            +
                    version: 0.3.6
         | 
| 53 53 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 54 54 | 
             
              name: rays
         | 
| 55 55 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 56 56 | 
             
                requirements:
         | 
| 57 57 | 
             
                - - "~>"
         | 
| 58 58 | 
             
                  - !ruby/object:Gem::Version
         | 
| 59 | 
            -
                    version: 0.3. | 
| 59 | 
            +
                    version: 0.3.6
         | 
| 60 60 | 
             
                - - ">="
         | 
| 61 61 | 
             
                  - !ruby/object:Gem::Version
         | 
| 62 | 
            -
                    version: 0.3. | 
| 62 | 
            +
                    version: 0.3.6
         | 
| 63 63 | 
             
              type: :runtime
         | 
| 64 64 | 
             
              prerelease: false
         | 
| 65 65 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 66 66 | 
             
                requirements:
         | 
| 67 67 | 
             
                - - "~>"
         | 
| 68 68 | 
             
                  - !ruby/object:Gem::Version
         | 
| 69 | 
            -
                    version: 0.3. | 
| 69 | 
            +
                    version: 0.3.6
         | 
| 70 70 | 
             
                - - ">="
         | 
| 71 71 | 
             
                  - !ruby/object:Gem::Version
         | 
| 72 | 
            -
                    version: 0.3. | 
| 72 | 
            +
                    version: 0.3.6
         | 
| 73 73 | 
             
            description: This library helps you to develop interactive graphical user interface.
         | 
| 74 74 | 
             
            email: xordog@gmail.com
         | 
| 75 75 | 
             
            executables: []
         | 
| @@ -80,6 +80,7 @@ extra_rdoc_files: | |
| 80 80 | 
             
            - ".doc/ext/reflex/capture_event.cpp"
         | 
| 81 81 | 
             
            - ".doc/ext/reflex/contact_event.cpp"
         | 
| 82 82 | 
             
            - ".doc/ext/reflex/device.cpp"
         | 
| 83 | 
            +
            - ".doc/ext/reflex/device_event.cpp"
         | 
| 83 84 | 
             
            - ".doc/ext/reflex/draw_event.cpp"
         | 
| 84 85 | 
             
            - ".doc/ext/reflex/ellipse_shape.cpp"
         | 
| 85 86 | 
             
            - ".doc/ext/reflex/event.cpp"
         | 
| @@ -114,6 +115,7 @@ files: | |
| 114 115 | 
             
            - ".doc/ext/reflex/capture_event.cpp"
         | 
| 115 116 | 
             
            - ".doc/ext/reflex/contact_event.cpp"
         | 
| 116 117 | 
             
            - ".doc/ext/reflex/device.cpp"
         | 
| 118 | 
            +
            - ".doc/ext/reflex/device_event.cpp"
         | 
| 117 119 | 
             
            - ".doc/ext/reflex/draw_event.cpp"
         | 
| 118 120 | 
             
            - ".doc/ext/reflex/ellipse_shape.cpp"
         | 
| 119 121 | 
             
            - ".doc/ext/reflex/event.cpp"
         | 
| @@ -143,10 +145,12 @@ files: | |
| 143 145 | 
             
            - ".doc/ext/reflex/view.cpp"
         | 
| 144 146 | 
             
            - ".doc/ext/reflex/wheel_event.cpp"
         | 
| 145 147 | 
             
            - ".doc/ext/reflex/window.cpp"
         | 
| 148 | 
            +
            - ".github/PULL_REQUEST_TEMPLATE.md"
         | 
| 146 149 | 
             
            - ".github/workflows/release-gem.yml"
         | 
| 147 150 | 
             
            - ".github/workflows/tag.yml"
         | 
| 148 151 | 
             
            - ".github/workflows/test.yml"
         | 
| 149 152 | 
             
            - ".github/workflows/utils.rb"
         | 
| 153 | 
            +
            - CONTRIBUTING.md
         | 
| 150 154 | 
             
            - ChangeLog.md
         | 
| 151 155 | 
             
            - Gemfile
         | 
| 152 156 | 
             
            - Gemfile.lock
         | 
| @@ -159,6 +163,7 @@ files: | |
| 159 163 | 
             
            - ext/reflex/contact_event.cpp
         | 
| 160 164 | 
             
            - ext/reflex/defs.h
         | 
| 161 165 | 
             
            - ext/reflex/device.cpp
         | 
| 166 | 
            +
            - ext/reflex/device_event.cpp
         | 
| 162 167 | 
             
            - ext/reflex/draw_event.cpp
         | 
| 163 168 | 
             
            - ext/reflex/ellipse_shape.cpp
         | 
| 164 169 | 
             
            - ext/reflex/event.cpp
         | 
| @@ -198,12 +203,14 @@ files: | |
| 198 203 | 
             
            - include/reflex/event.h
         | 
| 199 204 | 
             
            - include/reflex/exception.h
         | 
| 200 205 | 
             
            - include/reflex/filter.h
         | 
| 206 | 
            +
            - include/reflex/gamepad.h
         | 
| 201 207 | 
             
            - include/reflex/image_view.h
         | 
| 202 208 | 
             
            - include/reflex/pointer.h
         | 
| 203 209 | 
             
            - include/reflex/reflex.h
         | 
| 204 210 | 
             
            - include/reflex/ruby.h
         | 
| 205 211 | 
             
            - include/reflex/ruby/application.h
         | 
| 206 212 | 
             
            - include/reflex/ruby/defs.h
         | 
| 213 | 
            +
            - include/reflex/ruby/device.h
         | 
| 207 214 | 
             
            - include/reflex/ruby/event.h
         | 
| 208 215 | 
             
            - include/reflex/ruby/exception.h
         | 
| 209 216 | 
             
            - include/reflex/ruby/filter.h
         | 
| @@ -325,12 +332,15 @@ files: | |
| 325 332 | 
             
            - src/application.h
         | 
| 326 333 | 
             
            - src/body.cpp
         | 
| 327 334 | 
             
            - src/body.h
         | 
| 335 | 
            +
            - src/device.cpp
         | 
| 328 336 | 
             
            - src/event.cpp
         | 
| 329 337 | 
             
            - src/event.h
         | 
| 330 338 | 
             
            - src/exception.cpp
         | 
| 331 339 | 
             
            - src/filter.cpp
         | 
| 332 340 | 
             
            - src/fixture.cpp
         | 
| 333 341 | 
             
            - src/fixture.h
         | 
| 342 | 
            +
            - src/gamepad.cpp
         | 
| 343 | 
            +
            - src/gamepad.h
         | 
| 334 344 | 
             
            - src/image_view.cpp
         | 
| 335 345 | 
             
            - src/ios/app_delegate.h
         | 
| 336 346 | 
             
            - src/ios/app_delegate.mm
         | 
| @@ -339,6 +349,7 @@ files: | |
| 339 349 | 
             
            - src/ios/device.mm
         | 
| 340 350 | 
             
            - src/ios/event.h
         | 
| 341 351 | 
             
            - src/ios/event.mm
         | 
| 352 | 
            +
            - src/ios/gamepad.mm
         | 
| 342 353 | 
             
            - src/ios/reflex.mm
         | 
| 343 354 | 
             
            - src/ios/screen.h
         | 
| 344 355 | 
             
            - src/ios/screen.mm
         | 
| @@ -353,6 +364,9 @@ files: | |
| 353 364 | 
             
            - src/osx/device.mm
         | 
| 354 365 | 
             
            - src/osx/event.h
         | 
| 355 366 | 
             
            - src/osx/event.mm
         | 
| 367 | 
            +
            - src/osx/gamepad.mm
         | 
| 368 | 
            +
            - src/osx/gamepad_gc.mm
         | 
| 369 | 
            +
            - src/osx/gamepad_hid.mm
         | 
| 356 370 | 
             
            - src/osx/native_window.h
         | 
| 357 371 | 
             
            - src/osx/native_window.mm
         | 
| 358 372 | 
             
            - src/osx/opengl_view.h
         | 
| @@ -378,6 +392,8 @@ files: | |
| 378 392 | 
             
            - src/win32/device.cpp
         | 
| 379 393 | 
             
            - src/win32/event.cpp
         | 
| 380 394 | 
             
            - src/win32/event.h
         | 
| 395 | 
            +
            - src/win32/gamepad.cpp
         | 
| 396 | 
            +
            - src/win32/gamepad.h
         | 
| 381 397 | 
             
            - src/win32/opengl.cpp
         | 
| 382 398 | 
             
            - src/win32/opengl.h
         | 
| 383 399 | 
             
            - src/win32/reflex.cpp
         |