1 #ifndef swift_callback_h
2 #define swift_callback_h
6 #if __has_attribute(swift_name)
7 # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
9 # define SWIFT_COMPILE_NAME(X)
12 #if __has_attribute(objc_method_family)
13 # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
15 # define SWIFT_METHOD_FAMILY(X)
18 #if !defined(SWIFT_CLASS_EXTRA)
19 # define SWIFT_CLASS_EXTRA
22 #if !defined(SWIFT_CLASS)
23 # if __has_attribute(objc_subclassing_restricted)
24 # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
25 # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
27 # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
28 # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
32 #if !defined(OBJC_DESIGNATED_INITIALIZER)
33 # if __has_attribute(objc_designated_initializer)
34 # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
36 # define OBJC_DESIGNATED_INITIALIZER
40 #if !defined(SWIFT_UNAVAILABLE)
41 # define SWIFT_UNAVAILABLE __attribute__((unavailable))
43 #if !defined(SWIFT_UNAVAILABLE_MSG)
44 # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
47 #if __has_attribute(external_source_symbol)
48 # pragma push_macro("any")
51 # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="demo",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
53 # pragma pop_macro("any")
60 SWIFT_CLASS_NAMED(
"CallbackHandler")
61 @interface CallbackHandler : NSObject
62 - (nonnull instancetype)initWithUserdata:(
void const * _Nonnull)userdata OBJC_DESIGNATED_INITIALIZER;
65 - (nonnull instancetype)init SWIFT_UNAVAILABLE;
66 + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
69 #if __has_attribute(external_source_symbol)
70 # pragma clang attribute pop
Definition: CallbackData.h:106
Definition: CallbackData.h:150