diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-09 16:37:04 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-09 16:37:04 -0400 |
| commit | 471b3a57e75263b76eece91fa0ceeacaba99a4c9 (patch) | |
| tree | 7a6a4ebbeb89a50227bb5931727eb153e037afa5 /new/ui.h | |
| parent | 92b43720b6b33e838f8e9b5dffaa556529de3d52 (diff) | |
Big change time: decided to stop playing around with hiding and made both uiControl and uiSizing public. Also restructured uiSizing to make system-dependent data in another structure.
Diffstat (limited to 'new/ui.h')
| -rw-r--r-- | new/ui.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -17,9 +17,30 @@ void uiQuit(void); void uiFreeText(char *); +typedef struct uiSizing uiSizing; +struct uiSizing { + intmax_t xPadding; + intmax_t yPadding; + struct uiSizingSys *sys; +}; + typedef struct uiControl uiControl; +struct uiControl { + void *data; // for use by implementations only + void *internal; // for use by ui only + void (*destroy)(uiControl *); + uintptr_t (*handle)(uiControl *); + void (*setParent)(uiControl *, uintptr_t); + void (*removeParent)(uiControl *); + void (*preferredSize)(uiControl *, uiSizing *, intmax_t *, intmax_t *); + void (*resize)(uiControl *, intmax_t, intmax_t, intmax_t, intmax_t, uiSizing *); +}; void uiControlDestroy(uiControl *); uintptr_t uiControlHandle(uiControl *); +void uiControlSetParent(uiControl *, uintptr_t); +void uiControlRemoveParent(uiControl *); +void uiControlPreferredSize(uiControl *, uiSizing *, intmax_t *width, intmax_t *height); +void uiControlResize(uiControl *, intmax_t, intmax_t, intmax_t, intmax_t, uiSizing *); typedef struct uiWindow uiWindow; uiWindow *uiNewWindow(char *, int, int); |
