Re: drawables...

>what's the real difference between GdkWindow, GdkPixmap y
>GdkDrawable?... I find this three types the same in practice

A GdkDrawable is an abstract class that is inherited from by both
GdkWindow and GdkPixmap. A drawable is an object that can be used as
the argument to gdk_draw_*() functions.

Thus, GdkWindow and GdkPixmap both represents objects that can be
drawn upon. GdkWindow is the only one that can ever be displayed
directly on a screen. To get the contents of a GdkPixmap to be
visible, you have to draw the pixmap into a GdkWindow (using
gdk_draw_pixmap(window, pixmap, ....)).

To use X Window terminology, a pixmap is an offscreen, server-side
drawable resource; a window is mappable, server-side drawable
resource. only windows that are mapped are visible, so its possible to
draw into a window without the result being visible. drawing into a
pixmap, by contrast, is never visible until an extra step is taken, as
described above.

The final part of the trinity is a GdkImage, which is a client-side
drawable. It too can never appear on the screen without being drawn
into a GdkWindow.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]