From 1030dc837b10a03a02a85d5504cbeec168ce49e2 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 03 May 2010 21:53:47 +0000 Subject: Import XaoS r489 (trunk after version 3.5) --- (limited to 'src/ui/ui-drv/qt/ui_qt.c') diff --git a/src/ui/ui-drv/qt/ui_qt.c b/src/ui/ui-drv/qt/ui_qt.c new file mode 100644 index 0000000..1ac3b0a --- /dev/null +++ b/src/ui/ui-drv/qt/ui_qt.c @@ -0,0 +1,99 @@ +#include "aconfig.h" +#ifdef TEMPLATE_DRIVER +/*includes */ +#include + +static int template_set_color(int r, int g, int b, int init) +{ + return ( /*pixel value or -1 for full palette */ -1); +} + +static void template_setpalette(ui_palette pal, int start, int end) +{ +} + +static void template_print(int x, int y, CONST char *text) +{ +} + +static void template_display() +{ +} + +static void template_flip_buffers() +{ +} + +void template_free_buffers(char *b1, char *b2) +{ +} + +int template_alloc_buffers(char **b1, char **b2) +{ + return 1; /* bytes per scanline */ +} + +static void template_getsize(int *w, int *h) +{ +} + +static void +template_processevents(int wait, int *mx, int *my, int *mb, int *k) +{ +} + +static int template_init() +{ + return ( /*1 for sucess 0 for fail */ 1); +} + +static void template_uninitialise() +{ +} + +static void template_getmouse(int *x, int *y, int *b) +{ +} + + +static void template_mousetype(int type) +{ +} + +static struct params params[] = { + {"", P_HELP, NULL, "Template driver options:"}, + {"-flag", P_SWITCH, &variable, "Example flag..."}, + {NULL, 0, NULL, NULL} +}; + +struct ui_driver template_driver = { + "Template", + template_init, + template_getsize, + template_processevents, + template_getmouse, + template_uninitialise, + template_set_color, /*You should implement just one */ + template_set_palette, /*of these and add NULL as second */ + template_print, + template_display, + template_alloc_buffers, + template_free_buffers, + template_flip_buffers, + template_mousetype, /*This should be NULL */ + NULL, /*flush */ + 8, /*text width */ + 8, /*text height */ + UGLYTEXTSIZE, + params, + 0, /*flags...see ui.h */ + 0.0, 0.0, /*width/height of screen in centimeters */ + 0, 0, /*resolution of screen for windowed systems */ + UI_C256, /*Image type */ + 0, 255, 255 /*start, end of palette and maximum allocatable */ + /*entries */ +}; + +/* DONT FORGET TO ADD DOCUMENTATION ABOUT YOUR DRIVER INTO xaos.hlp FILE!*/ + +#endif -- cgit v0.9.1