annotate include/SDL_hints.h @ 5267:b530ef003506

Happy 2011! :)
author Sam Lantinga <slouken@libsdl.org>
date Fri, 11 Feb 2011 22:37:15 -0800
parents ce4f91138031
children 3c94c559f5c2
rev   line source
5192
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DihintsMedia Layer
5267
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5238
diff changeset
3 Copyright (C) 1997-2011 Sam Lantinga
5192
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 Lesser General Public License for more details.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 /**
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 * \file SDL_hints.h
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 * Official documentation for SDL configuration variables
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28 * This file contains functions to set and get configuration hints,
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 * as well as listing each of them alphabetically.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 * The convention for naming hints is SDL_HINT_X, where "SDL_X" is
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32 * the environment variable that can be used to override the default.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 * In general these hints are just that - they may or may not be
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35 * supported or applicable on any given platform, but they provide
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36 * a way for an application or user to give the library a hint as
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 * to how they would like the library to work.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40 #ifndef _SDL_hints_h
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
41 #define _SDL_hints_h
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43 #include "SDL_stdinc.h"
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45 #include "begin_code.h"
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 /* Set up for C function definitions, even when using C++ */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47 #ifdef __cplusplus
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 /* *INDENT-OFF* */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49 extern "C" {
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50 /* *INDENT-ON* */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
51 #endif
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52
5193
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
53 /**
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
54 * \brief A variable controlling how 3D acceleration is used to accelerate the SDL 1.2 screen surface.
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
55 *
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
56 * SDL can try to accelerate the SDL 1.2 screen surface by using streaming
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
57 * textures with a 3D rendering engine. This variable controls whether and
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
58 * how this is done.
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
59 *
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
60 * This variable can be set to the following values:
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
61 * "0" - Disable 3D acceleration
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
62 * "1" - Enable 3D acceleration, using the default renderer.
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
63 * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
64 *
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
65 * By default SDL tries to make a best guess for each platform whether
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
66 * to use acceleration or not.
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
67 */
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
68 #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
5192
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
69
5195
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
70 /**
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
71 * \brief A variable specifying which render driver to use.
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
72 *
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
73 * If the application doesn't pick a specific renderer to use, this variable
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
74 * specifies the name of the preferred renderer. If the preferred renderer
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
75 * can't be initialized, the normal default renderer is used.
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
76 *
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
77 * This variable is case insensitive and can be set to the following values:
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
78 * "direct3d"
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
79 * "opengl"
5238
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
80 * "opengles2"
5195
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
81 * "opengles"
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
82 * "software"
5238
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
83 *
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
84 * The default varies by platform, but it's the first one in the list that
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
85 * is available on the current platform.
5195
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
86 */
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
87 #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
88
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
89 /**
5238
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
90 * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
91 *
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
92 * This variable can be set to the following values:
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
93 * "0" - Disable shaders
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
94 * "1" - Enable shaders
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
95 *
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
96 * By default shaders are used if OpenGL supports them.
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
97 */
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
98 #define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
99
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5203
diff changeset
100 /**
5195
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
101 * \brief A variable controlling whether updates to the SDL 1.2 screen surface should be synchronized with the vertical refresh, to avoid tearing.
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
102 *
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
103 * This variable can be set to the following values:
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
104 * "0" - Disable vsync
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
105 * "1" - Enable vsync
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
106 *
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
107 * By default SDL does not sync screen surface updates with vertical refresh.
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
108 */
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
109 #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5193
diff changeset
110
5192
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
111
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
112 /**
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
113 * \brief An enumeration of hint priorities
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
114 */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
115 typedef enum
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
116 {
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
117 SDL_HINT_DEFAULT,
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
118 SDL_HINT_NORMAL,
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
119 SDL_HINT_OVERRIDE
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
120 } SDL_HintPriority;
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
121
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
122
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
123 /**
5203
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
124 * \brief Set a hint with a specific priority
5192
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
125 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
126 * The priority controls the behavior when setting a hint that already
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
127 * has a value. Hints will replace existing hints of their priority and
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
128 * lower. Environment variables are considered to have override priority.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
129 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
130 * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
131 */
5203
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
132 extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
133 const char *value,
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
134 SDL_HintPriority priority);
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
135
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
136 /**
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
137 * \brief Set a hint with normal priority
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
138 *
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
139 * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
140 */
5192
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
141 extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
5203
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
142 const char *value);
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5195
diff changeset
143
5192
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
144
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
145 /**
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
146 * \brief Get a hint
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
147 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
148 * \return The string value of a hint variable.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
149 */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
150 extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
151
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
152 /**
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
153 * \brief Clear all hints
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
154 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
155 * This function is called during SDL_Quit() to free stored hints.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
156 */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
157 extern DECLSPEC void SDLCALL SDL_ClearHints();
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
158
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
159
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
160 /* Ends C function definitions when using C++ */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
161 #ifdef __cplusplus
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
162 /* *INDENT-OFF* */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
163 }
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
164 /* *INDENT-ON* */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
165 #endif
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
166 #include "close_code.h"
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
167
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
168 #endif /* _SDL_hints_h */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
169
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
170 /* vi: set ts=4 sw=4 expandtab: */