Inheritance: Application
Beispiel #1
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 ();
            }
        }
Beispiel #2
0
 public static void Terminate()
 {
     instance.TerminateInternal ();
     Desktop.Terminate ();
     instance = null;
 }