[lazarus] GTK team: please specify!

Marc Weustink marc at dommelstein.net
Sun Nov 2 19:22:47 EST 2003


At 19:28 2-11-2003, Micha Nelissen wrote:
>Mattias Gaertner wrote:
>
>>On Sun, 2 Nov 2003 15:03:10 +0100
>>Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
>>
>>>>The WinAPI specifies that GetDC(GetDesktopWindow()) should return a 
>>>>device context of the screen. We can use this DC to draw on.
>>>
>>>Very funny. ;)
>>>What has the winapi to do with the gtk?
>>>We need the window DC without clipping and we need an event to know, when
>>>the gtk has finished painting everything. And during moving we have to
>>>paint as well.
>>>When we got this, we can omit the paint on every message and we can omit
>>>the designer widgets, because the rest is already implemented. This
>>>solution would be very near to my initial wish in a former mail.
>>>I will do some experiments...
>>
>>Ok. Maybe I found the solution.
>>Now to the LCL.
>>GetDC will just return the "normal" device context for a window. Under gtk
>>this is without the child windows (they are clipped away). The designer

Just found out that clipping can be set by gdk though gdk_gc_set_subwindow.
Options are:
   GDK_CLIP_BY_CHILDREN  only draw onto the window itself.
   GDK_INCLUDE_INFERIORS Draw onto the window and child windows.


>>needs a DC with childs. Something like GetRawDC or GetWholeDC
>>or GetDCForWholeWindow or GetDesignerDC or ... . I guess under win32api this
>>is already the default, so you have little to do. If not, how does win32api
>>calls it?
>
>This is determined at control creation time, there isn't a seperate 
>function for that. CreateWindow help:

[snip]


>Where does that leave us?
>
>OTOH, it is possible to create transparent window in the win32 interface. 
>Is it too in gtk?

GDK can it. gdk_window_shape_combine_mask and co

Marc






More information about the Lazarus mailing list