GdkGC and Color question

I'm writing a Gtk'ized fvwmpager applet which shoudl enhance Fvwm with 
the Window Manager hints gnome is expecting.

The look&feel should be something like the FvwmPager. The problem i
have is the drawing of rectangles.

The pager is a widget derived from drawing area. The desktops are
displayed as rectangles. the current active desktop does have a
different color then the inactive desktops. The windows are displayed
in another color and the window having the focus right now is also
displayed in another color.

The problem i have is with styles, graphic contexts and color.

(Yes the widget is currently displaying all the desktops and windows,
means it works somehow).

How do i draw rectangles with arbitrary fill colors and border
colors? the window having the focus should be displyed in white with a 
black border. I currently messing around with gdk_gc_gc() and

The question is: what is style->bg_gc[winstate]? I assume it's the
background style. But why does the background style have a foreground
and a background color? Which color is used with gdk_draw_rectangle
for filling and which one for the border?

To the gnome people:
Fvwm configures it's modules with lines in it's .fvwm2rc file. gnome
is configure with it's own config files. What is the best thing to do
in such a situation? Stay with the Fvwm way so that Fvwm users have
little trouble configuring the widget, or using the Gnome way and
providing facilities to set the colors and stuff from the applet

Michael Lausch/g.a.m.s. edv dienstleistungen gmbh
See my web page <> or query PGP key server for PGP key.
"Reality is that which, when you stop believing in it, doesn't go away".
                -- Philip K. Dick

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