3 * ***** BEGIN GPL LICENSE BLOCK *****
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.
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.
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.
19 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
20 * All rights reserved.
22 * The Original Code is: all of this file.
24 * Contributor(s): none yet.
26 * ***** END GPL LICENSE BLOCK *****
29 /** \file ghost/intern/GHOST_ISystem.cpp
37 * Copyright (C) 2001 NaN Technologies B.V.
38 * @author Maarten Gribnau
42 #include "GHOST_ISystem.h"
45 # include "GHOST_SystemNULL.h"
46 #elif defined(WITH_GHOST_SDL)
47 # include "GHOST_SystemSDL.h"
49 # include "GHOST_SystemWin32.h"
53 # include "GHOST_SystemCocoa.h"
55 # include "GHOST_SystemCarbon.h"
58 # include "GHOST_SystemX11.h"
63 GHOST_ISystem* GHOST_ISystem::m_system = 0;
66 GHOST_TSuccess GHOST_ISystem::createSystem()
68 GHOST_TSuccess success;
71 m_system = new GHOST_SystemNULL();
72 #elif defined(WITH_GHOST_SDL)
73 m_system = new GHOST_SystemSDL();
75 m_system = new GHOST_SystemWin32 ();
79 m_system = new GHOST_SystemCocoa ();
81 m_system = new GHOST_SystemCarbon ();
84 m_system = new GHOST_SystemX11 ();
87 success = m_system != 0 ? GHOST_kSuccess : GHOST_kFailure;
90 success = GHOST_kFailure;
93 success = m_system->init();
98 GHOST_TSuccess GHOST_ISystem::disposeSystem()
100 GHOST_TSuccess success = GHOST_kSuccess;
106 success = GHOST_kFailure;
112 GHOST_ISystem* GHOST_ISystem::getSystem()