diff --git a/TODO.md b/TODO.md index 3862f534..0141ac3f 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,3 @@ -- change all private names away from uiXxxx and uipXxxx - make it so Windows API calls that do logLastError(), etc. abort whatever they're doing and not try to continue, just like wintable - figure out what to cleanup in darwin terminate: - delegate diff --git a/darwin/button.m b/darwin/button.m index 8a716373..cd8ab65e 100644 --- a/darwin/button.m +++ b/darwin/button.m @@ -1,7 +1,7 @@ // 7 april 2015 #import "uipriv_darwin.h" -@interface uipButtonDelegate : NSObject { +@interface buttonDelegate : NSObject { uiButton *b; void (*onClicked)(uiButton *, void *); void *onClickedData; @@ -11,7 +11,7 @@ - (void)setOnClicked:(void (*)(uiButton *, void *))f data:(void *)data; @end -@implementation uipButtonDelegate +@implementation buttonDelegate - (IBAction)buttonClicked:(id)sender { @@ -34,7 +34,7 @@ struct button { uiButton b; NSButton *button; - uipButtonDelegate *delegate; + buttonDelegate *delegate; }; static void defaultOnClicked(uiButton *b, void *data) @@ -88,7 +88,7 @@ uiButton *uiNewButton(const char *text) [b->button setBezelStyle:NSRoundedBezelStyle]; setStandardControlFont(b->button); - b->delegate = [uipButtonDelegate new]; + b->delegate = [buttonDelegate new]; [b->button setTarget:b->delegate]; [b->button setAction:@selector(buttonClicked:)]; [b->delegate setButton:uiButton(b)]; diff --git a/darwin/checkbox.m b/darwin/checkbox.m index 3bc79b87..0b5c8b80 100644 --- a/darwin/checkbox.m +++ b/darwin/checkbox.m @@ -1,7 +1,7 @@ // 7 april 2015 #import "uipriv_darwin.h" -@interface uipCheckboxDelegate : NSObject { +@interface checkboxDelegate : NSObject { uiCheckbox *c; void (*onToggled)(uiCheckbox *, void *); void *onToggledData; @@ -11,7 +11,7 @@ - (void)setOnToggled:(void (*)(uiCheckbox *, void *))f data:(void *)data; @end -@implementation uipCheckboxDelegate +@implementation checkboxDelegate - (IBAction)checkboxToggled:(id)sender { @@ -34,7 +34,7 @@ struct checkbox { uiCheckbox c; NSButton *checkbox; - uipCheckboxDelegate *delegate; + checkboxDelegate *delegate; }; static void defaultOnToggled(uiCheckbox *c, void *data) @@ -105,7 +105,7 @@ uiCheckbox *uiNewCheckbox(const char *text) [c->checkbox setBordered:NO]; setStandardControlFont(c->checkbox); - c->delegate = [uipCheckboxDelegate new]; + c->delegate = [checkboxDelegate new]; [c->checkbox setTarget:c->delegate]; [c->checkbox setAction:@selector(checkboxToggled:)]; [c->delegate setCheckbox:uiCheckbox(c)]; diff --git a/darwin/init.m b/darwin/init.m index 738c8c6e..10eadec8 100644 --- a/darwin/init.m +++ b/darwin/init.m @@ -1,10 +1,10 @@ // 6 april 2015 #import "uipriv_darwin.h" -@interface uiApplication : NSApplication +@interface applicationClass : NSApplication @end -@implementation uiApplication +@implementation applicationClass // hey look! we're overriding terminate:! // we're going to make sure we can go back to main() whether Cocoa likes it or not! @@ -47,7 +47,7 @@ uiInitOptions options; const char *uiInit(uiInitOptions *o) { options = *o; - [uiApplication sharedApplication]; + [applicationClass sharedApplication]; // don't check for a NO return; something (launch services?) causes running from application bundles to always return NO when asking to change activation policy, even if the change is to the same activation policy! // see https://github.com/andlabs/ui/issues/6 [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];