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: drawables


Rob,

If you have a pDrawable and pDrawable->type == DRAWABLE_WINDOW then you
actually have a pWindow already and pWindow == pDrawable.

Just look at xc/programs/Xserver/include/windowstr.h/WindowRec and you'll
see that the first member in a WindowRec is actually a DrawableRec, so the
address of that DrawableRec is the same as the address of the WindowRec.

The exact same thing is true for PixmapRec's and we have to use that
knowledge in winfillsp.c/winFillSpansNativeGDI to get a pixmap pointer when
pDrawable->type == DRAWBLE_PIXMAP via

pPixmap = (PixmapPtr) pDrawable;


I hope that clarifies things.

This may actually be documented in the Porting Layer Definition, but I don't
remember for sure.

Sounds like you are making good progress.  Keep it up and I hope to see what
you have soon,

Harold

> -----Original Message-----
> From: cygwin-xfree-owner@cygwin.com
> [mailto:cygwin-xfree-owner@cygwin.com]On Behalf Of Robert Collins
> Sent: Tuesday, April 09, 2002 12:36 AM
> To: Cygwin-Xfree
> Subject: drawables
>
>
> For rootless, I'd ideally be able to go from a pdrawable to a pWin. Is
> there a reliable way to do this?
>
> Some scenarios where this makes sense:
> 1) Anything passed a pDrawable + a pGC - if it's a window we want a HDC
> for that window.
> 2) Clipping. If we are drawing a window we need a win32 clipping context
> so that we don't overwrite other onscreen windows that happen to be in
> front of us. (At the moment we draw onto the win32 screen DC, because I
> can't go from pDrawable to pWin in the setspans/fillspans routines.
>
> BTW, I have rootless mode happily drawing all the windows, with a win32
> window on the task bar. I'm deliberatly not writing a 'internal window
> manager' at this point.
>
> So we're nearly at my proof-of-concept target.
>
> Rob


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