svn merge -r38300:38400 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / intern / ghost / intern / GHOST_DisplayManagerSDL.h
1 /*
2  * $Id: GHOST_DisplayManagerSDL.h 38349 2011-07-13 00:49:22Z gsrb3d $
3  * ***** BEGIN GPL LICENSE BLOCK *****
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  * Contributor(s): Campbell Barton
20  *
21  * ***** END GPL LICENSE BLOCK *****
22  */
23
24 /** \file ghost/intern/GHOST_DisplayManagerSDL.h
25  *  \ingroup GHOST
26  * Declaration of GHOST_DisplayManagerSDL class.
27  */
28
29 #ifndef _GHOST_DISPLAY_MANAGER_SDL_H_
30 #define _GHOST_DISPLAY_MANAGER_SDL_H_
31
32 #include "GHOST_DisplayManager.h"
33
34 extern "C" {
35         #include "SDL.h"
36 }
37
38 #if !SDL_VERSION_ATLEAST(1, 3, 0)
39 #  error "SDL 1.3 or newer is needed to build with Ghost"
40 #endif
41
42 class GHOST_SystemSDL;
43
44 class GHOST_DisplayManagerSDL : public GHOST_DisplayManager
45 {
46 public:
47         GHOST_DisplayManagerSDL(GHOST_SystemSDL *system);
48
49         GHOST_TSuccess
50         getNumDisplays(GHOST_TUns8& numDisplays);
51
52         GHOST_TSuccess
53         getNumDisplaySettings(GHOST_TUns8 display,
54                               GHOST_TInt32& numSettings);
55
56         GHOST_TSuccess
57         getDisplaySetting(GHOST_TUns8 display,
58                           GHOST_TInt32 index,
59                           GHOST_DisplaySetting& setting);
60
61         GHOST_TSuccess
62         getCurrentDisplaySetting(GHOST_TUns8 display,
63                                  GHOST_DisplaySetting& setting);
64
65         GHOST_TSuccess
66         setCurrentDisplaySetting(GHOST_TUns8 display,
67                                  const GHOST_DisplaySetting& setting);
68
69 private :
70         GHOST_SystemSDL * m_system;
71 };
72
73 #endif /* _GHOST_DISPLAY_MANAGER_SDL_H_ */