Removed/moved around the remnants of the autogenerated typefuncs system.

This commit is contained in:
Pietro Gagliardi 2015-05-29 22:44:48 -04:00
parent 5a15c84827
commit 44bbad70e5
5 changed files with 33 additions and 0 deletions

View File

@ -28,6 +28,7 @@ baseHFILES = \
baseCFILES = \
box.c \
control.c \
menu.c \
ptrarray.c \
shouldquit.c \
types.c \

View File

@ -19,6 +19,8 @@ struct boxControl {
intmax_t height;
};
uiDefineControlType(uiBox, uiTypeBox, struct box)
static void boxCommitDestroy(uiControl *c)
{
struct box *b = (struct box *) c;

View File

@ -8,6 +8,15 @@ struct controlBase {
int disabled;
};
static uintmax_t type_uiControl = 0;
uintmax_t uiTypeControl(void)
{
if (type_uiControl == 0)
type_uiControl = uiRegisterType("uiControl", 0, 0);
return type_uiControl;
}
#define controlBase(c) ((struct controlBase *) (c->Internal))
static void controlBaseDestroy(uiControl *c)

19
redo/menu.c Normal file
View File

@ -0,0 +1,19 @@
// 29 may 2015
#include "out/ui.h"
static uintmax_t type_uiMenu = 0;
static uintmax_t type_uiMenuItem = 0;
uintmax_t uiTypeMenu(void)
{
if (type_uiMenu == 0)
type_uiMenu = uiRegisterType("uiMenu", 0, 0);
return type_uiMenu;
}
uintmax_t uiTypeMenuItem(void)
{
if (type_uiMenuItem == 0)
type_uiMenuItem = uiRegisterType("uiMenuItem", 0, 0);
return type_uiMenuItem;
}

View File

@ -14,6 +14,8 @@ struct window {
int margined;
};
uiDefineControlType(uiWindow, uiTypeWindow, struct window)
static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
struct window *w;