swk

static widget kit
git clone git://git.suckless.org/swk
Log | Files | Refs | README | LICENSE

commit ddd21e594a8527607dfa503d3639179335182137
parent ee131f1a38870739d153d5e97cdd4b2209a37cba
Author: pancake <pancake@nopcode.org>
Date:   Wed, 18 Aug 2010 20:14:28 +0200

* Add 'uninstall' target
* Add more information in README
* Display warning when image cannot be loaded
Diffstat:
Makefile | 7+++++++
README | 14+++++++++++++-
swk.c | 5++++-
3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -51,6 +51,13 @@ install: mkdir -p ${DESTDIR}/${LIBDIR}/pkgconfig cp swk.pc ${DESTDIR}/${LIBDIR}/pkgconfig/swk.pc +deinstall uninstall: + rm -f ${DESTDIR}/${INCDIR}/swk.h + rm -f ${DESTDIR}/${LIBDIR}/libswk.a + rm -f ${DESTDIR}/${LIBDIR}/libswk.so + rm -f ${DESTDIR}/${LIBDIR}/mk/swk.mk + rm -f ${DESTDIR}/${LIBDIR}/pkgconfig/swk.pc + static: libswk.a shared: libswk.so diff --git a/README b/README @@ -3,8 +3,20 @@ SWK - simple widget kit swk is a minimalist widget kit with support for SDL and X11 +How to build for SDL: +--------------------- +make PREFIX=/usr +sudo make install PREFIX=/usr + + +How to build for X11: +--------------------- +make x PREFIX=/usr +sudo make install PREFIX=/usr + + Requirements -============ +------------ In order to build swk you need SDL, SDL-ttf and SDL-image ArchLinux: pacman -S sdl sdl_ttf sdl_image diff --git a/swk.c b/swk.c @@ -525,8 +525,11 @@ swk_image_free(SwkBox *b) { void swk_image(SwkEvent *e) { - if(e->box->data == NULL) + if(e->box->data == NULL) { e->box->data = swk_gi_img_load(e->box->text); + if(e->box->data) + fprintf(stderr, "Cannot find image %s\n", e->box->text); + } switch(e->type) { case EExpose: if (e->box->data)