diff --git a/common/controlsigs.h b/common/controlsigs.h index ae0bce7e..b703cfc4 100644 --- a/common/controlsigs.h +++ b/common/controlsigs.h @@ -1,5 +1,6 @@ // 24 april 2016 +#define uiAreaSignature 0x41726561 #define uiBoxSignature 0x426F784C #define uiButtonSignature 0x42746F6E #define uiCheckboxSignature 0x43686B62 diff --git a/darwin/area.m b/darwin/area.m index bd4714b2..c08e7cac 100644 --- a/darwin/area.m +++ b/darwin/area.m @@ -357,7 +357,7 @@ uiArea *uiNewArea(uiAreaHandler *ah) { uiArea *a; - a = (uiArea *) uiNewControl(uiAreaType()); + a = (uiArea *) uiNewControl(uiArea); a->ah = ah; a->scrolling = NO; diff --git a/darwin/box.m b/darwin/box.m index 3de18830..92b5f4a7 100644 --- a/darwin/box.m +++ b/darwin/box.m @@ -272,7 +272,7 @@ static uiBox *finishNewBox(BOOL vertical) { uiBox *b; - b = (uiBox *) uiNewControl(uiBoxType()); + b = (uiBox *) uiNewControl(uiBox); b->view = [[NSView alloc] initWithFrame:NSZeroRect]; diff --git a/darwin/button.m b/darwin/button.m index 3b8dacbc..42f308e9 100644 --- a/darwin/button.m +++ b/darwin/button.m @@ -90,7 +90,7 @@ uiButton *uiNewButton(const char *text) { uiButton *b; - b = (uiButton *) uiNewControl(uiButtonType()); + b = (uiButton *) uiNewControl(uiButton); b->button = [[NSButton alloc] initWithFrame:NSZeroRect]; [b->button setTitle:toNSString(text)]; diff --git a/darwin/checkbox.m b/darwin/checkbox.m index 9ecb1804..3294e9b5 100644 --- a/darwin/checkbox.m +++ b/darwin/checkbox.m @@ -109,7 +109,7 @@ uiCheckbox *uiNewCheckbox(const char *text) { uiCheckbox *c; - c = (uiCheckbox *) uiNewControl(uiCheckboxType()); + c = (uiCheckbox *) uiNewControl(uiCheckbox); c->button = [[NSButton alloc] initWithFrame:NSZeroRect]; [c->button setTitle:toNSString(text)]; diff --git a/darwin/combobox.m b/darwin/combobox.m index 8e573809..2bbdf4a2 100644 --- a/darwin/combobox.m +++ b/darwin/combobox.m @@ -169,7 +169,7 @@ static uiCombobox *finishNewCombobox(BOOL editable) { uiCombobox *c; - c = (uiCombobox *) uiNewControl(uiComboboxType()); + c = (uiCombobox *) uiNewControl(uiCombobox); c->editable = editable; if (c->editable) { diff --git a/darwin/datetimepicker.m b/darwin/datetimepicker.m index 944e5ee3..31fe407a 100644 --- a/darwin/datetimepicker.m +++ b/darwin/datetimepicker.m @@ -15,7 +15,7 @@ static uiDateTimePicker *finishNewDateTimePicker(NSDatePickerElementFlags elemen { uiDateTimePicker *d; - d = (uiDateTimePicker *) uiNewControl(uiDateTimePickerType()); + d = (uiDateTimePicker *) uiNewControl(uiDateTimePicker); d->dp = [[NSDatePicker alloc] initWithFrame:NSZeroRect]; [d->dp setBordered:NO]; diff --git a/darwin/entry.m b/darwin/entry.m index 1a589b82..5c2c37e0 100644 --- a/darwin/entry.m +++ b/darwin/entry.m @@ -148,7 +148,7 @@ uiEntry *uiNewEntry(void) { uiEntry *e; - e = (uiEntry *) uiNewControl(uiEntryType()); + e = (uiEntry *) uiNewControl(uiEntry); e->textfield = newEditableTextField(); diff --git a/darwin/fontbutton.m b/darwin/fontbutton.m index d98ff413..d25cc1d4 100644 --- a/darwin/fontbutton.m +++ b/darwin/fontbutton.m @@ -172,7 +172,7 @@ uiFontButton *uiNewFontButton(void) { uiFontButton *b; - b = (uiFontButton *) uiNewControl(uiFontButtonType()); + b = (uiFontButton *) uiNewControl(uiFontButton); b->button = [[fontButton alloc] initWithFrame:NSZeroRect libuiFontButton:b]; uiDarwinSetControlFont(b->button, NSRegularControlSize); diff --git a/darwin/group.m b/darwin/group.m index 02e74158..ac16977a 100644 --- a/darwin/group.m +++ b/darwin/group.m @@ -101,7 +101,7 @@ uiGroup *uiNewGroup(const char *title) { uiGroup *g; - g = (uiGroup *) uiNewControl(uiGroupType()); + g = (uiGroup *) uiNewControl(uiGroup); g->box = [[NSBox alloc] initWithFrame:NSZeroRect]; [g->box setTitle:toNSString(title)]; diff --git a/darwin/label.m b/darwin/label.m index 49a70628..c498a750 100644 --- a/darwin/label.m +++ b/darwin/label.m @@ -27,7 +27,7 @@ uiLabel *uiNewLabel(const char *text) { uiLabel *l; - l = (uiLabel *) uiNewControl(uiLabelType()); + l = (uiLabel *) uiNewControl(uiLabel); l->textfield = [[NSTextField alloc] initWithFrame:NSZeroRect]; [l->textfield setStringValue:toNSString(text)]; diff --git a/darwin/multilineentry.m b/darwin/multilineentry.m index c591beb0..c4af6328 100644 --- a/darwin/multilineentry.m +++ b/darwin/multilineentry.m @@ -70,7 +70,7 @@ uiMultilineEntry *uiNewMultilineEntry(void) uiMultilineEntry *e; NSFont *font; - e = (uiMultilineEntry *) uiNewControl(uiMultilineEntryType()); + e = (uiMultilineEntry *) uiNewControl(uiMultilineEntry); e->sv = [[NSScrollView alloc] initWithFrame:NSZeroRect]; // TODO verify against Interface Builder diff --git a/darwin/progressbar.m b/darwin/progressbar.m index c6b5fb50..234bd57a 100644 --- a/darwin/progressbar.m +++ b/darwin/progressbar.m @@ -31,7 +31,7 @@ uiProgressBar *uiNewProgressBar(void) { uiProgressBar *p; - p = (uiProgressBar *) uiNewControl(uiProgressBarType()); + p = (uiProgressBar *) uiNewControl(uiProgressBar); p->pi = [[NSProgressIndicator alloc] initWithFrame:NSZeroRect]; [p->pi setControlSize:NSRegularControlSize]; diff --git a/darwin/radiobuttons.m b/darwin/radiobuttons.m index 56fa9a51..eab3bd3e 100644 --- a/darwin/radiobuttons.m +++ b/darwin/radiobuttons.m @@ -46,7 +46,7 @@ uiRadioButtons *uiNewRadioButtons(void) uiRadioButtons *r; NSButtonCell *cell; - r = (uiRadioButtons *) uiNewControl(uiRadioButtonsType()); + r = (uiRadioButtons *) uiNewControl(uiRadioButtons); // we have to set up the NSMatrix this way (prototype first) // otherwise we won't be able to change its properties (such as the button type) diff --git a/darwin/separator.m b/darwin/separator.m index 766850ef..60dfc795 100644 --- a/darwin/separator.m +++ b/darwin/separator.m @@ -20,7 +20,7 @@ uiSeparator *uiNewHorizontalSeparator(void) { uiSeparator *s; - s = (uiSeparator *) uiNewControl(uiSeparatorType()); + s = (uiSeparator *) uiNewControl(uiSeparator); s->box = [[NSBox alloc] initWithFrame:NSMakeRect(0, 0, separatorFrameWidth, separatorFrameHeight)]; [s->box setBoxType:NSBoxSeparator]; diff --git a/darwin/slider.m b/darwin/slider.m index c3089473..e8be6c47 100644 --- a/darwin/slider.m +++ b/darwin/slider.m @@ -110,7 +110,7 @@ uiSlider *uiNewSlider(intmax_t min, intmax_t max) uiSlider *s; NSSliderCell *cell; - s = (uiSlider *) uiNewControl(uiSliderType()); + s = (uiSlider *) uiNewControl(uiSlider); // a horizontal slider is defined as one where the width > height, not by a flag // to be safe, don't use NSZeroRect, but make it horizontal from the get-go diff --git a/darwin/spinbox.m b/darwin/spinbox.m index bf48edd4..a5bf7878 100644 --- a/darwin/spinbox.m +++ b/darwin/spinbox.m @@ -162,7 +162,7 @@ uiSpinbox *uiNewSpinbox(intmax_t min, intmax_t max) if (min >= max) complain("error: min >= max in uiNewSpinbox()"); - s = (uiSpinbox *) uiNewControl(uiSpinboxType()); + s = (uiSpinbox *) uiNewControl(uiSpinbox); s->spinbox = [[libui_spinbox alloc] initWithFrame:NSZeroRect spinbox:s]; [s->spinbox setMinimum:min]; diff --git a/darwin/tab.m b/darwin/tab.m index 11c1c021..09451c2c 100644 --- a/darwin/tab.m +++ b/darwin/tab.m @@ -148,7 +148,7 @@ uiTab *uiNewTab(void) { uiTab *t; - t = (uiTab *) uiNewControl(uiTabType()); + t = (uiTab *) uiNewControl(uiTab); t->tabview = [[NSTabView alloc] initWithFrame:NSZeroRect]; // also good for NSTabView (same selector and everything) diff --git a/darwin/window.m b/darwin/window.m index 4f580fdf..b2ae7931 100644 --- a/darwin/window.m +++ b/darwin/window.m @@ -192,7 +192,7 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar) finalizeMenus(); - w = (uiWindow *) uiNewControl(uiWindowType()); + w = (uiWindow *) uiNewControl(uiWindow); w->window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, (CGFloat) width, (CGFloat) height) styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)