sdl2-bindings 0.1.6 → 0.2.0

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.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +5 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +8 -5
  5. data/lib/sdl2_syswm.rb +103 -29
  6. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ff45dc869d3e6b6580a58bc614aa46ee16ec4731dc2e0f2f23dac2b15d4f330
4
- data.tar.gz: ac4785455d17d1089d9092f07c81db507cab2802a98339cea60b8e874ba766cf
3
+ metadata.gz: 25b91bcb457fecf36bfa667b829977816bfcc4348a2b926676aa04f2ae2c71a8
4
+ data.tar.gz: 6c807ef1fa2a8cbae4457cc7cdf255f2358a425f46d2fd4535234f716f1e266a
5
5
  SHA512:
6
- metadata.gz: 27ed6da2b7a9bccac8fa1662104108cafff1b300a20aab006af30a72d93350ec7c7946e8a553612a46cb15fb62b69ff5acad7b9edd4f1a80d3152fcae02984ff
7
- data.tar.gz: 361e671205aebb5714bbec11b627ec88f4efb17795d7a61353eba7602fbd7c623b3c6e91658df0512c395f7a8c523e015e6984435abad7ef8504091aa75b100e
6
+ metadata.gz: 0b51083c4a27bb14ed410c07186db196ac3454b22bf39e1119e82843799142c0fa2e600a48000158b986562f8adecf9b2e6e7c6d660a1744ff7d60d0f566fc81
7
+ data.tar.gz: d3e0cb0fc66b152ea8f69e909df7d46d804948f359a95a1f2d2fb131de7cda98c71dc36495d9ecb276d23a278c669e7ac1e4b1351c066416368d377d99df9e33
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2023-02-05 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * lib/sdl2_syswm.rb: Added X11 support
4
+ * Added Linux (on WSL) as a tested environment
5
+
1
6
  2022-11-23 vaiorabbit <http://twitter.com/vaiorabbit>
2
7
 
3
8
  * SDL 2.26.0 ( https://github.com/libsdl-org/SDL/releases/tag/release-2.26.0 )
data/LICENSE.txt CHANGED
@@ -1,5 +1,5 @@
1
1
  sdl2-bindings : Yet another SDL2 wrapper for Ruby
2
- Copyright (c) 2015-2022 vaiorabbit <http://twitter.com/vaiorabbit>
2
+ Copyright (c) 2015-2023 vaiorabbit <http://twitter.com/vaiorabbit>
3
3
 
4
4
  This software is provided 'as-is', without any express or implied
5
5
  warranty. In no event will the authors be held liable for any damages
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # sdl2-bindings : Yet another SDL2 wrapper for Ruby #
4
4
 
5
5
  * Created : 2015-09-19
6
- * Last modified : 2022-11-23
6
+ * Last modified : 2023-02-05
7
7
 
8
8
  ## Features ##
9
9
 
@@ -24,7 +24,7 @@ See the project below to learn how to use this library:
24
24
  ## Target version ##
25
25
 
26
26
  * [2022-11-23]
27
- * SDL : 2.26.0
27
+ * SDL : 2.26.0 - 2.26.2
28
28
  * SDL_image : 2.6.2
29
29
  * SDL_mixer : 2.6.2
30
30
  * SDL_ttf : 2.20.1
@@ -88,13 +88,16 @@ See the project below to learn how to use this library:
88
88
 
89
89
  ## Supported Environments ##
90
90
 
91
- * [2022-04-29] Windows 10 (21H1), ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x64-mingw-ucrt]
92
- * [2022-10-09] macOS Monterey (12.5.1), ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
91
+ * [2023-01-07] Windows 11 (22H2), ruby 3.2.0 (2022-12-25 revision a528908271) [x64-mingw-ucrt]
92
+ * [2023-01-07] macOS Ventura (13.1) ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
93
93
  * [2022-10-09] Debian 11 (bullseye) on ASUS Chromebook Detachable CZ1, ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [aarch64-linux]
94
+ * [2023-02-05] Ubuntu Linux 22.04 LTS (jammy) on WSL/Windows 11, ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
94
95
 
