SDLRuby 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -19
  3. data/LICENSE.txt +21 -21
  4. data/README.md +31 -31
  5. data/Rakefile +12 -12
  6. data/SDLRuby.gemspec +38 -0
  7. data/examples/alert.rb +8 -0
  8. data/examples/window.rb +7 -0
  9. data/lib/SDLRuby/event/accessor.rb +2 -2
  10. data/lib/SDLRuby/event.rb +101 -101
  11. data/lib/SDLRuby/image/include/SDL_image.h.rb +61 -61
  12. data/lib/SDLRuby/mixer/include/SDL_mixer.h.rb +95 -95
  13. data/lib/SDLRuby/rw/operational.rb +116 -0
  14. data/lib/SDLRuby/rw/read_closure.rb +28 -0
  15. data/lib/SDLRuby/rw/seek_closure.rb +22 -0
  16. data/lib/SDLRuby/rw/size_closure.rb +21 -0
  17. data/lib/SDLRuby/rw/write_closure.rb +21 -0
  18. data/lib/SDLRuby/rw_ops/mem_close.rb +27 -0
  19. data/lib/SDLRuby/rw_ops/rw_object.rb +13 -107
  20. data/lib/SDLRuby/rw_ops.rb +40 -165
  21. data/lib/SDLRuby/sdl/include/SDL.h.rb +44 -44
  22. data/lib/SDLRuby/sdl/include/SDL_audio.h.rb +160 -160
  23. data/lib/SDLRuby/sdl/include/SDL_blendmode.h.rb +30 -30
  24. data/lib/SDLRuby/sdl/include/SDL_clipboard.h.rb +10 -10
  25. data/lib/SDLRuby/sdl/include/SDL_config.h.rb +13 -13
  26. data/lib/SDLRuby/sdl/include/SDL_cpuinfo.h.rb +27 -27
  27. data/lib/SDLRuby/sdl/include/SDL_endian.h.rb +12 -12
  28. data/lib/SDLRuby/sdl/include/SDL_error.h.rb +28 -28
  29. data/lib/SDLRuby/sdl/include/SDL_events.h.rb +472 -472
  30. data/lib/SDLRuby/sdl/include/SDL_filesystem.h.rb +6 -6
  31. data/lib/SDLRuby/sdl/include/SDL_gamecontroller.h.rb +147 -147
  32. data/lib/SDLRuby/sdl/include/SDL_gesture.h.rb +12 -12
  33. data/lib/SDLRuby/sdl/include/SDL_guid.h.rb +13 -13
  34. data/lib/SDLRuby/sdl/include/SDL_hints.h.rb +199 -199
  35. data/lib/SDLRuby/sdl/include/SDL_joystick.h.rb +131 -131
  36. data/lib/SDLRuby/sdl/include/SDL_keyboard.h.rb +35 -35
  37. data/lib/SDLRuby/sdl/include/SDL_keycode.h.rb +292 -292
  38. data/lib/SDLRuby/sdl/include/SDL_locale.h.rb +13 -13
  39. data/lib/SDLRuby/sdl/include/SDL_main.h.rb +3 -3
  40. data/lib/SDLRuby/sdl/include/SDL_messagebox.h.rb +58 -58
  41. data/lib/SDLRuby/sdl/include/SDL_misc.h.rb +5 -5
  42. data/lib/SDLRuby/sdl/include/SDL_mouse.h.rb +57 -57
  43. data/lib/SDLRuby/sdl/include/SDL_pixels.h.rb +285 -285
  44. data/lib/SDLRuby/sdl/include/SDL_platform.h.rb +3 -3
  45. data/lib/SDLRuby/sdl/include/SDL_power.h.rb +6 -6
  46. data/lib/SDLRuby/sdl/include/SDL_rect.h.rb +46 -46
  47. data/lib/SDLRuby/sdl/include/SDL_render.h.rb +131 -131
  48. data/lib/SDLRuby/sdl/include/SDL_revision.h.rb +2 -2
  49. data/lib/SDLRuby/sdl/include/SDL_rwops.h.rb +78 -78
  50. data/lib/SDLRuby/sdl/include/SDL_scancode.h.rb +252 -252
  51. data/lib/SDLRuby/sdl/include/SDL_sensor.h.rb +25 -25
  52. data/lib/SDLRuby/sdl/include/SDL_shape.h.rb +40 -40
  53. data/lib/SDLRuby/sdl/include/SDL_stdinc.h.rb +62 -62
  54. data/lib/SDLRuby/sdl/include/SDL_surface.h.rb +100 -100
  55. data/lib/SDLRuby/sdl/include/SDL_system.h.rb +6 -6
  56. data/lib/SDLRuby/sdl/include/SDL_syswm.h.rb +10 -10
  57. data/lib/SDLRuby/sdl/include/SDL_timer.h.rb +21 -21
  58. data/lib/SDLRuby/sdl/include/SDL_touch.h.rb +15 -15
  59. data/lib/SDLRuby/sdl/include/SDL_types.h.rb +3 -3
  60. data/lib/SDLRuby/sdl/include/SDL_version.h.rb +14 -14
  61. data/lib/SDLRuby/sdl/include/SDL_video.h.rb +264 -264
  62. data/lib/SDLRuby/sdl.rb +6 -6
  63. data/lib/SDLRuby/ttf/include/SDL_ttf.h.rb +54 -54
  64. data/lib/SDLRuby/version.rb +5 -5
  65. data/lib/SDLRuby/window/surfacer.rb +37 -37
  66. data/lib/SDLRuby.rb +32 -16
  67. data/sig/SDLRuby.rbs +4 -4
  68. data/sig/lib/SDLRuby/event/accessor.rbs +157 -157
  69. data/sig/lib/SDLRuby/event/type.rbs +67 -67
  70. data/sig/lib/SDLRuby/event.rbs +47 -47
  71. data/sig/lib/SDLRuby/keyboard.rbs +25 -25
  72. data/sig/lib/SDLRuby/mouse.rbs +35 -35
  73. data/sig/lib/SDLRuby/sdl.rbs +655 -655
  74. data/sig/lib/SDLRuby/timer.rbs +7 -7
  75. metadata +12 -3
