| 1 |
#pragma clang system_header |
| 2 |
|
| 3 |
template <typename T, typename CreateFunction> |
| 4 |
void callMethod(CreateFunction createFunction) { |
| 5 |
createFunction()->method(); |
| 6 |
} |
| 7 |
|
| 8 |
template <typename T, typename CreateFunction> |
| 9 |
inline void localVar(CreateFunction createFunction) { |
| 10 |
T* obj = createFunction(); |
| 11 |
obj->method(); |
| 12 |
} |
| 13 |
|
| 14 |
template <typename T> |
| 15 |
struct MemberVariable { |
| 16 |
T* obj { nullptr }; |
| 17 |
}; |
| 18 |
|
| 19 |
typedef struct sqlite3 sqlite3; |
| 20 |
|
| 21 |
typedef unsigned char uint8_t; |
| 22 |
|
| 23 |
enum os_log_type_t : uint8_t { |
| 24 |
OS_LOG_TYPE_DEFAULT = 0x00, |
| 25 |
OS_LOG_TYPE_INFO = 0x01, |
| 26 |
OS_LOG_TYPE_DEBUG = 0x02, |
| 27 |
OS_LOG_TYPE_ERROR = 0x10, |
| 28 |
OS_LOG_TYPE_FAULT = 0x11, |
| 29 |
}; |
| 30 |
|
| 31 |
typedef struct os_log_s *os_log_t; |
| 32 |
os_log_t os_log_create(const char *subsystem, const char *category); |
| 33 |
void os_log_msg(os_log_t oslog, os_log_type_t type, const char *msg, ...); |
| 34 |
|
| 35 |
typedef const struct __attribute__((objc_bridge(NSString))) __CFString * CFStringRef; |
| 36 |
|
| 37 |
extern CFStringRef const kCFURLTagNamesKey; |
| 38 |
|
| 39 |
#ifdef __OBJC__ |
| 40 |
@class NSString; |
| 41 |
@interface SystemObject { |
| 42 |
NSString *ns_string; |
| 43 |
CFStringRef cf_string; |
| 44 |
} |
| 45 |
@end |
| 46 |
|
| 47 |
typedef NSString *NSNotificationName; |
| 48 |
extern "C" NSNotificationName NSApplicationDidBecomeActiveNotification; |
| 49 |
|
| 50 |
#endif |