Fixed build errors. Let's test!
This commit is contained in:
parent
ded1ee6997
commit
b6c54aac43
|
@ -35,7 +35,7 @@ uiControl *uiControlParent(uiControl *c)
|
|||
|
||||
int isToplevel(uiControl *c)
|
||||
{
|
||||
return uiIsA(c, uiWindowType(), 0) != NULL;
|
||||
return c->TypeSignature == uiWindowSignature;
|
||||
}
|
||||
|
||||
// returns self if self is a window
|
||||
|
@ -148,8 +148,8 @@ void controlUpdateState(uiControl *c)
|
|||
|
||||
#define uiControlSignature 0x7569436F
|
||||
|
||||
// TODO does this need to be public?
|
||||
uiControl *uiNewControl(size_t size, uint32_t OSsig, uint32_t typesig, const char *typename)
|
||||
// TODO should this be public?
|
||||
uiControl *newControl(size_t size, uint32_t OSsig, uint32_t typesig, const char *typename)
|
||||
{
|
||||
uiControl *c;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define uiGroupSignature 0x47727062
|
||||
#define uiLabelSignature 0x4C61626C
|
||||
#define uiMultilineEntrySignature 0x4D6C6E45
|
||||
#define uiProgressbarSignature 0x50626172
|
||||
#define uiProgressBarSignature 0x50426172
|
||||
#define uiRadioButtonsSignature 0x5264696F
|
||||
#define uiSeparatorSignature 0x53657061
|
||||
#define uiSliderSignature 0x536C6964
|
||||
|
|
|
@ -24,6 +24,9 @@ extern void controlUpdateState(uiControl *);
|
|||
extern void osCommitEnable(uiControl *);
|
||||
extern void osCommitDisable(uiControl *);
|
||||
|
||||
// control.c
|
||||
extern uiControl *newControl(size_t size, uint32_t OSsig, uint32_t typesig, const char *typename);
|
||||
|
||||
// ptrarray.c
|
||||
struct ptrArray {
|
||||
void **ptrs;
|
||||
|
|
|
@ -375,7 +375,7 @@ uiArea *uiNewScrollingArea(uiAreaHandler *ah, intmax_t width, intmax_t height)
|
|||
{
|
||||
uiArea *a;
|
||||
|
||||
a = (uiArea *) uiNewControl(uiAreaType());
|
||||
a = (uiArea *) uiNewControl(uiArea);
|
||||
|
||||
a->ah = ah;
|
||||
a->scrolling = YES;
|
||||
|
|
|
@ -67,5 +67,5 @@ void uiDarwinSetControlFont(NSControl *c, NSControlSize size)
|
|||
|
||||
uiDarwinControl *uiDarwinNewControl(size_t n, uint32_t typesig, const char *typename)
|
||||
{
|
||||
return uiDarwinControl(uiNewControl(n, uiDarwinControlSignature, typesig, typename));
|
||||
return uiDarwinControl(newControl(n, uiDarwinControlSignature, typesig, typename));
|
||||
}
|
||||
|
|
|
@ -53,9 +53,9 @@ enum {
|
|||
|
||||
item = (uiMenuItem *) mapGet(self->items, sender);
|
||||
if (item->type == typeCheckbox)
|
||||
uiMenuItemSetChecked(uiMenuItem(item), !uiMenuItemChecked(uiMenuItem(item)));
|
||||
uiMenuItemSetChecked(item, !uiMenuItemChecked(item));
|
||||
// use the key window as the source of the menu event; it's the active window
|
||||
(*(item->onClicked))(uiMenuItem(item), windowFromNSWindow([realNSApp() keyWindow]), item->onClickedData);
|
||||
(*(item->onClicked))(item, windowFromNSWindow([realNSApp() keyWindow]), item->onClickedData);
|
||||
}
|
||||
|
||||
- (IBAction)onQuitClicked:(id)sender
|
||||
|
|
1
ui.h
1
ui.h
|
@ -63,7 +63,6 @@ _UI_EXTERN void uiControlShow(uiControl *);
|
|||
_UI_EXTERN void uiControlHide(uiControl *);
|
||||
_UI_EXTERN void uiControlEnable(uiControl *);
|
||||
_UI_EXTERN void uiControlDisable(uiControl *);
|
||||
_UI_EXTERN uiControl *uiNewControl(size_t size, uint32_t OSsig, uint32_t typesig, const char *typename);
|
||||
|
||||
typedef struct uiWindow uiWindow;
|
||||
#define uiWindow(this) ((uiWindow *) (this))
|
||||
|
|
Loading…
Reference in New Issue