Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

implementation_svgalib.cpp

Go to the documentation of this file.
00001 /*
00002         $Id: implementation_svgalib.cpp,v 1.2 2000/06/24 09:38:10 mbn Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 
00014         File purpose:
00015                 Initialization functions for Svgalib implementation.
00016 
00017 */
00018 
00019 #include "Core/precomp.h"
00020 
00021 #ifdef USE_SVGALIB
00022 
00023 #include "API/Core/Display/display.h"
00024 #include "Core/System/Unix/implementation_svgalib.h"
00025 #include "Core/Display/Svgalib/displaycard_svgalib.h"
00026 // #include "Core/Input/Svgalib/keyboard_svgalib.h"
00027 #include "API/Core/Input/input.h"
00028 //#include "Core/Input/FBDev/mouse_fbdev.h"
00029 #include "Core/Input/TTY/keyboard_tty.h"
00030 #include "Core/Input/X11/joystick_linux.h"
00031 #include "implementation.h"
00032 
00033 
00034 extern "C"
00035 {
00036         DL_PREFIX char* clan_module_identify()
00037         {
00038                 return "SVGAlib target";
00039         }
00040 
00041         DL_PREFIX char* clan_module_abbreviation()
00042         {
00043                 return "svga";
00044         }
00045 
00046         DL_PREFIX void clan_module_init()
00047         {
00048                 CL_Implementation_Svgalib::add_display();
00049         }
00050 }
00051 
00052 char *svgalib_identify()
00053 {
00054         return clan_module_identify();
00055 }
00056 
00057 char *svgalib_abbreviation()
00058 {
00059         return clan_module_abbreviation();
00060 }
00061 
00062 void svgalib_init()
00063 {
00064         return clan_module_init();
00065 }
00066 
00067 
00068 void CL_Implementation_Svgalib::add_display()
00069 {
00070         int card_no = CL_Display::cards.size();
00071         CL_Display::cards.push_back(new CL_DisplayCard_Svgalib(card_no));
00072 }
00073 
00074 void CL_Implementation_Svgalib::add_input()
00075 {
00076         CL_Input::keyboards.push_back(new CL_TTYKeyboard());
00077 //      CL_Input::pointers.push_back(new CL_Mouse_FBDev());
00078 
00079 #ifdef USE_JOY
00080 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
00081 
00082         for (int i=0; i<8; i++)
00083         {
00084                 CL_LinuxJoystick *joy = new CL_LinuxJoystick();
00085                 if (joy->init(i))
00086                         CL_Input::joysticks.push_back(joy);
00087                 else
00088                         delete joy;
00089         }
00090 
00091 #endif
00092 #endif
00093 //      CL_Input::keyboards.add(new CL_SVGAKeyboard());
00094 }
00095 
00096 #endif

Generated at Wed Apr 4 19:54:00 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001