SDL  2.0
SDL_mirvideo.c
Go to the documentation of this file.
1 /*
2  Simple DirectMedia Layer
3  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
4 
5  This software is provided 'as-is', without any express or implied
6  warranty. In no event will the authors be held liable for any damages
7  arising from the use of this software.
8 
9  Permission is granted to anyone to use this software for any purpose,
10  including commercial applications, and to alter it and redistribute it
11  freely, subject to the following restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not
14  claim that you wrote the original software. If you use this software
15  in a product, an acknowledgment in the product documentation would be
16  appreciated but is not required.
17  2. Altered source versions must be plainly marked as such, and must not be
18  misrepresented as being the original software.
19  3. This notice may not be removed or altered from any source distribution.
20 */
21 
22 /*
23  Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
24 */
25 
26 #include "../../SDL_internal.h"
27 
28 #if SDL_VIDEO_DRIVER_MIR
29 
30 #include "SDL_log.h"
31 
32 #include "SDL_mirwindow.h"
33 #include "SDL_video.h"
34 
35 #include "SDL_mirframebuffer.h"
36 #include "SDL_mirmouse.h"
37 #include "SDL_miropengl.h"
38 #include "SDL_mirvideo.h"
39 #include "SDL_mirvulkan.h"
40 
41 #include "SDL_mirdyn.h"
42 
43 #define MIR_DRIVER_NAME "mir"
44 
45 static const Uint32 mir_pixel_format_to_sdl_format[] = {
46  SDL_PIXELFORMAT_UNKNOWN, /* mir_pixel_format_invalid */
47  SDL_PIXELFORMAT_ABGR8888, /* mir_pixel_format_abgr_8888 */
48  SDL_PIXELFORMAT_BGR888, /* mir_pixel_format_xbgr_8888 */
49  SDL_PIXELFORMAT_ARGB8888, /* mir_pixel_format_argb_8888 */
50  SDL_PIXELFORMAT_RGB888, /* mir_pixel_format_xrgb_8888 */
51  SDL_PIXELFORMAT_BGR24, /* mir_pixel_format_bgr_888 */
52  SDL_PIXELFORMAT_RGB24, /* mir_pixel_format_rgb_888 */
53  SDL_PIXELFORMAT_RGB565, /* mir_pixel_format_rgb_565 */
54  SDL_PIXELFORMAT_RGBA5551, /* mir_pixel_format_rgba_5551 */
55  SDL_PIXELFORMAT_RGBA4444 /* mir_pixel_format_rgba_4444 */
56 };
57 
58 Uint32
59 MIR_GetSDLPixelFormat(MirPixelFormat format)
60 {
61  return mir_pixel_format_to_sdl_format[format];
62 }
63 
64 static int
65 MIR_VideoInit(_THIS);
66 
67 static void
68 MIR_VideoQuit(_THIS);
69 
70 static int
71 MIR_GetDisplayBounds(_THIS, SDL_VideoDisplay* display, SDL_Rect* rect);
72 
73 static void
74 MIR_GetDisplayModes(_THIS, SDL_VideoDisplay* sdl_display);
75 
76 static int
77 MIR_SetDisplayMode(_THIS, SDL_VideoDisplay* sdl_display, SDL_DisplayMode* mode);
78 
79 static SDL_WindowShaper*
80 MIR_CreateShaper(SDL_Window* window)
81 {
82  /* FIXME Im not sure if mir support this atm, will have to come back to this */
83  return NULL;
84 }
85 
86 static int
87 MIR_SetWindowShape(SDL_WindowShaper* shaper, SDL_Surface* shape, SDL_WindowShapeMode* shape_mode)
88 {
89  return SDL_Unsupported();
90 }
91 
92 static int
93 MIR_ResizeWindowShape(SDL_Window* window)
94 {
95  return SDL_Unsupported();
96 }
97 
98 static int
99 MIR_Available()
100 {
101  int available = 0;
102 
103  if (SDL_MIR_LoadSymbols()) {
104 
105  /* Lets ensure we can connect to the mir server */
106  MirConnection* connection = MIR_mir_connect_sync(NULL, __PRETTY_FUNCTION__);
107 
108  if (!MIR_mir_connection_is_valid(connection)) {
109  SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "Unable to connect to the mir server %s",
110  MIR_mir_connection_get_error_message(connection));
111 
112  return available;
113  }
114 
115  MIR_mir_connection_release(connection);
116 
117  available = 1;
119  }
120 
121  return available;
122 }
123 
124 static void
125 MIR_DeleteDevice(SDL_VideoDevice* device)
126 {
127  SDL_free(device);
129 }
130 
131 static void
132 MIR_PumpEvents(_THIS)
133 {
134 }
135 
136 static SDL_VideoDevice*
137 MIR_CreateDevice(int device_index)
138 {
139  MIR_Data* mir_data;
141 
142  if (!SDL_MIR_LoadSymbols()) {
143  return NULL;
144  }
145 
146  device = SDL_calloc(1, sizeof(SDL_VideoDevice));
147  if (!device) {
149  SDL_OutOfMemory();
150  return NULL;
151  }
152 
153  mir_data = SDL_calloc(1, sizeof(MIR_Data));
154  if (!mir_data) {
155  SDL_free(device);
157  SDL_OutOfMemory();
158  return NULL;
159  }
160 
161  device->driverdata = mir_data;
162 
163  /* mirvideo */
164  device->VideoInit = MIR_VideoInit;
165  device->VideoQuit = MIR_VideoQuit;
166  device->GetDisplayBounds = MIR_GetDisplayBounds;
167  device->GetDisplayModes = MIR_GetDisplayModes;
168  device->SetDisplayMode = MIR_SetDisplayMode;
169  device->free = MIR_DeleteDevice;
170 
171  /* miropengles */
181 
182  /* mirwindow */
190  device->ShowWindow = MIR_RestoreWindow;
191  device->HideWindow = MIR_HideWindow;
199 
200  device->CreateSDLWindowFrom = NULL;
201  device->SetWindowIcon = NULL;
202  device->RaiseWindow = NULL;
203  device->SetWindowBordered = NULL;
204  device->SetWindowResizable = NULL;
205  device->OnWindowEnter = NULL;
206  device->SetWindowPosition = NULL;
207 
208  /* mirframebuffer */
212 
213  device->shape_driver.CreateShaper = MIR_CreateShaper;
214  device->shape_driver.SetWindowShape = MIR_SetWindowShape;
215  device->shape_driver.ResizeWindowShape = MIR_ResizeWindowShape;
216 
217  device->PumpEvents = MIR_PumpEvents;
218 
219  device->SuspendScreenSaver = NULL;
220 
221  device->StartTextInput = NULL;
222  device->StopTextInput = NULL;
223  device->SetTextInputRect = NULL;
224 
225  device->HasScreenKeyboardSupport = NULL;
226  device->ShowScreenKeyboard = NULL;
227  device->HideScreenKeyboard = NULL;
228  device->IsScreenKeyboardShown = NULL;
229 
230  device->SetClipboardText = NULL;
231  device->GetClipboardText = NULL;
232  device->HasClipboardText = NULL;
233 
234  device->ShowMessageBox = NULL;
235 
236 #if SDL_VIDEO_VULKAN
237  device->Vulkan_LoadLibrary = MIR_Vulkan_LoadLibrary;
238  device->Vulkan_UnloadLibrary = MIR_Vulkan_UnloadLibrary;
239  device->Vulkan_GetInstanceExtensions = MIR_Vulkan_GetInstanceExtensions;
240  device->Vulkan_CreateSurface = MIR_Vulkan_CreateSurface;
241 #endif
242 
243  return device;
244 }
245 
247  MIR_DRIVER_NAME, "SDL Mir video driver",
248  MIR_Available, MIR_CreateDevice
249 };
250 
251 static SDL_DisplayMode
252 MIR_ConvertModeToSDLMode(MirOutputMode const* mode, MirPixelFormat format)
253 {
254  SDL_DisplayMode sdl_mode = {
255  .format = MIR_GetSDLPixelFormat(format),
256  .w = MIR_mir_output_mode_get_width(mode),
257  .h = MIR_mir_output_mode_get_height(mode),
258  .refresh_rate = MIR_mir_output_mode_get_refresh_rate(mode),
259  .driverdata = NULL
260  };
261 
262  return sdl_mode;
263 }
264 
265 static void
266 MIR_AddModeToDisplay(SDL_VideoDisplay* display, MirOutputMode const* mode, MirPixelFormat format)
267 {
268  SDL_DisplayMode sdl_mode = MIR_ConvertModeToSDLMode(mode, format);
269  SDL_AddDisplayMode(display, &sdl_mode);
270 }
271 
272 static void
273 MIR_InitDisplayFromOutput(_THIS, MirOutput* output)
274 {
275  SDL_VideoDisplay display;
276  int m;
277 
278  MirPixelFormat format = MIR_mir_output_get_current_pixel_format(output);
279  int num_modes = MIR_mir_output_get_num_modes(output);
280  SDL_DisplayMode current_mode = MIR_ConvertModeToSDLMode(MIR_mir_output_get_current_mode(output), format);
281 
282  SDL_zero(display);
283 
284  // Unfortunate cast, but SDL_AddVideoDisplay will strdup this pointer so its read-only in this case.
285  display.name = (char*)MIR_mir_output_type_name(MIR_mir_output_get_type(output));
286 
287  for (m = 0; m < num_modes; m++) {
288  MirOutputMode const* mode = MIR_mir_output_get_mode(output, m);
289  MIR_AddModeToDisplay(&display, mode, format);
290  }
291 
292  display.desktop_mode = current_mode;
293  display.current_mode = current_mode;
294 
295  display.driverdata = output;
296  SDL_AddVideoDisplay(&display);
297 }
298 
299 static void
300 MIR_InitDisplays(_THIS)
301 {
302  MIR_Data* mir_data = _this->driverdata;
303  int num_outputs = MIR_mir_display_config_get_num_outputs(mir_data->display_config);
304  int d;
305 
306  for (d = 0; d < num_outputs; d++) {
307  MirOutput* output = MIR_mir_display_config_get_mutable_output(mir_data->display_config, d);
308  SDL_bool enabled = MIR_mir_output_is_enabled(output);
309  MirOutputConnectionState state = MIR_mir_output_get_connection_state(output);
310 
311  if (enabled && state == mir_output_connection_state_connected) {
312  MIR_InitDisplayFromOutput(_this, output);
313  }
314  }
315 }
316 
317 static int
318 MIR_VideoInit(_THIS)
319 {
320  MIR_Data* mir_data = _this->driverdata;
321 
322  mir_data->connection = MIR_mir_connect_sync(NULL, __PRETTY_FUNCTION__);
323  mir_data->current_window = NULL;
324  mir_data->software = SDL_FALSE;
325  mir_data->pixel_format = mir_pixel_format_invalid;
326 
327  if (!MIR_mir_connection_is_valid(mir_data->connection)) {
328  return SDL_SetError("Failed to connect to the mir server: %s",
329  MIR_mir_connection_get_error_message(mir_data->connection));
330  }
331 
332  mir_data->display_config = MIR_mir_connection_create_display_configuration(mir_data->connection);
333 
334  MIR_InitDisplays(_this);
335  MIR_InitMouse();
336 
337  return 0;
338 }
339 
340 static void
341 MIR_CleanUpDisplayConfig(_THIS)
342 {
343  MIR_Data* mir_data = _this->driverdata;
344  int i;
345 
346  // SDL_VideoQuit frees the display driverdata, we own it not them
347  for (i = 0; i < _this->num_displays; ++i) {
349  }
350 
351  MIR_mir_display_config_release(mir_data->display_config);
352 }
353 
354 static void
355 MIR_VideoQuit(_THIS)
356 {
357  MIR_Data* mir_data = _this->driverdata;
358 
359  MIR_CleanUpDisplayConfig(_this);
360 
361  MIR_FiniMouse();
362 
365 
366  MIR_mir_connection_release(mir_data->connection);
367 
368  SDL_free(mir_data);
369  _this->driverdata = NULL;
370 }
371 
372 static int
373 MIR_GetDisplayBounds(_THIS, SDL_VideoDisplay* display, SDL_Rect* rect)
374 {
375  MirOutput const* output = display->driverdata;
376 
377  rect->x = MIR_mir_output_get_position_x(output);
378  rect->y = MIR_mir_output_get_position_y(output);
379  rect->w = display->current_mode.w;
380  rect->h = display->current_mode.h;
381 
382  return 0;
383 }
384 
385 static void
386 MIR_GetDisplayModes(_THIS, SDL_VideoDisplay* display)
387 {
388 }
389 
390 static int
391 MIR_SetDisplayMode(_THIS, SDL_VideoDisplay* display, SDL_DisplayMode* mode)
392 {
393  int m;
394  MirOutput* output = display->driverdata;
395  int num_modes = MIR_mir_output_get_num_modes(output);
396  Uint32 sdl_format = MIR_GetSDLPixelFormat(
397  MIR_mir_output_get_current_pixel_format(output));
398 
399  for (m = 0; m < num_modes; m++) {
400  MirOutputMode const* mir_mode = MIR_mir_output_get_mode(output, m);
401  int width = MIR_mir_output_mode_get_width(mir_mode);
402  int height = MIR_mir_output_mode_get_height(mir_mode);
403  double refresh_rate = MIR_mir_output_mode_get_refresh_rate(mir_mode);
404 
405  if (mode->format == sdl_format &&
406  mode->w == width &&
407  mode->h == height &&
408  mode->refresh_rate == refresh_rate) {
409 
410  // FIXME Currently wont actually *set* anything. Need to wait for applying display changes
411  MIR_mir_output_set_current_mode(output, mir_mode);
412  return 0;
413  }
414  }
415 
416  return -1;
417 }
418 
419 #endif /* SDL_VIDEO_DRIVER_MIR */
420 
421 /* vi: set ts=4 sw=4 expandtab: */
422 
int(* Vulkan_LoadLibrary)(_THIS, const char *path)
Definition: SDL_sysvideo.h:270
#define MIR_GL_GetSwapInterval
Definition: SDL_miropengl.h:34
void(* RestoreWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:227
void MIR_MinimizeWindow(_THIS, SDL_Window *window)
#define MIR_GL_GetProcAddress
Definition: SDL_miropengl.h:37
void MIR_HideWindow(_THIS, SDL_Window *window)
int MIR_CreateWindowFramebuffer(_THIS, SDL_Window *sdl_window, Uint32 *format, void **pixels, int *pitch)
int MIR_GetWindowGammaRamp(_THIS, SDL_Window *window, Uint16 *ramp)
SDL_bool(* IsScreenKeyboardShown)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:294
int MIR_CreateWindow(_THIS, SDL_Window *window)
SDL_Rect rect
Definition: testrelative.c:27
VideoBootStrap MIR_bootstrap
static int available()
Definition: video.c:356
MirPixelFormat pixel_format
Definition: SDL_mirvideo.h:41
void(* free)(_THIS)
Definition: SDL_sysvideo.h:390
MirDisplayConfig * display_config
Definition: SDL_mirvideo.h:38
struct xkb_state * state
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
const GLfloat * m
int(* GL_SetSwapInterval)(_THIS, int interval)
Definition: SDL_sysvideo.h:260
void(* ShowWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:222
The structure that defines a display mode.
Definition: SDL_video.h:53
void MIR_FiniMouse()
void(* StartTextInput)(_THIS)
Definition: SDL_sysvideo.h:286
void(* SetWindowSize)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:215
void MIR_DestroyWindow(_THIS, SDL_Window *window)
uint32_t Uint32
Definition: SDL_stdinc.h:181
void MIR_SetWindowGrab(_THIS, SDL_Window *window, SDL_bool grabbed)
int SDL_AddVideoDisplay(const SDL_VideoDisplay *display)
Definition: SDL_video.c:606
int(* GL_LoadLibrary)(_THIS, const char *path)
Definition: SDL_sysvideo.h:254
GLint GLint GLsizei width
Definition: SDL_opengl.h:1572
int(* SetDisplayMode)(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
Definition: SDL_sysvideo.h:204
#define MIR_GL_SetSwapInterval
Definition: SDL_miropengl.h:35
void(* SetWindowBordered)(_THIS, SDL_Window *window, SDL_bool bordered)
Definition: SDL_sysvideo.h:228
static SDL_VideoDevice * _this
Definition: SDL_video.c:121
void SDL_MIR_UnloadSymbols(void)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: SDL_opengl.h:1572
void(* HideWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:223
static SDL_AudioDeviceID device
Definition: loopwave.c:37
MirConnection * connection
Definition: SDL_mirvideo.h:37
void(* RaiseWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:224
int(* SetWindowShape)(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
Definition: SDL_sysvideo.h:61
void(* SetTextInputRect)(_THIS, SDL_Rect *rect)
Definition: SDL_sysvideo.h:288
SDL_bool software
Definition: SDL_mirvideo.h:40
SDL_bool(* Vulkan_GetInstanceExtensions)(_THIS, SDL_Window *window, unsigned *count, const char **names)
Definition: SDL_sysvideo.h:272
void * SDL_calloc(size_t nmemb, size_t size)
MIR_Window * current_window
Definition: SDL_mirvideo.h:39
SDL_bool(* GetWindowWMInfo)(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
Definition: SDL_sysvideo.h:247
SDL_GLContext(* GL_CreateContext)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:257
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 SDL_AssertionHandler void SDL_SpinLock SDL_atomic_t int int return SDL_atomic_t return void void void return void return int return SDL_AudioSpec SDL_AudioSpec return int int return return int SDL_RWops int SDL_AudioSpec Uint8 ** d
SDL_bool(* Vulkan_CreateSurface)(_THIS, SDL_Window *window, VkInstance instance, VkSurfaceKHR *surface)
Definition: SDL_sysvideo.h:273
SDL_GLContext MIR_GL_CreateContext(_THIS, SDL_Window *window)
#define _THIS
int(* GL_MakeCurrent)(_THIS, SDL_Window *window, SDL_GLContext context)
Definition: SDL_sysvideo.h:258
void MIR_RestoreWindow(_THIS, SDL_Window *window)
void SDL_free(void *mem)
void MIR_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
void(* Vulkan_UnloadLibrary)(_THIS)
Definition: SDL_sysvideo.h:271
int MIR_GL_SwapWindow(_THIS, SDL_Window *window)
void MIR_MaximizeWindow(_THIS, SDL_Window *window)
void(* SetWindowMinimumSize)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:216
SDL_DisplayMode current_mode
Definition: SDL_sysvideo.h:132
#define MIR_GL_UnloadLibrary
Definition: SDL_miropengl.h:36
GLenum mode
SDL_VideoDisplay * displays
Definition: SDL_sysvideo.h:312
int(* GetDisplayBounds)(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect)
Definition: SDL_sysvideo.h:181
void(* DestroyWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:234
void(* StopTextInput)(_THIS)
Definition: SDL_sysvideo.h:287
#define SDL_zero(x)
Definition: SDL_stdinc.h:385
int MIR_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context)
int MIR_UpdateWindowFramebuffer(_THIS, SDL_Window *sdl_window, const SDL_Rect *rects, int numrects)
void(* SetWindowIcon)(_THIS, SDL_Window *window, SDL_Surface *icon)
Definition: SDL_sysvideo.h:213
int x
Definition: SDL_rect.h:66
int MIR_SetWindowGammaRamp(_THIS, SDL_Window *window, Uint16 const *ramp)
int w
Definition: SDL_rect.h:67
SDL_bool(* HasScreenKeyboardSupport)(_THIS)
Definition: SDL_sysvideo.h:291
GLenum GLenum GLsizei const GLuint GLboolean enabled
void MIR_SetWindowTitle(_THIS, SDL_Window *window)
void(* DestroyWindowFramebuffer)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:237
void MIR_DestroyWindowFramebuffer(_THIS, SDL_Window *sdl_window)
void(* GL_UnloadLibrary)(_THIS)
Definition: SDL_sysvideo.h:256
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
Definition: SDL_x11sym.h:50
void(* GetDisplayModes)(_THIS, SDL_VideoDisplay *display)
Definition: SDL_sysvideo.h:196
int(* ShowMessageBox)(_THIS, const SDL_MessageBoxData *messageboxdata, int *buttonid)
Definition: SDL_sysvideo.h:302
void(* SetWindowMaximumSize)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:217
#define NULL
Definition: begin_code.h:164
int(* CreateSDLWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:210
#define SDL_OutOfMemory()
Definition: SDL_error.h:52
SDL_bool
Definition: SDL_stdinc.h:139
SDL_DisplayMode desktop_mode
Definition: SDL_sysvideo.h:131
void(* VideoQuit)(_THIS)
Definition: SDL_sysvideo.h:166
#define SDL_SetError
#define MIR_GL_DeleteContext
Definition: SDL_miropengl.h:33
SDL_WindowShaper *(* CreateShaper)(SDL_Window *window)
Definition: SDL_sysvideo.h:60
GLint GLint GLsizei GLsizei height
Definition: SDL_opengl.h:1572
int(* ResizeWindowShape)(SDL_Window *window)
Definition: SDL_sysvideo.h:62
EGLSurface EGLNativeWindowType * window
Definition: eglext.h:1025
void(* SetWindowPosition)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:214
int(* GL_SwapWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:262
int h
Definition: SDL_rect.h:67
void(* ShowScreenKeyboard)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:292
The type used to identify a window.
Definition: SDL_sysvideo.h:73
int(* GetWindowGammaRamp)(_THIS, SDL_Window *window, Uint16 *ramp)
Definition: SDL_sysvideo.h:232
void(* MinimizeWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:226
SDL_bool(* HasClipboardText)(_THIS)
Definition: SDL_sysvideo.h:299
SDL_bool SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode)
Definition: SDL_video.c:743
SDL_ShapeDriver shape_driver
Definition: SDL_sysvideo.h:244
int(* VideoInit)(_THIS)
Definition: SDL_sysvideo.h:160
int(* CreateSDLWindowFrom)(_THIS, SDL_Window *window, const void *data)
Definition: SDL_sysvideo.h:211
void(* SetWindowFullscreen)(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
Definition: SDL_sysvideo.h:230
A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents...
Definition: SDL_shape.h:101
int(* UpdateWindowFramebuffer)(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects)
Definition: SDL_sysvideo.h:236
void(* GL_DeleteContext)(_THIS, SDL_GLContext context)
Definition: SDL_sysvideo.h:263
char *(* GetClipboardText)(_THIS)
Definition: SDL_sysvideo.h:298
Uint32 format
Definition: SDL_video.h:55
void(* SetWindowTitle)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:212
#define SDL_LogWarn
void(* SetWindowResizable)(_THIS, SDL_Window *window, SDL_bool resizable)
Definition: SDL_sysvideo.h:229
int(* GL_GetSwapInterval)(_THIS)
Definition: SDL_sysvideo.h:261
void(* MaximizeWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:225
int(* SetClipboardText)(_THIS, const char *text)
Definition: SDL_sysvideo.h:297
Uint32 MIR_GetSDLPixelFormat(MirPixelFormat format)
int(* SetWindowGammaRamp)(_THIS, SDL_Window *window, const Uint16 *ramp)
Definition: SDL_sysvideo.h:231
void(* OnWindowEnter)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:238
void(* SuspendScreenSaver)(_THIS)
Definition: SDL_sysvideo.h:283
void(* SetWindowGrab)(_THIS, SDL_Window *window, SDL_bool grabbed)
Definition: SDL_sysvideo.h:233
int y
Definition: SDL_rect.h:66
#define SDL_Unsupported()
Definition: SDL_error.h:53
int SDL_MIR_LoadSymbols(void)
int(* CreateWindowFramebuffer)(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch)
Definition: SDL_sysvideo.h:235
SDL_bool MIR_GetWindowWMInfo(_THIS, SDL_Window *window, SDL_SysWMinfo *info)
void MIR_SetWindowMaximumSize(_THIS, SDL_Window *window)
int MIR_GL_LoadLibrary(_THIS, const char *path)
void MIR_InitMouse()
void *(* GL_GetProcAddress)(_THIS, const char *proc)
Definition: SDL_sysvideo.h:255
A rectangle, with the origin at the upper left.
Definition: SDL_rect.h:64
void MIR_SetWindowMinimumSize(_THIS, SDL_Window *window)
void MIR_SetWindowSize(_THIS, SDL_Window *window)
void(* PumpEvents)(_THIS)
Definition: SDL_sysvideo.h:280
void(* HideScreenKeyboard)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:293