andlabs-ui/new/uipriv_darwin.h

44 lines
994 B
C
Raw Normal View History

// 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 19:01:14 -05:00
#define toNSString(str) [NSString stringWithUTF8String:(str)]
#define fromNSString(str) [(str) UTF8String]
2015-04-06 19:01:14 -05:00
// TODO see if we can override alloc instead
#ifdef uiLogAllocations
#import <stdio.h>
#define uiLogObjCClassAllocations \
+ (id)alloc \
{ \
id thing; \
thing = [super alloc]; \
fprintf(stderr, "%p alloc %s\n", thing, [[self className] UTF8String]); \
return thing; \
} \
- (void)dealloc \
{ \
[super dealloc]; \
fprintf(stderr, "%p free\n", self); \
}
#else
#define uiLogObjCClassAllocations
#endif
// util_darwin.m
extern void setStandardControlFont(NSControl *);
// container_darwin.m
2015-04-09 14:25:18 -05:00
struct uiSizing {
uiSizingCommon
};
@interface uiContainer : NSView
// TODO rename to uiChild
@property uiControl *child;
- (void)uiUpdateNow;
- (void)uiSetMargined:(BOOL)margined;
@end