diff --git a/area_darwin.m b/area_darwin.m index a34dcdb..6727415 100644 --- a/area_darwin.m +++ b/area_darwin.m @@ -2,11 +2,11 @@ #include "objc_darwin.h" #include "_cgo_export.h" -#include -#include -#include -#include -#include +#import +#import +#import +#import +#import #define to(T, x) ((T *) (x)) #define toNSEvent(x) to(NSEvent, (x)) diff --git a/delegateuitask_darwin.m b/delegateuitask_darwin.m index 4ad0796..b45f680 100644 --- a/delegateuitask_darwin.m +++ b/delegateuitask_darwin.m @@ -2,13 +2,13 @@ #include "objc_darwin.h" #include "_cgo_export.h" -#include -#include -#include +#import +#import +#import // see the hack below; we'll include everything first just in case some other headers get included below; if the hack ever gets resolved, we can use the ones below instead -#include -#include +#import +#import // HACK. // Apple's header files are bugged: there's an enum that was introduced in 10.7 with new values added in 10.8, but instead of wrapping the whole enum in a version check, they wrap just the fields. This means that on 10.6 that enum will be empty, which is illegal. @@ -19,8 +19,8 @@ #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7 -# MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_3 -#include +//# MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_3 +#import #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 @@ -28,9 +28,9 @@ // NSWindow.h is below because it includes NSApplication.h // we'll use the other headers's include guards so if the above is resolved and I forget to uncomment anything below it won't matter -#include -#include -#include +#import +#import +#import extern NSRect dummyRect; diff --git a/dialog_darwin.m b/dialog_darwin.m index 7bd7a8f..b147c5a 100644 --- a/dialog_darwin.m +++ b/dialog_darwin.m @@ -1,7 +1,7 @@ // 15 may 2014 #include "objc_darwin.h" -#include +#import static void alert(NSString *primary, NSString *secondary, NSAlertStyle style) { diff --git a/listbox_darwin.m b/listbox_darwin.m index 69ac09e..4754a3f 100644 --- a/listbox_darwin.m +++ b/listbox_darwin.m @@ -1,26 +1,26 @@ // 13 may 2014 #include "objc_darwin.h" -#include -#include -#include +#import +#import +#import // see delegateuitask_darwin.m // in this case, NSTableView.h includes NSApplication.h -#include +#import #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7 -#include +#import #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_6 -#include -#include +#import +#import #define to(T, x) ((T *) (x)) #define toNSMutableDictionary(x) to(NSMutableDictionary, (x)) diff --git a/objc_darwin.m b/objc_darwin.m index ded192e..79966c9 100644 --- a/objc_darwin.m +++ b/objc_darwin.m @@ -1,25 +1,24 @@ // 15 may 2014 #include "objc_darwin.h" -#include +#import // see delegateuitask_darwin.m // in this case, NSScrollView.h includes NSApplication.h -// NOTE NSView.h apparently lacks include guards; we'll need to uncomment the one below -#include +#import #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7 -#include +#import #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_6 -//#include -#include +#import +#import #define to(T, x) ((T *) (x)) #define _toNSString(x) to(NSString, (x)) diff --git a/prefsize_darwin.m b/prefsize_darwin.m index 8c975af..34a0dcd 100644 --- a/prefsize_darwin.m +++ b/prefsize_darwin.m @@ -1,7 +1,7 @@ // 15 may 2014 #include "objc_darwin.h" -#include +#import // see delegateuitask_darwin.m // in this case, NSScrollView.h, NSTableView.h, AND NSProgressIndicator.h all include NSApplication.h @@ -10,15 +10,15 @@ #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7 -#include +#import #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_6 -#include -#include -#include +#import +#import +#import #define to(T, x) ((T *) (x)) #define toNSControl(x) to(NSControl, (x)) diff --git a/sysdata_darwin.m b/sysdata_darwin.m index ded1d3c..46c19e0 100644 --- a/sysdata_darwin.m +++ b/sysdata_darwin.m @@ -1,35 +1,34 @@ // 12 may 2014 #include "objc_darwin.h" -#include +#import // see delegateuitask_darwin.m // in this case, lots of headers include NSApplication.h -// NOTE uncomment the ones below when resolved because yay inconsistent include guard madness -#include -#include +#import +#import #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7 -#include +#import #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_6 -#include -#include -#include -//#include -#include -#include -#include -#include -#include -#include -#include +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import extern NSRect dummyRect;