summaryrefslogtreecommitdiff
path: root/new/uipriv_darwin.h
blob: f91b84d3b6029b26e08930247f36c3459eb39338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// 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>
#import "uipriv.h"
#import "ui_darwin.h"

#define toNSString(str) [NSString stringWithUTF8String:(str)]
#define fromNSString(str) [(str) UTF8String]

#define uiLogObjCClassAllocations \
+ (id)alloc \
{ \
	id thing; \
	thing = [super alloc]; \
	if (options.debugLogAllocations) \
		fprintf(stderr, "%p alloc %s\n", thing, [[self className] UTF8String]); \
	return thing; \
} \
- (void)dealloc \
{ \
	[super dealloc]; \
	if (options.debugLogAllocations) \
		fprintf(stderr, "%p free\n", self); \
}

// init_darwin.m
extern NSView *destroyedControlsView;

// util_darwin.m
extern void setStandardControlFont(NSControl *);
extern void disableAutocorrect(NSTextView *);

// container_darwin.m
@interface uiContainer : NSView
@property uiControl *uiChild;
- (void)uiUpdateNow;
- (BOOL)uiMargined;
- (void)uiSetMargined:(BOOL)margined;
@end