Monday, July 21, 2008

Detach now compiles

The Detach library now compiles. (!) It's written in C and is included in libawn-extras in my branch. This will allow any applet to detach just like to-do, run, and SlickSwitcher do. Unfortunately, there's not too much to see now. You can look at the source code to get an idea of what the it'll be like. Here's some examples:
GObject *d;
d = detach_new(applet);
detach_add(d, widget);
detach_set_icon_type(d,DETACH_ICON_SURFACE);
detach_set_surface(d, surface);
This is only the second thing I've done in C, and, for me, the process has been surprisingly easy. C does seem somewhat intimidating with pointers and type casting, etc., but it's really not that hard. I learned a lot by just looking at Awn's (and -Extras') source code.

Next I'm probably going to do Python bindings for it so I can test it more easily.

No comments: