2015-04-06 11:20:51 -05:00
|
|
|
// 6 april 2015
|
|
|
|
|
|
|
|
#ifndef __UI_UI_H__
|
|
|
|
#define __UI_UI_H__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
typedef struct uiInitError uiInitError;
|
|
|
|
typedef struct uiInitOptions uiInitOptions;
|
|
|
|
|
|
|
|
uiInitError *uiInit(uiInitOptions *);
|
|
|
|
const char *uiInitErrorMessage(uiInitError *);
|
|
|
|
void uiInitErrorFree(uiInitError *);
|
|
|
|
|
|
|
|
void uiMain(void);
|
|
|
|
void uiQuit(void);
|
|
|
|
|
2015-04-07 03:02:21 -05:00
|
|
|
typedef struct uiControl uiControl;
|
2015-04-07 03:12:03 -05:00
|
|
|
uintptr_t uiControlHandle(uiControl *);
|
2015-04-07 03:02:21 -05:00
|
|
|
|
2015-04-06 11:20:51 -05:00
|
|
|
typedef struct uiWindow uiWindow;
|
|
|
|
uiWindow *uiNewWindow(char *, int, int);
|
|
|
|
void uiWindowDestroy(uiWindow *);
|
|
|
|
uintptr_t uiWindowHandle(uiWindow *);
|
|
|
|
// TODO titles
|
|
|
|
void uiWindowShow(uiWindow *);
|
|
|
|
void uiWindowHide(uiWindow *);
|
|
|
|
void uiWindowOnClosing(uiWindow *, int (*)(uiWindow *, void *), void *);
|
2015-04-07 03:02:21 -05:00
|
|
|
void uiWindowSetChild(uiWindow *, uiControl *);
|
2015-04-06 11:20:51 -05:00
|
|
|
|
2015-04-07 03:02:21 -05:00
|
|
|
uiControl *uiNewButton(const char *);
|
|
|
|
// TODO text
|
|
|
|
void uiButtonOnClicked(uiControl *, void (*)(uiControl *, void *), void *);
|
2015-04-07 02:12:34 -05:00
|
|
|
|
2015-04-07 17:53:09 -05:00
|
|
|
uiControl *uiNewHorizontalStack(void);
|
|
|
|
uiControl *uiNewVerticalStack(void);
|
|
|
|
void uiStackAdd(uiControl *, uiControl *, int);
|
|
|
|
|
2015-04-06 11:20:51 -05:00
|
|
|
#endif
|