This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: X client wrapper for Win apps?


Alexander Gottwald wrote:

On Thu, 19 Sep 2002, Jehan wrote:


4. Give me valid point (like the hardware thing) and I'll just up. API
compatibility isn't a valid one since it can be easily fix (more easily
that writing a new GDI driver).

Just explain the design you have in mind. Is it

Application      User32.dll          User32-orig.dll     XWin

   ------------>LineTo(x,y)----+---->LineTo(x,y)
                               |
                               +-------------------->shadowDrawLine

If so, then you must call the xserver drawing function directly
Application      User32.dll          User32-orig.dll     XLib

   ------------>LineTo(x,y)----+---->LineTo(x,y)
                               |
                               +-------------------->XDrawLine

In this case you have the X11 Protocol overhead again.

And of course the problem with the replaced User32.dll

My proposal was

Application    User32.dll          GDI            DisplayGDI       XLib

   ---------->LineTo(x,y)---->gdiLineTo(x,y)--->gdiLineTo(x,y)
                                    |
                                    +-------------------------->XDrawLine

This requires the same work as replacing user32 since all exported functions
from the library must be replace with stubs calling the original functions
and the code for converting the calls to X11 or the Xserver functions
must be written.

bye
   ago

Now we're talking. This is the type of thing we should be discussing. It is clear that
doing this Windows->X thing would useful and there is a fair amount of interest in
it. I suggest we discuss an implementation strategy and do it.

Maybe we can separate out the "why would you want to do that" thread from a
planning thread...
I've thought about several ways for doing various things but really need to read up
more of the docs on how the GDI works. Unless of course someone wants to post
a nice explanation of whats relevant. Pros/cons of the two approaches above?

Essentialy I've thought that wine has a lot of the code we need but we probably
need to start a separate system to establish the basic framework before we try
getting the wine code ported. Maybe I'm wrong. Anyone tried to compile x11drv?

Also, it may be advantageous to only use X for certain applications ... in that case
you want to be able to set (say with environment variables like DISPLAY) whether
you're using X or not and which display you're exporting it to. This would also
involve allowing different users to logon at the same time from different X servers
etc. If we're looking at this type of approach, I'm not sure a GDI driver would work
because you may need different gdi drviers for different apps - is that possible in Windows?

I've made a whole lot of notes on different possible approaches which might be useful
to start things off which I can post as the discussion proceeds...



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]