edelib  2.1.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
XSettingsManager Class Reference

Manager part of XSETTINGS protocol. More...

#include <edelib/XSettingsManager.h>

Public Member Functions

 XSettingsManager ()
 
 ~XSettingsManager ()
 
bool init (Display *dpy, int screen)
 
void clear (void)
 
bool should_terminate (const XEvent *xev)
 
void set (const char *name, int val)
 
void set (const char *name, const char *val)
 
void set (const char *name, unsigned short red, unsigned short green, unsigned short blue, unsigned short alpha)
 
void notify (void)
 

Static Public Member Functions

static bool manager_running (Display *dpy, int screen)
 

Protected Attributes

XSettingsDatamanager_data
 

Detailed Description

Manager part of XSETTINGS protocol.

XSettingsManager is class used to make manager(s) for XSETTINGS. Please note that XSETTINGS supports only one manager to be up so this must be taken into account.

Final applications should not use this class except manager is not provided.

Constructor & Destructor Documentation

XSettingsManager ( )
inline

Empty constructor

~XSettingsManager ( )
inline

Clears internal data

Member Function Documentation

void clear ( void  )

Clears internal data. init() must be called agan if other functions are going to be called

bool init ( Display *  dpy,
int  screen 
)

Init needed communication parts.

Returns
false if failed
Parameters
dpyis display
screenis screen
static bool manager_running ( Display *  dpy,
int  screen 
)
static

Checks if other manager is running

Returns
true if does otherwise false
Parameters
dpyis display
screenis screen
void notify ( void  )

Notify for changed data. This should be called aftear set()

void set ( const char *  name,
int  val 
)

Set integer value on manager

Parameters
nameis setting name
valis int value
void set ( const char *  name,
const char *  val 
)

Set string (char*) value on manager. Data will be copied

Parameters
nameis setting name
valis string value
void set ( const char *  name,
unsigned short  red,
unsigned short  green,
unsigned short  blue,
unsigned short  alpha 
)

Set RGBA color values on manager

Parameters
nameis setting name
redis red component
greenis green component
blueis blue component
alphais alpha component
bool should_terminate ( const XEvent *  xev)

This function must be placed in X loop

Returns
true if should terminate
Parameters
xevis X event

Member Data Documentation

XSettingsData* manager_data
protected

Data used by manager class


The documentation for this class was generated from the following file: