@@ -142,6 +142,32 @@ pub enum SDL_GLprofile {
142
142
SDL_GL_CONTEXT_PROFILE_ES = 0x0004
143
143
}
144
144
145
+ #[ repr( u32 ) ]
146
+ pub enum SDL_SYSWM_TYPE {
147
+ SDL_SYSWM_UNKNOWN ,
148
+ SDL_SYSWM_WINDOWS ,
149
+ SDL_SYSWM_X11 ,
150
+ SDL_SYSWM_DIRECTFB ,
151
+ SDL_SYSWM_COCOA ,
152
+ SDL_SYSWM_UIKIT ,
153
+ SDL_SYSWM_WAYLAND ,
154
+ SDL_SYSWM_MIR ,
155
+ SDL_SYSWM_WINRT ,
156
+ SDL_SYSWM_ANDROID ,
157
+ SDL_SYSWM_VIVANTE
158
+ }
159
+
160
+ #[ repr( C ) ]
161
+ pub struct SDL_SysWMinfo {
162
+ pub version : :: version:: SDL_version ,
163
+ pub subsystem : SDL_SYSWM_TYPE ,
164
+ // info should be an untagged union, but it has not it stable yet. Waiting for
165
+ // https://github.com/rust-lang/rust/issues/32836 to be closed.
166
+ //
167
+ // According to http://hg.libsdl.org/SDL/rev/69452f9839d5, this can at most be 64bytes.
168
+ pub info : [ u8 ; 64 ] ,
169
+ }
170
+
145
171
//SDL_video.h
146
172
extern "C" {
147
173
pub fn SDL_GetNumVideoDrivers ( ) -> c_int ;
@@ -195,6 +221,7 @@ extern "C" {
195
221
pub fn SDL_GetWindowGrab ( window : * mut SDL_Window ) -> SDL_bool ;
196
222
pub fn SDL_SetWindowBrightness ( window : * mut SDL_Window , brightness : c_float ) -> c_int ;
197
223
pub fn SDL_GetWindowBrightness ( window : * mut SDL_Window ) -> c_float ;
224
+ pub fn SDL_GetWindowWMInfo ( window : * mut SDL_Window , info : * mut SDL_SysWMinfo ) -> SDL_bool ;
198
225
pub fn SDL_SetWindowGammaRamp ( window : * mut SDL_Window , red : * const uint16_t , green : * const uint16_t , blue : * const uint16_t ) -> c_int ;
199
226
pub fn SDL_GetWindowGammaRamp ( window : * mut SDL_Window , red : * mut uint16_t , green : * mut uint16_t , blue : * mut uint16_t ) -> c_int ;
200
227
pub fn SDL_DestroyWindow ( window : * mut SDL_Window ) ;
0 commit comments