95
96
  <details>
96
97
  <summary>Older Environments</summary>
97
98
 
99
+ * [2022-04-29] Windows 10 (21H1), ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x64-mingw-ucrt]
100
+ * [2022-10-09] macOS Monterey (12.5.1), ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
98
101
  * [2022-07-31] macOS Monterey (12.4), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin21]
99
102
  * [2022-02-12] Windows 10 (21H1), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x64-mingw-ucrt]
100
103
  * [2022-01-11] macOS Monterey (12.1), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
@@ -111,7 +114,7 @@ See the project below to learn how to use this library:
111
114
  The zlib/libpng License ( http://opensource.org/licenses/Zlib ).
112
115
 
113
116
  sdl2-bindings : Yet another SDL2 wrapper for Ruby
114
- Copyright (c) 2015-2022 vaiorabbit <http://twitter.com/vaiorabbit>
117
+ Copyright (c) 2015-2023 vaiorabbit <http://twitter.com/vaiorabbit>
115
118
 
116
119
  This software is provided 'as-is', without any express or implied
117
120
  warranty. In no event will the authors be held liable for any damages
data/lib/sdl2_syswm.rb CHANGED
@@ -37,47 +37,69 @@ module SDL
37
37
 
38
38
  class SysWMmsg_def_win < FFI::Struct
39
39
  layout(
40
- :hwnd, :pointer,
41
- :msg, :uint32,
42
- :wParam, :uint64,
43
- :lParam, :int64
40
+ :hwnd, :pointer,
41
+ :msg, :uint32,
42
+ :wParam, :uint64,
43
+ :lParam, :int64
44
44
  )
45
45
  end
46
46
 
47
47
  class SysWMmsg_value_win < FFI::Union
48
48
  layout(
49
- :win, SysWMmsg_def_win.by_value,
50
- :dummy, :int
49
+ :win, SysWMmsg_def_win.by_value,
50
+ :dummy, :int
51
51
  )
52
52
  end
53
53
 
54
54
  class SysWMmsg_win < FFI::Struct
55
55
  layout(
56
- :version, Version.by_value,
57
- :subsystem, :int,
58
- :msg, SysWMmsg_value_win.by_value
56
+ :version, Version.by_value,
57
+ :subsystem, :int,
58
+ :msg, SysWMmsg_value_win.by_value
59
59
  )
60
60
  end
61
61
 
62
62
 
63
63
  class SysWMmsg_def_cocoa < FFI::Struct
64
64
  layout(
65
- :dummy, :int
65
+ :dummy, :int
66
66
  )
67
67
  end
68
68
 
69
69
  class SysWMmsg_value_cocoa < FFI::Union
70
70
  layout(
71
- :cocoa, SysWMmsg_def_cocoa.by_value,
72
- :dummy, :int
71
+ :cocoa, SysWMmsg_def_cocoa.by_value,
72
+ :dummy, :int
73
73
  )
74
74
  end
75
75
 
76
76
  class SysWMmsg_cocoa < FFI::Struct
77
77
  layout(
78
- :version, Version.by_value,
79
- :subsystem, :int,
80
- :msg, SysWMmsg_value_cocoa.by_value
78
+ :version, Version.by_value,
79
+ :subsystem, :int,
80
+ :msg, SysWMmsg_value_cocoa.by_value
81
+ )
82
+ end
83
+
84
+
85
+ class SysWMmsg_def_x11 < FFI::Struct
86
+ layout(
87
+ :event, [:long, 24] # /usr/include/X11/Xlib.h
88
+ )
89
+ end
90
+
91
+ class SysWMmsg_value_x11 < FFI::Union
92
+ layout(
93
+ :x11, SysWMmsg_def_x11.by_value,
94
+ :dummy, :int
95
+ )
96
+ end
97
+
98
+ class SysWMmsg_x11 < FFI::Struct
99
+ layout(
100
+ :version, Version.by_value,
101
+ :subsystem, :int,
102
+ :msg, SysWMmsg_value_x11.by_value
81
103
  )
82
104
  end
83
105
 
@@ -85,46 +107,98 @@ module SDL
85
107
 
86
108
  class SysWMinfo_def_win < FFI::Struct
87
109
  layout(
88
- :window, :pointer,
89
- :hdc, :pointer,
90
- :hinstance, :pointer
110
+ :window, :pointer,
111
+ :hdc, :pointer,
112
+ :hinstance, :pointer
91
113
  )
92
114
  end
93
115
 
94
116
  class SysWMinfo_value_win < FFI::Union
95
117
  layout(
96
- :win, SysWMinfo_def_win.by_value,
97
- :dummy, [:uint8, 64]
118
+ :win, SysWMinfo_def_win.by_value,
119
+ :dummy, [:uint8, 64]
98
120
  )
99
121
  end
100
122
 
101
123
  class SysWMinfo_win < FFI::Struct
102
124
  layout(
103
- :version, Version.by_value,
104
- :subsystem, :int,
105
- :info, SysWMinfo_value_win.by_value
125
+ :version, Version.by_value,
126
+ :subsystem, :int,
127
+ :info, SysWMinfo_value_win.by_value
106
128
  )
107
129
  end
108
130
 
109
131
 
110
132
  class SysWMinfo_def_cocoa < FFI::Struct
111
133
  layout(
112
- :window, :pointer
134
+ :window, :pointer
113
135
  )
114
136
  end
115
137
 
116
138
  class SysWMinfo_value_cocoa < FFI::Union
117
139
  layout(
118
- :cocoa, SysWMinfo_def_cocoa.by_value,
119
- :dummy, [:uint8, 64]
140
+ :cocoa, SysWMinfo_def_cocoa.by_value,
141
+ :dummy, [:uint8, 64]
120
142
  )
121
143
  end
122
144
 
123
145
  class SysWMinfo_cocoa < FFI::Struct
124
146
  layout(
125
- :version, Version.by_value,
126
- :subsystem, :int,
127
- :info, SysWMinfo_value_cocoa.by_value
147
+ :version, Version.by_value,
148
+ :subsystem, :int,
149
+ :info, SysWMinfo_value_cocoa.by_value
150
+ )
151
+ end
152
+
153
+
154
+ class SysWMinfo_def_x11 < FFI::Struct
155
+ layout(
156
+ :display, :pointer,
157
+ :window, :ulong # /usr/include/X11/X.h
158
+ )
159
+ end
160
+
161
+ class SysWMinfo_value_x11 < FFI::Union
162
+ layout(
163
+ :x11, SysWMinfo_def_x11.by_value,
164
+ :dummy, [:uint8, 64]
165
+ )
166
+ end
167
+
168
+ class SysWMinfo_x11 < FFI::Struct
169
+ layout(
170
+ :version, Version.by_value,
171
+ :subsystem, :int,
172
+ :info, SysWMinfo_value_x11.by_value
173
+ )
174
+ end
175
+
176
+
177
+ class SysWMinfo_def_wl < FFI::Struct
178
+ layout(
179
+ :display, :pointer,
180
+ :surface, :pointer,
181
+ :shell_surface, :pointer,
182
+ :egl_window, :pointer,
183
+ :xdg_surface, :pointer,
184
+ :xdg_toplevel, :pointer,
185
+ :xdg_popup, :pointer,
186
+ :xdg_positioner, :pointer
187
+ )
188
+ end
189
+
190
+ class SysWMinfo_value_wl < FFI::Union
191
+ layout(
192
+ :wl, SysWMinfo_def_wl.by_value,
193
+ :dummy, [:uint8, 64]
194
+ )
195
+ end
196
+
197
+ class SysWMinfo_wl < FFI::Struct
198
+ layout(
199
+ :version, Version.by_value,
200
+ :subsystem, :int,
201
+ :info, SysWMinfo_value_wl.by_value
128
202
  )
129
203
  end
130
204
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdl2-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-23 00:00:00.000000000 Z
11
+ date: 2023-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -95,14 +95,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
- version: 2.6.0
98
+ version: 3.0.0
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.3.7
105
+ rubygems_version: 3.4.1
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Bindings for SDL2