Inheritance: Accessible
Beispiel #1
0
        internal Desktop(Application registry)
            : base(registry, "/org/a11y/atspi/accessible/root")
        {
            lock (sync) {
                if (instance == null)
                    instance = this;
                else
                    throw new Exception ("Attempt to create a second desktop");
            }
            role = Role.DesktopFrame;
            children = new List<Accessible> ();

            stateSet = new StateSet ();
            stateSet.Add (StateType.Enabled);
            stateSet.Add (StateType.Sensitive);
            stateSet.Add (StateType.Showing);
            stateSet.Add (StateType.Visible);

            InitEvents ();
        }
Beispiel #2
0
 public static void Terminate()
 {
     lock (sync) {
         instance = null;
     }
 }
Beispiel #3
0
        internal Registry(bool startLoop)
            : base("org.a11y.atspi.Registry")
        {
            lock (sync) {
                if (instance != null)
                    throw new Exception ("Attempt to create a second registry");
                instance = this;
            }

            bus = GetAtspiBus ();
            if (bus == null)
                bus = Bus.Session;

            ObjectPath op = new ObjectPath ("/org/a11y/atspi/registry");
            proxy = Registry.Bus.GetObject<IRegistry> ("org.a11y.atspi.Registry", op);
            eventListeners = new Dictionary<string, int> ();
            RegisterEventListener ("Object:ChildrenChanged");
            RegisterEventListener ("Object:StateChanged");
            RegisterEventListener ("Object:PropertyChange");

            applications = new Dictionary<string, Application> ();
            applications [name] = this;
            desktop = new Desktop (this);
            applications [desktop.GetAlternateBusName ()] = this;
            accessibles [SPI_PATH_ROOT] = desktop;

            busProxy = Bus.GetObject<IBus> ("org.freedesktop.DBus", new ObjectPath ("/org/freedesktop/DBus"));

            PostInit ();
            desktop.PostInit ();

            if (DeviceEventController.Instance == null)
                new DeviceEventController ();

            if (startLoop && loopThread == null) {
                loopThread = new Thread (new ThreadStart (Iterate));
                loopThread.IsBackground = true;
                loopThread.Start ();
            }
        }