Function

Atspiregister_keystroke_listener

Declaration [src]

gboolean
atspi_register_keystroke_listener (
  AtspiDeviceListener* listener,
  GArray* key_set,
  AtspiKeyMaskType modmask,
  AtspiKeyEventMask event_types,
  AtspiKeyListenerSyncType sync_type,
  GError** error
)

Description [src]

Registers a listener for keystroke events, either pre-emptively for all windows (ATSPI_KEYLISTENER_ALL_WINDOWS), non-preemptively (ATSPI_KEYLISTENER_NOSYNC), or pre-emptively at the toolkit level (ATSPI_KEYLISTENER_CANCONSUME). If ALL_WINDOWS or CANCONSUME are used, the event is consumed upon receipt if one of listeners callbacks returns TRUE (other sync_type values may be available in the future).

Parameters

listener AtspiDeviceListener
 

A pointer to the AtspiDeviceListener for which keystroke events are requested.

 The data is owned by the caller of the function.
key_set An array of AtspiKeyDefinition*
 

A pointer to the AtspiKeyDefinition array indicating which keystroke events are requested, or NULL to indicate that all keycodes and keyvals for the specified modifier set are to be included.

 The argument can be NULL.
 The data is owned by the caller of the function.
modmask AtspiKeyMaskType
 

An AtspiKeyMaskType mask indicating which key event modifiers must be set in combination with keys, events will only be reported for key events for which all modifiers in modmask are set. If you wish to listen for events with multiple modifier combinations, you must call #atspi_register_keystroke_listener once for each combination.

event_types AtspiKeyEventMask
 

An AtspiKeyMaskType mask indicating which types of key events are requested (ATSPI_KEY_PRESSED etc.).

sync_type AtspiKeyListenerSyncType
 

An AtspiKeyListenerSyncType parameter indicating the behavior of the notification/listener transaction.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE if successful, otherwise FALSE.