@@ -1,54 +1,54 @@
1
- module SDLRuby::TTF
2
- typealias "TTF_Font", "struct _TTF_Font"
3
- typealias "TTF_Direction", "int"
4
- extern "const SDL_version * TTF_Linked_Version(void)"
5
- extern "void TTF_GetFreeTypeVersion(int *major, int *minor, int *patch)"
6
- extern "void TTF_GetHarfBuzzVersion(int *major, int *minor, int *patch)"
7
- extern "void TTF_ByteSwappedUNICODE(SDL_bool swapped)"
8
- extern "int TTF_Init(void)"
9
- extern "TTF_Font * TTF_OpenFont(const char *file, int ptsize)"
10
- extern "TTF_Font * TTF_OpenFontIndex(const char *file, int ptsize, long index)"
11
- extern "TTF_Font * TTF_OpenFontRW(SDL_RWops *src, int freesrc, int ptsize)"
12
- extern "TTF_Font * TTF_OpenFontIndexRW(SDL_RWops *src, int freesrc, int ptsize, long index)"
13
- extern "TTF_Font * TTF_OpenFontDPI(const char *file, int ptsize, unsigned int hdpi, unsigned int vdpi)"
14
- extern "TTF_Font * TTF_OpenFontIndexDPI(const char *file, int ptsize, long index, unsigned int hdpi, unsigned int vdpi)"
15
- extern "TTF_Font * TTF_OpenFontDPIRW(SDL_RWops *src, int freesrc, int ptsize, unsigned int hdpi, unsigned int vdpi)"
16
- extern "TTF_Font * TTF_OpenFontIndexDPIRW(SDL_RWops *src, int freesrc, int ptsize, long index, unsigned int hdpi, unsigned int vdpi)"
17
- extern "int TTF_SetFontSize(TTF_Font *font, int ptsize)"
18
- extern "int TTF_SetFontSizeDPI(TTF_Font *font, int ptsize, unsigned int hdpi, unsigned int vdpi)"
19
- extern "int TTF_GetFontStyle(const TTF_Font *font)"
20
- extern "void TTF_SetFontStyle(TTF_Font *font, int style)"
21
- extern "int TTF_GetFontOutline(const TTF_Font *font)"
22
- extern "void TTF_SetFontOutline(TTF_Font *font, int outline)"
23
- extern "int TTF_GetFontHinting(const TTF_Font *font)"
24
- extern "void TTF_SetFontHinting(TTF_Font *font, int hinting)"
25
- extern "int TTF_GetFontWrappedAlign(const TTF_Font *font)"
26
- extern "void TTF_SetFontWrappedAlign(TTF_Font *font, int align)"
27
- extern "int TTF_FontHeight(const TTF_Font *font)"
28
- extern "int TTF_FontAscent(const TTF_Font *font)"
29
- extern "int TTF_FontDescent(const TTF_Font *font)"
30
- extern "int TTF_FontLineSkip(const TTF_Font *font)"
31
- extern "int TTF_GetFontKerning(const TTF_Font *font)"
32
- extern "void TTF_SetFontKerning(TTF_Font *font, int allowed)"
33
- extern "long TTF_FontFaces(const TTF_Font *font)"
34
- extern "int TTF_FontFaceIsFixedWidth(const TTF_Font *font)"
35
- extern "const char * TTF_FontFaceFamilyName(const TTF_Font *font)"
36
- extern "const char * TTF_FontFaceStyleName(const TTF_Font *font)"
37
- extern "int TTF_GlyphIsProvided32(TTF_Font *font, Uint32 ch)"
38
- extern "int TTF_GlyphMetrics32(TTF_Font *font, Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance)"
39
- extern "int TTF_SizeUTF8(TTF_Font *font, const char *text, int *w, int *h)"
40
- extern "int TTF_MeasureUTF8(TTF_Font *font, const char *text, int measure_width, int *extent, int *count)"
41
- extern "SDL_Surface * TTF_RenderUTF8_Solid(TTF_Font *font, const char *text, SDL_Color fg)"
42
- extern "SDL_Surface * TTF_RenderUTF8_Solid_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)"
43
- extern "SDL_Surface * TTF_RenderUTF8_Shaded(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg)"
44
- extern "SDL_Surface * TTF_RenderUTF8_Shaded_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength)"
45
- extern "SDL_Surface * TTF_RenderUTF8_Blended(TTF_Font *font, const char *text, SDL_Color fg)"
46
- extern "SDL_Surface * TTF_RenderUTF8_Blended_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)"
47
- extern "SDL_Surface * TTF_RenderUTF8_LCD(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg)"
48
- extern "SDL_Surface * TTF_RenderUTF8_LCD_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength)"
49
- extern "void TTF_CloseFont(TTF_Font *font)"
50
- extern "void TTF_Quit(void)"
51
- extern "int TTF_WasInit(void)"
52
- extern "int TTF_SetFontDirection(TTF_Font *font, TTF_Direction direction)"
53
- extern "int TTF_SetFontScriptName(TTF_Font *font, const char *script)"
54
- end
1
+ module SDLRuby::TTF
2
+ typealias "TTF_Font", "struct _TTF_Font"
3
+ typealias "TTF_Direction", "int"
4
+ extern "const SDL_version * TTF_Linked_Version(void)"
5
+ extern "void TTF_GetFreeTypeVersion(int *major, int *minor, int *patch)"
6
+ extern "void TTF_GetHarfBuzzVersion(int *major, int *minor, int *patch)"
7
+ extern "void TTF_ByteSwappedUNICODE(SDL_bool swapped)"
8
+ extern "int TTF_Init(void)"
9
+ extern "TTF_Font * TTF_OpenFont(const char *file, int ptsize)"
10
+ extern "TTF_Font * TTF_OpenFontIndex(const char *file, int ptsize, long index)"
11
+ extern "TTF_Font * TTF_OpenFontRW(SDL_RWops *src, int freesrc, int ptsize)"
12
+ extern "TTF_Font * TTF_OpenFontIndexRW(SDL_RWops *src, int freesrc, int ptsize, long index)"
13
+ extern "TTF_Font * TTF_OpenFontDPI(const char *file, int ptsize, unsigned int hdpi, unsigned int vdpi)"
14
+ extern "TTF_Font * TTF_OpenFontIndexDPI(const char *file, int ptsize, long index, unsigned int hdpi, unsigned int vdpi)"
15
+ extern "TTF_Font * TTF_OpenFontDPIRW(SDL_RWops *src, int freesrc, int ptsize, unsigned int hdpi, unsigned int vdpi)"
16
+ extern "TTF_Font * TTF_OpenFontIndexDPIRW(SDL_RWops *src, int freesrc, int ptsize, long index, unsigned int hdpi, unsigned int vdpi)"
17
+ extern "int TTF_SetFontSize(TTF_Font *font, int ptsize)"
18
+ extern "int TTF_SetFontSizeDPI(TTF_Font *font, int ptsize, unsigned int hdpi, unsigned int vdpi)"
19
+ extern "int TTF_GetFontStyle(const TTF_Font *font)"
20
+ extern "void TTF_SetFontStyle(TTF_Font *font, int style)"
21
+ extern "int TTF_GetFontOutline(const TTF_Font *font)"
22
+ extern "void TTF_SetFontOutline(TTF_Font *font, int outline)"
23
+ extern "int TTF_GetFontHinting(const TTF_Font *font)"
24
+ extern "void TTF_SetFontHinting(TTF_Font *font, int hinting)"
25
+ extern "int TTF_GetFontWrappedAlign(const TTF_Font *font)"
26
+ extern "void TTF_SetFontWrappedAlign(TTF_Font *font, int align)"
27
+ extern "int TTF_FontHeight(const TTF_Font *font)"
28
+ extern "int TTF_FontAscent(const TTF_Font *font)"
29
+ extern "int TTF_FontDescent(const TTF_Font *font)"
30
+ extern "int TTF_FontLineSkip(const TTF_Font *font)"
31
+ extern "int TTF_GetFontKerning(const TTF_Font *font)"
32
+ extern "void TTF_SetFontKerning(TTF_Font *font, int allowed)"
33
+ extern "long TTF_FontFaces(const TTF_Font *font)"
34
+ extern "int TTF_FontFaceIsFixedWidth(const TTF_Font *font)"
35
+ extern "const char * TTF_FontFaceFamilyName(const TTF_Font *font)"
36
+ extern "const char * TTF_FontFaceStyleName(const TTF_Font *font)"
37
+ extern "int TTF_GlyphIsProvided32(TTF_Font *font, Uint32 ch)"
38
+ extern "int TTF_GlyphMetrics32(TTF_Font *font, Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance)"
39
+ extern "int TTF_SizeUTF8(TTF_Font *font, const char *text, int *w, int *h)"
40
+ extern "int TTF_MeasureUTF8(TTF_Font *font, const char *text, int measure_width, int *extent, int *count)"
41
+ extern "SDL_Surface * TTF_RenderUTF8_Solid(TTF_Font *font, const char *text, SDL_Color fg)"
42
+ extern "SDL_Surface * TTF_RenderUTF8_Solid_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)"
43
+ extern "SDL_Surface * TTF_RenderUTF8_Shaded(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg)"
44
+ extern "SDL_Surface * TTF_RenderUTF8_Shaded_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength)"
45
+ extern "SDL_Surface * TTF_RenderUTF8_Blended(TTF_Font *font, const char *text, SDL_Color fg)"
46
+ extern "SDL_Surface * TTF_RenderUTF8_Blended_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)"
47
+ extern "SDL_Surface * TTF_RenderUTF8_LCD(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg)"
48
+ extern "SDL_Surface * TTF_RenderUTF8_LCD_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength)"
49
+ extern "void TTF_CloseFont(TTF_Font *font)"
50
+ extern "void TTF_Quit(void)"
51
+ extern "int TTF_WasInit(void)"
52
+ extern "int TTF_SetFontDirection(TTF_Font *font, TTF_Direction direction)"
53
+ extern "int TTF_SetFontScriptName(TTF_Font *font, const char *script)"
54
+ end
@@ -1,5 +1,5 @@
1
- # frozen_string_literal: true
2
-
3
- module SDLRuby
4
- VERSION = "0.3.0"
5
- end
1
+ # frozen_string_literal: true
2
+
3
+ module SDLRuby
4
+ VERSION = "0.4.0"
5
+ end
@@ -1,37 +1,37 @@
1
- module SDLRuby
2
- class Window
3
- module Surfacer
4
- include SDL
5
-
6
- def destroy_surface
7
- err = SDL.SDL_DestroyWindowSurface(self)
8
- raise SDLError if err < 0
9
- end
10
-
11
- def surface
12
- ptr = SDL.SDL_GetWindowSurface(self)
13
- raise SDLError if ptr.null?
14
-
15
- # ウィンドウからのサーフェスにはSDL_DONTFREEフラグが設定されている。
16
- # このためにSDL_FreeSurfaceではリファレンスカウンターを減じる事ができない。
17
- # これはRubyのGC管理では問題になる(メモリーリークする)。
18
- # そのためSDL_DONTFREEフラグを解除する!
19
- #
20
- st = SDL_Surface.new(ptr)
21
- st.flags &= ~SDL_DONTFREE
22
-
23
- Surface.new(ptr, add_ref: true)
24
- end
25
-
26
- # ウィンドウのサーフェスがvalidかどうか確認していない。
27
- # リサイズなどで壊れていてもtrueを戻す。
28
- #
29
- def surface? = SDL.SDL_HasWindowSurface(self) == 1
30
-
31
- def update_surface
32
- err = SDL.SDL_UpdateWindowSurface(self)
33
- raise SDLError if err < 0
34
- end
35
- end
36
- end
37
- end
1
+ module SDLRuby
2
+ class Window
3
+ module Surfacer
4
+ include SDL
5
+
6
+ def destroy_surface
7
+ err = SDL.SDL_DestroyWindowSurface(self)
8
+ raise SDLError if err < 0
9
+ end
10
+
11
+ def surface
12
+ ptr = SDL.SDL_GetWindowSurface(self)
13
+ raise SDLError if ptr.null?
14
+
15
+ # ウィンドウからのサーフェスにはSDL_DONTFREEフラグが設定されている。
16
+ # このためにSDL_FreeSurfaceではリファレンスカウンターを減じる事ができない。
17
+ # これはRubyのGC管理では問題になる(メモリーリークする)。
18
+ # そのためSDL_DONTFREEフラグを解除する!
19
+ #
20
+ st = SDL_Surface.new(ptr)
21
+ st.flags &= ~SDL_DONTFREE
22
+
23
+ Surface.new(ptr, add_ref: true)
24
+ end
25
+
26
+ # ウィンドウのサーフェスがvalidかどうか確認していない。
27
+ # リサイズなどで壊れていてもtrueを戻す。
28
+ #
29
+ def surface? = SDL.SDL_HasWindowSurface(self) == 1
30
+
31
+ def update_surface
32
+ err = SDL.SDL_UpdateWindowSurface(self)
33
+ raise SDLError if err < 0
34
+ end
35
+ end
36
+ end
37
+ end
data/lib/SDLRuby.rb CHANGED
@@ -1,16 +1,32 @@
1
- # frozen_string_literal: true
2
-
3
- require 'forwardable'
4
- require_relative 'SDLRuby/version'
5
- require_relative 'SDLRuby/sdl'
6
-
7
- # Extended libraries
8
- #
9
- require_relative 'SDLRuby/font'
10
- require_relative 'SDLRuby/image'
11
- require_relative 'SDLRuby/mixer'
12
- require_relative 'SDLRuby/music'
13
-
14
- module SDLRuby
15
- class Error < StandardError; end
16
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'forwardable'
4
+ require_relative 'SDLRuby/version'
5
+
6
+ module SDLRuby
7
+ class Error < StandardError; end
8
+
9
+ class << self
10
+ def load_sdl
11
+ require_relative 'SDLRuby/sdl'
12
+ end
13
+
14
+ # Extended libraries
15
+ #
16
+ def load_sdl_font
17
+ require_relative 'SDLRuby/font'
18
+ end
19
+
20
+ def load_sdl_image
21
+ require_relative 'SDLRuby/image'
22
+ end
23
+
24
+ def load_sdl_mixer
25
+ require_relative 'SDLRuby/mixer'
26
+ end
27
+
28
+ def load_sdl_music
29
+ require_relative 'SDLRuby/music'
30
+ end
31
+ end
32
+ end
data/sig/SDLRuby.rbs CHANGED
@@ -1,4 +1,4 @@
1
- module SDLRuby
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end
1
+ module SDLRuby
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
@@ -1,157 +1,157 @@
1
- module SDLRuby
2
- class Event
3
- module Accessor
4
- include SDL
5
-
6
- def self.[]: (Symbol sym) -> Module
7
-
8
- def axis: () -> Integer?
9
-
10
- def ball: () -> Integer?
11
-
12
- def button: () -> Integer?
13
-
14
- def clicks: () -> Integer?
15
-
16
- def code: () -> Integer?
17
-
18
- def dDist: () -> Float?
19
-
20
- def dTheta: () -> Float?
21
-
22
- def data: () -> Array[Float]?
23
-
24
- def data1: () -> (Integer | untyped)?
25
-
26
- def data2: () -> (Integer | untyped)?
27
-
28
- def direction: () -> Integer?
29
-
30
- def display: () -> Integer?
31
-
32
- def dx: () -> Integer?
33
-
34
- def dy: () -> Integer?
35
-
36
- def error: () -> Float?
37
-
38
- def event: () -> Integer?
39
-
40
- def file: () -> String?
41
-
42
- def finger: () -> Integer?
43
-
44
- def fingerId: () -> Integer?
45
-
46
- def gestureId: () -> Integer?
47
-
48
- def hat: () -> Integer?
49
-
50
- def iscapture: () -> Integer?
51
-
52
- def keysym: () -> Hash[String, Integer]?
53
-
54
- def length: () -> Integer?
55
-
56
- def level: () -> Integer?
57
-
58
- def mouseX: () -> Integer?
59
-
60
- def mouseY: () -> Integer?
61
-
62
- def msg: () -> untyped?
63
-
64
- def numFingers: () -> Integer?
65
-
66
- def padding: () -> void
67
-
68
- def padding1: () -> void
69
-
70
- def padding2: () -> void
71
-
72
- def padding3: () -> void
73
-
74
- def padding4: () -> void
75
-
76
- def preciseX: () -> Float?
77
-
78
- def preciseY: () -> Float?
79
-
80
- def pressure: () -> Float?
81
-
82
- def repeat: () -> Integer?
83
-
84
- def sensor: () -> Integer?
85
-
86
- def start: () -> Integer?
87
-
88
- def state: () -> Integer?
89
-
90
- def text: () -> String?
91
-
92
- def timestamp: () -> Integer
93
-
94
- def timestamp_us: () -> Integer?
95
-
96
- def touchId: () -> Integer?
97
-
98
- def touchpad: () -> Integer?
99
-
100
- def type: () -> Integer
101
-
102
- def value: () -> Integer?
103
-
104
- def which: () -> Integer?
105
-
106
- def windowID: () -> Integer?
107
-
108
- def x: () -> (Integer | Float)?
109
-
110
- def xrel: () -> Integer?
111
-
112
- def y: () -> (Integer | Float)?
113
-
114
- def yrel: () -> Integer?
115
-
116
- alias d_dist dDist
117
-
118
- alias d_theta dTheta
119
-
120
- alias finger_id fingerId
121
-
122
- alias gesture_id gestureId
123
-
124
- alias mouse_x mouseX
125
-
126
- alias mouse_y mouseY
127
-
128
- alias num_fingers numFingers
129
-
130
- alias precise_x preciseX
131
-
132
- alias precise_y preciseY
133
-
134
- alias touch_id touchId
135
-
136
- alias window_id windowID
137
-
138
- def capture?: () -> bool
139
-
140
- def pressed?: () -> bool
141
-
142
- def scancode: () -> Integer?
143
-
144
- def sym: () -> Integer?
145
-
146
- def mod: () -> Integer?
147
-
148
- private
149
-
150
- def char_ary_to_str: (Array[Integer] a) -> ("" | String)
151
-
152
- def char_ptr_to_str: (untyped ptr) -> ("" | String)
153
-
154
- def keep_member_pointer: (untyped) -> void
155
- end
156
- end
157
- end
1
+ module SDLRuby
2
+ class Event
3
+ module Accessor
4
+ include SDL
5
+
6
+ def self.[]: (Symbol sym) -> Module
7
+
8
+ def axis: () -> Integer?
9
+
10
+ def ball: () -> Integer?
11
+
12
+ def button: () -> Integer?
13
+
14
+ def clicks: () -> Integer?
15
+
16
+ def code: () -> Integer?
17
+
18
+ def dDist: () -> Float?
19
+
20
+ def dTheta: () -> Float?
21
+
22
+ def data: () -> Array[Float]?
23
+
24
+ def data1: () -> (Integer | untyped)?
25
+
26
+ def data2: () -> (Integer | untyped)?
27
+
28
+ def direction: () -> Integer?
29
+
30
+ def display: () -> Integer?
31
+
32
+ def dx: () -> Integer?
33
+
34
+ def dy: () -> Integer?
35
+
36
+ def error: () -> Float?
37
+
38
+ def event: () -> Integer?
39
+
40
+ def file: () -> String?
41
+
42
+ def finger: () -> Integer?
43
+
44
+ def fingerId: () -> Integer?
45
+
46
+ def gestureId: () -> Integer?
47
+
48
+ def hat: () -> Integer?
49
+
50
+ def iscapture: () -> Integer?
51
+
52
+ def keysym: () -> Hash[String, Integer]?
53
+
54
+ def length: () -> Integer?
55
+
56
+ def level: () -> Integer?
57
+
58
+ def mouseX: () -> Integer?
59
+
60
+ def mouseY: () -> Integer?
61
+
62
+ def msg: () -> untyped?
63
+
64
+ def numFingers: () -> Integer?
65
+
66
+ def padding: () -> void
67
+
68
+ def padding1: () -> void
69
+
70
+ def padding2: () -> void
71
+
72
+ def padding3: () -> void
73
+
74
+ def padding4: () -> void
75
+
76
+ def preciseX: () -> Float?
77
+
78
+ def preciseY: () -> Float?
79
+
80
+ def pressure: () -> Float?
81
+
82
+ def repeat: () -> Integer?
83
+
84
+ def sensor: () -> Integer?
85
+
86
+ def start: () -> Integer?
87
+
88
+ def state: () -> Integer?
89
+
90
+ def text: () -> String?
91
+
92
+ def timestamp: () -> Integer
93
+
94
+ def timestamp_us: () -> Integer?
95
+
96
+ def touchId: () -> Integer?
97
+
98
+ def touchpad: () -> Integer?
99
+
100
+ def type: () -> Integer
101
+
102
+ def value: () -> Integer?
103
+
104
+ def which: () -> Integer?
105
+
106
+ def windowID: () -> Integer?
107
+
108
+ def x: () -> (Integer | Float)?
109
+
110
+ def xrel: () -> Integer?
111
+
112
+ def y: () -> (Integer | Float)?
113
+
114
+ def yrel: () -> Integer?
115
+
116
+ alias d_dist dDist
117
+
118
+ alias d_theta dTheta
119
+
120
+ alias finger_id fingerId
121
+
122
+ alias gesture_id gestureId
123
+
124
+ alias mouse_x mouseX
125
+
126
+ alias mouse_y mouseY
127
+
128
+ alias num_fingers numFingers
129
+
130
+ alias precise_x preciseX
131
+
132
+ alias precise_y preciseY
133
+
134
+ alias touch_id touchId
135
+
136
+ alias window_id windowID
137
+
138
+ def capture?: () -> bool
139
+
140
+ def pressed?: () -> bool
141
+
142
+ def scancode: () -> Integer?
143
+
144
+ def sym: () -> Integer?
145
+
146
+ def mod: () -> Integer?
147
+
148
+ private
149
+
150
+ def char_ary_to_str: (Array[Integer] a) -> ("" | String)
151
+
152
+ def char_ptr_to_str: (untyped ptr) -> ("" | String)
153
+
154
+ def keep_member_pointer: (untyped) -> void
155
+ end
156
+ end
157
+ end