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