added prelim version of tile.c

This commit is contained in:
Anselm R. Garbe 2006-06-14 19:09:45 +02:00
parent a894cc3bf5
commit 514018b292
3 changed files with 28 additions and 2 deletions

View File

@ -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

View File

@ -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 */

27
liblitz/input.c Normal file
View File

@ -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);
}