master
steffen 13 years ago
parent fecfe775c2
commit 86ef5ffb33

@ -1,4 +1,4 @@
/* $id: Exp $ */
/* $Id: gui.c,v 1.3 2013/02/16 20:29:16 steffen Exp $ */
/***************************************************************************
* gui.c
*

@ -28,6 +28,7 @@
#include "osmroute.h"
#define GUI_TEXTLEN 256
#define GUI_MAX_ITEM 256
enum {
EGUI_NONE,
@ -38,6 +39,14 @@ enum {
EGUI_MOUSERELEASED
};
enum {
GUI_NONE,
GUI_BUTTON,
GUI_LIST,
GUI_ENTRY,
GUI_CHECKBOX,
GUI_LABEL
};
/*
* styles for the windows..
@ -109,22 +118,10 @@ struct {
} typedef GUICheckbox;
#define GUI_WIN_BUTTONS 16
#define GUI_WIN_ENTRYS 8
#define GUI_WIN_LABELS 16
#define GUI_WIN_CHECKBOXES 16
#define GUI_WIN_LISTS 4
#define GUI_WIN_ELEMENTS 32
enum {
GUINONE,
GUIBUTTON,
GUILIST,
GUIENTRY,
GUICHECKBOX,
GUILABEL
};
struct _GUIItem_ {
int type;
void *item;
} typedef GUIItem;
struct _GUIWindow_ {
void (*callback_close) ();
@ -140,14 +137,8 @@ struct _GUIWindow_ {
int h;
int style;
GUIButton buttons[GUI_WIN_BUTTONS];
GUIEntry entrys[GUI_WIN_ENTRYS];
GUICheckbox checkboxes[GUI_WIN_CHECKBOXES];
GUILabel labels[GUI_WIN_LABELS];
GUIList lists[GUI_WIN_LISTS];
void *focus; // element which holds the focus
GUIItem items[GUI_MAX_ITEM];
void *focus;
} typedef GUIWindow;
extern GUIWindow *currentwin;
@ -157,7 +148,7 @@ extern void gui_draw ();
extern void gui_close ();
extern int gui_event (GUIEvent event);
extern void guiwindow_new (GUIWindow *win, int w, int h);
extern void guiwindow_new (GUIWindow *win, int w, int h, char *title);
extern void guiwindow_close (GUIWindow *win);
/* button functions */

Loading…
Cancel
Save