Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * Contributor(s): Campbell Barton 00019 * 00020 * ***** END GPL LICENSE BLOCK ***** 00021 */ 00022 00028 #ifndef _GHOST_SYSTEM_NULL_H_ 00029 #define _GHOST_SYSTEM_NULL_H_ 00030 00031 #include "GHOST_System.h" 00032 #include "../GHOST_Types.h" 00033 #include "GHOST_DisplayManagerNULL.h" 00034 #include "GHOST_WindowNULL.h" 00035 00036 class GHOST_WindowNULL; 00037 00038 class GHOST_SystemNULL : public GHOST_System { 00039 public: 00040 00041 GHOST_SystemNULL( ) : GHOST_System() { /* nop */ } 00042 ~GHOST_SystemNULL() { /* nop */ } 00043 bool processEvents(bool waitForEvent) { return false; } 00044 int toggleConsole(int action) { return 0; } 00045 GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys& keys) const { return GHOST_kSuccess; } 00046 GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const { return GHOST_kSuccess; } 00047 GHOST_TUns8 *getClipboard(bool selection) const { return NULL; } 00048 void putClipboard(GHOST_TInt8 *buffer, bool selection) const { /* nop */ } 00049 GHOST_TUns64 getMilliSeconds( ) const { return 0; } 00050 GHOST_TUns8 getNumDisplays( ) const { return GHOST_TUns8(1); } 00051 GHOST_TSuccess getCursorPosition( GHOST_TInt32& x, GHOST_TInt32& y ) const { return GHOST_kFailure; } 00052 GHOST_TSuccess setCursorPosition( GHOST_TInt32 x, GHOST_TInt32 y ) { return GHOST_kFailure; } 00053 void getMainDisplayDimensions( GHOST_TUns32& width, GHOST_TUns32& height ) const { /* nop */ } 00054 00055 GHOST_TSuccess init() { 00056 GHOST_TSuccess success = GHOST_System::init(); 00057 00058 if (success) { 00059 m_displayManager = new GHOST_DisplayManagerNULL(this); 00060 00061 if (m_displayManager) { 00062 return GHOST_kSuccess; 00063 } 00064 } 00065 00066 return GHOST_kFailure; 00067 } 00068 00069 GHOST_IWindow* createWindow( 00070 const STR_String& title, 00071 GHOST_TInt32 left, 00072 GHOST_TInt32 top, 00073 GHOST_TUns32 width, 00074 GHOST_TUns32 height, 00075 GHOST_TWindowState state, 00076 GHOST_TDrawingContextType type, 00077 bool stereoVisual, 00078 const GHOST_TUns16 numOfAASamples, 00079 const GHOST_TEmbedderWindowID parentWindow 00080 ) { 00081 return new GHOST_WindowNULL (this, title, left, top, width, height, state, parentWindow, type, stereoVisual, 1); 00082 } 00083 }; 00084 00085 #endif 00086 00087 00088 00089 00090 00091 00092