1 |
/* |
/* |
2 |
Copyright (c) 2013 Christian Schoenebeck |
Copyright (c) 2013 - 2017 Christian Schoenebeck |
3 |
|
|
4 |
This file is part of "gigedit" and released under the terms of the |
This file is part of "gigedit" and released under the terms of the |
5 |
GNU General Public License version 2. |
GNU General Public License version 2. |
9 |
#import <Cocoa/Cocoa.h> |
#import <Cocoa/Cocoa.h> |
10 |
#import <stdio.h> |
#import <stdio.h> |
11 |
|
|
12 |
|
#if __clang__ |
13 |
|
# define HAS_OBJC_ARC __has_feature(objc_arc) |
14 |
|
#else |
15 |
|
# define HAS_OBJC_ARC 0 |
16 |
|
#endif |
17 |
|
|
18 |
@interface MacHelper : NSObject { |
@interface MacHelper : NSObject { |
19 |
@public |
@public |
20 |
void (*m_fn)(void* info); |
void (*m_fn)(void* info); |
49 |
printf("perfoming selector on main thread ...\n"); fflush(stdout); |
printf("perfoming selector on main thread ...\n"); fflush(stdout); |
50 |
[obj performSelectorOnMainThread:@selector(runCFunc) withObject:obj waitUntilDone:NO]; |
[obj performSelectorOnMainThread:@selector(runCFunc) withObject:obj waitUntilDone:NO]; |
51 |
printf("Selector scheduled async. (on main thread).\n"); fflush(stdout); |
printf("Selector scheduled async. (on main thread).\n"); fflush(stdout); |
52 |
|
#if !HAS_OBJC_ARC |
53 |
[obj release]; |
[obj release]; |
54 |
|
#endif |
55 |
} |
} |
56 |
|
|
57 |
#if defined(__cplusplus) |
#if defined(__cplusplus) |