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-09 10:54:02 -05:00
|
|
|
#define fromNSString(str) [(str) UTF8String]
|
2015-04-06 19:01:14 -05:00
|
|
|
|
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 14:53:50 -05:00
|
|
|
#define uiLogObjCClassAllocations \
|
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 \
|
|
|
|
{ \
|
|
|
|
[super dealloc]; \
|
|
|
|
fprintf(stderr, "%p free\n", self); \
|
|
|
|
}
|
|
|
|
#else
|
2015-04-08 14:53:50 -05:00
|
|
|
#define uiLogObjCClassAllocations
|
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
|
2015-04-08 18:14:22 -05:00
|
|
|
// TODO rename to uiChild
|
2015-04-07 14:45:00 -05:00
|
|
|
@property uiControl *child;
|
2015-04-08 18:14:22 -05:00
|
|
|
- (void)uiUpdateNow;
|
2015-04-09 14:10:12 -05:00
|
|
|
- (void)uiSetMargined:(BOOL)margined;
|
2015-04-07 14:45:00 -05:00
|
|
|
@end
|