module lib.sdl2.hints

Code Map

module lib.sdl2.hints;


//! \brief A variable controlling how 3D acceleration is used to
//! accelerate the SDL screen surface.
enum SDL_HINT_FRAMEBUFFER_ACCELERATION;
//! \brief A variable specifying which render driver to use.
enum SDL_HINT_RENDER_DRIVER;
//! \brief A variable controlling whether the OpenGL render driver uses
//! shaders if they are available.
enum SDL_HINT_RENDER_OPENGL_SHADERS;
//! \brief A variable controlling the scaling quality
enum SDL_HINT_RENDER_SCALE_QUALITY;
//! \brief A variable controlling whether updates to the SDL screen
//! surface should be synchronized with the vertical refresh, to avoid
//! tearing.
enum SDL_HINT_RENDER_VSYNC;
//! \brief A variable controlling whether the X11 VidMode extension should
//! be used.
enum SDL_HINT_VIDEO_X11_XVIDMODE;
//! \brief A variable controlling whether the X11 Xinerama extension
//! should be used.
enum SDL_HINT_VIDEO_X11_XINERAMA;
//! \brief A variable controlling whether the X11 XRandR extension should
//! be used.
enum SDL_HINT_VIDEO_X11_XRANDR;
//! \brief A variable controlling whether grabbing input grabs the
//! keyboard
enum SDL_HINT_GRAB_KEYBOARD;
//! \brief Minimize your SDL_Window if it loses key focus when in
//! Fullscreen mode. Defaults to true.
enum SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS;
//! \brief A variable controlling whether the idle timer is disabled on
//! iOS.
enum SDL_HINT_IDLE_TIMER_DISABLED;
//! \brief A variable controlling which orientations are allowed on iOS.
enum SDL_HINT_ORIENTATIONS;
//! \brief A variable that lets you disable the detection and use of
//! Xinput gamepad devices
enum SDL_HINT_XINPUT_ENABLED;
//! \brief A variable that lets you manually hint extra gamecontroller db
//! entries
enum SDL_HINT_GAMECONTROLLERCONFIG;
//! \brief A variable that lets you enable joystick (and gamecontroller)
//! events even when your app is in the background.
enum SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS;
//! \brief If set to 0 then never set the top most bit on a SDL Window,
//! even if the video mode expects it. This is a debugging aid for
//! developers and not expected to be used by end users. The default is
//! "1"
enum SDL_HINT_ALLOW_TOPMOST;
enum SDL_HINT_DEFAULT;
enum SDL_HINT_NORMAL;
enum SDL_HINT_OVERRIDE;

//! \brief An enumeration of hint priorities
alias SDL_HintPriority = i32;

//! \brief Set a hint with a specific priority
fn SDL_SetHintWithPriority(name: const(const(char)*), value: const(const(char)*), priority: SDL_HintPriority) SDL_bool;
//! \brief Set a hint with normal priority
fn SDL_SetHint(name: const(const(char)*), value: const(const(char)*)) SDL_bool;
//! \brief Get a hint
fn SDL_GetHint(name: const(const(char)*)) char*;
//! \brief Get a hint
fn SDL_GetHintBoolean(name: const(const(char)*), default_value: SDL_bool) SDL_bool;
//! \brief Clear all hints
fn SDL_ClearHints();
enum SDL_HINT_FRAMEBUFFER_ACCELERATION

\brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.

SDL can try to accelerate the SDL screen surface by using streaming textures with a 3D rendering engine. This variable controls whether and how this is done.

This variable can be set to the following values: "0" - Disable 3D acceleration "1" - Enable 3D acceleration, using the default renderer. "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)

By default SDL tries to make a best guess for each platform whether to use acceleration or not.

enum SDL_HINT_RENDER_DRIVER

\brief A variable specifying which render driver to use.

If the application doesn't pick a specific renderer to use, this variable specifies the name of the preferred renderer. If the preferred renderer can't be initialized, the normal default renderer is used.

This variable is case insensitive and can be set to the following values: "direct3d" "opengl" "opengles2" "opengles" "software"

The default varies by platform, but it's the first one in the list that is available on the current platform.

enum SDL_HINT_RENDER_OPENGL_SHADERS

\brief A variable controlling whether the OpenGL render driver uses shaders if they are available.

This variable can be set to the following values: "0" - Disable shaders "1" - Enable shaders

