doxygen: add newline after \file
[blender.git] / intern / ghost / intern / GHOST_SystemNULL.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_SystemNULL class.
20  */
21
22 #ifndef __GHOST_SYSTEMNULL_H__
23 #define __GHOST_SYSTEMNULL_H__
24
25 #include "GHOST_System.h"
26 #include "../GHOST_Types.h"
27 #include "GHOST_DisplayManagerNULL.h"
28 #include "GHOST_WindowNULL.h"
29
30 class GHOST_WindowNULL;
31
32 class GHOST_SystemNULL : public GHOST_System {
33 public:
34
35         GHOST_SystemNULL() : GHOST_System() { /* nop */ }
36         ~GHOST_SystemNULL() { /* nop */ }
37         bool processEvents(bool waitForEvent) { return false; }
38         int toggleConsole(int action) { return 0; }
39         GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys& keys) const { return GHOST_kSuccess; }
40         GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const { return GHOST_kSuccess; }
41         GHOST_TUns8 *getClipboard(bool selection) const { return NULL; }
42         void putClipboard(GHOST_TInt8 *buffer, bool selection) const { /* nop */ }
43         GHOST_TUns64 getMilliSeconds() const { return 0; }
44         GHOST_TUns8 getNumDisplays() const { return GHOST_TUns8(1); }
45         GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const { return GHOST_kFailure; }
46         GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) { return GHOST_kFailure; }
47         void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const { /* nop */ }
48         void getAllDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const { /* nop */ }
49         bool supportsNativeDialogs(void) { return false;}
50         GHOST_IContext *createOffscreenContext() { return NULL; }
51         GHOST_TSuccess disposeContext(GHOST_IContext *context) { return GHOST_kFailure; }
52
53         GHOST_TSuccess init() {
54                 GHOST_TSuccess success = GHOST_System::init();
55
56                 if (success) {
57                         m_displayManager = new GHOST_DisplayManagerNULL(this);
58
59                         if (m_displayManager) {
60                                 return GHOST_kSuccess;
61                         }
62                 }
63
64                 return GHOST_kFailure;
65         }
66
67         GHOST_IWindow *createWindow(
68                         const STR_String& title,
69                         GHOST_TInt32 left,
70                         GHOST_TInt32 top,
71                         GHOST_TUns32 width,
72                         GHOST_TUns32 height,
73                         GHOST_TWindowState state,
74                         GHOST_TDrawingContextType type,
75                         GHOST_GLSettings glSettings,
76                         bool exclusive,
77                         const GHOST_TEmbedderWindowID parentWindow)
78         {
79                 return new GHOST_WindowNULL(this, title, left, top, width, height, state, parentWindow, type,
80                                             ((glSettings.flags & GHOST_glStereoVisual) != 0), 1);
81         }
82 };
83
84 #endif  /* __GHOST_SYSTEMNULL_H__ */