Fixed *some* errors...

This commit is contained in:
Pietro Gagliardi 2015-05-29 20:01:11 -04:00
parent af4c9ae0c9
commit d3f18ccae6
3 changed files with 10 additions and 10 deletions

View File

@ -64,7 +64,7 @@ uiTyped *newTyped(uintmax_t type)
struct typeinfo *ti;
uiTyped *instance;
if (type == 0 || id >= types->len)
if (type == 0 || type >= types->len)
complain("invalid type ID given to newTyped()");
ti = ptrArrayIndex(types, struct typeinfo *, type);
instance = (uiTyped *) uiAlloc(ti->size, ti->name);

View File

@ -66,7 +66,7 @@ interface Control {
func SysFunc(p *uiControlSysFuncParams);
func StartZOrder(p *uiControlSysFuncParams) int;
func CommitDestroy(void);
func CommitSetParent(uiControl *);
func CommitSetParent(parent *uiControl);
func CommitShow(void);
func CommitHide(void);
func CommitEnable(void);
@ -76,13 +76,13 @@ interface Control {
func NewControl(type uintmax_t) *Control;
raw "#define uiDefineControlType(typename, funcname, realtype) \";
raw " static uintmax_t type_ ## typename = 0; \";
raw " uintmax_t funcname(void) \";
raw " { \";
raw " if (type_ ## typename == 0) \";
raw " type_ ## typename = uiRegisterType(#typename, uiTypeControl(), sizeof (realtype)); \";
raw " return type_ ## typename; \";
raw "#define uiDefineControlType(typename, funcname, realtype) \\";
raw " static uintmax_t type_ ## typename = 0; \\";
raw " uintmax_t funcname(void) \\";
raw " { \\";
raw " if (type_ ## typename == 0) \\";
raw " type_ ## typename = uiRegisterType(#typename, uiTypeControl(), sizeof (realtype)); \\";
raw " return type_ ## typename; \\";
raw " }";
func FreeSizing(d *Sizing);

View File

@ -89,7 +89,7 @@ uiButton *uiNewButton(const char *text)
struct button *b;
WCHAR *wtext;
b = (struct button *) uiWindowsNewControl(uiTypeButton());
b = (struct button *) uiWindowsNewSingleHWNDControl(uiTypeButton());
wtext = toUTF16(text);
b->hwnd = uiWindowsUtilCreateControlHWND(0,