This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: X client wrapper for Win apps?
Stuart Adamson wrote:
Every Windows draw command is translated into calls to a GDI
driver. this
driver is either the driver of the graphics card or a
printer. The people
from wine already have written a driver which exports a GDI
interface and
maps all calls to X11. Maybe this is a starting point.
But xfree86 will also be using this interface to draw to the screen (as
will the logon box etc). I can see this becoming rather circular ....
You need to be able to set the GDI context per application.
Maybe the way forward is to filter calls to user32.dll (where most of the
basic
windowing functions end up). By filtering I mean renaming user32.dll to
user32-real.dll and writing your own user32.dll which either sends requests
to
X11 or to user32-real.dll, depending on the process id of the requesting
process.
Stuart
Yes, this way makes more sense and in fact I've started investigating it
already.
To make debugging easy rather than replacing user32.dll I'm using
Windows hooks
to try and catch all the function calls and log them first ... then
we'll know which
ones to work on to get simple apps going ... it also gives us the
ability to call both
the original user32.dll function and a modified one which will do
something with X
which might be useful in debugging. Not much progress yet, just got the
hooks working...