Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /intern/ghost/intern/GHOST_SystemNULL.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemNULL.h')
-rw-r--r--intern/ghost/intern/GHOST_SystemNULL.h144
1 files changed, 99 insertions, 45 deletions
diff --git a/intern/ghost/intern/GHOST_SystemNULL.h b/intern/ghost/intern/GHOST_SystemNULL.h
index 19e87bffd78..7f68c801a70 100644
--- a/intern/ghost/intern/GHOST_SystemNULL.h
+++ b/intern/ghost/intern/GHOST_SystemNULL.h
@@ -30,55 +30,109 @@
class GHOST_WindowNULL;
class GHOST_SystemNULL : public GHOST_System {
-public:
+ public:
+ GHOST_SystemNULL() : GHOST_System()
+ { /* nop */
+ }
+ ~GHOST_SystemNULL()
+ { /* nop */
+ }
+ bool processEvents(bool waitForEvent)
+ {
+ return false;
+ }
+ int toggleConsole(int action)
+ {
+ return 0;
+ }
+ GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys &keys) const
+ {
+ return GHOST_kSuccess;
+ }
+ GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const
+ {
+ return GHOST_kSuccess;
+ }
+ GHOST_TUns8 *getClipboard(bool selection) const
+ {
+ return NULL;
+ }
+ void putClipboard(GHOST_TInt8 *buffer, bool selection) const
+ { /* nop */
+ }
+ GHOST_TUns64 getMilliSeconds() const
+ {
+ return 0;
+ }
+ GHOST_TUns8 getNumDisplays() const
+ {
+ return GHOST_TUns8(1);
+ }
+ GHOST_TSuccess getCursorPosition(GHOST_TInt32 &x, GHOST_TInt32 &y) const
+ {
+ return GHOST_kFailure;
+ }
+ GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
+ {
+ return GHOST_kFailure;
+ }
+ void getMainDisplayDimensions(GHOST_TUns32 &width, GHOST_TUns32 &height) const
+ { /* nop */
+ }
+ void getAllDisplayDimensions(GHOST_TUns32 &width, GHOST_TUns32 &height) const
+ { /* nop */
+ }
+ bool supportsNativeDialogs(void)
+ {
+ return false;
+ }
+ GHOST_IContext *createOffscreenContext()
+ {
+ return NULL;
+ }
+ GHOST_TSuccess disposeContext(GHOST_IContext *context)
+ {
+ return GHOST_kFailure;
+ }
- GHOST_SystemNULL() : GHOST_System() { /* nop */ }
- ~GHOST_SystemNULL() { /* nop */ }
- bool processEvents(bool waitForEvent) { return false; }
- int toggleConsole(int action) { return 0; }
- GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys& keys) const { return GHOST_kSuccess; }
- GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const { return GHOST_kSuccess; }
- GHOST_TUns8 *getClipboard(bool selection) const { return NULL; }
- void putClipboard(GHOST_TInt8 *buffer, bool selection) const { /* nop */ }
- GHOST_TUns64 getMilliSeconds() const { return 0; }
- GHOST_TUns8 getNumDisplays() const { return GHOST_TUns8(1); }
- GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const { return GHOST_kFailure; }
- GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) { return GHOST_kFailure; }
- void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const { /* nop */ }
- void getAllDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const { /* nop */ }
- bool supportsNativeDialogs(void) { return false;}
- GHOST_IContext *createOffscreenContext() { return NULL; }
- GHOST_TSuccess disposeContext(GHOST_IContext *context) { return GHOST_kFailure; }
+ GHOST_TSuccess init()
+ {
+ GHOST_TSuccess success = GHOST_System::init();
- GHOST_TSuccess init() {
- GHOST_TSuccess success = GHOST_System::init();
+ if (success) {
+ m_displayManager = new GHOST_DisplayManagerNULL(this);
- if (success) {
- m_displayManager = new GHOST_DisplayManagerNULL(this);
+ if (m_displayManager) {
+ return GHOST_kSuccess;
+ }
+ }
- if (m_displayManager) {
- return GHOST_kSuccess;
- }
- }
+ return GHOST_kFailure;
+ }
- return GHOST_kFailure;
- }
-
- GHOST_IWindow *createWindow(
- const STR_String& title,
- GHOST_TInt32 left,
- GHOST_TInt32 top,
- GHOST_TUns32 width,
- GHOST_TUns32 height,
- GHOST_TWindowState state,
- GHOST_TDrawingContextType type,
- GHOST_GLSettings glSettings,
- bool exclusive,
- const GHOST_TEmbedderWindowID parentWindow)
- {
- return new GHOST_WindowNULL(this, title, left, top, width, height, state, parentWindow, type,
- ((glSettings.flags & GHOST_glStereoVisual) != 0), 1);
- }
+ GHOST_IWindow *createWindow(const STR_String &title,
+ GHOST_TInt32 left,
+ GHOST_TInt32 top,
+ GHOST_TUns32 width,
+ GHOST_TUns32 height,
+ GHOST_TWindowState state,
+ GHOST_TDrawingContextType type,
+ GHOST_GLSettings glSettings,
+ bool exclusive,
+ const GHOST_TEmbedderWindowID parentWindow)
+ {
+ return new GHOST_WindowNULL(this,
+ title,
+ left,
+ top,
+ width,
+ height,
+ state,
+ parentWindow,
+ type,
+ ((glSettings.flags & GHOST_glStereoVisual) != 0),
+ 1);
+ }
};
-#endif /* __GHOST_SYSTEMNULL_H__ */
+#endif /* __GHOST_SYSTEMNULL_H__ */