[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    Re: Using MCOP for Qt Accessibility
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       2001-07-27 11:25:23
[Download RAW message or body]

   Hi!

On Thu, Jul 26, 2001 at 11:58:58AM -0700, JP S-C wrote:
> Dear KDE-Multimedia list:
> 
>      I, along with Ramkumar Duraikannu <linux_ram@yahoo.com>, a graduate
> student at the California State University at Sacramento and many other
> members of the Linux accessibility community are interested in using
> MCOP to make Qt/KDE accessible.  We were previously considering using
> DCOP, but then Bill Haneman and Waldo Bastian (among others) brought it
> to our attention that MCOP is more data-oriented and DCOP more
> function-call oriented.

Well, I am not sure myself what I would choose ;) - probably MCOP because I
know it a lot better, and in doubt it also is more powerful, portable and more
independant of Qt. However all applications running under KDE currently
communicate already using DCOP, so that some of the structures I will
outline below (like all applications registering themselves to a central
server) already exist with DCOP.

> [...]
> 
> Specifically, we are interested in integrating MCOP into Qt in a
> cross-platform fashion.  We would like to be able to then form some sort
> of API so we can do things like call a function that will give us all
> information about or a specific attribute of an application.
> 
> Can you give us advice on how to do this or help us?

(Sorry for not getting back to your first mail, I kind-of got lost in other
issues, like the upcoming KDE2.2 release).

I think the most important thing is that MCOP is a communication protocol
and object model, but it doesn't know about widgets, buttons, texts,
character sets, ... and so on. So I think you can roughly partition your
task in four subtasks:

(1) get the information you need from Qt - it might be that Qt3 (as Martin
Vogt has adressed) already offers a lot of the information you want and
need for accessibility - there is not much I can say here, since I am
not that much of a Qt expert - in doubt it might be a good idea to talk
with the Trolls about it

(2) define interfaces how a single application exposes this functionality
via MCOP - a very very simple example could be

// accessibility.idl file
module Accessibility {
    interface Widget {
        attribute string text;
    };
    interface Button : Widget {
        void click();
    };
    interface Application {
        attribute string name;

        attribute sequence<Widget> widgets;
    };
};

Then each running application could have an Accessibility::Application
interface (which you implement using the knowledge of (1)), and an
accessibility software could iterate through the widgets, display their
texts, and click on buttons. Well - this is just a simple example. ;)

Here you can also think about whether you want to make one IDL interface
per (major) widget, or if you rather want to proxy all properties exported
by Qt generically, so that you have a few simple IDL interfaces, that will
allow accessing all current and future widgets. It's a question of looking
what Qt provides and what is the most elegant way to go, then.

(3) implement a server that all applications on startup register themselves
with, for example looking like

// accessibility.idl file
module Accessibility {
    interface Server {
        attribute sequence<Application> applications;

        void addApplication(Application app);
        void removeApplication(Application app);
    };
};

Then applications could on startup find the accessibility server, register
themselves with that, and the accessibility software could iterate through
all applications, and give them commands.

(4) porting MCOP to other platforms

If cross-platform means that you want to run it under Windows, then you will
need to port MCOP first. It should not be too hard, especially if you leave
out features you don't need (like dynamically loading modules). However be
prepared to port some unixisms, like opendir() to their windows equivalents.

If you "just" mean all possible Unix platforms, then you are pretty much done
right now, it should run almost everywhere.


As for help, I can offer help in form of answering questions (like I can
do to all people programming around with MCOP), or reviewing IDL files and
such, but I probably won't have the time to really write pieces of code.

   Cu... Stefan
-- 
  -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany
     KDE Developer, project infos at http://space.twc.de/~stefan/kde *-         
_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic