X11workbench Toolkit
1.0
|
Data Structures | |
struct | s_WB_ERROR_INFO |
Structure definition for X11 error information. More... | |
Typedefs | |
typedef struct s_WB_ERROR_INFO | WB_ERROR_INFO |
Structure definition for X11 error information. More... | |
Functions | |
static __inline__ void | WBSupressErrorOutput (void) |
Supress X11 XErrorEvent output to stderr. More... | |
static __inline__ void | WBAllowErrorOutput (void) |
Restore X11 XErrorEvent output to stderr. More... | |
void | WBErrorClear (void) |
Clear the 'last error' information obtained via WBGetLastError() More... | |
int | WBErrorCheck (void) |
Check to see whether or not an X11 error was detected. More... | |
int | WBErrorCheckRetry (void) |
Check to see whether or not an X11 error was detected AND can be re-tried. More... | |
const WB_ERROR_INFO * | WBGetLastError (void) |
Obtain a const pointer to the internal WB_ERROR_INFO structure. More... | |
X11 has its own error notification mechanism that normally terminates the application. Since many errors are actually 'expected' (particularly with respect to using the clipboard) it is necessary to process these without program interruption. Normal error handling consists of a notification message sent to stderr, and error information being stored in a set of global variables. Prior to using this information, it is FIRST necessary to clear the error state, and then check for an error after the operation has completed.
Structure definition for X11 error information.
|
static |
Restore X11 XErrorEvent output to stderr.
Call this function to decrement the error output supression counter. Error output will be restored whenever the supression counter returns to zero. Each call to the WBSupressErrorOutput() function should be balanced with a call to this function.
Header File: window_helper.h
Definition at line 3703 of file window_helper.h.
int WBErrorCheck | ( | void | ) |
Check to see whether or not an X11 error was detected.
Call this function to check to see if an XErrorEvent has been processed and stored in the internal WB_ERROR_INFO structure. It is necessary to FIRST call WBErrorClear() before any operation that might result in an error that can THEN be checked for using this function.
Header File: window_helper.h
Definition at line 9594 of file window_helper.c.
int WBErrorCheckRetry | ( | void | ) |
Check to see whether or not an X11 error was detected AND can be re-tried.
Call this function to check to see if an XErrorEvent has been processed and stored in the internal WB_ERROR_INFO structure, and if a retry is possible based on the type and condition of the error. It is necessary to FIRST call WBErrorClear() before any operation that might result in an error that can THEN be checked for retryability using this function.
Header File: window_helper.h
Definition at line 9599 of file window_helper.c.
void WBErrorClear | ( | void | ) |
Clear the 'last error' information obtained via WBGetLastError()
Header File: window_helper.h
Definition at line 9589 of file window_helper.c.
const WB_ERROR_INFO* WBGetLastError | ( | void | ) |
Obtain a const pointer to the internal WB_ERROR_INFO structure.
Call this function to obtain details about the last error from the XErrorEvent passed to the error handler. If there has been no error event, the 'pDisplay' member will always be NULL. You should always call WBErrorClear() to clear out this structure before performing an operation that might result in an XErrorEvent.
Header File: window_helper.h
Definition at line 9611 of file window_helper.c.
|
static |
Supress X11 XErrorEvent output to stderr.
Call this function to increment the error output supression counter. Error output will be restored whenever the supression counter returns to zero. Each call to this function should be balanced with a call to WBAllowErrorOutput().
Header File: window_helper.h
Definition at line 3682 of file window_helper.h.