quinn-os/programs/gui/textboxtest.c
2016-02-02 15:48:33 +10:00

39 lines
700 B
C

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "quinn.h"
void exit_callback(int wh) {
quinn_exit();
exit(0);
}
int main(int argc, char **argv) {
struct window_req_t *req;
int window_handle;
char buff[10];
struct widget_t *textbox;
quinn_init();
req = (struct window_req_t *)malloc(sizeof(struct window_req_t));
req->x = 100;
req->y = 100;
req->width = 150;
req->height = 150;
req->icon = NULL;
req->flags = 0;
strcpy(req->name, "Textbox Test");
window_handle = quinn_req_window(req, exit_callback);
free(req);
textbox = quinn_add_textbox(window_handle, 10, 10, 130, 25, NULL, NULL);
while (1) {
quinn_process();
quinn_yield();
}
quinn_exit();
}