libsax 7.2

device.h

00001 /**************
00002 FILE          : device.h
00003 ***************
00004 PROJECT       : SaX2 - library interface [header]
00005               :
00006 AUTHOR        : Marcus Schäfer <ms@suse.de>
00007               :
00008 BELONGS TO    : SaX2 - SuSE advanced X11 configuration 
00009               : 
00010               :
00011 DESCRIPTION   : native C++ class library to access SaX2
00012               : functionality. Easy to use interface for
00013               : //.../
00014               : - importing/exporting X11 configurations
00015               : - modifying/creating X11 configurations 
00016               : ---
00017               :
00018               :
00019 STATUS        : Status: Development
00020 **************/
00021 #ifndef SAX_DEVICE_H
00022 #define SAX_DEVICE_H 1
00023 
00024 //====================================
00025 // Includes...
00026 //------------------------------------
00027 #include "import.h"
00028 
00029 namespace SaX {
00030 //====================================
00031 // Defines...
00032 //------------------------------------
00033 #define SAX_INPUT_TOUCHPANEL  "Touchpanel"
00034 #define SAX_INPUT_TABLET      "Tablet"
00035 #define SAX_INPUT_PEN         "Pen"
00036 #define SAX_INPUT_PAD         "Pad"
00037 #define SAX_INPUT_ERASER      "Eraser"
00038 #define SAX_INPUT_TOUCH       "Touch"
00039 #define SAX_INPUT_MOUSE       "Mouse"
00040 #define SAX_INPUT_VNC         "VNC"
00041 #define SAX_INPUT_KEYBOARD    "Keyboard"
00042 
00043 //====================================
00044 // Interface class for dlopen ability
00045 //------------------------------------
00053 class SaXManipulateDevicesIF : public SaXException {
00054         public:
00055         virtual int addDesktopDevice ( void ) = 0;
00056         virtual int addInputDevice   ( const char* ) = 0;
00057 
00058         public:
00059         virtual int removeDesktopDevice ( int ) = 0;
00060         virtual int removeInputDevice   ( int ) = 0;
00061 
00062         public:
00063         virtual ~SaXManipulateDevicesIF ( void ) { }
00064 };
00065 //====================================
00066 // Class SaXManipulateDevices...
00067 //------------------------------------
00140 class SaXManipulateDevices : public SaXManipulateDevicesIF {
00141         private:
00142         SaXImport* mDesktop;
00143         SaXImport* mCard;
00144         SaXImport* mInput;
00145         SaXImport* mLayout;
00146 
00147         private:
00148         bool desktopHandlingAllowed;
00149         bool inputHandlingAllowed;
00150 
00151         private:
00152         void updateLayout (int);
00153 
00154         public:
00155         int addDesktopDevice ( void );
00156         int addInputDevice   ( const char* );
00157 
00158         public:
00159         int removeDesktopDevice ( int );
00160         int removeInputDevice   ( int );
00161 
00162         public:
00163         SaXManipulateDevices ( SaXImport*,SaXImport*,SaXImport* );
00164         SaXManipulateDevices ( SaXImport*,SaXImport* );
00165 };
00166 } // end namespace
00167 #endif