This is the mail archive of the win32-x11@sources.redhat.com mailing list for the win32-x11 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: Start of plan for XOpenWin


On Sat, 21 Sep 2002, David Fraser wrote:

> Evaluation of each:
> 1) GDI driver
>     + could take over whole system locally
>     - difficult/impossible to X-ify single application

Maybe not. Each drawing in a windows application is done on a device
context (DC) which can be requested inside the application via GetDC.
There is also a function CreateDC which uses a drivername
eg. CreateDC("IBMGRX", "IBM Graphics", "LPT1:", NULL) for an ibm printer.
If we can start an application with an explicitly given DC (created
from the gdi-wrapper driver) then the application will use the driver as
output.

> 2) GDI wrapper
>       + could take over whole system locally
>       ? are copies of gdi.dll are loaded for each app? think not

Each dll is only loaded once (for all applications). So you must tell
the linker not to request gdi32.dll but gdi23-replacement.dll. Don't
know if this is possible.

> 3) Investigate using code from wine x11drv
>     Basically in Wine there's a lot of code that's relevant
>     Alexander Gottwald posted on the cygwin list that he got x11drv, the
>     X11 driver for GDI, to compile but not link
>     Basically a lot of this code could probably be copied and pasted into
>     our project to implement functions as we go along.
>     When we work out how it all works, we may be able to use it straight

Using the code directly is a deadend IMO. The code uses calls to user32
and gdi32 from wine which use symbols like GDI_GetDC or USER_UnLock.
Cleaning this is a lot of work.
But using portions of the code seems to work.

bye
    ago
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723


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