2015-04-06 18:04:13 -05:00
|
|
|
// 6 january 2015
|
|
|
|
#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
|
|
|
|
#import <Cocoa/Cocoa.h>
|
2015-04-06 20:53:31 -05:00
|
|
|
#import "uipriv.h"
|
2015-04-07 13:42:52 -05:00
|
|
|
#import "ui_darwin.h"
|
2015-04-06 18:04:13 -05:00
|
|
|
|
2015-04-06 19:01:14 -05:00
|
|
|
#define toNSString(str) [NSString stringWithUTF8String:(str)]
|
|
|
|
|
2015-04-07 15:38:51 -05:00
|
|
|
// TODO move this to the right place
|
|
|
|
struct uiSizing {
|
|
|
|
};
|
|
|
|
|
2015-04-08 01:28:42 -05:00
|
|
|
// TODO see if we can override alloc instead
|
2015-04-07 23:26:49 -05:00
|
|
|
#ifdef uiLogAllocations
|
|
|
|
#import <stdio.h>
|
2015-04-08 02:38:08 -05:00
|
|
|
#define uiLogObjCClassAllocations(deallocCode) \
|
2015-04-08 01:28:42 -05:00
|
|
|
+ (id)alloc \
|
2015-04-07 23:26:49 -05:00
|
|
|
{ \
|
2015-04-08 01:28:42 -05:00
|
|
|
id thing; \
|
|
|
|
thing = [super alloc]; \
|
|
|
|
fprintf(stderr, "%p alloc %s\n", thing, [[self className] UTF8String]); \
|
|
|
|
return thing; \
|
2015-04-07 23:26:49 -05:00
|
|
|
} \
|
|
|
|
- (void)dealloc \
|
|
|
|
{ \
|
2015-04-08 02:38:08 -05:00
|
|
|
deallocCode \
|
2015-04-07 23:26:49 -05:00
|
|
|
[super dealloc]; \
|
|
|
|
fprintf(stderr, "%p free\n", self); \
|
|
|
|
}
|
|
|
|
#else
|
2015-04-08 02:38:08 -05:00
|
|
|
#define uiLogObjCClassAllocations(deallocCode) \
|
|
|
|
- (void)dealloc \
|
|
|
|
{ \
|
|
|
|
deallocCode \
|
|
|
|
[super dealloc]; \
|
|
|
|
}
|
2015-04-07 23:26:49 -05:00
|
|
|
#endif
|
|
|
|
|
2015-04-07 15:12:28 -05:00
|
|
|
// util_darwin.m
|
|
|
|
extern void setStandardControlFont(NSControl *);
|
|
|
|
|
2015-04-07 14:45:00 -05:00
|
|
|
// container_darwin.m
|
|
|
|
@interface uiContainer : NSView
|
|
|
|
@property uiControl *child;
|
|
|
|
@end
|