X-Git-Url: https://plomlompom.com/repos/index.html?a=blobdiff_plain;f=windows.c;h=6a649a325b187894c8ddc46b6eb34b51f680f68f;hb=5e78457b82ee45796bd391daeeb1e35ff5b8fe17;hp=ba6401b2191a28f6a64938d3b955905a9ff1e206;hpb=891ff33aec8906fe8203910a26c56650ce74b904;p=plomrogue
diff --git a/windows.c b/windows.c
index ba6401b..6a649a3 100644
--- a/windows.c
+++ b/windows.c
@@ -23,7 +23,7 @@ void scroll_pad (struct WinMeta * win_meta, char dir) {
else if ('-' == dir && win_meta->pad_offset > 0)
win_meta->pad_offset--; }
-struct Win init_window (struct WinMeta * win_meta, char * title) {
+struct Win init_window (struct WinMeta * win_meta, char * title, void * data, void * func) {
// Create and populate Win struct with sane default values.
struct Win win;
win.prev = 0;
@@ -32,6 +32,8 @@ struct Win init_window (struct WinMeta * win_meta, char * title) {
win.title = title;
win.width = 20;
win.height = win_meta->height - 1;
+ win.data = data;
+ win.draw = func;
return win; }
void append_window (struct WinMeta * win_meta, struct Win * win) {