* Boston, MA 02111-1307, USA.
*/
-#include <Bonobo.idl>
+#include <Bonobo_Unknown.idl>
#include <Event.idl>
#include <Application.idl>
#include <Desktop.idl>
+#ifndef _ACCESSIBILITY_REGISTRY_IDL_
+#define _ACCESSIBILITY_REGISTRY_IDL_
+
module Accessibility {
typedef sequence<Desktop> DesktopSeq;
* Register a new application with the accessibility broker.
*
**/
- void registerApplication (in Application application);
+ oneway void registerApplication (in Application application);
/**
* deregisterApplication:
*
**/
- void deregisterGlobalEventListener (in EventListener listener);
+ void deregisterGlobalEventListenerAll (in EventListener listener);
+ /**
+ * deregisterGlobalEventListener:
+ * @listener: the requesting @EventListener
+ * @eventName: a string indicating the type of events
+ * return values: void
+ *
+ * Request that a previously registered client stop receiving
+ * global notifications for events of a certain type.
+ *
+ **/
+
+ void deregisterGlobalEventListener (in EventListener listener,
+ in string event_name);
/**
* event types: "Window" "Desktop"
* "Window:Create" "Window:Destroy"
KEY_RELEASED
};
+ enum EventType {
+ KEY_PRESSED_EVENT,
+ KEY_RELEASED_EVENT
+ };
+
+ enum KeySynthType {
+ KEY_PRESS,
+ KEY_RELEASE,
+ KEY_PRESSRELEASE,
+ KEY_SYM
+ };
+
enum ModifierType {
+ MODIFIER_SHIFT,
MODIFIER_ALT,
- MODIFIER_META,
MODIFIER_CONTROL,
- MODIFIER_SHIFT,
+ MODIFIER_META,
MODIFIER_META2,
- MODIFIER_META3
+ MODIFIER_META3,
+ MODIFIER_SHIFTLOCK,
+ MODIFIER_NUMLOCK
};
- typedef sequence<ModifierType> ModifierSeq;
+ struct ControllerEventMask {
+ unsigned long value;
+ unsigned short refcount;
+ };
struct KeyStroke {
long keyID;
+ short keycode;
+ unsigned long timestamp;
KeyEventType type;
- ModifierSeq modifiers;
+ unsigned short modifiers;
+ };
+
+ struct DeviceEvent {
+ long eventID;
+ short hw_code;
+ unsigned long timestamp;
+ EventType type;
+ unsigned short modifiers;
};
- interface KeystrokeListener {
+ typedef sequence< long > KeySet;
+ typedef sequence< KeyEventType > KeyEventTypeSeq;
+
+ interface KeystrokeListener : Bonobo::Unknown {
boolean keyEvent (in KeyStroke key);
};
- interface DeviceEventController {
+ interface DeviceEventListener : Bonobo::Unknown {
+ boolean notifyEvent (in DeviceEvent event);
+ };
+
+ interface DeviceEventController : Bonobo::Unknown {
/**
* registerKeystrokeListener:
* @listener: a @KeystrokeListener which will intercept key events.
+ * @keys: a @KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
+ * @mask: a @ControllerEventMask filtering the intercepted key events.
+ * @type: an @EventType mask that may created by ORing event types together.
+ * @is_synchronous: a @boolean indicating whether the listener should
+ * receive the events synchronously, potentially consuming them,
+ * or just be notified asynchronously of those events that have
+ * been generated.
* Returns: void
*
* Register to intercept keyboard events, and either pass them on or
* consume them.
*
**/
- void registerKeystrokeListener (in KeystrokeListener listener);
+ void registerKeystrokeListener (in KeystrokeListener listener,
+ in KeySet keys,
+ in ControllerEventMask mask,
+ in KeyEventTypeSeq type,
+ in boolean is_synchronous);
+
+ /**
+ * deregisterKeystrokeListener:
+ * @listener: a @KeystrokeListener which will intercept key events.
+ * @keys: a @KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
+ * @mask: a @ControllerEventMask filtering the intercepted key events.
+ * @type: an @EventType mask that may created by ORing event types together.
+ * @is_synchronous: a @boolean indicating whether the listener should
+ * receive the events synchronously, potentially consuming them,
+ * or just be notified asynchronously of those events that have
+ * been generated.
+ * Returns: void
+ *
+ * De-register a previously registered keyboard eventlistener.
+ *
+ **/
+ void deregisterKeystrokeListener (in KeystrokeListener listener,
+ in KeySet keys,
+ in ControllerEventMask mask,
+ in KeyEventTypeSeq type,
+ in boolean is_synchronous);
+ boolean notifyListenersSync (in DeviceEventListener listener,
+ in DeviceEvent event);
+
+ oneway void notifyListenersAsync (in DeviceEventListener listener,
+ in DeviceEvent event);
+
/**
* generateKeyEvent:
- * @keyEventID: a long integer indicating which keypress is synthesized.
+ * @keycode: a long integer indicating the keycode of
+ * the keypress to be synthesized.
+ *
+ * Note that this long may be truncated before being
+ * processed, as keycode length may be platform-dependent
+ * and keycode ranges are generally much smaller than
+ * CORBA_long.
+ *
* Returns: void
*
* Synthesize a keypress event.
*
**/
- void generateKeyEvent (in long keyEventID);
+ void generateKeyEvent (in long keycode, in KeySynthType type);
/**
* generateMouseEvent:
void generateMouseEvent (in long x, in long y, in string eventName);
};
};
+
+#endif