RE: drawables

2002-04-09 Thread Robert Collins



 -Original Message-
 From: Harold Hunt [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, April 09, 2002 3:11 PM

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

Yes it is sortof - some frameworks have defined mechanisms for RTTI, and
I hate to guess wrong...
 
 Sounds like you are making good progress.  Keep it up and I 
 hope to see what you have soon,

So do I :}.

As soon as I get the mouse going again I think I'll send the patch in.

Rob



drawables

2002-04-08 Thread Robert Collins

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



RE: drawables

2002-04-08 Thread Harold Hunt

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: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]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