My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SDL_hints.h
Go to the documentation of this file.
1 /*
2  Simple DirectMedia Layer
3  Copyright (C) 1997-2014 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 
39 #ifndef _SDL_hints_h
40 #define _SDL_hints_h
41 
42 #include "SDL_stdinc.h"
43 
44 #include "begin_code.h"
45 /* Set up for C function definitions, even when using C++ */
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
65 #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
66 
84 #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
85 
95 #define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
96 
106 #define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
107 
119 #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_HINT_RENDER_DIRECT3D11_DEBUG"
120 
131 #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
132 
142 #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
143 
153 #define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
154 
164 #define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
165 
175 #define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
176 
186 #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
187 
197 #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
198 
208 #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
209 
214 #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
215 
228 #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
229 
239 #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
240 
249 #define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
250 
251 
259 #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
260 
261 
270 #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
271 
272 
284 #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
285 
286 
295 #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
296 
297 
312 #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
313 
314 
318 #define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
319 
326 #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
327 
342 #define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
343 
361 #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
362 
363 /*
364  * \brief A URL to a WinRT app's privacy policy
365  *
366  * All network-enabled WinRT apps must make a privacy policy available to its
367  * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
368  * be available in the Windows Settings charm, as accessed from within the app.
369  * SDL provides code to add a URL-based link there, which can point to the app's
370  * privacy policy.
371  *
372  * To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
373  * before calling any SDL_Init functions. The contents of the hint should
374  * be a valid URL. For example, "http://www.example.com".
375  *
376  * The default value is "", which will prevent SDL from adding a privacy policy
377  * link to the Settings charm. This hint should only be set during app init.
378  *
379  * The label text of an app's "Privacy Policy" link may be customized via another
380  * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
381  *
382  * Please note that on Windows Phone, Microsoft does not provide standard UI
383  * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
384  * will not get used on that platform. Network-enabled phone apps should display
385  * their privacy policy through some other, in-app means.
386  */
387 #define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_HINT_WINRT_PRIVACY_POLICY_URL"
388 
408 #define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_HINT_WINRT_PRIVACY_POLICY_LABEL"
409 
417 #define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_HINT_WINRT_HANDLE_BACK_BUTTON"
418 
436 #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
437 
438 
442 typedef enum
443 {
444  SDL_HINT_DEFAULT,
445  SDL_HINT_NORMAL,
446  SDL_HINT_OVERRIDE
448 
449 
459 extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
460  const char *value,
461  SDL_HintPriority priority);
462 
468 extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
469  const char *value);
470 
476 extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
477 
485 typedef void (*SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
486 extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
487  SDL_HintCallback callback,
488  void *userdata);
489 
497 extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
498  SDL_HintCallback callback,
499  void *userdata);
500 
506 extern DECLSPEC void SDLCALL SDL_ClearHints(void);
507 
508 
509 /* Ends C function definitions when using C++ */
510 #ifdef __cplusplus
511 }
512 #endif
513 #include "close_code.h"
514 
515 #endif /* _SDL_hints_h */
516 
517 /* vi: set ts=4 sw=4 expandtab: */
typedef void(SDLCALL *SDL_AudioCallback)(void *userdata
DECLSPEC void SDLCALL SDL_ClearHints(void)
Clear all hints.
void(* SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue)
Add a function to watch a particular hint.
Definition: SDL_hints.h:485
DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
Remove a function watching a particular hint.
DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name, const char *value)
Set a hint with normal priority.
SDL_HintPriority
An enumeration of hint priorities.
Definition: SDL_hints.h:442
DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority)
Set a hint with a specific priority.
DECLSPEC const char *SDLCALL SDL_GetHint(const char *name)
Get a hint.