SDLRuby 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -19
- data/LICENSE.txt +21 -21
- data/README.md +31 -31
- data/Rakefile +12 -12
- data/SDLRuby.gemspec +38 -0
- data/examples/alert.rb +8 -0
- data/examples/window.rb +7 -0
- data/lib/SDLRuby/event/accessor.rb +2 -2
- data/lib/SDLRuby/event.rb +101 -101
- data/lib/SDLRuby/image/include/SDL_image.h.rb +61 -61
- data/lib/SDLRuby/mixer/include/SDL_mixer.h.rb +95 -95
- data/lib/SDLRuby/rw/operational.rb +116 -0
- data/lib/SDLRuby/rw/read_closure.rb +28 -0
- data/lib/SDLRuby/rw/seek_closure.rb +22 -0
- data/lib/SDLRuby/rw/size_closure.rb +21 -0
- data/lib/SDLRuby/rw/write_closure.rb +21 -0
- data/lib/SDLRuby/rw_ops/mem_close.rb +27 -0
- data/lib/SDLRuby/rw_ops/rw_object.rb +13 -107
- data/lib/SDLRuby/rw_ops.rb +40 -165
- data/lib/SDLRuby/sdl/include/SDL.h.rb +44 -44
- data/lib/SDLRuby/sdl/include/SDL_audio.h.rb +160 -160
- data/lib/SDLRuby/sdl/include/SDL_blendmode.h.rb +30 -30
- data/lib/SDLRuby/sdl/include/SDL_clipboard.h.rb +10 -10
- data/lib/SDLRuby/sdl/include/SDL_config.h.rb +13 -13
- data/lib/SDLRuby/sdl/include/SDL_cpuinfo.h.rb +27 -27
- data/lib/SDLRuby/sdl/include/SDL_endian.h.rb +12 -12
- data/lib/SDLRuby/sdl/include/SDL_error.h.rb +28 -28
- data/lib/SDLRuby/sdl/include/SDL_events.h.rb +472 -472
- data/lib/SDLRuby/sdl/include/SDL_filesystem.h.rb +6 -6
- data/lib/SDLRuby/sdl/include/SDL_gamecontroller.h.rb +147 -147
- data/lib/SDLRuby/sdl/include/SDL_gesture.h.rb +12 -12
- data/lib/SDLRuby/sdl/include/SDL_guid.h.rb +13 -13
- data/lib/SDLRuby/sdl/include/SDL_hints.h.rb +199 -199
- data/lib/SDLRuby/sdl/include/SDL_joystick.h.rb +131 -131
- data/lib/SDLRuby/sdl/include/SDL_keyboard.h.rb +35 -35
- data/lib/SDLRuby/sdl/include/SDL_keycode.h.rb +292 -292
- data/lib/SDLRuby/sdl/include/SDL_locale.h.rb +13 -13
- data/lib/SDLRuby/sdl/include/SDL_main.h.rb +3 -3
- data/lib/SDLRuby/sdl/include/SDL_messagebox.h.rb +58 -58
- data/lib/SDLRuby/sdl/include/SDL_misc.h.rb +5 -5
- data/lib/SDLRuby/sdl/include/SDL_mouse.h.rb +57 -57
- data/lib/SDLRuby/sdl/include/SDL_pixels.h.rb +285 -285
- data/lib/SDLRuby/sdl/include/SDL_platform.h.rb +3 -3
- data/lib/SDLRuby/sdl/include/SDL_power.h.rb +6 -6
- data/lib/SDLRuby/sdl/include/SDL_rect.h.rb +46 -46
- data/lib/SDLRuby/sdl/include/SDL_render.h.rb +131 -131
- data/lib/SDLRuby/sdl/include/SDL_revision.h.rb +2 -2
- data/lib/SDLRuby/sdl/include/SDL_rwops.h.rb +78 -78
- data/lib/SDLRuby/sdl/include/SDL_scancode.h.rb +252 -252
- data/lib/SDLRuby/sdl/include/SDL_sensor.h.rb +25 -25
- data/lib/SDLRuby/sdl/include/SDL_shape.h.rb +40 -40
- data/lib/SDLRuby/sdl/include/SDL_stdinc.h.rb +62 -62
- data/lib/SDLRuby/sdl/include/SDL_surface.h.rb +100 -100
- data/lib/SDLRuby/sdl/include/SDL_system.h.rb +6 -6
- data/lib/SDLRuby/sdl/include/SDL_syswm.h.rb +10 -10
- data/lib/SDLRuby/sdl/include/SDL_timer.h.rb +21 -21
- data/lib/SDLRuby/sdl/include/SDL_touch.h.rb +15 -15
- data/lib/SDLRuby/sdl/include/SDL_types.h.rb +3 -3
- data/lib/SDLRuby/sdl/include/SDL_version.h.rb +14 -14
- data/lib/SDLRuby/sdl/include/SDL_video.h.rb +264 -264
- data/lib/SDLRuby/sdl.rb +6 -6
- data/lib/SDLRuby/ttf/include/SDL_ttf.h.rb +54 -54
- data/lib/SDLRuby/version.rb +5 -5
- data/lib/SDLRuby/window/surfacer.rb +37 -37
- data/lib/SDLRuby.rb +32 -16
- data/sig/SDLRuby.rbs +4 -4
- data/sig/lib/SDLRuby/event/accessor.rbs +157 -157
- data/sig/lib/SDLRuby/event/type.rbs +67 -67
- data/sig/lib/SDLRuby/event.rbs +47 -47
- data/sig/lib/SDLRuby/keyboard.rbs +25 -25
- data/sig/lib/SDLRuby/mouse.rbs +35 -35
- data/sig/lib/SDLRuby/sdl.rbs +655 -655
- data/sig/lib/SDLRuby/timer.rbs +7 -7
- metadata +12 -3
@@ -1,67 +1,67 @@
|
|
1
|
-
module SDLRuby
|
2
|
-
class Event
|
3
|
-
module Type
|
4
|
-
include SDL
|
5
|
-
|
6
|
-
QUIT_EVENT: ::Range[Integer]
|
7
|
-
|
8
|
-
DISPLAY_EVENT: ::Range[Integer]
|
9
|
-
|
10
|
-
WINDOW_EVENT: ::Range[Integer]
|
11
|
-
|
12
|
-
SYSWM_EVENT: ::Range[Integer]
|
13
|
-
|
14
|
-
KEY_EVENT: ::Range[Integer]
|
15
|
-
|
16
|
-
EDIT_EVENT: ::Range[Integer]
|
17
|
-
|
18
|
-
TEXT_EVENT: ::Range[Integer]
|
19
|
-
|
20
|
-
EDIT_EXT_EVENT: ::Range[Integer]
|
21
|
-
|
22
|
-
MOTION_EVENT: ::Range[Integer]
|
23
|
-
|
24
|
-
BUTTON_EVENT: ::Range[Integer]
|
25
|
-
|
26
|
-
WHEEL_EVENT: ::Range[Integer]
|
27
|
-
|
28
|
-
JAXIS_EVENT: ::Range[Integer]
|
29
|
-
|
30
|
-
JBALL_EVENT: ::Range[Integer]
|
31
|
-
|
32
|
-
JHAT_EVENT: ::Range[Integer]
|
33
|
-
|
34
|
-
JBUTTON_EVENT: ::Range[Integer]
|
35
|
-
|
36
|
-
JDEVICE_EVENT: ::Range[Integer]
|
37
|
-
|
38
|
-
JBATTERY_EVENT: ::Range[Integer]
|
39
|
-
|
40
|
-
CAXIS_EVENT: ::Range[Integer]
|
41
|
-
|
42
|
-
CBUTTON_EVENT: ::Range[Integer]
|
43
|
-
|
44
|
-
CDEVICE_EVENT: ::Range[Integer]
|
45
|
-
|
46
|
-
CTOUCHPAD_EVENT: ::Range[Integer]
|
47
|
-
|
48
|
-
CSENSOR_EVENT: ::Range[Integer]
|
49
|
-
|
50
|
-
TFINGER_EVENT: ::Range[Integer]
|
51
|
-
|
52
|
-
DGESTURE_EVENT: ::Range[Integer]
|
53
|
-
|
54
|
-
MGESTURE_EVENT: ::Range[Integer]
|
55
|
-
|
56
|
-
DROP_EVENT: ::Range[Integer]
|
57
|
-
|
58
|
-
ADEVICE_EVENT: ::Range[Integer]
|
59
|
-
|
60
|
-
SENSOR_EVENT: ::Range[Integer]
|
61
|
-
|
62
|
-
USER_EVENT: ::Range[Integer]
|
63
|
-
|
64
|
-
def self.to_sym: (Integer `type`) -> Symbol
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
1
|
+
module SDLRuby
|
2
|
+
class Event
|
3
|
+
module Type
|
4
|
+
include SDL
|
5
|
+
|
6
|
+
QUIT_EVENT: ::Range[Integer]
|
7
|
+
|
8
|
+
DISPLAY_EVENT: ::Range[Integer]
|
9
|
+
|
10
|
+
WINDOW_EVENT: ::Range[Integer]
|
11
|
+
|
12
|
+
SYSWM_EVENT: ::Range[Integer]
|
13
|
+
|
14
|
+
KEY_EVENT: ::Range[Integer]
|
15
|
+
|
16
|
+
EDIT_EVENT: ::Range[Integer]
|
17
|
+
|
18
|
+
TEXT_EVENT: ::Range[Integer]
|
19
|
+
|
20
|
+
EDIT_EXT_EVENT: ::Range[Integer]
|
21
|
+
|
22
|
+
MOTION_EVENT: ::Range[Integer]
|
23
|
+
|
24
|
+
BUTTON_EVENT: ::Range[Integer]
|
25
|
+
|
26
|
+
WHEEL_EVENT: ::Range[Integer]
|
27
|
+
|
28
|
+
JAXIS_EVENT: ::Range[Integer]
|
29
|
+
|
30
|
+
JBALL_EVENT: ::Range[Integer]
|
31
|
+
|
32
|
+
JHAT_EVENT: ::Range[Integer]
|
33
|
+
|
34
|
+
JBUTTON_EVENT: ::Range[Integer]
|
35
|
+
|
36
|
+
JDEVICE_EVENT: ::Range[Integer]
|
37
|
+
|
38
|
+
JBATTERY_EVENT: ::Range[Integer]
|
39
|
+
|
40
|
+
CAXIS_EVENT: ::Range[Integer]
|
41
|
+
|
42
|
+
CBUTTON_EVENT: ::Range[Integer]
|
43
|
+
|
44
|
+
CDEVICE_EVENT: ::Range[Integer]
|
45
|
+
|
46
|
+
CTOUCHPAD_EVENT: ::Range[Integer]
|
47
|
+
|
48
|
+
CSENSOR_EVENT: ::Range[Integer]
|
49
|
+
|
50
|
+
TFINGER_EVENT: ::Range[Integer]
|
51
|
+
|
52
|
+
DGESTURE_EVENT: ::Range[Integer]
|
53
|
+
|
54
|
+
MGESTURE_EVENT: ::Range[Integer]
|
55
|
+
|
56
|
+
DROP_EVENT: ::Range[Integer]
|
57
|
+
|
58
|
+
ADEVICE_EVENT: ::Range[Integer]
|
59
|
+
|
60
|
+
SENSOR_EVENT: ::Range[Integer]
|
61
|
+
|
62
|
+
USER_EVENT: ::Range[Integer]
|
63
|
+
|
64
|
+
def self.to_sym: (Integer `type`) -> Symbol
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
data/sig/lib/SDLRuby/event.rbs
CHANGED
@@ -1,47 +1,47 @@
|
|
1
|
-
module SDLRuby
|
2
|
-
class Event
|
3
|
-
include Accessor
|
4
|
-
|
5
|
-
include SDL
|
6
|
-
|
7
|
-
private
|
8
|
-
|
9
|
-
def self.__malloc__: () -> untyped
|
10
|
-
|
11
|
-
public
|
12
|
-
|
13
|
-
def self.clear: () -> void
|
14
|
-
|
15
|
-
def self.deq: (?bool non_block) -> (self | nil)
|
16
|
-
|
17
|
-
def self.disable: (Integer `type`) -> void
|
18
|
-
|
19
|
-
def self.empty?: () -> untyped
|
20
|
-
|
21
|
-
def self.enable: (Integer `type`) -> void
|
22
|
-
|
23
|
-
def self.get: () -> Event
|
24
|
-
|
25
|
-
def self.length: () -> Integer
|
26
|
-
|
27
|
-
alias self.size self.length
|
28
|
-
|
29
|
-
def self.quit?: () -> bool
|
30
|
-
|
31
|
-
def self.reserve: (Integer num) -> Integer
|
32
|
-
|
33
|
-
def self.update: () -> void
|
34
|
-
|
35
|
-
def self.wait: (?Integer|Float|Rational? timeout) -> boolish
|
36
|
-
|
37
|
-
def initialize: (untyped ptr) -> void
|
38
|
-
|
39
|
-
private
|
40
|
-
|
41
|
-
attr_reader entity: untyped
|
42
|
-
|
43
|
-
public
|
44
|
-
|
45
|
-
def to_ptr: () -> untyped
|
46
|
-
end
|
47
|
-
end
|
1
|
+
module SDLRuby
|
2
|
+
class Event
|
3
|
+
include Accessor
|
4
|
+
|
5
|
+
include SDL
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def self.__malloc__: () -> untyped
|
10
|
+
|
11
|
+
public
|
12
|
+
|
13
|
+
def self.clear: () -> void
|
14
|
+
|
15
|
+
def self.deq: (?bool non_block) -> (self | nil)
|
16
|
+
|
17
|
+
def self.disable: (Integer `type`) -> void
|
18
|
+
|
19
|
+
def self.empty?: () -> untyped
|
20
|
+
|
21
|
+
def self.enable: (Integer `type`) -> void
|
22
|
+
|
23
|
+
def self.get: () -> Event
|
24
|
+
|
25
|
+
def self.length: () -> Integer
|
26
|
+
|
27
|
+
alias self.size self.length
|
28
|
+
|
29
|
+
def self.quit?: () -> bool
|
30
|
+
|
31
|
+
def self.reserve: (Integer num) -> Integer
|
32
|
+
|
33
|
+
def self.update: () -> void
|
34
|
+
|
35
|
+
def self.wait: (?Integer|Float|Rational? timeout) -> boolish
|
36
|
+
|
37
|
+
def initialize: (untyped ptr) -> void
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
attr_reader entity: untyped
|
42
|
+
|
43
|
+
public
|
44
|
+
|
45
|
+
def to_ptr: () -> untyped
|
46
|
+
end
|
47
|
+
end
|
@@ -1,25 +1,25 @@
|
|
1
|
-
module SDLRuby
|
2
|
-
module Keyboard
|
3
|
-
include SDL
|
4
|
-
|
5
|
-
def self.==: (untyped other) -> bool
|
6
|
-
|
7
|
-
def self.any?: () -> bool
|
8
|
-
|
9
|
-
def self.clear: () -> void
|
10
|
-
|
11
|
-
def self.mod: () -> Integer
|
12
|
-
|
13
|
-
def self.scancode: (String | Symbol s) -> Integer
|
14
|
-
|
15
|
-
def self.scancode_name: (Integer num) -> String
|
16
|
-
|
17
|
-
def self.size: () -> Integer
|
18
|
-
|
19
|
-
alias self.length self.size
|
20
|
-
|
21
|
-
def self.to_a: () -> Array[Integer]
|
22
|
-
|
23
|
-
def self.to_str: () -> String
|
24
|
-
end
|
25
|
-
end
|
1
|
+
module SDLRuby
|
2
|
+
module Keyboard
|
3
|
+
include SDL
|
4
|
+
|
5
|
+
def self.==: (untyped other) -> bool
|
6
|
+
|
7
|
+
def self.any?: () -> bool
|
8
|
+
|
9
|
+
def self.clear: () -> void
|
10
|
+
|
11
|
+
def self.mod: () -> Integer
|
12
|
+
|
13
|
+
def self.scancode: (String | Symbol s) -> Integer
|
14
|
+
|
15
|
+
def self.scancode_name: (Integer num) -> String
|
16
|
+
|
17
|
+
def self.size: () -> Integer
|
18
|
+
|
19
|
+
alias self.length self.size
|
20
|
+
|
21
|
+
def self.to_a: () -> Array[Integer]
|
22
|
+
|
23
|
+
def self.to_str: () -> String
|
24
|
+
end
|
25
|
+
end
|
data/sig/lib/SDLRuby/mouse.rbs
CHANGED
@@ -1,35 +1,35 @@
|
|
1
|
-
module SDLRuby
|
2
|
-
module Mouse
|
3
|
-
include SDL
|
4
|
-
|
5
|
-
def self.button: () -> Array[bool]
|
6
|
-
|
7
|
-
def self.capture=: (boolish) -> void
|
8
|
-
|
9
|
-
def self.global_button: () -> Array[bool]
|
10
|
-
|
11
|
-
def self.global_pos: () -> [Integer, Integer]
|
12
|
-
|
13
|
-
def self.global_pos=: ([Integer, Integer] xy) -> void
|
14
|
-
|
15
|
-
def self.global_state: () -> [Array[bool], Integer, Integer]
|
16
|
-
|
17
|
-
def self.pos: () -> [Integer, Integer]
|
18
|
-
|
19
|
-
def self.pos=: ([Integer, Integer] xy) -> void
|
20
|
-
|
21
|
-
def self.relative=: (boolish) -> untyped
|
22
|
-
|
23
|
-
def self.relative?: () -> bool
|
24
|
-
|
25
|
-
def self.relative_pos: () -> [Integer, Integer]
|
26
|
-
|
27
|
-
def self.relative_state: () -> [Array[bool], Integer, Integer]
|
28
|
-
|
29
|
-
def self.state: () -> [Array[bool], Integer, Integer]
|
30
|
-
|
31
|
-
private
|
32
|
-
|
33
|
-
def self.button_to_ary: (Integer num) -> ::Array[bool]
|
34
|
-
end
|
35
|
-
end
|
1
|
+
module SDLRuby
|
2
|
+
module Mouse
|
3
|
+
include SDL
|
4
|
+
|
5
|
+
def self.button: () -> Array[bool]
|
6
|
+
|
7
|
+
def self.capture=: (boolish) -> void
|
8
|
+
|
9
|
+
def self.global_button: () -> Array[bool]
|
10
|
+
|
11
|
+
def self.global_pos: () -> [Integer, Integer]
|
12
|
+
|
13
|
+
def self.global_pos=: ([Integer, Integer] xy) -> void
|
14
|
+
|
15
|
+
def self.global_state: () -> [Array[bool], Integer, Integer]
|
16
|
+
|
17
|
+
def self.pos: () -> [Integer, Integer]
|
18
|
+
|
19
|
+
def self.pos=: ([Integer, Integer] xy) -> void
|
20
|
+
|
21
|
+
def self.relative=: (boolish) -> untyped
|
22
|
+
|
23
|
+
def self.relative?: () -> bool
|
24
|
+
|
25
|
+
def self.relative_pos: () -> [Integer, Integer]
|
26
|
+
|
27
|
+
def self.relative_state: () -> [Array[bool], Integer, Integer]
|
28
|
+
|
29
|
+
def self.state: () -> [Array[bool], Integer, Integer]
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def self.button_to_ary: (Integer num) -> ::Array[bool]
|
34
|
+
end
|
35
|
+
end
|