commit 14ba87197707beb689f7d66f3beae4bfd5112e34
parent c2475e7e28c3d562e975b8eed7c76391f2fe767a
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Tue, 13 Jun 2006 09:53:55 +0200
changed blitz_create_win
Diffstat:
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/liblitz/blitz.h b/liblitz/blitz.h
@@ -77,8 +77,8 @@ void blitz_loadfont(BlitzFont *font, char *fontstr);
int blitz_loadcolor(BlitzColor *c, char *colstr);
/* window.c */
-void blitz_create_win(BlitzWindow *win, unsigned long mask,
- int x, int y, int w, int h);
+BlitzWindow *blitz_create_win(unsigned long mask,
+ int x, int y, int w, int h);
void blitz_resize_win(BlitzWindow *win,
int x, int y, int w, int h);
void blitz_destroy_win(BlitzWindow *win);
diff --git a/liblitz/window.c b/liblitz/window.c
@@ -8,10 +8,10 @@
#include "blitz.h"
-void
-blitz_create_win(BlitzWindow *win, unsigned long mask,
- int x, int y, int w, int h)
+BlitzWindow *
+blitz_create_win(unsigned long mask, int x, int y, int w, int h)
{
+ BlitzWindow *win = cext_emallocz(sizeof(BlitzWindow));
XSetWindowAttributes wa;
wa.override_redirect = 1;
wa.background_pixmap = ParentRelative;
@@ -26,6 +26,7 @@ blitz_create_win(BlitzWindow *win, unsigned long mask,
win->rect.y = y;
win->rect.width = w;
win->rect.height = h;
+ return win;
}
void