Multiple Display support Update



Hi Guys,

Here's an update on how stuff are going on Multiple Display support front...

Any [Feedback|Comment] are welcome !

Especially if you think I forgot something or something's wrong.

To abstract the concept of multiple displays and multiple screens in each
display. I've created three main object :
GdkDisplayMgr, GdkDisplay and GdkScreen.

GdkDisplayMgr will replace all the global variables related to display,
root window, etc. present at the moment in Gdk. This object will only be 
instanciated once during the initialization of Gdk. That will be the
only global object needed to get display/screen info.

This object is used to :
- create new displays.
- get the default display.
- get a list of display currently in use.
- etc.

GdkDisplay holds all info about a display mainly :
- # of screen available.
- list of screens.
It is used to :
- get default screen
- get a specific screen
- etc.

GdkScreen holds all info about a screen :
- root window
- leader window
- list of visuals
- default visual
- list of GCs
- default GC
- related GdkDisplay
- and so on.

GdkDisplayMgr has only virtual functions that are to be implemented
for each platform (I've only implemented it of X11).
GdkDisplay is a virtual object it needs a platform dependent subclass 
for X11 it's GdkDisplayImplX11. Same for GdkScreen a virtual object for gdk 
with a platform dependent subclass (GdkScreenImplX11 for X).

Now the integration part...

There are lot of stuff to be changed in gdk to make the multiple display
work. From my evaluation, I've noted 207 functions in gdk-x11 that will have to 
be altered to support MD. (If you are interested I've got a list of them).

There are 4 main type of changes to be done :

- Add a GdkScreen member functions to objects that are heavily using display and
  screen info such as GdkDrawable, GdkColormap, GdkCursor, GdkGC, etc.
- Objects that uses display and scr but that derive from objects having access to
  GdkScreen (e.g. GdkWindow get GdkScreen from GdkDrawable). Hopefully just a big 
  sed job.
- Feature/Architecture changes  e.g. for GdkEvents I need to change the logic 
  to be able to poll events from more than one display without blocking any 
  display (others GdkVisuals, GdkAtom, etc.).
- Plain functions such as gdk_init_windowing_* and co, These fcts needs to be 
  modified to support MD and still provide the same fct signature for backward
  compatibility.  

I've got the classes implemented, I'm currently working on the GdkEvents.
If you want to see my code, email me.

Cheers,

A+

Erwann


- I speak for myself, not for my employer. -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Erwann Chénedé, Sun Microsystems Ireland
  Desktop Applications & Middleware Group
  Phone  : +353 1 8199031        xt: 19031
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]