<2001-10-13 Louise Miller <louise.miller@sun.com>
[platform/core/uifw/at-spi2-atk.git] / idl / Registry.idl
index 91359f2..96da28b 100644 (file)
@@ -1,8 +1,33 @@
-#include <Bonobo.idl>
+/* 
+ * AT-SPI - Assistive Technology Service Provider Interface 
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#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;
@@ -19,7 +44,7 @@ module Accessibility {
          * Register a new application with the accessibility broker.
          *
         **/
-        void registerApplication (in Application application);
+        oneway void registerApplication (in Application application);
 
        /**
          * deregisterApplication:
@@ -57,7 +82,20 @@ module Accessibility {
          *
         **/
 
-        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"
@@ -120,38 +158,57 @@ module Accessibility {
   };
 
   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:
@@ -176,3 +233,5 @@ module Accessibility {
          void generateMouseEvent (in long x, in long y, in string eventName);
     }; 
 };
+
+#endif