xklavier.h Source File

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 #ifdef __cplusplus
    00009 extern "C"
    00010 {
    00011 #endif
    00012
    00016   typedef struct
    00017   {
    00019     int group;
    00021     unsigned indicators;
    00022   }
    00023   XklState;
    00024
    00037   extern int XklInit( Display * dpy );
    00038
    00042   extern int XklTerm( void );
    00043
    00055   extern int XklStartListen( void );
    00056
    00061   extern int XklStopListen( void );
    00062
    00067   extern int XklPauseListen( void );
    00068
    00073   extern int XklResumeListen( void );
    00074
    00081   extern Bool XklGrabKey( int key, unsigned modifiers );
    00082
    00089   extern Bool XklUngrabKey( int key, unsigned modifiers );
    00090
    00098   extern int XklFilterEvents( XEvent * evt );
    00099
    00110   extern Window XklGetCurrentWindow( void );
    00111
    00116   extern XklState *XklGetCurrentState( void );
    00117
    00129   extern char *XklGetWindowTitle( Window w );
    00130
    00138   extern Bool XklGetState( Window win, XklState * state_return );
    00139
    00144   extern void XklDelState( Window win );
    00145
    00151   extern void XklSaveState( Window win, XklState * state );
    00152
    00159   extern Bool XklIsSameApp( Window win1, Window win2 );
    00160
    00172   extern unsigned XklGetNumGroups( void );
    00173
    00179   extern const char **XklGetGroupNames( void );
    00180
    00186   extern const char **XklGetIndicatorNames( void );
    00187
    00199   extern int XklGetNextGroup( void );
    00200
    00205   extern int XklGetPrevGroup( void );
    00206
    00211   extern int XklGetRestoreGroup( void );
    00212
    00220   extern void XklLockGroup( int group );
    00221
    00234   typedef void ( *ConfigCallback ) ( void *userData );
    00235
    00242   extern int XklRegisterConfigCallback( ConfigCallback fun, void *userData );
    00243
    00252   typedef void ( *WinCallback ) ( Window win, Window parent, void *userData );
    00253
    00260   extern int XklRegisterWindowCallback( WinCallback fun, void *userData );
    00261
    00270   typedef void ( *StateCallback ) ( int group, Bool restore, void *userData );
    00271
    00278   extern int XklRegisterStateCallback( StateCallback fun, void *userData );
    00279
    00291   extern void XklSetLayoutPerApp( Bool isGlobal );
    00292
    00296   extern Bool XklIsLayoutPerApp( void );
    00297
    00302   extern void XklSetIndicatorsHandling( Bool whetherHandle );
    00303
    00307   extern Bool XklGetIndicatorsHandling( void );
    00308
    00319   extern const char *XklGetLastError( void );
    00320
    00331   extern void _XklDebug( const char file[], const char function[], int level,
    00332                          const char format[], ... );
    00333
    00339   extern void XklSetDebugLevel( int level );
    00340
    00347 #define XklDebug( level, format, args... ) \
    00348   _XklDebug( __FILE__, __func__, level, format, ## args )
    00349
    00352 #ifdef __cplusplus
    00353 }
    00354 #endif                          /* __cplusplus */
    00355
    00356 #endif