DEADSOFTWARE

migrating from PanelIDs to panel GUIDs; part two
[d2df-sdl.git] / src / lib / sdl2 / sdlhints.inc
1 {// from "SDL_hints.h"
2 /*
3 Simple DirectMedia Layer
4 Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
6 This software is provided 'as-is', without any express or implied
7 warranty. In no event will the authors be held liable for any damages
8 arising from the use of this software.
10 Permission is granted to anyone to use this software for any purpose,
11 including commercial applications, and to alter it and redistribute it
12 freely, subject to the following restrictions:
14 1. The origin of this software must not be misrepresented; you must not
15 claim that you wrote the original software. If you use this software
16 in a product, an acknowledgment in the product documentation would be
17 appreciated but is not required.
18 2. Altered source versions must be plainly marked as such, and must not be
19 misrepresented as being the original software.
20 3. This notice may not be removed or altered from any source distribution.
21 */
23 /**
24 * \file SDL_hints.h
25 *
26 * Official documentation for SDL configuration variables
27 *
28 * This file contains functions to set and get configuration hints,
29 * as well as listing each of them alphabetically.
30 *
31 * The convention for naming hints is SDL_HINT_X, where "SDL_X" is
32 * the environment variable that can be used to override the default.
33 *
34 * In general these hints are just that - they may or may not be
35 * supported or applicable on any given platform, but they provide
36 * a way for an application or user to give the library a hint as
37 * to how they would like the library to work.
38 */
39 }
42 (**
43 * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
44 *
45 * SDL can try to accelerate the SDL screen surface by using streaming
46 * textures with a 3D rendering engine. This variable controls whether and
47 * how this is done.
48 *
49 * This variable can be set to the following values:
50 * "0" - Disable 3D acceleration
51 * "1" - Enable 3D acceleration, using the default renderer.
52 * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
53 *
54 * By default SDL tries to make a best guess for each platform whether
55 * to use acceleration or not.
56 *)
57 const
58 SDL_HINT_FRAMEBUFFER_ACCELERATION = 'SDL_FRAMEBUFFER_ACCELERATION';
60 {/**
61 * \brief A variable specifying which render driver to use.
62 *
63 * If the application doesn't pick a specific renderer to use, this variable
64 * specifies the name of the preferred renderer. If the preferred renderer
65 * can't be initialized, the normal default renderer is used.
66 *
67 * This variable is case insensitive and can be set to the following values:
68 * "direct3d"
69 * "opengl"
70 * "opengles2"
71 * "opengles"
72 * "software"
73 *
74 * The default varies by platform, but it's the first one in the list that
75 * is available on the current platform.
76 */}
77 SDL_HINT_RENDER_DRIVER = 'SDL_RENDER_DRIVER';
79 {/**
80 * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
81 *
82 * This variable can be set to the following values:
83 * "0" - Disable shaders
84 * "1" - Enable shaders
85 *
86 * By default shaders are used if OpenGL supports them.
87 */}
88 SDL_HINT_RENDER_OPENGL_SHADERS = 'SDL_RENDER_OPENGL_SHADERS';
90 {**
91 * \brief A variable controlling whether the Direct3D device is initialized for thread-safe operations.
92 *
93 * This variable can be set to the following values:
94 * "0" - Thread-safety is not enabled (faster)
95 * "1" - Thread-safety is enabled
96 *
97 * By default the Direct3D device is created with thread-safety disabled.
98 *}
99 SDL_HINT_RENDER_DIRECT3D_THREADSAFE = 'SDL_RENDER_DIRECT3D_THREADSAFE';
101 {**
102 * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
104 * This variable does not have any effect on the Direct3D 9 based renderer.
106 * This variable can be set to the following values:
107 * "0" - Disable Debug Layer use
108 * "1" - Enable Debug Layer use
110 * By default, SDL does not use Direct3D Debug Layer.
111 *}
112 SDL_HINT_RENDER_DIRECT3D11_DEBUG = 'SDL_HINT_RENDER_DIRECT3D11_DEBUG';
114 {/**
115 * \brief A variable controlling the scaling quality
117 * This variable can be set to the following values:
118 * "0" or "nearest" - Nearest pixel sampling
119 * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D)
120 * "2" or "best" - Currently this is the same as "linear"
122 * By default nearest pixel sampling is used
123 */}
124 SDL_HINT_RENDER_SCALE_QUALITY = 'SDL_RENDER_SCALE_QUALITY';
126 {/**
127 * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.
129 * This variable can be set to the following values:
130 * "0" - Disable vsync
131 * "1" - Enable vsync
133 * By default SDL does not sync screen surface updates with vertical refresh.
134 */}
135 SDL_HINT_RENDER_VSYNC = 'SDL_RENDER_VSYNC';
137 {/**
138 * \brief A variable controlling whether the screensaver is enabled.
140 * This variable can be set to the following values:
141 * "0" - Disable screensaver
142 * "1" - Enable screensaver
144 * By default SDL will disable the screensaver.
145 */}
146 SDL_HINT_VIDEO_ALLOW_SCREENSAVER = 'SDL_VIDEO_ALLOW_SCREENSAVER';
148 {/**
149 * \brief A variable controlling whether the X11 VidMode extension should be used.
151 * This variable can be set to the following values:
152 * "0" - Disable XVidMode
153 * "1" - Enable XVidMode
155 * By default SDL will use XVidMode if it is available.
156 */}
157 SDL_HINT_VIDEO_X11_XVIDMODE = 'SDL_VIDEO_X11_XVIDMODE';
159 {/**
160 * \brief A variable controlling whether the X11 Xinerama extension should be used.
162 * This variable can be set to the following values:
163 * "0" - Disable Xinerama
164 * "1" - Enable Xinerama
166 * By default SDL will use Xinerama if it is available.
167 */}
168 SDL_HINT_VIDEO_X11_XINERAMA = 'SDL_VIDEO_X11_XINERAMA';
170 {/**
171 * \brief A variable controlling whether the X11 XRandR extension should be used.
173 * This variable can be set to the following values:
174 * "0" - Disable XRandR
175 * "1" - Enable XRandR
177 * By default SDL will not use XRandR because of window manager issues.
178 */}
179 SDL_HINT_VIDEO_X11_XRANDR = 'SDL_VIDEO_X11_XRANDR';
181 {/**
182 * \brief A variable controlling whether grabbing input grabs the keyboard
184 * This variable can be set to the following values:
185 * "0" - Grab will affect only the mouse
186 * "1" - Grab will affect mouse and keyboard
188 * By default SDL will not grab the keyboard so system shortcuts still work.
189 */}
190 SDL_HINT_GRAB_KEYBOARD = 'SDL_GRAB_KEYBOARD';
192 {/**
193 * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
195 * This variable can be set to the following values:
196 * "0" - Relative mouse mode uses raw input
197 * "1" - Relative mouse mode uses mouse warping
199 * By default SDL will use raw input for relative mouse mode
200 */}
201 SDL_HINT_MOUSE_RELATIVE_MODE_WARP = 'SDL_MOUSE_RELATIVE_MODE_WARP';
203 {/**
204 * \brief Minimize your SDL_Window if it loses key focus when in Fullscreen mode. Defaults to true.
206 */}
207 SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS = 'SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS';
210 {/**
211 * \brief A variable controlling whether the idle timer is disabled on iOS.
213 * When an iOS app does not receive touches for some time, the screen is
214 * dimmed automatically. For games where the accelerometer is the only input
215 * this is problematic. This functionality can be disabled by setting this
216 * hint.
218 * This variable can be set to the following values:
219 * "0" - Enable idle timer
220 * "1" - Disable idle timer
221 */}
222 SDL_HINT_IDLE_TIMER_DISABLED = 'SDL_IOS_IDLE_TIMER_DISABLED';
224 {/**
225 * \brief A variable controlling which orientations are allowed on iOS.
227 * In some circumstances it is necessary to be able to explicitly control
228 * which UI orientations are allowed.
230 * This variable is a space delimited list of the following values:
231 * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
232 */}
233 SDL_HINT_ORIENTATIONS = 'SDL_IOS_ORIENTATIONS';
235 {/**
236 * \brief A variable controlling whether an Android built-in accelerometer should be
237 * listed as a joystick device, rather than listing actual joysticks only.
239 * This variable can be set to the following values:
240 * "0" - List only real joysticks and accept input from them
241 * "1" - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default).
242 */}
243 SDL_HINT_ACCELEROMETER_AS_JOYSTICK = 'SDL_ACCELEROMETER_AS_JOYSTICK';
245 {/**
246 * \brief A variable that lets you disable the detection and use of Xinput gamepad devices
248 * The variable can be set to the following values:
249 * "0" - Disable XInput timer (only uses direct input)
250 * "1" - Enable XInput timer (the default)
251 */}
252 SDL_HINT_XINPUT_ENABLED = 'SDL_XINPUT_ENABLED';
255 {/**
256 * \brief A variable that lets you manually hint extra gamecontroller db entries
258 * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
260 * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
261 * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
262 */}
263 SDL_HINT_GAMECONTROLLERCONFIG = 'SDL_GAMECONTROLLERCONFIG';
266 {/**
267 * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
269 * The variable can be set to the following values:
270 * "0" - Disable joystick & gamecontroller input events when the
271 * application is in the background.
272 * "1" - Enable joystick & gamecontroller input events when the
273 * application is in the backgroumd.
275 * The default value is "0". This hint may be set at any time.
276 */}
277 SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS = 'SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS';
280 {/**
281 * \brief If set to 0 then never set the top most bit on a SDL Window, even if the video mode expects it.
282 * This is a debugging aid for developers and not expected to be used by end users. The default is "1"
284 * This variable can be set to the following values:
285 * "0" - don't allow topmost
286 * "1" - allow topmost
287 */}
288 SDL_HINT_ALLOW_TOPMOST = 'SDL_ALLOW_TOPMOST';
291 {/**
292 * \brief A variable that controls the timer resolution, in milliseconds.
294 * The higher resolution the timer, the more frequently the CPU services
295 * timer interrupts, and the more precise delays are, but this takes up
296 * power and CPU time. This hint is only used on Windows 7 and earlier.
298 * See this blog post for more information:
299 * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
301 * If this variable is set to "0", the system timer resolution is not set.
303 * The default value is "1". This hint may be set at any time.
304 */}
305 SDL_HINT_TIMER_RESOLUTION = 'SDL_TIMER_RESOLUTION';
307 {**
308 * \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac)
309 *}
310 SDL_HINT_VIDEO_HIGHDPI_DISABLED = 'SDL_VIDEO_HIGHDPI_DISABLED';
312 {**
313 * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
315 * If present, holding ctrl while left clicking will generate a right click
316 * event when on Mac.
317 *}
318 SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK = 'SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK';
320 {**
321 * \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
323 * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
324 * can use two different sets of binaries, those compiled by the user from source
325 * or those provided by the Chrome browser. In the later case, these binaries require
326 * that SDL loads a DLL providing the shader compiler.
328 * This variable can be set to the following values:
329 * "d3dcompiler_46.dll" - default, best for Vista or later.
330 * "d3dcompiler_43.dll" - for XP support.
331 * "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
333 *}
334 SDL_HINT_VIDEO_WIN_D3DCOMPILER = 'SDL_VIDEO_WIN_D3DCOMPILER';
336 {/**
337 * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
339 * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
340 * SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
341 * created SDL_Window:
343 * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
344 * needed for example when sharing an OpenGL context across multiple windows.
346 * 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
347 * OpenGL rendering.
349 * This variable can be set to the following values:
350 * The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
351 * share a pixel format with.
352 */}
353 SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT = 'SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT';
355 {**
356 * \brief A URL to a WinRT app's privacy policy
358 * All network-enabled WinRT apps must make a privacy policy available to its
359 * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
360 * be available in the Windows Settings charm, as accessed from within the app.
361 * SDL provides code to add a URL-based link there, which can point to the app's
362 * privacy policy.
364 * To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
365 * before calling any SDL_Init functions. The contents of the hint should
366 * be a valid URL. For example, "http://www.example.com".
368 * The default value is "", which will prevent SDL from adding a privacy policy
369 * link to the Settings charm. This hint should only be set during app init.
371 * The label text of an app's "Privacy Policy" link may be customized via another
372 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
374 * Please note that on Windows Phone, Microsoft does not provide standard UI
375 * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
376 * will not get used on that platform. Network-enabled phone apps should display
377 * their privacy policy through some other, in-app means.
378 *}
379 SDL_HINT_WINRT_PRIVACY_POLICY_URL = 'SDL_HINT_WINRT_PRIVACY_POLICY_URL';
381 {**
382 * \brief Label text for a WinRT app's privacy policy link
384 * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
385 * Microsoft mandates that this policy be available via the Windows Settings charm.
386 * SDL provides code to add a link there, with it's label text being set via the
387 * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
389 * Please note that a privacy policy's contents are not set via this hint. A separate
390 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
391 * policy.
393 * The contents of this hint should be encoded as a UTF8 string.
395 * The default value is "Privacy Policy". This hint should only be set during app
396 * initialization, preferably before any calls to SDL_Init.
398 * For additional information on linking to a privacy policy, see the documentation for
399 * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
400 *}
401 SDL_HINT_WINRT_PRIVACY_POLICY_LABEL = 'SDL_HINT_WINRT_PRIVACY_POLICY_LABEL';
403 {**
404 * \brief If set to 1, back button press events on Windows Phone 8+ will be marked as handled.
406 * TODO, WinRT: document SDL_HINT_WINRT_HANDLE_BACK_BUTTON need and use
407 * For now, more details on why this is needed can be found at the
408 * beginning of the following web page:
409 * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
410 *}
411 SDL_HINT_WINRT_HANDLE_BACK_BUTTON = 'SDL_HINT_WINRT_HANDLE_BACK_BUTTON';
413 {**
414 * \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
416 * This hint only applies to Mac OS X.
418 * The variable can be set to the following values:
419 * "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
420 * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
421 * button on their titlebars).
422 * "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
423 * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
424 * button on their titlebars.
426 * The default value is "1". Spaces are disabled regardless of this hint if
427 * the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
428 * any windows are created.
429 *}
430 SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES = 'SDL_VIDEO_MAC_FULLSCREEN_SPACES';
433 {/**
434 * \brief An enumeration of hint priorities
435 */}
436 type
437 SDL_HintPriority = (SDL_HINT_DEFAULT, SDL_HINT_NORMAL, SDL_HINT_OVERRIDE);
440 {/**
441 * \brief Set a hint with a specific priority
443 * The priority controls the behavior when setting a hint that already
444 * has a value. Hints will replace existing hints of their priority and
445 * lower. Environment variables are considered to have override priority.
447 * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
448 */}
449 function SDL_SetHintWithPriority( const name: PChar; const value: PChar; priority: SDL_HintPriority) : boolean; cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetHintWithPriority' {$ENDIF} {$ENDIF};
451 // extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
452 // const char *value,
453 // SDL_HintPriority priority);
454 {/**
455 * \brief Set a hint with normal priority
457 * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
458 */}
459 function SDL_SetHint( const name: PChar; const value: PChar) : boolean; cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetHint' {$ENDIF} {$ENDIF};
461 //extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
462 // const char *value);
464 {/**
465 * \brief Get a hint
467 * \return The string value of a hint variable.
468 */}
469 function SDL_GetHint( const name: PChar): PChar; cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetHint' {$ENDIF} {$ENDIF};
470 //extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
473 {/**
474 * \brief Add a function to watch a particular hint
476 * \param name The hint to watch
477 * \param callback The function to call when the hint value changes
478 * \param userdata A pointer to pass to the callback function
479 */}
480 type
481 TSDL_HintCallback = procedure(userdata: Pointer; const name: PChar; const oldValue: PChar; const newValue: PChar);
482 procedure SDL_AddHintCallback(const name: PChar; callback: TSDL_HintCallback; userdata: Pointer); cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AddHintCallback' {$ENDIF} {$ENDIF};
483 //typedef void (*SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
484 //extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
485 // SDL_HintCallback callback,
486 // void *userdata);
488 {/**
489 * \brief Remove a function watching a particular hint
491 * \param name The hint being watched
492 * \param callback The function being called when the hint value changes
493 * \param userdata A pointer being passed to the callback function
494 */}
495 procedure SDL_DelHintCallback(const name: PChar; callback: TSDL_HintCallback; userdata: Pointer); cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DelHintCallback' {$ENDIF} {$ENDIF};
496 //extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
497 // SDL_HintCallback callback,
498 // void *userdata);
500 {/**
501 * \brief Clear all hints
503 * This function is called during SDL_Quit() to free stored hints.
504 */}
505 //extern DECLSPEC void SDLCALL SDL_ClearHints(void);
506 procedure SDL_ClearHints(); cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ClearHints' {$ENDIF} {$ENDIF};