brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · d55b3ab Raw
51 lines · c
1#pragma clang system_header2 3template <typename T, typename CreateFunction>4void callMethod(CreateFunction createFunction) {5  createFunction()->method();6}7 8template <typename T, typename CreateFunction>9inline void localVar(CreateFunction createFunction) {10  T* obj = createFunction();11  obj->method();12}13 14template <typename T>15struct MemberVariable {16    T* obj { nullptr };17};18 19typedef struct sqlite3 sqlite3;20 21typedef unsigned char uint8_t;22 23enum 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 31typedef struct os_log_s *os_log_t;32os_log_t os_log_create(const char *subsystem, const char *category);33void os_log_msg(os_log_t oslog, os_log_type_t type, const char *msg, ...);34 35typedef const struct __attribute__((objc_bridge(NSString))) __CFString * CFStringRef;36 37extern CFStringRef const kCFURLTagNamesKey;38 39#ifdef __OBJC__40@class NSString;41@interface SystemObject {42  NSString *ns_string;43  CFStringRef cf_string;44}45@end46 47typedef NSString *NSNotificationName;48extern "C" NSNotificationName NSApplicationDidBecomeActiveNotification;49 50#endif51