libxcm
|
The observer context can be allocated and setup through XcmeContext_Create. More...
Classes | |
struct | XcmeContext_s_ |
Macros | |
#define | TIME_DIVIDER 10000 |
Functions | |
int | myXErrorHandler (Display *display, XErrorEvent *e) |
int | XcmMessage (XCME_MSG_e code, const void *context XCM_UNUSED, const char *format,...) |
Function XcmMessage. More... | |
int | XcmMessageFuncSet (XcmMessage_f message_func) |
set a message function to customise messages | |
void | XcmDebugVariableSet (int *debug) |
set own debug variable | |
char * | printfNetColorDesktop (XcmeContext_s *c, int verbose) |
const char * | XcmePrintWindowName (Display *display, Window w) |
return a short window description text | |
void | XcmICCprofileGetNameFuncSet (XcmICCprofileGetName_f getName) |
Function XcmICCprofileGetNameFuncSet. More... | |
void | XcmICCprofileFromMD5FuncSet (XcmICCprofileGetFromMD5_f fromMD5) |
Function XcmICCprofileFromMD5FuncSet. More... | |
const char * | XcmePrintWindowRegions (Display *display, Window w, int always) |
Function XcmePrintWindowRegions. More... | |
void | xcmePrintWindowRegions (Display *display, Window w, int always) |
Function xcmePrintWindowRegions. More... | |
int | myXErrorHandler (Display *display XCM_UNUSED, XErrorEvent *e XCM_UNUSED) |
void | XcmeSelectInput (XcmeContext_s *c) |
Function XcmeSelectInput. More... | |
XcmeContext_s * | XcmeContext_New () |
Function XcmeContext_New. More... | |
XcmeContext_s * | XcmeContext_Create (const char *display_name) |
Function XcmeContext_Create. More... | |
int | XcmeErrorHandler (Display *display, XErrorEvent *e) |
int | XcmeContext_Setup2 (XcmeContext_s *c, const char *display_name, int flags XCM_UNUSED) |
Function XcmeContext_Setup2. More... | |
int | XcmeContext_Setup (XcmeContext_s *c, const char *display_name) |
Function XcmeContext_Setup. More... | |
char * | XcmStringCopy_ (const char *string, void *(allocate_func)(size_t)) |
void | XcmStringAdd_ (char **text, const char *append, void *(allocate_func)(size_t), void(dealloc_func)(void *)) |
void | xcmeUnrollEdid1_ (void *edid, char **manufacturer, char **mnft, char **model, char **serial, char **vendor, uint32_t *week, uint32_t *year, uint32_t *mnft_id, uint32_t *model_id, double *c, void *(allocate_func)(size_t)) |
int | XcmeContext_Release (XcmeContext_s **c) |
Function XcmeContext_Release. More... | |
int | XcmeContext_InLoop (XcmeContext_s *c, XEvent *event) |
Function XcmeContext_InLoop. More... | |
Display * | XcmeContext_DisplayGet (XcmeContext_s *c) |
Function XcmeContext_DisplayGet. More... | |
int | XcmeContext_DisplaySet (XcmeContext_s *c, Display *display) |
Function XcmeContext_DisplaySet. More... | |
int | XcmeContext_WindowSet (XcmeContext_s *c, Window window) |
Function xcmeContext_WindowSet. More... | |
time_t | xcmTime () |
double | xcmSeconds () |
const char * | xcmPrintTime () |
Variables | |
XcmMessage_f | XcmMessage_p = XcmMessage |
int | xcm_debug_local_ = 0 |
int * | xcm_debug = &xcm_debug_local_ |
XcmICCprofileGetFromMD5_f | XcmICCprofileGetFromMD5_p = 0 |
XcmICCprofileGetName_f | XcmICCprofileGetName_p = 0 |
The observer context can be allocated and setup through XcmeContext_Create.
You can pass in a own X11 Display handle through XcmeContext_New(), XcmeContext_DisplaySet() and XcmeContext_Setup(). The events can be processed by passing all XEvents to XcmeContext_InLoop() from inside your X event handling loop. To release allocated resources call XcmeContext_Release(). For a examle look at the xcmsevents application, which is distributed along the sources.
XcmeContext_s* XcmeContext_Create | ( | const char * | display_name | ) |
Function XcmeContext_Create.
allocate and initialise a event observer context structure
The context is needed to observe colour management events.
[in] | display_name | a valid X11 display name |
Display* XcmeContext_DisplayGet | ( | XcmeContext_s * | c | ) |
Function XcmeContext_DisplayGet.
return the Display
[in] | c | a event observer context |
int XcmeContext_DisplaySet | ( | XcmeContext_s * | c, |
Display * | display | ||
) |
Function XcmeContext_DisplaySet.
set a custom X11 Display
[in,out] | c | a event observer context |
[in] | display | the custom X11 display |
int XcmeContext_InLoop | ( | XcmeContext_s * | c, |
XEvent * | event | ||
) |
Function XcmeContext_InLoop.
check for colour management events
This function needs to be called inside the X11 event loop, to observe the related events and send messages about them.
[in,out] | c | a event observer context |
[in] | event | a X event handle |
XcmeContext_s* XcmeContext_New | ( | ) |
Function XcmeContext_New.
allocate a event observer context structure
The context is needed to observe colour management events. After the allocation the context needs initialisation.
int XcmeContext_Release | ( | XcmeContext_s ** | c | ) |
Function XcmeContext_Release.
clean owned resources
[in,out] | c | a event observer context |
int XcmeContext_Setup | ( | XcmeContext_s * | c, |
const char * | display_name | ||
) |
Function XcmeContext_Setup.
allocate and initialise a event observer context structure
The initialised context is needed for observing colour management events.
[in,out] | c | a event observer context A existing X11 display will be honoured. |
[in] | display_name | a valid X11 display name or NULL; With a existing X11 display inside c, this option will be ignored. |
int XcmeContext_Setup2 | ( | XcmeContext_s * | c, |
const char * | display_name, | ||
int flags | XCM_UNUSED | ||
) |
Function XcmeContext_Setup2.
allocate and initialise a event observer context structure
The initialised context is needed for observing colour management events. No initial events are sent.
[in,out] | c | a event observer context A existing X11 display will be honoured. |
[in] | display_name | a valid X11 display name or NULL; With a existing X11 display inside c, this option will be ignored. |
[in] | flags | unused |
int XcmeContext_WindowSet | ( | XcmeContext_s * | c, |
Window | window | ||
) |
Function xcmeContext_WindowSet.
set a custom X11 Window
[in,out] | c | a event observer context |
[in] | window | the custom X11 window |
const char* XcmePrintWindowRegions | ( | Display * | display, |
Window | w, | ||
int | always | ||
) |
Function XcmePrintWindowRegions.
provide info text about window regions
The function informs about _ICC_COLOR_REGIONS atom.
[in] | display | X display |
[in] | w | X window |
[in] | always | send always a message, even for a empty property |
void xcmePrintWindowRegions | ( | Display * | display, |
Window | w, | ||
int | always | ||
) |
Function xcmePrintWindowRegions.
send a message about window regions
The function informs about _ICC_COLOR_REGIONS atom.
[in] | display | X display |
[in] | w | X window |
[in] | always | send always a message, even for a empty property |
void XcmeSelectInput | ( | XcmeContext_s * | c | ) |
Function XcmeSelectInput.
register windows
void XcmICCprofileFromMD5FuncSet | ( | XcmICCprofileGetFromMD5_f | fromMD5 | ) |
Function XcmICCprofileFromMD5FuncSet.
plugin more informations capabilities for ICC profiles
[in] | fromMD5 | a function to resolve a ICC profile in ICC profile paths from a md5 hash sum |
void XcmICCprofileGetNameFuncSet | ( | XcmICCprofileGetName_f | getName | ) |
Function XcmICCprofileGetNameFuncSet.
plugin more informations capabilities for ICC profiles
[in] | getName | get internal and external profile name |
int XcmMessage | ( | XCME_MSG_e | code, |
const void *context | XCM_UNUSED, | ||
const char * | format, | ||
... | |||
) |
Function XcmMessage.
default message function
Messages are printed out to stdout console text stream.