00001 /*************************************************************************** 00002 * Copyright (C) 2005-2007 Stefan Schwarzer, Jens Schneider, * 00003 * Matthias Hardt, Guido Madaus * 00004 * * 00005 * Copyright (C) 2007-2008 BerLinux Solutions GbR * 00006 * Stefan Schwarzer & Guido Madaus * 00007 * * 00008 * Copyright (C) 2009-2013 BerLinux Solutions GmbH * 00009 * * 00010 * Authors: * 00011 * Stefan Schwarzer <stefan.schwarzer@diskohq.org>, * 00012 * Matthias Hardt <matthias.hardt@diskohq.org>, * 00013 * Jens Schneider <jens.schneider@diskohq.org>, * 00014 * Guido Madaus <guido.madaus@diskohq.org>, * 00015 * Patrick Helterhoff <patrick.helterhoff@diskohq.org>, * 00016 * René Bählkow <rene.baehlkow@diskohq.org> * 00017 * * 00018 * This library is free software; you can redistribute it and/or * 00019 * modify it under the terms of the GNU Lesser General Public * 00020 * License version 2.1 as published by the Free Software Foundation. * 00021 * * 00022 * This library is distributed in the hope that it will be useful, * 00023 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00024 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00025 * Lesser General Public License for more details. * 00026 * * 00027 * You should have received a copy of the GNU Lesser General Public * 00028 * License along with this library; if not, write to the * 00029 * Free Software Foundation, Inc., * 00030 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * 00031 **************************************************************************/ 00032 00033 #ifndef MMSINIT_H_ 00034 #define MMSINIT_H_ 00035 00036 extern "C" { 00037 #include <stdlib.h> 00038 } 00039 00040 #include <string> 00041 #include <mmsbase/interfaces/immsswitcher.h> 00042 00043 //! type of the init flags 00044 typedef int MMSINIT_FLAGS; 00045 00046 //! none 00047 #define MMSINIT_NONE 0x00000000 00048 //! initializing the window manager 00049 #define MMSINIT_WINDOWMANAGER 0x00000001 00050 //! initializing the plugin manager (the configdb where the plugins are defined is required) 00051 #define MMSINIT_PLUGINMANAGER 0x00000002 00052 //! initializing the event manager 00053 #define MMSINIT_EVENTS 0x00000004 00054 //! initializing the graphic backends (x11/dfb/fbdev/...) 00055 #define MMSINIT_GRAPHICS 0x00000008 00056 //! initializing the input manager 00057 #define MMSINIT_INPUTS 0x00000010 00058 //! initializing the theme manager 00059 #define MMSINIT_THEMEMANAGER 0x00000020 00060 //! initializing the graphic backends including the window, the input and the theme manager 00061 #define MMSINIT_WINDOWS 0x00000039 00062 //! initializing all components 00063 #define MMSINIT_FULL 0x0000003f 00064 //! silent mode (no output) 00065 #define MMSINIT_SILENT 0x00000100 00066 //! no virtual console will be opened and screen will not cleared during startup 00067 #define MMSINIT_NO_CONSOLE 0x00000200 00068 //! disko should trigger an pan event to frame buffer driver every time current read buffer has changed (e.g. due to flipping regions) 00069 #define MMSINIT_FLIP_FLUSH 0x00000400 00070 00071 bool mmsInit(MMSINIT_FLAGS flags, int argc = 0, char *argv[] = NULL, string configfile = "", 00072 string appl_name = "Disko Application", string appl_icon_name = "Disko Application", 00073 MMSConfigDataGlobal *global = NULL, MMSConfigDataDB *configdb = NULL, MMSConfigDataDB *datadb = NULL, 00074 MMSConfigDataGraphics *graphics = NULL, MMSConfigDataLanguage *language = NULL); 00075 00076 bool mmsRelease(); 00077 00078 bool registerSwitcher(IMMSSwitcher *switcher); 00079 00080 void setPluginRegisterCallback(void(*cb)(MMSPluginManager*)); 00081 00082 IMMSWindowManager *getWindowManager(); 00083 00084 void setPluginManager(MMSPluginManager *pm); 00085 MMSPluginManager *getPluginManager(); 00086 00087 //! get access to the video layer 00088 /*! 00089 \return pointer to the MMSFBLayer video layer object 00090 \note If using only one layer, the graphics and video layer are the same. 00091 */ 00092 MMSFBLayer *getVideoLayer(); 00093 00094 //! get access to the graphics layer 00095 /*! 00096 \return pointer to the MMSFBLayer graphics layer object 00097 \note If using only one layer, the graphics and video layer are the same. 00098 */ 00099 MMSFBLayer *getGraphicsLayer(); 00100 00101 //! show the background window 00102 void showBackgroundWindow(); 00103 00104 00105 #endif /*MMSINIT_H_*/