More fixes.

This commit is contained in:
Pietro Gagliardi 2015-08-16 23:20:53 -04:00
parent 4b0d81c144
commit 13e90c4263
3 changed files with 8 additions and 8 deletions

View File

@ -119,7 +119,6 @@ static void controlUpdateState(uiControl *c)
//TODO uiControlQueueResize(c);
}
// TODO should this be public?
uiControl *uiNewControl(uintmax_t type)
{
return uiControl(newTyped(type));

View File

@ -88,17 +88,12 @@ void uiCheckboxOnToggled(uiCheckbox *c, void (*f)(uiCheckbox *, void *), void *d
c->onToggledData = data;
}
static void defaultOnToggled(uiCheckbox *c, void *data)
{
// do nothing
}
static int uiCheckboxChecked(uiCheckbox *c)
int uiCheckboxChecked(uiCheckbox *c)
{
return [c->button state] == NSOnState;
}
static void uiCheckboxSetChecked(uiCheckbox *c, int checked)
void uiCheckboxSetChecked(uiCheckbox *c, int checked)
{
NSInteger state;
@ -108,6 +103,11 @@ static void uiCheckboxSetChecked(uiCheckbox *c, int checked)
[c->button setState:state];
}
static void defaultOnToggled(uiCheckbox *c, void *data)
{
// do nothing
}
uiCheckbox *uiNewCheckbox(const char *text)
{
uiCheckbox *c;

View File

@ -64,6 +64,7 @@ _UI_EXTERN void uiControlShow(uiControl *);
_UI_EXTERN void uiControlHide(uiControl *);
_UI_EXTERN void uiControlEnable(uiControl *);
_UI_EXTERN void uiControlDisable(uiControl *);
_UI_EXTERN uiControl *uiNewControl(uintmax_t type);
/* TODO
func NewControl(type uintmax_t) *Control;