I've been hacking on some random code recently. Because most of the regular stuff has become boring and uninteresting. Here is another one of those small, yet cool snippet of code from my ~/hacks.
gdk_window_set_decorations(GDK_WINDOW(widget->window) , 0); gdk_window_shape_combine_mask(GDK_WINDOW(widget->window), mask, 0, 0);
The above code sets a mask on a window. This is the way to build skinnable interfaces which allow transparent windows. Working on some skunkworks which needs to display shaped windows.
You can get the code from here. There might be better ways to do this, but this one works.--
Man must shape his tools lest they shape him.
-- Arthur R. Miller