| AT-SPI C Bindings Reference Manual | ||||
|---|---|---|---|---|
int SPI_init (void); void SPI_event_main (void); void SPI_event_quit (void); SPIBoolean SPI_eventIsReady (void); AccessibleEvent* SPI_nextEvent (SPIBoolean waitForEvent); int SPI_exit (void); void SPI_freeString (char *s); Accessible* SPIAccessibleException_getSource (SPIException *err); char* SPIException_getDescription (SPIException *err); SPIExceptionCode SPIException_getExceptionCode (SPIException *err); SPIExceptionType SPIException_getSourceType (SPIException *err); SPIException; enum SPIExceptionCode; enum SPIExceptionType; SPIRect; void SPI_freeRect (SPIRect *r); char* SPI_dupString (char *s); SPIBoolean SPI_exceptionHandlerPush (SPIExceptionHandler *handler); SPIExceptionHandler* SPI_exceptionHandlerPop (void);
int SPI_init (void);
Connects to the accessibility registry and initializes the SPI.
| Returns : | 0 on success, otherwise an integer error code. |
void SPI_event_main (void);
Starts/enters the main event loop for the SPI services.
(NOTE: This method does not return control, it is exited via a call to SPI_event_quit() from within an event handler).
void SPI_event_quit (void);
Quits the last main event loop for the SPI services, see SPI_event_main
SPIBoolean SPI_eventIsReady (void);
Checks to see if an SPI event is waiting in the event queue. Used by clients that don't wish to use SPI_event_main().
Not Yet Implemented.
| Returns : | TRUE if an event is waiting, otherwise FALSE. |
AccessibleEvent* SPI_nextEvent (SPIBoolean waitForEvent);
Gets the next event in the SPI event queue; blocks if no event is pending and waitForEvent is TRUE. Used by clients that don't wish to use SPI_event_main().
Not Yet Implemented.
| waitForEvent : | a SPIBoolean indicating whether to block or not. |
| Returns : | the next AccessibleEvent in the SPI event queue. |
int SPI_exit (void);
Disconnects from the Accessibility Registry and releases any floating resources. Call only once at exit.
| Returns : | 0 if there were no leaks, otherwise non zero. |
void SPI_freeString (char *s);
Free a character string returned from an at-spi call. Clients of at-spi should use this function instead of free() or g_free(). A NULL string s will be silently ignored. This API should not be used to free strings from other libraries or allocated by the client.
| s : | a character string returned from another at-spi call. |
Accessible* SPIAccessibleException_getSource (SPIException *err);
Get the identity of the object which threw an exception.
Since: AT-SPI 1.4
| err : | the SPIException being queried. |
| Returns : | a pointer to the Accessible object which threw the exception. |
char* SPIException_getDescription (SPIException *err);
Get a text description of the exception that has been thrown. Unfortunately these descriptions tend to be terse and limited in the detail which they can provide.
| err : | the SPIException being queried. |
| Returns : | a brief character string describing the exception. |
SPIExceptionCode SPIException_getExceptionCode (SPIException *err);
Get the SPIExceptionCode telling what type of exception condition has occurred.
Since: AT-SPI 1.4
| err : | the SPIException being queried. |
| Returns : | the SPIExceptionCode corresponding to exception err. |
SPIExceptionType SPIException_getSourceType (SPIException *err);
Get the SPIExceptionType of an exception which has been thrown.
Since: AT-SPI 1.4
| err : | the exception being queried |
| Returns : | the SPIExceptionType corresponding to exception err. |
typedef struct {
SPIExceptionType type;
CORBA_Object source;
CORBA_Environment *ev;
SPIExceptionCode code;
char * desc;
} SPIException;
An opaque object encapsulating information about thrown exceptions.
| SPIExceptionType type; | private |
| CORBA_Object source; | private |
| CORBA_Environment *ev; | private |
| SPIExceptionCode code; | private |
| char *desc; | private |
typedef enum {
SPI_EXCEPTION_UNSPECIFIED,
SPI_EXCEPTION_DISCONNECT,
SPI_EXCEPTION_NO_IMPL,
SPI_EXCEPTION_IO,
SPI_EXCEPTION_BAD_DATA
} SPIExceptionCode;
Exception codes indicating what's gone wrong in an AT-SPI call.
typedef enum {
SPI_EXCEPTION_SOURCE_UNSPECIFIED,
SPI_EXCEPTION_SOURCE_ACCESSIBLE,
SPI_EXCEPTION_SOURCE_REGISTRY,
SPI_EXCEPTION_SOURCE_DEVICE
} SPIExceptionType;
The general source of the failure, i.e. whether the app, registry, or device system has encountered trouble.
typedef struct {
long x;
long y;
long width;
long height;
} SPIRect;
A structure encapsulating a rectangle.
| long x; | The position of the minimum x value of the rectangle (i.e. left hand corner) |
| long y; | The position of the minimum y value of the rectangle's bounds. |
| long width; | Width of the rectangle in pixels. |
| long height; | Height of the rectangle in pixels. |
void SPI_freeRect (SPIRect *r);
Free a SPIRect structure returned from an at-spi call. Clients of at-spi should use this function instead of free() or g_free(). A NULL rect r will be silently ignored. This API should not be used to free data from other libraries or allocated by the client.
Since: AT-SPI 1.6
| r : | a pointer to an SPIRect returned from another at-spi call. |
char* SPI_dupString (char *s);
Since: AT-SPI 1.4
| s : | a UTF-8 string to be duplicated |
| Returns : | a duplicate of the string passed as a parameter, which should be freed via SPI_freeString after use. |
SPIBoolean SPI_exceptionHandlerPush (SPIExceptionHandler *handler);
Install a client-side handler for SPIException instances, which can see and handle any exceptions before chaining them to the next exception handler in the stack.
Since: AT-SPI 1.4
| handler : | an SPIExceptionHandler to install as the first code to deal with exceptions. |
| Returns : | TRUE if the result succeeded, FALSE if hander could not be registered. |