|
Xcm 0.4.0
|
Defines | |
| #define | XCM_ICC_COLOUR_SERVER_TARGET_PROFILE_IN_X_BASE "_ICC_DEVICE_PROFILE" |
| net-color spec atoms | |
| #define | XCM_ICC_V0_3_TARGET_PROFILE_IN_X_BASE "_ICC_PROFILE" |
| _ICC_PROFILE_(xxx) in X spec atoms | |
Typedefs | |
| typedef struct XcmeContext_s_ | XcmeContext_s |
| context for parsing events | |
Enumerations | |
| enum | XCME_MSG_e { XCME_MSG_TITLE = 400, XCME_MSG_COPYRIGHT, XCME_MSG_INFO, XCME_MSG_SYSTEM, XCME_MSG_DISPLAY_ERROR, XCME_MSG_DISPLAY_EVENT, XCME_MSG_DISPLAY_STATUS } |
customisable signals for a observer More... | |
Functions | |
| int | XcmMessage (XCME_MSG_e code, const void *context, const char *format,...) |
| default message function | |
| int | XcmMessageFuncSet (XcmMessage_f message_func) |
| set a message function to customise messages | |
| const char * | xcmePrintWindowName (Display *display, Window w) |
| return a short window description text | |
| void | XcmICCprofileGetNameFuncSet (XcmICCprofileGetName_f getName) |
| plugin more informations capabilities for ICC profiles | |
| void | XcmICCprofileFromMD5FuncSet (XcmICCprofileGetFromMD5_f fromMD5) |
| plugin more informations capabilities for ICC profiles | |
| void | xcmePrintWindowRegions (Display *display, Window w, int always) |
| send a message about window regions | |
| XcmeContext_s * | XcmeContext_New () |
| allocate a event observer context structure | |
| XcmeContext_s * | XcmeContext_Create (const char *display_name) |
| allocate and initialise a event observer context structure | |
| int | XcmeContext_Setup (XcmeContext_s *c, const char *display_name) |
| allocate and initialise a event observer context structure | |
| int | XcmeContext_Release (XcmeContext_s **c) |
| clean owned resources | |
| int | XcmeContext_InLoop (XcmeContext_s *c, XEvent *event) |
| check for colour management events | |
| Display * | XcmeContext_DisplayGet (XcmeContext_s *c) |
| return the Display | |
| int | XcmeContext_DisplaySet (XcmeContext_s *c, Display *display) |
| set a custom X11 Display | |
| int | XcmeContext_WindowSet (XcmeContext_s *c, Window window) |
| set a custom X11 Window | |
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.
XcmEvents.h
A small X11 colour management event observer.
| #define XCM_ICC_COLOUR_SERVER_TARGET_PROFILE_IN_X_BASE "_ICC_DEVICE_PROFILE" |
net-color spec atoms
| #define XCM_ICC_V0_3_TARGET_PROFILE_IN_X_BASE "_ICC_PROFILE" |
_ICC_PROFILE_(xxx) in X spec atoms
| typedef struct XcmeContext_s_ XcmeContext_s |
context for parsing events
| enum XCME_MSG_e |
customisable signals for a observer
| XcmeContext_s * XcmeContext_Create | ( | const char * | display_name | ) |
allocate and initialise a event observer context structure
Function XcmeContext_Create The context is needed to observe colour management events.
| [in] | display_name | a valid X11 display name |
| Display * XcmeContext_DisplayGet | ( | XcmeContext_s * | c | ) |
return the Display
Function XcmeContext_DisplayGet
| [in] | c | a event observer context |
| int XcmeContext_DisplaySet | ( | XcmeContext_s * | c, |
| Display * | display | ||
| ) |
set a custom X11 Display
Function XcmeContext_DisplaySet
| [in,out] | c | a event observer context |
| [in] | display | the custom X11 display |
| int XcmeContext_InLoop | ( | XcmeContext_s * | c, |
| XEvent * | event | ||
| ) |
check for colour management events
Function XcmeContext_InLoop 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 | ( | ) |
allocate a event observer context structure
Function XcmeContext_New The context is needed to observe colour management events. After the allocation the context needs initialisation.
| int XcmeContext_Release | ( | XcmeContext_s ** | c | ) |
clean owned resources
Function XcmeContext_Release
| [in,out] | c | a event observer context |
| int XcmeContext_Setup | ( | XcmeContext_s * | c, |
| const char * | display_name | ||
| ) |
allocate and initialise a event observer context structure
Function XcmeContext_Setup 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_WindowSet | ( | XcmeContext_s * | c, |
| Window | window | ||
| ) |
set a custom X11 Window
Function xcmeContext_WindowSet
| [in,out] | c | a event observer context |
| [in] | window | the custom X11 window |
| const char* xcmePrintWindowName | ( | Display * | display, |
| Window | w | ||
| ) |
return a short window description text
| void xcmePrintWindowRegions | ( | Display * | display, |
| Window | w, | ||
| int | always | ||
| ) |
send a message about window regions
Function xcmePrintWindowRegions The function informs about _NET_COLOR_REGIONS atom.
| [in] | display | X display |
| [in] | w | X window |
| [in] | always | send always a message, even for a empty property |
| void XcmICCprofileFromMD5FuncSet | ( | XcmICCprofileGetFromMD5_f | fromMD5 | ) |
plugin more informations capabilities for ICC profiles
Function XcmICCprofileFromMD5FuncSet
| [in] | fromMD5 | a function to resolve a ICC profile in ICC profile paths from a md5 hash sum |
| void XcmICCprofileGetNameFuncSet | ( | XcmICCprofileGetName_f | getName | ) |
plugin more informations capabilities for ICC profiles
Function XcmICCprofileGetNameFuncSet
| [in] | getName | get internal and external profile name |
| int XcmMessage | ( | XCME_MSG_e | code, |
| const void * | context, | ||
| const char * | format, | ||
| ... | |||
| ) |
default message function
Function XcmMessage Messages are printed out to stdout console text stream.
| int XcmMessageFuncSet | ( | XcmMessage_f | message_func | ) |
set a message function to customise messages
1.7.3