Main Page   Modules   Compound List   File List   Compound Members   File Members  

xklavier.h

Go to the documentation of this file.
00001 
00005 #ifndef __XKLAVIER_H__
00006 #define __XKLAVIER_H__
00007 
00008 #include <stdarg.h>
00009 
00010 #include <X11/Xlib.h>
00011 #include <X11/XKBlib.h>
00012 
00013 #ifdef __cplusplus
00014 extern "C"
00015 {
00016 #endif
00017 
00018   typedef enum
00019   {
00023     GROUP_CHANGED,
00027     INDICATORS_CHANGED
00028   }
00029   XklStateChange;
00030 
00034   typedef struct
00035   {
00037     int group;
00039     unsigned indicators;
00040   }
00041   XklState;
00042 
00055   extern int XklInit( Display * dpy );
00056 
00060   extern int XklTerm( void );
00061 
00073   extern int XklStartListen( void );
00074 
00079   extern int XklStopListen( void );
00080 
00085   extern int XklPauseListen( void );
00086 
00091   extern int XklResumeListen( void );
00092 
00099   extern Bool XklGrabKey( int key, unsigned modifiers );
00100 
00107   extern Bool XklUngrabKey( int key, unsigned modifiers );
00108 
00116   extern int XklFilterEvents( XEvent * evt );
00117 
00121   extern void XklAllowOneSwitchToSecondaryGroup( void );
00122 
00133   extern Window XklGetCurrentWindow( void );
00134 
00139   extern XklState *XklGetCurrentState( void );
00140 
00152   extern char *XklGetWindowTitle( Window w );
00153 
00161   extern Bool XklGetState( Window win, XklState * state_return );
00162 
00167   extern void XklDelState( Window win );
00168 
00174   extern void XklSaveState( Window win, XklState * state );
00175 
00182   extern Bool XklIsSameApp( Window win1, Window win2 );
00183 
00195   extern unsigned XklGetNumGroups( void );
00196 
00202   extern const char **XklGetGroupNames( void );
00203 
00209   extern const char **XklGetIndicatorNames( void );
00210 
00222   extern int XklGetNextGroup( void );
00223 
00228   extern int XklGetPrevGroup( void );
00229 
00234   extern int XklGetRestoreGroup( void );
00235 
00243   extern void XklLockGroup( int group );
00244 
00257   typedef void ( *XklConfigCallback ) ( void *userData );
00258 
00265   extern int XklRegisterConfigCallback( XklConfigCallback fun,
00266                                         void *userData );
00267 
00276   typedef void ( *XklWinCallback ) ( Window win, Window parent,
00277                                      void *userData );
00278 
00285   extern int XklRegisterWindowCallback( XklWinCallback fun, void *userData );
00286 
00296   typedef void ( *XklStateCallback ) ( XklStateChange changeType, int group,
00297                                        Bool restore, void *userData );
00298 
00305   extern int XklRegisterStateCallback( XklStateCallback fun, void *userData );
00306 
00318   extern void XklSetGroupPerApp( Bool isGlobal );
00319 
00323   extern Bool XklIsGroupPerApp( void );
00324 
00329   extern void XklSetIndicatorsHandling( Bool whetherHandle );
00330 
00334   extern Bool XklGetIndicatorsHandling( void );
00335 
00342   extern void XklSetSecondaryGroupsMask( int mask );
00343 
00347   extern int XklGetSecondaryGroupsMask( void );
00358   extern const char *XklGetLastError( void );
00359 
00370   extern void _XklDebug( const char file[], const char function[], int level,
00371                          const char format[], ... );
00372 
00387   typedef void ( *XklLogAppender ) ( const char file[], const char function[],
00388                                      int level, const char format[],
00389                                      va_list args );
00390 
00402   extern void XklDefaultLogAppender( const char file[], const char function[],
00403                                      int level, const char format[],
00404                                      va_list args );
00405 
00410   extern void XklSetLogAppender( XklLogAppender fun );
00411 
00417   extern void XklSetDebugLevel( int level );
00418 
00425 #define XklDebug( level, format, args... ) \
00426   _XklDebug( __FILE__, __func__, level, format, ## args )
00427 
00430 #ifdef __cplusplus
00431 }
00432 #endif                          /* __cplusplus */
00433 
00434 #endif

Generated on Fri Jan 31 16:52:10 2003 for libxklavier by doxygen1.2.18