Fixed the OS X build, including warnings. It works. I'm still a bit unhappy about the way these backends are turning out...
This commit is contained in:
parent
07c484c0af
commit
a76309995b
|
@ -82,5 +82,5 @@ uiButton *uiNewButton(const char *text)
|
|||
|
||||
bb.uiB = b;
|
||||
|
||||
return b.uiB;
|
||||
return bb.uiB;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ static void checkboxOnToggled(uiCheckbox *c, void (*f)(uiCheckbox *, void *), vo
|
|||
{
|
||||
uiCheckboxNSButton *cc;
|
||||
|
||||
cc = (uiCheckboxNSButton *) uiControlHandle(uiCheckbox(c));
|
||||
cc = (uiCheckboxNSButton *) uiControlHandle(uiControl(c));
|
||||
cc.uiOnToggled = f;
|
||||
cc.uiOnToggledData = data;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ uiCheckbox *uiNewCheckbox(const char *text)
|
|||
c = uiNew(uiCheckbox);
|
||||
|
||||
uiDarwinNewControl(uiControl(c), [uiCheckboxNSButton class], NO, NO);
|
||||
cc = (uiCheckboxNSButton *) uiControlHandle(c);
|
||||
cc = (uiCheckboxNSButton *) uiControlHandle(uiControl(c));
|
||||
|
||||
[cc setTitle:toNSString(text)];
|
||||
[cc setButtonType:NSSwitchButton];
|
||||
|
|
|
@ -59,7 +59,7 @@ uiEntry *uiNewEntry(void)
|
|||
e = uiNew(uiEntry);
|
||||
|
||||
uiDarwinNewControl(uiControl(e), [uiNSTextField class], NO, NO);
|
||||
t = (uiNSTextField *) uiControlHandle(c);
|
||||
t = (uiNSTextField *) uiControlHandle(uiControl(e));
|
||||
|
||||
[t setSelectable:YES]; // otherwise the setting is masked by the editable default of YES
|
||||
finishNewTextField((NSTextField *) t, YES);
|
||||
|
|
|
@ -34,7 +34,7 @@ static void labelSetText(uiLabel *l, const char *text)
|
|||
[t setStringValue:toNSString(text)];
|
||||
}
|
||||
|
||||
uiControl *uiNewLabel(const char *text)
|
||||
uiLabel *uiNewLabel(const char *text)
|
||||
{
|
||||
uiLabel *l;
|
||||
uiLabelNSTextField *t;
|
||||
|
@ -42,7 +42,7 @@ uiControl *uiNewLabel(const char *text)
|
|||
l = uiNew(uiLabel);
|
||||
|
||||
uiDarwinNewControl(uiControl(l), [uiLabelNSTextField class], NO, NO);
|
||||
t = (uiLabelNSTextField *) uiControlHandle(c);
|
||||
t = (uiLabelNSTextField *) uiControlHandle(uiControl(l));
|
||||
|
||||
[t setStringValue:toNSString(text)];
|
||||
[t setEditable:NO];
|
||||
|
@ -53,7 +53,7 @@ uiControl *uiNewLabel(const char *text)
|
|||
uiLabel(l)->Text = labelText;
|
||||
uiLabel(l)->SetText = labelSetText;
|
||||
|
||||
t.uiC = l;
|
||||
t.uiL = l;
|
||||
|
||||
return t.uiC;
|
||||
return t.uiL;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
{
|
||||
// TODO free all tabs explicitly
|
||||
if (uiDarwinControlFreeWhenAppropriate(uiControl(self.uiT), [self superview]))
|
||||
self.uiC = NULL;
|
||||
self.uiT = NULL;
|
||||
[super viewDidMoveToSuperview];
|
||||
}
|
||||
|
||||
|
@ -55,8 +55,10 @@ uiTab *uiNewTab(void)
|
|||
uiTab *t;
|
||||
uiNSTabView *tv;
|
||||
|
||||
t = uiNew(uiTab);
|
||||
|
||||
uiDarwinNewControl(uiControl(t), [uiNSTabView class], NO, NO);
|
||||
tv = (uiNSTabView *) uiControlHandle(c);
|
||||
tv = (uiNSTabView *) uiControlHandle(uiControl(t));
|
||||
|
||||
// also good for NSTabView (same selector and everything)
|
||||
setStandardControlFont((NSControl *) tv);
|
||||
|
|
|
@ -19,7 +19,7 @@ uiLogObjCClassAllocations
|
|||
- (BOOL)windowShouldClose:(id)win
|
||||
{
|
||||
// return exact constants to be safe
|
||||
if ((*(self.onClosing))(self.uiw, self.onClosingData))
|
||||
if ((*(self.onClosing))(uiWindow(self.uiw), self.onClosingData))
|
||||
return YES;
|
||||
return NO;
|
||||
}
|
||||
|
@ -153,10 +153,10 @@ uiWindow *uiNewWindow(const char *title, int width, int height)
|
|||
uiWindow(d.uiw)->SetTitle = windowSetTitle;
|
||||
uiWindow(d.uiw)->Show = windowShow;
|
||||
uiWindow(d.uiw)->Hide = windowHide;
|
||||
uiWindow(d.uiw)->OnClosing = windowSetOnClosing;
|
||||
uiWindow(d.uiw)->OnClosing = windowOnClosing;
|
||||
uiWindow(d.uiw)->SetChild = windowSetChild;
|
||||
uiWindow(d.uiw)->Margined = windowMargined;
|
||||
uiWindow(d.uiw)->SetMargined = windowSetMargined;
|
||||
|
||||
return d.uiw;
|
||||
return uiWindow(d.uiw);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue