diff --git a/liblitz/Makefile b/liblitz/Makefile index 0e63003b..3ab70782 100644 --- a/liblitz/Makefile +++ b/liblitz/Makefile @@ -6,7 +6,7 @@ include ../config.mk CFLAGS += -I../libixp -I../libcext LDFLAGS += -L../libixp -lixp -L../libcext -lcext -SRC = blitz.c color.c font.c label.c tile.c widget.c +SRC = blitz.c color.c font.c input.c label.c tile.c widget.c OBJ = ${SRC:.c=.o} all: liblitz.a diff --git a/liblitz/blitz.h b/liblitz/blitz.h index f73db71a..3d8cfef7 100644 --- a/liblitz/blitz.h +++ b/liblitz/blitz.h @@ -112,7 +112,6 @@ void blitz_drawborder(BlitzDraw *d); /* input.c */ BlitzInput *blitz_create_input(Drawable drawable, GC gc); -void blitz_draw_input(BlitzInput *t, char *text); void blitz_destroy_input(BlitzInput *t); /* tile.c */ diff --git a/liblitz/input.c b/liblitz/input.c new file mode 100644 index 00000000..d360fd9f --- /dev/null +++ b/liblitz/input.c @@ -0,0 +1,27 @@ +/* + * (C)opyright MMIV-MMVI Anselm R. Garbe + * See LICENSE file for license details. + */ + +#include + +#include + +#include "blitz.h" + +BlitzInput * +blitz_create_input(Drawable drawable, GC gc) +{ + BlitzInput *i = cext_emallocz(sizeof(BlitzInput)); + i->drawable = drawable; + i->gc = gc; + blitz_add_widget(BLITZWIDGET(i)); + return i; +} + +void +blitz_destroy_input(BlitzInput *i) +{ + blitz_rm_widget(BLITZWIDGET(i)); + free(i); +}