2015-06-21 10:33:46 -05:00
|
|
|
/*
|
|
|
|
Simple DirectMedia Layer
|
2023-01-09 11:41:41 -06:00
|
|
|
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
2015-06-21 10:33:46 -05:00
|
|
|
|
|
|
|
This software is provided 'as-is', without any express or implied
|
|
|
|
warranty. In no event will the authors be held liable for any damages
|
|
|
|
arising from the use of this software.
|
|
|
|
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
|
|
including commercial applications, and to alter it and redistribute it
|
|
|
|
freely, subject to the following restrictions:
|
|
|
|
|
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
|
|
claim that you wrote the original software. If you use this software
|
|
|
|
in a product, an acknowledgment in the product documentation would be
|
|
|
|
appreciated but is not required.
|
|
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
|
|
misrepresented as being the original software.
|
|
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
|
|
*/
|
2022-11-29 20:34:15 -06:00
|
|
|
#include "SDL_internal.h"
|
2015-06-21 10:33:46 -05:00
|
|
|
|
2016-11-20 23:34:54 -06:00
|
|
|
#ifndef SDL_x11modes_h_
|
|
|
|
#define SDL_x11modes_h_
|
2015-06-21 10:33:46 -05:00
|
|
|
|
2023-01-29 15:30:55 -06:00
|
|
|
struct SDL_DisplayData
|
2015-06-21 10:33:46 -05:00
|
|
|
{
|
|
|
|
int screen;
|
|
|
|
Visual *visual;
|
|
|
|
int depth;
|
|
|
|
int scanline_pad;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
|
2022-04-26 15:41:28 -05:00
|
|
|
SDL_bool use_xrandr;
|
2015-06-21 10:33:46 -05:00
|
|
|
|
|
|
|
#if SDL_VIDEO_DRIVER_X11_XRANDR
|
|
|
|
RROutput xrandr_output;
|
|
|
|
#endif
|
2023-01-29 15:30:55 -06:00
|
|
|
};
|
2015-06-21 10:33:46 -05:00
|
|
|
|
2023-01-29 15:30:55 -06:00
|
|
|
struct SDL_DisplayModeData
|
2015-06-21 10:33:46 -05:00
|
|
|
{
|
|
|
|
#if SDL_VIDEO_DRIVER_X11_XRANDR
|
|
|
|
RRMode xrandr_mode;
|
2022-04-26 15:41:28 -05:00
|
|
|
#else
|
2022-11-30 14:51:59 -06:00
|
|
|
int unused; /* just so struct isn't empty. */
|
2015-06-21 10:33:46 -05:00
|
|
|
#endif
|
2023-01-29 15:30:55 -06:00
|
|
|
};
|
2015-06-21 10:33:46 -05:00
|
|
|
|
|
|
|
extern int X11_InitModes(_THIS);
|
2023-02-06 13:24:12 -06:00
|
|
|
extern int X11_GetDisplayModes(_THIS, SDL_VideoDisplay *display);
|
2022-11-30 14:51:59 -06:00
|
|
|
extern int X11_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode);
|
2015-06-21 10:33:46 -05:00
|
|
|
extern void X11_QuitModes(_THIS);
|
|
|
|
|
|
|
|
/* Some utility functions for working with visuals */
|
2022-11-30 14:51:59 -06:00
|
|
|
extern int X11_GetVisualInfoFromVisual(Display *display, Visual *visual,
|
|
|
|
XVisualInfo *vinfo);
|
|
|
|
extern Uint32 X11_GetPixelFormatFromVisualInfo(Display *display,
|
|
|
|
XVisualInfo *vinfo);
|
|
|
|
extern int X11_GetDisplayBounds(_THIS, SDL_VideoDisplay *sdl_display, SDL_Rect *rect);
|
|
|
|
extern int X11_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay *sdl_display, SDL_Rect *rect);
|
2015-06-21 10:33:46 -05:00
|
|
|
|
2022-06-06 01:13:37 -05:00
|
|
|
#if SDL_VIDEO_DRIVER_X11_XRANDR
|
|
|
|
extern void X11_HandleXRandREvent(_THIS, const XEvent *xevent);
|
|
|
|
#endif
|
|
|
|
|
2016-11-20 23:34:54 -06:00
|
|
|
#endif /* SDL_x11modes_h_ */
|