commit 514018b292e17629f0f67e5a89816e3e0bd58d39
parent a894cc3bf524bf933917490a8660998eed348cb5
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Wed, 14 Jun 2006 19:09:45 +0200
added prelim version of tile.c
Diffstat:
3 files changed, 28 insertions(+), 2 deletions(-)
diff --git 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
@@ -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
@@ -0,0 +1,27 @@
+/*
+ * (C)opyright MMIV-MMVI Anselm R. Garbe <garbeam at gmail dot com>
+ * See LICENSE file for license details.
+ */
+
+#include <stdlib.h>
+
+#include <cext.h>
+
+#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);
+}