edelib: XSettingsManager Class Reference

edelib 1.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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
XSettingsData * | manager_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

  dpy | is display
  screen | is screen

static bool manager_running | ( | Display * | dpy,
|  | int | screen
| ) |  |
| static

Checks if other manager is running

Returns
  true if does otherwise false

Parameters

  dpy | is display
  screen | is 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

  name | is setting name
  val | is int value

void set | ( | const char * | name,
|  | const char * | val
| ) |  |

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

Parameters

  name | is setting name
  val | is 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

  name | is setting name
  red | is red component
  green | is green component
  blue | is blue component
  alpha | is alpha component

bool should_terminate | ( | const XEvent * | xev | ) |

This function must be placed in X loop

Returns
  true if should terminate

Parameters

  xev | is 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:

- edelib/XSettingsManager.h