summaryrefslogtreecommitdiff
path: root/new/util_darwin.m
blob: 4ed562aa81a4f38af62c7c9c20451a9ff5644517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 7 april 2015
#import "uipriv_darwin.h"

// also fine for NSCells and NSTexts (NSTextViews)
void setStandardControlFont(NSControl *control)
{
	[control setFont:[NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSRegularControlSize]]];
}

void uiDoFreeOnDealloc(NSMutableArray *m)
{
	[m enumerateObjectsUsingBlock:^(id obj, NSUInteger index, BOOL *stop) {
		NSValue *v = (NSValue *) obj;

		uiFree([v pointerValue]);
	}];
	[m release];
}