include/SDL_hints.h
changeset 5189 6f6a9340fb93
child 5190 82a48f4d65f6
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/include/SDL_hints.h	Sat Feb 05 10:02:39 2011 -0800
     1.3 @@ -0,0 +1,104 @@
     1.4 +/*
     1.5 +    SDL - Simple DihintsMedia Layer
     1.6 +    Copyright (C) 1997-2010 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Lesser General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2.1 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Lesser General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Lesser General Public
    1.19 +    License along with this library; if not, write to the Free Software
    1.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@libsdl.org
    1.24 +*/
    1.25 +
    1.26 +/**
    1.27 + *  \file SDL_hints.h
    1.28 + *  
    1.29 + *  Official documentation for SDL configuration variables
    1.30 + *
    1.31 + *  This file contains functions to set and get configuration hints,
    1.32 + *  as well as listing each of them alphabetically.
    1.33 + *
    1.34 + *  The convention for naming hints is SDL_HINT_X, where "SDL_X" is
    1.35 + *  the environment variable that can be used to override the default.
    1.36 + *
    1.37 + *  In general these hints are just that - they may or may not be
    1.38 + *  supported or applicable on any given platform, but they provide
    1.39 + *  a way for an application or user to give the library a hint as
    1.40 + *  to how they would like the library to work.
    1.41 + */
    1.42 +
    1.43 +#ifndef _SDL_hints_h
    1.44 +#define _SDL_hints_h
    1.45 +
    1.46 +#include "SDL_stdinc.h"
    1.47 +
    1.48 +#include "begin_code.h"
    1.49 +/* Set up for C function definitions, even when using C++ */
    1.50 +#ifdef __cplusplus
    1.51 +/* *INDENT-OFF* */
    1.52 +extern "C" {
    1.53 +/* *INDENT-ON* */
    1.54 +#endif
    1.55 +
    1.56 +
    1.57 +
    1.58 +/**
    1.59 + *  \brief  An enumeration of hint priorities
    1.60 + */
    1.61 +typedef enum
    1.62 +{
    1.63 +    SDL_HINT_DEFAULT,
    1.64 +    SDL_HINT_NORMAL,
    1.65 +    SDL_HINT_OVERRIDE
    1.66 +} SDL_HintPriority;
    1.67 +
    1.68 +
    1.69 +/**
    1.70 + *  \brief Set a hint
    1.71 + *
    1.72 + *  The priority controls the behavior when setting a hint that already
    1.73 + *  has a value.  Hints will replace existing hints of their priority and
    1.74 + *  lower.  Environment variables are considered to have override priority.
    1.75 + * 
    1.76 + *  \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
    1.77 + */
    1.78 +extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
    1.79 +                                             const char *value,
    1.80 +                                             SDL_HintPriority priority);
    1.81 +
    1.82 +/**
    1.83 + *  \brief Get a hint
    1.84 + *  
    1.85 + *  \return The string value of a hint variable.
    1.86 + */
    1.87 +extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
    1.88 +
    1.89 +/**
    1.90 + *  \brief  Clear all hints
    1.91 + *
    1.92 + *  This function is called during SDL_Quit() to free stored hints.
    1.93 + */
    1.94 +extern DECLSPEC void SDLCALL SDL_ClearHints();
    1.95 +
    1.96 +
    1.97 +/* Ends C function definitions when using C++ */
    1.98 +#ifdef __cplusplus
    1.99 +/* *INDENT-OFF* */
   1.100 +}
   1.101 +/* *INDENT-ON* */
   1.102 +#endif
   1.103 +#include "close_code.h"
   1.104 +
   1.105 +#endif /* _SDL_hints_h */
   1.106 +
   1.107 +/* vi: set ts=4 sw=4 expandtab: */