By default shaders are used if OpenGL supports them.

enum SDL_HINT_RENDER_SCALE_QUALITY

\brief A variable controlling the scaling quality

This variable can be set to the following values: "0" or "nearest" - Nearest pixel sampling "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D) "2" or "best" - Anisotropic filtering (supported by Direct3D)

By default nearest pixel sampling is used

enum SDL_HINT_RENDER_VSYNC

\brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.

This variable can be set to the following values: "0" - Disable vsync "1" - Enable vsync

By default SDL does not sync screen surface updates with vertical refresh.

enum SDL_HINT_VIDEO_X11_XVIDMODE

\brief A variable controlling whether the X11 VidMode extension should be used.

This variable can be set to the following values: "0" - Disable XVidMode "1" - Enable XVidMode

By default SDL will use XVidMode if it is available.

enum SDL_HINT_VIDEO_X11_XINERAMA

\brief A variable controlling whether the X11 Xinerama extension should be used.

This variable can be set to the following values: "0" - Disable Xinerama "1" - Enable Xinerama

By default SDL will use Xinerama if it is available.

enum SDL_HINT_VIDEO_X11_XRANDR

\brief A variable controlling whether the X11 XRandR extension should be used.

This variable can be set to the following values: "0" - Disable XRandR "1" - Enable XRandR

By default SDL will not use XRandR because of window manager issues.

enum SDL_HINT_GRAB_KEYBOARD

\brief A variable controlling whether grabbing input grabs the keyboard

This variable can be set to the following values: "0" - Grab will affect only the mouse "1" - Grab will affect mouse and keyboard

By default SDL will not grab the keyboard so system shortcuts still work.

enum SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS

\brief Minimize your SDL_Window if it loses key focus when in Fullscreen mode. Defaults to true.

enum SDL_HINT_IDLE_TIMER_DISABLED

\brief A variable controlling whether the idle timer is disabled on iOS.

When an iOS app does not receive touches for some time, the screen is dimmed automatically. For games where the accelerometer is the only input this is problematic. This functionality can be disabled by setting this hint.

This variable can be set to the following values: "0" - Enable idle timer "1" - Disable idle timer

enum SDL_HINT_ORIENTATIONS

\brief A variable controlling which orientations are allowed on iOS.

In some circumstances it is necessary to be able to explicitly control which UI orientations are allowed.

This variable is a space delimited list of the following values: "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"

enum SDL_HINT_XINPUT_ENABLED

\brief A variable that lets you disable the detection and use of Xinput gamepad devices

The variable can be set to the following values: "0" - Disable XInput timer (only uses direct input) "1" - Enable XInput timer (the default)

enum SDL_HINT_GAMECONTROLLERCONFIG

\brief A variable that lets you manually hint extra gamecontroller db entries

The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h

This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()

enum SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS

\brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.

The default value is "0".

The variable can be set to the following values: "0" - Disable joystick & gamecontroller input events when the application is in the background. "1" - Enable joystick & gamecontroller input events when the application is in the backgroumd.

enum SDL_HINT_ALLOW_TOPMOST

\brief If set to 0 then never set the top most bit on a SDL Window, even if the video mode expects it. This is a debugging aid for developers and not expected to be used by end users. The default is "1"

This variable can be set to the following values: "0" - don't allow topmost "1" - allow topmost

alias SDL_HintPriority

\brief An enumeration of hint priorities

fn SDL_SetHintWithPriority(name: const(const(char)*), value: const(const(char)*), priority: SDL_HintPriority) SDL_bool

\brief Set a hint with a specific priority

The priority controls the behavior when setting a hint that already has a value. Hints will replace existing hints of their priority and lower. Environment variables are considered to have override priority.

\return SDL_TRUE if the hint was set, SDL_FALSE otherwise

fn SDL_SetHint(name: const(const(char)*), value: const(const(char)*)) SDL_bool

\brief Set a hint with normal priority

\return SDL_TRUE if the hint was set, SDL_FALSE otherwise

fn SDL_GetHint(name: const(const(char)*)) char*

\brief Get a hint

\return The string value of a hint variable.

fn SDL_GetHintBoolean(name: const(const(char)*), default_value: SDL_bool) SDL_bool

\brief Get a hint

\return The boolean value of a hint variable.

fn SDL_ClearHints()

\brief Clear all hints

This function is called during SDL_Quit() to free stored hints.