Re: gdk_window_set_background?
- From: Havoc Pennington <hp redhat com>
- To: Vicki Stanfield <vicki dialupnet com>
- Cc: GTK-List <gtk-list gnome org>
- Subject: Re: gdk_window_set_background?
- Date: 18 May 2001 23:40:06 -0400
Vicki Stanfield <vicki dialupnet com> writes:
> What is the function gdk_window_set_background used for? I have used
> gtk_windows, but I don't understand how a gdk_window fits into the
> scheme. Can someone explain it to me (as if I were a six year old)?
>
GdkWindow is a primitive window in the low-level windowing system. A
window in this sense is just a rectangular screen area that has a
background color, receives events, and you can draw on it. It has zero
"intelligence."
A widget is a higher-level abstraction, adding features such as
layout management, and adding some specific functionality such as
being a clickable button. Widgets can use from zero to infinite
GdkWindows to implement their functionality.
GtkWindow and GdkWindow have nothing special to do with one another,
aside from the usual fact that widgets can use GdkWindow in their
implementation.
gdk_window_set_background() sets the background color of a
GdkWindow. But this should only be done by the widget that
owns/creates the GdkWindow; if you try to do it, the widget is likely
to just change it back to whatever it wanted.
Setting the background with the techniques in
http://pobox.com/~hp/gtk-colors.html will end up calling
gdk_window_set_background() internally, but you don't need
to use gdk_window_set_background() directly.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]