at-spi-idl: /home/gnome-dev/src/at-spi/idl/Accessibility_Registry.idl Source File

# Accessibility_Registry.idl

Go to the documentation of this file.

    00001 /*
    00002  * AT-SPI - Assistive Technology Service Provider Interface
    00003  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
    00004  *
    00005  * Copyright 2001 Sun Microsystems Inc.
    00006  *
    00007  * This library is free software; you can redistribute it and/or
    00008  * modify it under the terms of the GNU Library General Public
    00009  * License as published by the Free Software Foundation; either
    00010  * version 2 of the License, or (at your option) any later version.
    00011  *
    00012  * This library is distributed in the hope that it will be useful,
    00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00015  * Library General Public License for more details.
    00016  *
    00017  * You should have received a copy of the GNU Library General Public
    00018  * License along with this library; if not, write to the
    00019  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00020  * Boston, MA 02111-1307, USA.
    00021  */
    00022
    00023 #include <Accessibility_Event.idl>
    00024 #include <Accessibility_Application.idl>
    00025 #include <Accessibility_Desktop.idl>
    00026
    00027 #ifndef _ACCESSIBILITY_REGISTRY_IDL_
    00028 #define _ACCESSIBILITY_REGISTRY_IDL_
    00029
    00030 module Accessibility {
    00031
    00032   typedef sequence<Desktop> DesktopSeq;
    00033
    00034   interface DeviceEventController;
    00035
    00073   interface Registry : EventListener {
    00074
    00079         oneway void registerApplication (in Application app);
    00080
    00087         void deregisterApplication (in Application app);
    00088
    00096         void registerGlobalEventListener (in EventListener listener,
    00097                                           in string eventName);
    00098
    00107         void deregisterGlobalEventListenerAll (in EventListener listener);
    00108
    00118         void deregisterGlobalEventListener (in EventListener listener,
    00119                                             in string eventName);
    00144         short getDesktopCount ();
    00145
    00154         Desktop getDesktop (in short n);
    00155
    00162         DesktopSeq getDesktopList ();
    00163
    00169         DeviceEventController getDeviceEventController ();
    00170
    00176         void unImplemented ();
    00177         void unImplemented2 ();
    00178         void unImplemented3 ();
    00179         void unImplemented4 ();
    00180         void unImplemented5 ();
    00181         void unImplemented6 ();
    00183     };
    00184
    00186   enum KeyEventType {
    00187     KEY_PRESSED,
    00188     KEY_RELEASED
    00189   };
    00190
    00195   enum EventType {
    00196       KEY_PRESSED_EVENT,
    00197       KEY_RELEASED_EVENT,
    00198       BUTTON_PRESSED_EVENT,
    00200       BUTTON_RELEASED_EVENT
    00202   };
    00203
    00205   enum KeySynthType {
    00206     KEY_PRESS,
    00207     KEY_RELEASE,
    00208     KEY_PRESSRELEASE,
    00209     KEY_SYM,
    00220     KEY_STRING
    00226   };
    00227
    00228   enum ModifierType {
    00229     MODIFIER_SHIFT,
    00230     MODIFIER_SHIFTLOCK,
    00231     MODIFIER_CONTROL,
    00232     MODIFIER_ALT,
    00233     MODIFIER_META,
    00241     MODIFIER_META2,
    00242     MODIFIER_META3,
    00243     MODIFIER_NUMLOCK
    00246   };
    00247
    00252   struct EventListenerMode {
    00253     boolean synchronous;
    00262     boolean preemptive;
    00269     boolean global;
    00279   };
    00280
    00290   typedef unsigned long ControllerEventMask;
    00291
    00293   struct DeviceEvent {
    00294     EventType type;
    00295     long  id;
    00298     short hw_code;
    00311     unsigned short modifiers;
    00321     unsigned long timestamp;
    00327     string event_string;
    00333     boolean is_text;
    00338   };
    00339
    00367   struct KeyDefinition {
    00368     long keycode;
    00369     long keysym;
    00370     string keystring;
    00371     long unused;
    00372   };
    00373
    00374   typedef sequence< KeyDefinition > KeySet;
    00375   typedef sequence< EventType > KeyEventTypeSeq;
    00376   typedef sequence< EventType > EventTypeSeq;
    00377
    00382   interface DeviceEventListener : Bonobo::Unknown {
    00388         boolean notifyEvent (in DeviceEvent event);
    00390         void    unImplemented__ ();
    00391         void    unImplemented_2_ ();
    00392         void    unImplemented_3_ ();
    00393         void    unImplemented_4_ ();
    00394         void    unImplemented_5_ ();
    00395         void    unImplemented_6_ ();
    00397   };
    00398
    00403   interface DeviceEventController : Bonobo::Unknown {
    00404
    00429         boolean registerKeystrokeListener (in DeviceEventListener listener,
    00430                                         in KeySet keys,
    00431                                         in ControllerEventMask mask,
    00432                                         in KeyEventTypeSeq type,
    00433                                         in EventListenerMode mode);
    00434
    00442         void deregisterKeystrokeListener (in DeviceEventListener listener,
    00443                                           in KeySet keys,
    00444                                           in ControllerEventMask mask,
    00445                                           in KeyEventTypeSeq type);
    00446
    00455         boolean registerDeviceEventListener (in DeviceEventListener listener,
    00456                                              in EventTypeSeq typeseq);
    00457
    00464         void deregisterDeviceEventListener (in DeviceEventListener listener,
    00465                                             in EventTypeSeq typeseq);
    00466
    00482         boolean notifyListenersSync (in DeviceEvent event);
    00483
    00495         oneway void notifyListenersAsync (in DeviceEvent event);
    00496
    00517          void generateKeyboardEvent (in long keycode,
    00518                                      in string keystring,
    00519                                      in KeySynthType type);
    00520
    00527          void generateMouseEvent (in long x, in long y, in string eventName);
    00528
    00534          void unImplemented ();
    00535          void unImplemented2 ();
    00536          void unImplemented3 ();
    00537          void unImplemented4 ();
    00539     };
    00540 };
    00541
    00542 #endif