zenilib
0.5.3.0
|
#include "SDL_stdinc.h"
#include "SDL_pixels.h"
#include "SDL_rect.h"
#include "SDL_surface.h"
#include "begin_code.h"
#include "close_code.h"
Go to the source code of this file.
Classes | |
struct | SDL_DisplayMode |
The structure that defines a display mode. More... | |
Macros | |
#define | SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0) |
#define | SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X)) |
#define | SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000 |
Used to indicate that the window position should be centered. More... | |
#define | SDL_WINDOWPOS_ISCENTERED(X) (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK) |
#define | SDL_WINDOWPOS_ISUNDEFINED(X) (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK) |
#define | SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0) |
#define | SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X)) |
#define | SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000 |
Used to indicate that you don't care what the window position is. More... | |
Typedefs | |
typedef void * | SDL_GLContext |
An opaque handle to an OpenGL context. More... | |
typedef struct SDL_Window | SDL_Window |
The type used to identify a window. More... | |
Functions | |
DECLSPEC SDL_Window *SDLCALL | SDL_CreateWindow (const char *title, int x, int y, int w, int h, Uint32 flags) |
Create a window with the specified position, dimensions, and flags. More... | |
DECLSPEC SDL_Window *SDLCALL | SDL_CreateWindowFrom (const void *data) |
Create an SDL window from an existing native window. More... | |
DECLSPEC void SDLCALL | SDL_DestroyWindow (SDL_Window *window) |
Destroy a window. More... | |
DECLSPEC void SDLCALL | SDL_DisableScreenSaver (void) |
Prevent the screen from being blanked by a screensaver. More... | |
DECLSPEC void SDLCALL | SDL_EnableScreenSaver (void) |
Allow the screen to be blanked by a screensaver. More... | |
DECLSPEC SDL_DisplayMode *SDLCALL | SDL_GetClosestDisplayMode (int displayIndex, const SDL_DisplayMode *mode, SDL_DisplayMode *closest) |
Get the closest match to the requested display mode. More... | |
DECLSPEC int SDLCALL | SDL_GetCurrentDisplayMode (int displayIndex, SDL_DisplayMode *mode) |
Fill in information about the current display mode. More... | |
DECLSPEC const char *SDLCALL | SDL_GetCurrentVideoDriver (void) |
Returns the name of the currently initialized video driver. More... | |
DECLSPEC int SDLCALL | SDL_GetDesktopDisplayMode (int displayIndex, SDL_DisplayMode *mode) |
Fill in information about the desktop display mode. More... | |
DECLSPEC int SDLCALL | SDL_GetDisplayBounds (int displayIndex, SDL_Rect *rect) |
Get the desktop area represented by a display, with the primary display located at 0,0. More... | |
DECLSPEC int SDLCALL | SDL_GetDisplayMode (int displayIndex, int modeIndex, SDL_DisplayMode *mode) |
Fill in information about a specific display mode. More... | |
DECLSPEC const char *SDLCALL | SDL_GetDisplayName (int displayIndex) |
Get the name of a display in UTF-8 encoding. More... | |
DECLSPEC int SDLCALL | SDL_GetNumDisplayModes (int displayIndex) |
Returns the number of available display modes. More... | |
DECLSPEC int SDLCALL | SDL_GetNumVideoDisplays (void) |
Returns the number of available video displays. More... | |
DECLSPEC int SDLCALL | SDL_GetNumVideoDrivers (void) |
Get the number of video drivers compiled into SDL. More... | |
DECLSPEC const char *SDLCALL | SDL_GetVideoDriver (int index) |
Get the name of a built in video driver. More... | |
DECLSPEC float SDLCALL | SDL_GetWindowBrightness (SDL_Window *window) |
Get the brightness (gamma correction) for a window. More... | |
DECLSPEC void *SDLCALL | SDL_GetWindowData (SDL_Window *window, const char *name) |
Retrieve the data pointer associated with a window. More... | |
DECLSPEC int SDLCALL | SDL_GetWindowDisplayIndex (SDL_Window *window) |
Get the display index associated with a window. More... | |
DECLSPEC int SDLCALL | SDL_GetWindowDisplayMode (SDL_Window *window, SDL_DisplayMode *mode) |
Fill in information about the display mode used when a fullscreen window is visible. More... | |
DECLSPEC Uint32 SDLCALL | SDL_GetWindowFlags (SDL_Window *window) |
Get the window flags. More... | |
DECLSPEC SDL_Window *SDLCALL | SDL_GetWindowFromID (Uint32 id) |
Get a window from a stored ID, or NULL if it doesn't exist. More... | |
DECLSPEC int SDLCALL | SDL_GetWindowGammaRamp (SDL_Window *window, Uint16 *red, Uint16 *green, Uint16 *blue) |
Get the gamma ramp for a window. More... | |
DECLSPEC SDL_bool SDLCALL | SDL_GetWindowGrab (SDL_Window *window) |
Get a window's input grab mode. More... | |
DECLSPEC Uint32 SDLCALL | SDL_GetWindowID (SDL_Window *window) |
Get the numeric ID of a window, for logging purposes. More... | |
DECLSPEC void SDLCALL | SDL_GetWindowMaximumSize (SDL_Window *window, int *w, int *h) |
Get the maximum size of a window's client area. More... | |
DECLSPEC void SDLCALL | SDL_GetWindowMinimumSize (SDL_Window *window, int *w, int *h) |
Get the minimum size of a window's client area. More... | |
DECLSPEC Uint32 SDLCALL | SDL_GetWindowPixelFormat (SDL_Window *window) |
Get the pixel format associated with the window. More... | |
DECLSPEC void SDLCALL | SDL_GetWindowPosition (SDL_Window *window, int *x, int *y) |
Get the position of a window. More... | |
DECLSPEC void SDLCALL | SDL_GetWindowSize (SDL_Window *window, int *w, int *h) |
Get the size of a window's client area. More... | |
DECLSPEC SDL_Surface *SDLCALL | SDL_GetWindowSurface (SDL_Window *window) |
Get the SDL surface associated with the window. More... | |
DECLSPEC const char *SDLCALL | SDL_GetWindowTitle (SDL_Window *window) |
Get the title of a window, in UTF-8 format. More... | |
DECLSPEC void SDLCALL | SDL_HideWindow (SDL_Window *window) |
Hide a window. More... | |
DECLSPEC SDL_bool SDLCALL | SDL_IsScreenSaverEnabled (void) |
Returns whether the screensaver is currently enabled (default on). More... | |
DECLSPEC void SDLCALL | SDL_MaximizeWindow (SDL_Window *window) |
Make a window as large as possible. More... | |
DECLSPEC void SDLCALL | SDL_MinimizeWindow (SDL_Window *window) |
Minimize a window to an iconic representation. More... | |
DECLSPEC void SDLCALL | SDL_RaiseWindow (SDL_Window *window) |
Raise a window above other windows and set the input focus. More... | |
DECLSPEC void SDLCALL | SDL_RestoreWindow (SDL_Window *window) |
Restore the size and position of a minimized or maximized window. More... | |
DECLSPEC void SDLCALL | SDL_SetWindowBordered (SDL_Window *window, SDL_bool bordered) |
Set the border state of a window. More... | |
DECLSPEC int SDLCALL | SDL_SetWindowBrightness (SDL_Window *window, float brightness) |
Set the brightness (gamma correction) for a window. More... | |
DECLSPEC void *SDLCALL | SDL_SetWindowData (SDL_Window *window, const char *name, void *userdata) |
Associate an arbitrary named pointer with a window. More... | |
DECLSPEC int SDLCALL | SDL_SetWindowDisplayMode (SDL_Window *window, const SDL_DisplayMode *mode) |
Set the display mode used when a fullscreen window is visible. More... | |
DECLSPEC int SDLCALL | SDL_SetWindowFullscreen (SDL_Window *window, Uint32 flags) |
Set a window's fullscreen state. More... | |
DECLSPEC int SDLCALL | SDL_SetWindowGammaRamp (SDL_Window *window, const Uint16 *red, const Uint16 *green, const Uint16 *blue) |
Set the gamma ramp for a window. More... | |
DECLSPEC void SDLCALL | SDL_SetWindowGrab (SDL_Window *window, SDL_bool grabbed) |
Set a window's input grab mode. More... | |
DECLSPEC void SDLCALL | SDL_SetWindowIcon (SDL_Window *window, SDL_Surface *icon) |
Set the icon for a window. More... | |
DECLSPEC void SDLCALL | SDL_SetWindowMaximumSize (SDL_Window *window, int max_w, int max_h) |
Set the maximum size of a window's client area. More... | |
DECLSPEC void SDLCALL | SDL_SetWindowMinimumSize (SDL_Window *window, int min_w, int min_h) |
Set the minimum size of a window's client area. More... | |
DECLSPEC void SDLCALL | SDL_SetWindowPosition (SDL_Window *window, int x, int y) |
Set the position of a window. More... | |
DECLSPEC void SDLCALL | SDL_SetWindowSize (SDL_Window *window, int w, int h) |
Set the size of a window's client area. More... | |
DECLSPEC void SDLCALL | SDL_SetWindowTitle (SDL_Window *window, const char *title) |
Set the title of a window, in UTF-8 format. More... | |
DECLSPEC void SDLCALL | SDL_ShowWindow (SDL_Window *window) |
Show a window. More... | |
DECLSPEC int SDLCALL | SDL_UpdateWindowSurface (SDL_Window *window) |
Copy the window surface to the screen. More... | |
DECLSPEC int SDLCALL | SDL_UpdateWindowSurfaceRects (SDL_Window *window, const SDL_Rect *rects, int numrects) |
Copy a number of rectangles on the window surface to the screen. More... | |
DECLSPEC int SDLCALL | SDL_VideoInit (const char *driver_name) |
Initialize the video subsystem, optionally specifying a video driver. More... | |
DECLSPEC void SDLCALL | SDL_VideoQuit (void) |
Shuts down the video subsystem. More... | |
OpenGL support functions | |
DECLSPEC int SDLCALL | SDL_GL_LoadLibrary (const char *path) |
Dynamically load an OpenGL library. More... | |
DECLSPEC void *SDLCALL | SDL_GL_GetProcAddress (const char *proc) |
Get the address of an OpenGL function. More... | |
DECLSPEC void SDLCALL | SDL_GL_UnloadLibrary (void) |
Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary(). More... | |
DECLSPEC SDL_bool SDLCALL | SDL_GL_ExtensionSupported (const char *extension) |
Return true if an OpenGL extension is supported for the current context. More... | |
DECLSPEC int SDLCALL | SDL_GL_SetAttribute (SDL_GLattr attr, int value) |
Set an OpenGL window attribute before window creation. More... | |
DECLSPEC int SDLCALL | SDL_GL_GetAttribute (SDL_GLattr attr, int *value) |
Get the actual value for an attribute from the current context. More... | |
DECLSPEC SDL_GLContext SDLCALL | SDL_GL_CreateContext (SDL_Window *window) |
Create an OpenGL context for use with an OpenGL window, and make it current. More... | |
DECLSPEC int SDLCALL | SDL_GL_MakeCurrent (SDL_Window *window, SDL_GLContext context) |
Set up an OpenGL context for rendering into an OpenGL window. More... | |
DECLSPEC SDL_Window *SDLCALL | SDL_GL_GetCurrentWindow (void) |
Get the currently active OpenGL window. More... | |
DECLSPEC SDL_GLContext SDLCALL | SDL_GL_GetCurrentContext (void) |
Get the currently active OpenGL context. More... | |
DECLSPEC void SDLCALL | SDL_GL_GetDrawableSize (SDL_Window *window, int *w, int *h) |
Get the size of a window's underlying drawable (for use with glViewport). More... | |
DECLSPEC int SDLCALL | SDL_GL_SetSwapInterval (int interval) |
Set the swap interval for the current OpenGL context. More... | |
DECLSPEC int SDLCALL | SDL_GL_GetSwapInterval (void) |
Get the swap interval for the current OpenGL context. More... | |
DECLSPEC void SDLCALL | SDL_GL_SwapWindow (SDL_Window *window) |
Swap the OpenGL buffers for a window, if double-buffering is supported. More... | |
DECLSPEC void SDLCALL | SDL_GL_DeleteContext (SDL_GLContext context) |
Delete an OpenGL context. More... | |
Header file for SDL video functions.
Definition in file SDL_video.h.
#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0) |
Definition at line 128 of file SDL_video.h.
Referenced by SDLTest_CommonArg(), and Zeni::Window::Window().
#define SDL_WINDOWPOS_CENTERED_DISPLAY | ( | X | ) | (SDL_WINDOWPOS_CENTERED_MASK|(X)) |
Definition at line 127 of file SDL_video.h.
Referenced by SDLTest_CommonArg().
#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000 |
Used to indicate that the window position should be centered.
Definition at line 126 of file SDL_video.h.
#define SDL_WINDOWPOS_ISCENTERED | ( | X | ) | (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK) |
Definition at line 129 of file SDL_video.h.
Referenced by SDL_CreateWindow(), SDL_GetWindowDisplayIndex(), SDL_SetWindowPosition(), and SDLTest_CommonArg().
#define SDL_WINDOWPOS_ISUNDEFINED | ( | X | ) | (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK) |
Definition at line 120 of file SDL_video.h.
Referenced by SDL_CreateWindow(), SDL_GetWindowDisplayIndex(), SDL_SendWindowEvent(), SDL_SetWindowPosition(), and SDLTest_CommonArg().
#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0) |
Definition at line 119 of file SDL_video.h.
Referenced by SDL_CreateWindowAndRenderer(), and SDLTest_CommonCreateState().
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY | ( | X | ) | (SDL_WINDOWPOS_UNDEFINED_MASK|(X)) |
Definition at line 118 of file SDL_video.h.
Referenced by SDLTest_CommonArg().
#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000 |
Used to indicate that you don't care what the window position is.
Definition at line 117 of file SDL_video.h.
typedef void* SDL_GLContext |
An opaque handle to an OpenGL context.
Definition at line 161 of file SDL_video.h.
typedef struct SDL_Window SDL_Window |
The type used to identify a window.
Definition at line 89 of file SDL_video.h.
enum SDL_GLattr |
OpenGL configuration attributes.
Definition at line 166 of file SDL_video.h.
enum SDL_GLcontextFlag |
Enumerator | |
---|---|
SDL_GL_CONTEXT_DEBUG_FLAG | |
SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG | |
SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG | |
SDL_GL_CONTEXT_RESET_ISOLATION_FLAG |
Definition at line 200 of file SDL_video.h.
enum SDL_GLprofile |
Enumerator | |
---|---|
SDL_GL_CONTEXT_PROFILE_CORE | |
SDL_GL_CONTEXT_PROFILE_COMPATIBILITY | |
SDL_GL_CONTEXT_PROFILE_ES |
Definition at line 193 of file SDL_video.h.
enum SDL_WindowEventID |
Event subtype for window events.
Definition at line 135 of file SDL_video.h.
enum SDL_WindowFlags |
The flags on a window.
Definition at line 96 of file SDL_video.h.
DECLSPEC SDL_Window* SDLCALL SDL_CreateWindow | ( | const char * | title, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
Uint32 | flags | ||
) |
Create a window with the specified position, dimensions, and flags.
title | The title of the window, in UTF-8 encoding. |
x | The x position of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED. |
y | The y position of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED. |
w | The width of the window. |
h | The height of the window. |
flags | The flags for the window, a mask of any of the following: SDL_WINDOW_FULLSCREEN, SDL_WINDOW_OPENGL, SDL_WINDOW_HIDDEN, SDL_WINDOW_BORDERLESS, SDL_WINDOW_RESIZABLE, SDL_WINDOW_MAXIMIZED, SDL_WINDOW_MINIMIZED, SDL_WINDOW_INPUT_GRABBED, SDL_WINDOW_ALLOW_HIGHDPI. |
Definition at line 1190 of file SDL_video.c.
References SDL_Window::brightness, CREATE_FLAGS, SDL_VideoDevice::CreateWindow, display, SDL_Window::flags, FULLSCREEN_VISIBLE, SDL_VideoDevice::GL_CreateContext, SDL_Rect::h, SDL_Window::h, SDL_Window::id, SDL_Window::magic, SDL_Window::next, SDL_VideoDevice::next_object_id, NULL, SDL_Window::prev, SDL_calloc(), SDL_DestroyWindow(), SDL_FinishWindowCreation(), SDL_GetDisplayBounds(), SDL_GetDisplayForWindow(), SDL_GetHint(), SDL_GetIndexOfDisplay(), SDL_GL_LoadLibrary(), SDL_HINT_VIDEO_HIGHDPI_DISABLED, SDL_OutOfMemory, SDL_SetError(), SDL_SetWindowTitle(), SDL_UpdateFullscreenMode(), SDL_VideoInit(), SDL_WINDOW_ALLOW_HIGHDPI, SDL_WINDOW_HIDDEN, SDL_WINDOW_OPENGL, SDL_WINDOWPOS_ISCENTERED, SDL_WINDOWPOS_ISUNDEFINED, SDL_Rect::w, SDL_Window::w, SDL_VideoDevice::window_magic, SDL_VideoDevice::windows, SDL_Rect::x, SDL_Window::x, SDL_Rect::y, and SDL_Window::y.
Referenced by SDL_CreateShapedWindow(), SDL_CreateWindowAndRenderer(), SDLTest_CommonInit(), ShouldUseTextureFramebuffer(), and Zeni::Window::Window().
DECLSPEC SDL_Window* SDLCALL SDL_CreateWindowFrom | ( | const void * | data | ) |
Create an SDL window from an existing native window.
data | A pointer to driver-dependent window creation data |
Definition at line 1285 of file SDL_video.c.
References SDL_Window::brightness, SDL_VideoDevice::CreateWindowFrom, SDL_Window::flags, SDL_Window::id, SDL_Window::magic, SDL_Window::next, SDL_VideoDevice::next_object_id, NULL, SDL_Window::prev, SDL_calloc(), SDL_DestroyWindow(), SDL_OutOfMemory, SDL_UninitializedVideo(), SDL_WINDOW_FOREIGN, SDL_VideoDevice::window_magic, and SDL_VideoDevice::windows.
DECLSPEC void SDLCALL SDL_DestroyWindow | ( | SDL_Window * | window | ) |
Destroy a window.
Definition at line 2154 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_VideoDevice::current_glwin, SDL_Window::data, SDL_VideoDevice::DestroyWindow, SDL_VideoDevice::DestroyWindowFramebuffer, display, SDL_Surface::flags, SDL_Window::flags, SDL_VideoDisplay::fullscreen_window, SDL_Window::gamma, SDL_Window::icon, SDL_Window::magic, SDL_WindowUserData::name, SDL_WindowUserData::next, SDL_Window::next, NULL, SDL_Window::prev, SDL_DONTFREE, SDL_free(), SDL_FreeSurface(), SDL_GetDisplayForWindow(), SDL_GetKeyboardFocus(), SDL_GetMouseFocus(), SDL_GL_MakeCurrent(), SDL_GL_UnloadLibrary(), SDL_HideWindow(), SDL_SetKeyboardFocus(), SDL_SetMouseFocus(), SDL_WINDOW_OPENGL, SDL_Window::surface, SDL_Window::title, and SDL_VideoDevice::windows.
Referenced by SDL_CreateShapedWindow(), SDL_CreateWindow(), SDL_CreateWindowFrom(), SDL_VideoQuit(), SDLTest_CommonEvent(), ShouldUseTextureFramebuffer(), and Zeni::Window::~Window().
Prevent the screen from being blanked by a screensaver.
Definition at line 2250 of file SDL_video.c.
References SDL_TRUE, SDL_VideoDevice::suspend_screensaver, and SDL_VideoDevice::SuspendScreenSaver.
Referenced by Zeni::Core::set_screen_saver().
Allow the screen to be blanked by a screensaver.
Definition at line 2235 of file SDL_video.c.
References SDL_FALSE, SDL_VideoDevice::suspend_screensaver, and SDL_VideoDevice::SuspendScreenSaver.
Referenced by SDL_VideoQuit(), and Zeni::Core::set_screen_saver().
DECLSPEC SDL_DisplayMode* SDLCALL SDL_GetClosestDisplayMode | ( | int | displayIndex, |
const SDL_DisplayMode * | mode, | ||
SDL_DisplayMode * | closest | ||
) |
Get the closest match to the requested display mode.
displayIndex | The index of display from which mode should be queried. |
mode | The desired display mode |
closest | A pointer to a display mode to be filled in with the closest match of the available display modes. |
closest
, or NULL if no matching video mode was available.The available display modes are scanned, and closest
is filled in with the closest mode matching the requested mode and returned. The mode format and refresh_rate default to the desktop mode if they are 0. The modes are scanned with size being first priority, format being second priority, and finally checking the refresh_rate. If all the available modes are too small, then NULL is returned.
Definition at line 874 of file SDL_video.c.
References CHECK_DISPLAY_INDEX, display, SDL_VideoDevice::displays, NULL, and SDL_GetClosestDisplayModeForDisplay().
DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode | ( | int | displayIndex, |
SDL_DisplayMode * | mode | ||
) |
Fill in information about the current display mode.
Definition at line 753 of file SDL_video.c.
References CHECK_DISPLAY_INDEX, SDL_VideoDisplay::current_mode, display, and SDL_VideoDevice::displays.
Returns the name of the currently initialized video driver.
Definition at line 538 of file SDL_video.c.
References SDL_VideoDevice::name, NULL, and SDL_UninitializedVideo().
Referenced by SDLTest_CommonInit().
DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode | ( | int | displayIndex, |
SDL_DisplayMode * | mode | ||
) |
Fill in information about the desktop display mode.
Definition at line 739 of file SDL_video.c.
References CHECK_DISPLAY_INDEX, SDL_VideoDisplay::desktop_mode, display, and SDL_VideoDevice::displays.
Referenced by SDLTest_CommonInit().
Get the desktop area represented by a display, with the primary display located at 0,0.
Definition at line 638 of file SDL_video.c.
References CHECK_DISPLAY_INDEX, SDL_VideoDisplay::current_mode, display, SDL_VideoDevice::displays, SDL_VideoDevice::GetDisplayBounds, SDL_DisplayMode::h, SDL_Rect::h, SDL_GetDisplayBounds(), SDL_DisplayMode::w, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by FullscreenTo(), SDL_CreateWindow(), SDL_GetDisplayBounds(), SDL_GetWindowDisplayIndex(), SDL_SetWindowPosition(), SDLTest_CommonInit(), and Zeni::Window::Window().
Fill in information about a specific display mode.
Definition at line 721 of file SDL_video.c.
References CHECK_DISPLAY_INDEX, display, SDL_VideoDisplay::display_modes, SDL_VideoDevice::displays, SDL_GetNumDisplayModesForDisplay(), and SDL_SetError().
Referenced by SDLTest_CommonInit(), and Zeni::Window::Window().
Get the name of a display in UTF-8 encoding.
Definition at line 630 of file SDL_video.c.
References CHECK_DISPLAY_INDEX, SDL_VideoDevice::displays, SDL_VideoDisplay::name, and NULL.
Referenced by SDLTest_CommonInit().
Returns the number of available display modes.
Definition at line 713 of file SDL_video.c.
References CHECK_DISPLAY_INDEX, SDL_VideoDevice::displays, and SDL_GetNumDisplayModesForDisplay().
Referenced by SDLTest_CommonInit(), and Zeni::Window::Window().
Returns the number of available video displays.
Definition at line 597 of file SDL_video.c.
References SDL_VideoDevice::num_displays, and SDL_UninitializedVideo().
Referenced by SDLTest_CommonInit().
Get the number of video drivers compiled into SDL.
Definition at line 388 of file SDL_video.c.
References SDL_arraysize.
Referenced by SDL_GetVideoDriver(), and SDLTest_CommonInit().
Get the name of a built in video driver.
Definition at line 394 of file SDL_video.c.
References VideoBootStrap::name, NULL, and SDL_GetNumVideoDrivers().
Referenced by SDLTest_CommonInit().
DECLSPEC float SDLCALL SDL_GetWindowBrightness | ( | SDL_Window * | window | ) |
Get the brightness (gamma correction) for a window.
Definition at line 1920 of file SDL_video.c.
References SDL_Window::brightness, and CHECK_WINDOW_MAGIC.
DECLSPEC void* SDLCALL SDL_GetWindowData | ( | SDL_Window * | window, |
const char * | name | ||
) |
Retrieve the data pointer associated with a window.
window | The window to query. |
name | The name of the pointer. |
Definition at line 1514 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_WindowUserData::data, SDL_Window::data, SDL_WindowUserData::name, SDL_WindowUserData::next, NULL, SDL_InvalidParamError, and SDL_strcmp().
Referenced by SDL_CreateWindowTexture(), SDL_GetRenderer(), and SDL_UpdateWindowTexture().
DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex | ( | SDL_Window * | window | ) |
Get the display index associated with a window.
Definition at line 936 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, display, SDL_VideoDevice::displays, SDL_VideoDisplay::fullscreen_window, SDL_Rect::h, SDL_Window::h, i, NULL, SDL_VideoDevice::num_displays, SDL_EnclosePoints(), SDL_GetDisplayBounds(), SDL_SetError(), SDL_WINDOWPOS_ISCENTERED, SDL_WINDOWPOS_ISUNDEFINED, SDL_Rect::w, SDL_Window::w, SDL_Point::x, SDL_Rect::x, SDL_Window::x, SDL_Point::y, SDL_Rect::y, and SDL_Window::y.
Referenced by SDL_GetDisplayForWindow().
DECLSPEC int SDLCALL SDL_GetWindowDisplayMode | ( | SDL_Window * | window, |
SDL_DisplayMode * | mode | ||
) |
Fill in information about the display mode used when a fullscreen window is visible.
Definition at line 1020 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_VideoDisplay::desktop_mode, display, SDL_Window::flags, SDL_Window::fullscreen_mode, SDL_DisplayMode::h, SDL_Window::h, SDL_GetClosestDisplayModeForDisplay(), SDL_GetDisplayForWindow(), SDL_InvalidParamError, SDL_SetError(), SDL_WINDOW_FULLSCREEN_DESKTOP, SDL_DisplayMode::w, and SDL_Window::w.
Referenced by SDL_UpdateFullscreenMode().
DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags | ( | SDL_Window * | window | ) |
Get the window flags.
Definition at line 1409 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, and SDL_Window::flags.
Referenced by FullscreenTo(), SDL_CreateRenderer(), SDL_PromptAssertion(), SDL_RendererEventWatch(), and SDLTest_CommonEvent().
DECLSPEC SDL_Window* SDLCALL SDL_GetWindowFromID | ( | Uint32 | id | ) |
Get a window from a stored ID, or NULL if it doesn't exist.
Definition at line 1393 of file SDL_video.c.
References SDL_Window::id, SDL_Window::next, NULL, and SDL_VideoDevice::windows.
Referenced by FullscreenTo(), SDL_RendererEventWatch(), and SDLTest_CommonEvent().
DECLSPEC int SDLCALL SDL_GetWindowGammaRamp | ( | SDL_Window * | window, |
Uint16 * | red, | ||
Uint16 * | green, | ||
Uint16 * | blue | ||
) |
Get the gamma ramp for a window.
window | The window from which the gamma ramp should be queried. |
red | A pointer to a 256 element array of 16-bit quantities to hold the translation table for the red channel, or NULL. |
green | A pointer to a 256 element array of 16-bit quantities to hold the translation table for the green channel, or NULL. |
blue | A pointer to a 256 element array of 16-bit quantities to hold the translation table for the blue channel, or NULL. |
Definition at line 1961 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::gamma, SDL_VideoDevice::GetWindowGammaRamp, i, SDL_Window::saved_gamma, SDL_malloc(), SDL_memcpy(), and SDL_OutOfMemory.
Referenced by SDL_SetWindowGammaRamp().
DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab | ( | SDL_Window * | window | ) |
Get a window's input grab mode.
Definition at line 2037 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_FALSE, and SDL_WINDOW_INPUT_GRABBED.
Referenced by Zeni::Window::get_mouse_state(), and SDLTest_CommonEvent().
DECLSPEC Uint32 SDLCALL SDL_GetWindowID | ( | SDL_Window * | window | ) |
Get the numeric ID of a window, for logging purposes.
Definition at line 1385 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, and SDL_Window::id.
Referenced by Zeni::Game::run().
Get the maximum size of a window's client area.
window | The window to query. |
w | Pointer to variable for storing the maximum width, may be NULL |
h | Pointer to variable for storing the maximum height, may be NULL |
Definition at line 1710 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::max_h, and SDL_Window::max_w.
Get the minimum size of a window's client area.
window | The window to query. |
w | Pointer to variable for storing the minimum width, may be NULL |
h | Pointer to variable for storing the minimum height, may be NULL |
Definition at line 1674 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::min_h, and SDL_Window::min_w.
DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat | ( | SDL_Window * | window | ) |
Get the pixel format associated with the window.
Definition at line 1059 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_VideoDisplay::current_mode, display, SDL_DisplayMode::format, SDL_GetDisplayForWindow(), and SDL_PIXELFORMAT_UNKNOWN.
Referenced by SDL_RenderReadPixels().
Get the position of a window.
window | The window to query. |
x | Pointer to variable for storing the x position, may be NULL |
y | Pointer to variable for storing the y position, may be NULL |
Definition at line 1570 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_WINDOW_FULLSCREEN, SDL_Window::x, and SDL_Window::y.
Get the size of a window's client area.
window | The window to query. |
w | Pointer to variable for storing the width, may be NULL |
h | Pointer to variable for storing the height, may be NULL |
Definition at line 1638 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::h, and SDL_Window::w.
Referenced by SDL_GetRendererOutputSize(), SDL_GL_GetDrawableSize(), SDL_PrivateSendMouseMotion(), SDL_RendererEventWatch(), SDL_UpdateMouseFocus(), SDLTest_CommonEvent(), and SDLTest_CommonInit().
DECLSPEC SDL_Surface* SDLCALL SDL_GetWindowSurface | ( | SDL_Window * | window | ) |
Get the SDL surface associated with the window.
A new surface will be created with the optimal format for the window, if necessary. This surface will be freed when the window is destroyed.
Definition at line 1858 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Surface::flags, NULL, SDL_CreateWindowFramebuffer(), SDL_DONTFREE, SDL_FreeSurface(), SDL_TRUE, SDL_Window::surface, and SDL_Window::surface_valid.
Referenced by SW_ActivateRenderer(), and SW_CreateRenderer().
DECLSPEC const char* SDLCALL SDL_GetWindowTitle | ( | SDL_Window * | window | ) |
Get the title of a window, in UTF-8 format.
Definition at line 1437 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, and SDL_Window::title.
DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext | ( | SDL_Window * | window | ) |
Create an OpenGL context for use with an OpenGL window, and make it current.
Definition at line 2758 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_VideoDevice::current_glctx, SDL_VideoDevice::current_glctx_tls, SDL_VideoDevice::current_glwin, SDL_VideoDevice::current_glwin_tls, SDL_Window::flags, SDL_VideoDevice::GL_CreateContext, NULL, SDL_SetError(), SDL_TLSSet(), and SDL_WINDOW_OPENGL.
Referenced by Zeni::Video_GL_Shader::init(), Zeni::Video_GL_Fixed::init(), and ShouldUseTextureFramebuffer().
DECLSPEC void SDLCALL SDL_GL_DeleteContext | ( | SDL_GLContext | context | ) |
Delete an OpenGL context.
Definition at line 2889 of file SDL_video.c.
References SDL_VideoDevice::GL_DeleteContext, NULL, SDL_GL_GetCurrentContext(), and SDL_GL_MakeCurrent().
Referenced by ShouldUseTextureFramebuffer(), Zeni::Video_GL_Shader::uninit(), and Zeni::Video_GL_Fixed::uninit().
Return true if an OpenGL extension is supported for the current context.
Definition at line 2385 of file SDL_video.c.
References APIENTRY, GL_EXTENSIONS, GL_NUM_EXTENSIONS, GL_VERSION, i, isAtLeastGL3(), SDL_FALSE, SDL_getenv(), SDL_GL_GetProcAddress(), SDL_strchr(), SDL_strcmp(), SDL_strlen(), SDL_strstr(), and SDL_TRUE.
DECLSPEC int SDLCALL SDL_GL_GetAttribute | ( | SDL_GLattr | attr, |
int * | value | ||
) |
Get the actual value for an attribute from the current context.
Definition at line 2578 of file SDL_video.c.
References SDL_VideoDevice::accelerated, APIENTRY, bits, SDL_VideoDevice::double_buffer, error, SDL_VideoDevice::flags, GL_ACCUM_ALPHA_BITS, GL_ACCUM_BLUE_BITS, GL_ACCUM_GREEN_BITS, GL_ACCUM_RED_BITS, GL_ALPHA_BITS, GL_BLUE_BITS, SDL_VideoDevice::gl_config, GL_DEPTH_BITS, GL_DOUBLEBUFFER, GL_GREEN_BITS, GL_INVALID_ENUM, GL_INVALID_VALUE, GL_NO_ERROR, GL_RED_BITS, GL_SAMPLE_BUFFERS, GL_SAMPLE_BUFFERS_ARB, GL_SAMPLES, GL_SAMPLES_ARB, GL_STENCIL_BITS, GL_STEREO, SDL_VideoDevice::major_version, SDL_VideoDevice::minor_version, SDL_VideoDevice::profile_mask, SDL_VideoDevice::retained_backing, SDL_GL_ACCELERATED_VISUAL, SDL_GL_ACCUM_ALPHA_SIZE, SDL_GL_ACCUM_BLUE_SIZE, SDL_GL_ACCUM_GREEN_SIZE, SDL_GL_ACCUM_RED_SIZE, SDL_GL_ALPHA_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_BUFFER_SIZE, SDL_GL_CONTEXT_EGL, SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_MAJOR_VERSION, SDL_GL_CONTEXT_MINOR_VERSION, SDL_GL_CONTEXT_PROFILE_ES, SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_DEPTH_SIZE, SDL_GL_DOUBLEBUFFER, SDL_GL_GetProcAddress(), SDL_GL_GREEN_SIZE, SDL_GL_MULTISAMPLEBUFFERS, SDL_GL_MULTISAMPLESAMPLES, SDL_GL_RED_SIZE, SDL_GL_RETAINED_BACKING, SDL_GL_SHARE_WITH_CURRENT_CONTEXT, SDL_GL_STENCIL_SIZE, SDL_GL_STEREO, SDL_SetError(), SDL_Unsupported, and SDL_VideoDevice::share_with_current_context.
DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext | ( | void | ) |
Get the currently active OpenGL context.
Definition at line 2822 of file SDL_video.c.
References SDL_VideoDevice::current_glctx_tls, NULL, SDL_TLSGet(), and SDL_UninitializedVideo().
Referenced by SDL_GL_DeleteContext(), SDL_GL_GetSwapInterval(), SDL_GL_MakeCurrent(), and SDL_GL_SetSwapInterval().
DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow | ( | void | ) |
Get the currently active OpenGL window.
Definition at line 2812 of file SDL_video.c.
References SDL_VideoDevice::current_glwin_tls, NULL, SDL_TLSGet(), and SDL_UninitializedVideo().
Referenced by SDL_GL_MakeCurrent(), and SDL_GL_SwapWindow().
Get the size of a window's underlying drawable (for use with glViewport).
window | Window from which the drawable size should be queried |
w | Pointer to variable for storing the width, may be NULL |
h | Pointer to variable for storing the height, may be NULL |
This may differ from SDL_GetWindowSize if we're rendering to a high-DPI drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with high-DPI support (Apple calls this "Retina"), and not disabled by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
Definition at line 2831 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_VideoDevice::GL_GetDrawableSize, and SDL_GetWindowSize().
Get the address of an OpenGL function.
Definition at line 2340 of file SDL_video.c.
References SDL_VideoDevice::driver_loaded, SDL_VideoDevice::gl_config, SDL_VideoDevice::GL_GetProcAddress, NULL, SDL_SetError(), and SDL_UninitializedVideo().
Referenced by Zeni::Video_GL_Shader::init(), Zeni::Video_GL_Fixed::init(), SDL_GL_ExtensionSupported(), SDL_GL_GetAttribute(), and ShouldUseTextureFramebuffer().
Get the swap interval for the current OpenGL context.
Definition at line 2857 of file SDL_video.c.
References SDL_VideoDevice::GL_GetSwapInterval, NULL, and SDL_GL_GetCurrentContext().
Dynamically load an OpenGL library.
path | The platform dependent OpenGL library name, or NULL to open the default OpenGL library. |
This should be done after initializing the video driver, but before creating any OpenGL windows. If no OpenGL library is loaded, the default library will be loaded upon creation of the first OpenGL window.
Definition at line 2315 of file SDL_video.c.
References SDL_VideoDevice::driver_loaded, SDL_VideoDevice::driver_path, SDL_VideoDevice::gl_config, SDL_VideoDevice::GL_LoadLibrary, SDL_SetError(), SDL_strcmp(), and SDL_UninitializedVideo().
Referenced by SDL_CreateWindow(), and SDL_RecreateWindow().
DECLSPEC int SDLCALL SDL_GL_MakeCurrent | ( | SDL_Window * | window, |
SDL_GLContext | context | ||
) |
Set up an OpenGL context for rendering into an OpenGL window.
Definition at line 2781 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_VideoDevice::current_glctx, SDL_VideoDevice::current_glctx_tls, SDL_VideoDevice::current_glwin, SDL_VideoDevice::current_glwin_tls, SDL_Window::flags, SDL_VideoDevice::GL_MakeCurrent, NULL, SDL_GL_GetCurrentContext(), SDL_GL_GetCurrentWindow(), SDL_SetError(), SDL_TLSSet(), and SDL_WINDOW_OPENGL.
Referenced by SDL_DestroyWindow(), and SDL_GL_DeleteContext().
DECLSPEC int SDLCALL SDL_GL_SetAttribute | ( | SDL_GLattr | attr, |
int | value | ||
) |
Set an OpenGL window attribute before window creation.
Definition at line 2469 of file SDL_video.c.
References SDL_VideoDevice::accelerated, SDL_VideoDevice::accum_alpha_size, SDL_VideoDevice::accum_blue_size, SDL_VideoDevice::accum_green_size, SDL_VideoDevice::accum_red_size, SDL_VideoDevice::alpha_size, SDL_VideoDevice::blue_size, SDL_VideoDevice::buffer_size, SDL_VideoDevice::depth_size, SDL_VideoDevice::double_buffer, SDL_VideoDevice::flags, SDL_VideoDevice::gl_config, SDL_VideoDevice::green_size, SDL_VideoDevice::major_version, SDL_VideoDevice::minor_version, SDL_VideoDevice::multisamplebuffers, SDL_VideoDevice::multisamplesamples, SDL_VideoDevice::profile_mask, SDL_VideoDevice::red_size, SDL_VideoDevice::retained_backing, SDL_GL_ACCELERATED_VISUAL, SDL_GL_ACCUM_ALPHA_SIZE, SDL_GL_ACCUM_BLUE_SIZE, SDL_GL_ACCUM_GREEN_SIZE, SDL_GL_ACCUM_RED_SIZE, SDL_GL_ALPHA_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_BUFFER_SIZE, SDL_GL_CONTEXT_DEBUG_FLAG, SDL_GL_CONTEXT_EGL, SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG, SDL_GL_CONTEXT_MAJOR_VERSION, SDL_GL_CONTEXT_MINOR_VERSION, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY, SDL_GL_CONTEXT_PROFILE_CORE, SDL_GL_CONTEXT_PROFILE_ES, SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_RESET_ISOLATION_FLAG, SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG, SDL_GL_DEPTH_SIZE, SDL_GL_DOUBLEBUFFER, SDL_GL_GREEN_SIZE, SDL_GL_MULTISAMPLEBUFFERS, SDL_GL_MULTISAMPLESAMPLES, SDL_GL_RED_SIZE, SDL_GL_RETAINED_BACKING, SDL_GL_SetAttribute(), SDL_GL_SHARE_WITH_CURRENT_CONTEXT, SDL_GL_STENCIL_SIZE, SDL_GL_STEREO, SDL_SetError(), SDL_UninitializedVideo(), SDL_Unsupported, SDL_VideoDevice::share_with_current_context, SDL_VideoDevice::stencil_size, and SDL_VideoDevice::stereo.
Referenced by Zeni::Video_GL_Shader::init(), Zeni::Video_GL_Fixed::init(), SDL_GL_SetAttribute(), SDLTest_CommonInit(), Zeni::Video_GL_Shader::set_vertical_sync(), Zeni::Video_GL_Fixed::set_vertical_sync(), and Zeni::Window::Window().
Set the swap interval for the current OpenGL context.
interval | 0 for immediate updates, 1 for updates synchronized with the vertical retrace. If the system supports it, you may specify -1 to allow late swaps to happen immediately instead of waiting for the next retrace. |
Definition at line 2843 of file SDL_video.c.
References SDL_VideoDevice::GL_SetSwapInterval, NULL, SDL_GL_GetCurrentContext(), SDL_SetError(), and SDL_UninitializedVideo().
Referenced by Zeni::Video_GL_Shader::init(), Zeni::Video_GL_Fixed::init(), Zeni::Video_GL_Shader::set_vertical_sync(), and Zeni::Video_GL_Fixed::set_vertical_sync().
DECLSPEC void SDLCALL SDL_GL_SwapWindow | ( | SDL_Window * | window | ) |
Swap the OpenGL buffers for a window, if double-buffering is supported.
Definition at line 2871 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_VideoDevice::GL_SwapWindow, SDL_GL_GetCurrentWindow(), SDL_SetError(), and SDL_WINDOW_OPENGL.
Referenced by Zeni::Video_GL_Fixed::end_render(), and Zeni::Video_GL_Shader::end_render().
Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
Definition at line 2362 of file SDL_video.c.
References SDL_VideoDevice::driver_loaded, SDL_VideoDevice::gl_config, SDL_VideoDevice::GL_UnloadLibrary, and SDL_UninitializedVideo().
Referenced by SDL_DestroyWindow(), and SDL_RecreateWindow().
DECLSPEC void SDLCALL SDL_HideWindow | ( | SDL_Window * | window | ) |
Hide a window.
Definition at line 1737 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_VideoDevice::HideWindow, SDL_FALSE, SDL_SendWindowEvent(), SDL_UpdateFullscreenMode(), SDL_WINDOW_SHOWN, and SDL_WINDOWEVENT_HIDDEN.
Referenced by SDL_DestroyWindow(), and SDL_RecreateWindow().
Returns whether the screensaver is currently enabled (default on).
Definition at line 2226 of file SDL_video.c.
References SDL_FALSE, SDL_TRUE, and SDL_VideoDevice::suspend_screensaver.
Referenced by Zeni::Core::is_screen_saver_enabled().
DECLSPEC void SDLCALL SDL_MaximizeWindow | ( | SDL_Window * | window | ) |
Make a window as large as possible.
Definition at line 1767 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_VideoDevice::MaximizeWindow, and SDL_WINDOW_MAXIMIZED.
Referenced by SDL_FinishWindowCreation(), and SDLTest_CommonEvent().
DECLSPEC void SDLCALL SDL_MinimizeWindow | ( | SDL_Window * | window | ) |
Minimize a window to an iconic representation.
Definition at line 1783 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_VideoDevice::MinimizeWindow, SDL_FALSE, SDL_UpdateFullscreenMode(), and SDL_WINDOW_MINIMIZED.
Referenced by SDL_FinishWindowCreation(), SDL_OnWindowFocusLost(), SDL_PromptAssertion(), SDL_UpdateFullscreenMode(), and SDLTest_CommonEvent().
DECLSPEC void SDLCALL SDL_RaiseWindow | ( | SDL_Window * | window | ) |
Raise a window above other windows and set the input focus.
Definition at line 1754 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_VideoDevice::RaiseWindow, and SDL_WINDOW_SHOWN.
Referenced by SDL_OnWindowRestored().
DECLSPEC void SDLCALL SDL_RestoreWindow | ( | SDL_Window * | window | ) |
Restore the size and position of a minimized or maximized window.
Definition at line 1799 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_VideoDevice::RestoreWindow, SDL_WINDOW_MAXIMIZED, and SDL_WINDOW_MINIMIZED.
Referenced by SDL_PromptAssertion(), and SDLTest_CommonEvent().
DECLSPEC void SDLCALL SDL_SetWindowBordered | ( | SDL_Window * | window, |
SDL_bool | bordered | ||
) |
Set the border state of a window.
This will add or remove the window's SDL_WINDOW_BORDERLESS flag and add or remove the border from the actual window. This is a no-op if the window's border already matches the requested state.
window | The window of which to change the border state. |
bordered | SDL_FALSE to remove border, SDL_TRUE to add border. |
Definition at line 1593 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_FALSE, SDL_WINDOW_BORDERLESS, SDL_WINDOW_FULLSCREEN, and SDL_VideoDevice::SetWindowBordered.
Referenced by SDLTest_CommonEvent().
DECLSPEC int SDLCALL SDL_SetWindowBrightness | ( | SDL_Window * | window, |
float | brightness | ||
) |
Set the brightness (gamma correction) for a window.
Definition at line 1904 of file SDL_video.c.
References SDL_Window::brightness, CHECK_WINDOW_MAGIC, SDL_CalculateGammaRamp(), and SDL_SetWindowGammaRamp().
DECLSPEC void* SDLCALL SDL_SetWindowData | ( | SDL_Window * | window, |
const char * | name, | ||
void * | userdata | ||
) |
Associate an arbitrary named pointer with a window.
window | The window to associate with the pointer. |
name | The name of the pointer. |
userdata | The associated pointer. |
Definition at line 1467 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_WindowUserData::data, SDL_Window::data, SDL_WindowUserData::name, SDL_WindowUserData::next, NULL, SDL_free(), SDL_InvalidParamError, SDL_malloc(), SDL_strcmp(), and SDL_strdup().
Referenced by SDL_CreateRenderer(), SDL_CreateWindowTexture(), SDL_DestroyRenderer(), and SDL_DestroyWindowTexture().
DECLSPEC int SDLCALL SDL_SetWindowDisplayMode | ( | SDL_Window * | window, |
const SDL_DisplayMode * | mode | ||
) |
Set the display mode used when a fullscreen window is visible.
By default the window's dimensions and the desktop format and refresh rate are used.
window | The window for which the display mode should be set. |
mode | The mode to use, or NULL for the default mode. |
Definition at line 1007 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::fullscreen_mode, and SDL_zero.
Referenced by SDLTest_CommonInit().
DECLSPEC int SDLCALL SDL_SetWindowFullscreen | ( | SDL_Window * | window, |
Uint32 | flags | ||
) |
Set a window's fullscreen state.
Definition at line 1814 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, FULLSCREEN_MASK, FULLSCREEN_VISIBLE, and SDL_UpdateFullscreenMode().
Referenced by FullscreenTo(), SDL_FinishWindowCreation(), and SDLTest_CommonEvent().
DECLSPEC int SDLCALL SDL_SetWindowGammaRamp | ( | SDL_Window * | window, |
const Uint16 * | red, | ||
const Uint16 * | green, | ||
const Uint16 * | blue | ||
) |
Set the gamma ramp for a window.
window | The window for which the gamma ramp should be set. |
red | The translation table for the red channel, or NULL. |
green | The translation table for the green channel, or NULL. |
blue | The translation table for the blue channel, or NULL. |
Set the gamma translation table for the red, green, and blue channels of the video hardware. Each table is an array of 256 16-bit quantities, representing a mapping between the input and output for that channel. The input is the index into the array, and the output is the 16-bit gamma value at that index, scaled to the output color precision.
Definition at line 1928 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_Window::gamma, NULL, SDL_GetWindowGammaRamp(), SDL_memcpy(), SDL_Unsupported, SDL_WINDOW_INPUT_FOCUS, and SDL_VideoDevice::SetWindowGammaRamp.
Referenced by SDL_SetWindowBrightness().
DECLSPEC void SDLCALL SDL_SetWindowGrab | ( | SDL_Window * | window, |
SDL_bool | grabbed | ||
) |
Set a window's input grab mode.
window | The window for which the input grab mode should be set. |
grabbed | This is SDL_TRUE to grab input, and SDL_FALSE to release input. |
Definition at line 2021 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_UpdateWindowGrab(), and SDL_WINDOW_INPUT_GRABBED.
Referenced by SDL_FinishWindowCreation(), SDLTest_CommonEvent(), and Zeni::Window::set_mouse_state().
DECLSPEC void SDLCALL SDL_SetWindowIcon | ( | SDL_Window * | window, |
SDL_Surface * | icon | ||
) |
Set the icon for a window.
window | The window for which the icon should be set. |
icon | The icon for the window. |
Definition at line 1445 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::icon, SDL_ConvertSurfaceFormat(), SDL_FreeSurface(), SDL_PIXELFORMAT_ARGB8888, and SDL_VideoDevice::SetWindowIcon.
Referenced by Zeni::Window::alert_window_resized(), SDL_RecreateWindow(), and SDLTest_CommonInit().
Set the maximum size of a window's client area.
window | The window to set a new maximum size. |
max_w | The maximum width of the window, must be >0 |
max_h | The maximum height of the window, must be >0 |
Definition at line 1686 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_Window::h, SDL_Window::max_h, SDL_Window::max_w, SDL_InvalidParamError, SDL_min, SDL_SetWindowSize(), SDL_WINDOW_FULLSCREEN, SDL_VideoDevice::SetWindowMaximumSize, and SDL_Window::w.
Referenced by SDLTest_CommonInit().
Set the minimum size of a window's client area.
window | The window to set a new minimum size. |
min_w | The minimum width of the window, must be >0 |
min_h | The minimum height of the window, must be >0 |
Definition at line 1650 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_Window::h, SDL_Window::min_h, SDL_Window::min_w, SDL_InvalidParamError, SDL_max, SDL_SetWindowSize(), SDL_WINDOW_FULLSCREEN, SDL_VideoDevice::SetWindowMinimumSize, and SDL_Window::w.
Referenced by SDLTest_CommonInit().
Set the position of a window.
window | The window to reposition. |
x | The x coordinate of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED. |
y | The y coordinate of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED. |
Definition at line 1535 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, display, SDL_Window::flags, SDL_Rect::h, SDL_Window::h, SDL_GetDisplayBounds(), SDL_GetDisplayForWindow(), SDL_GetIndexOfDisplay(), SDL_SendWindowEvent(), SDL_WINDOW_FULLSCREEN, SDL_WINDOWEVENT_MOVED, SDL_WINDOWPOS_ISCENTERED, SDL_WINDOWPOS_ISUNDEFINED, SDL_VideoDevice::SetWindowPosition, SDL_Rect::w, SDL_Window::w, SDL_Rect::x, SDL_Window::x, SDL_Rect::y, and SDL_Window::y.
Referenced by FullscreenTo(), and SDL_SetWindowShape().
Set the size of a window's client area.
window | The window to resize. |
w | The width of the window, must be >0 |
h | The height of the window, must be >0 |
Definition at line 1611 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_Window::h, SDL_InvalidParamError, SDL_OnWindowResized(), SDL_WINDOW_FULLSCREEN, SDL_VideoDevice::SetWindowSize, and SDL_Window::w.
Referenced by SDL_SetWindowMaximumSize(), SDL_SetWindowMinimumSize(), and SDLTest_CommonEvent().
DECLSPEC void SDLCALL SDL_SetWindowTitle | ( | SDL_Window * | window, |
const char * | title | ||
) |
Set the title of a window, in UTF-8 format.
Definition at line 1417 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, NULL, SDL_free(), SDL_strdup(), SDL_VideoDevice::SetWindowTitle, and SDL_Window::title.
Referenced by Zeni::Window::alert_window_resized(), SDL_CreateWindow(), and SDL_RecreateWindow().
DECLSPEC void SDLCALL SDL_ShowWindow | ( | SDL_Window * | window | ) |
Show a window.
Definition at line 1722 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Window::flags, SDL_SendWindowEvent(), SDL_WINDOW_SHOWN, SDL_WINDOWEVENT_SHOWN, and SDL_VideoDevice::ShowWindow.
Referenced by Zeni::Window::alert_window_resized(), SDL_FinishWindowCreation(), SDLTest_CommonInit(), and Zeni::Window::Window().
DECLSPEC int SDLCALL SDL_UpdateWindowSurface | ( | SDL_Window * | window | ) |
Copy the window surface to the screen.
Definition at line 1877 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_Rect::h, SDL_Window::h, SDL_UpdateWindowSurfaceRects(), SDL_Rect::w, SDL_Window::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SW_RenderPresent().
DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects | ( | SDL_Window * | window, |
const SDL_Rect * | rects, | ||
int | numrects | ||
) |
Copy a number of rectangles on the window surface to the screen.
Definition at line 1891 of file SDL_video.c.
References CHECK_WINDOW_MAGIC, SDL_SetError(), SDL_Window::surface_valid, and SDL_VideoDevice::UpdateWindowFramebuffer.
Referenced by SDL_UpdateWindowSurface().
Initialize the video subsystem, optionally specifying a video driver.
driver_name | Initialize a specific driver by name, or NULL for the default video driver. |
This function initializes the video subsystem; setting up a connection to the window manager, etc, and determines the available display modes and pixel formats, but does not initialize a window or graphics mode.
Definition at line 406 of file SDL_video.c.
References SDL_VideoDevice::accelerated, SDL_VideoDevice::accum_alpha_size, SDL_VideoDevice::accum_blue_size, SDL_VideoDevice::accum_green_size, SDL_VideoDevice::accum_red_size, SDL_VideoDevice::alpha_size, SDL_VideoDevice::blue_size, SDL_VideoDevice::buffer_size, VideoBootStrap::create, SDL_VideoDevice::CreateWindowFramebuffer, SDL_VideoDevice::current_glctx_tls, SDL_VideoDevice::current_glwin_tls, SDL_VideoDevice::depth_size, SDL_VideoDevice::DestroyWindowFramebuffer, SDL_VideoDevice::dll_handle, SDL_VideoDevice::double_buffer, SDL_VideoDevice::driver_loaded, SDL_VideoDevice::flags, SDL_VideoDevice::gl_config, SDL_VideoDevice::green_size, i, SDL_VideoDevice::major_version, SDL_VideoDevice::minor_version, SDL_VideoDevice::multisamplebuffers, SDL_VideoDevice::multisamplesamples, SDL_VideoDevice::name, VideoBootStrap::name, SDL_VideoDevice::next_object_id, NULL, SDL_VideoDevice::num_displays, SDL_VideoDevice::profile_mask, SDL_VideoDevice::red_size, SDL_VideoDevice::retained_backing, SDL_CreateWindowTexture(), SDL_DestroyWindowTexture(), SDL_getenv(), SDL_GL_CONTEXT_PROFILE_ES, SDL_HasScreenKeyboardSupport(), SDL_INIT_EVENTS, SDL_InitSubSystem(), SDL_InitTicks(), SDL_KeyboardInit(), SDL_MouseInit(), SDL_SetError(), SDL_StartTextInput(), SDL_strlen(), SDL_strncasecmp(), SDL_TLSCreate(), SDL_TouchInit(), SDL_UpdateWindowTexture(), SDL_VideoQuit(), SDL_VideoDevice::share_with_current_context, ShouldUseTextureFramebuffer(), SDL_VideoDevice::stencil_size, SDL_VideoDevice::stereo, SDL_VideoDevice::UpdateWindowFramebuffer, and SDL_VideoDevice::VideoInit.
Referenced by SDL_CreateWindow(), SDL_InitSubSystem(), and SDLTest_CommonInit().
Shuts down the video subsystem.
This function closes all windows, and restores the original video mode.
Definition at line 2265 of file SDL_video.c.
References SDL_VideoDevice::clipboard_text, SDL_VideoDisplay::desktop_mode, display, SDL_VideoDisplay::display_modes, SDL_VideoDevice::displays, SDL_DisplayMode::driverdata, SDL_VideoDisplay::driverdata, SDL_VideoDevice::free, i, j, SDL_VideoDisplay::name, NULL, SDL_VideoDisplay::num_display_modes, SDL_VideoDevice::num_displays, SDL_DestroyWindow(), SDL_EnableScreenSaver(), SDL_free(), SDL_INIT_EVENTS, SDL_KeyboardQuit(), SDL_MouseQuit(), SDL_QuitSubSystem(), SDL_TouchQuit(), SDL_VideoDevice::VideoQuit, and SDL_VideoDevice::windows.
Referenced by SDL_QuitSubSystem(), SDL_VideoInit(), and SDLTest_CommonQuit().