* Boston, MA 02111-1307, USA.
*/
-#include <Bonobo.idl>
+#include <Bonobo_Unknown.idl>
#include <Event.idl>
#include <Application.idl>
#include <Desktop.idl>
};
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;
KeyEventType type;
- ModifierSeq modifiers;
+ unsigned short modifiers;
};
+ typedef sequence< long > KeySet;
+ typedef sequence< KeyEventType > KeyEventTypeSeq;
+
interface KeystrokeListener {
boolean keyEvent (in KeyStroke key);
};
- interface DeviceEventController {
+ 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);
/**
* generateKeyEvent: