source.h

DISPATCH_SOURCE_DECL(dispatch_source);
typedef const struct dispatch_source_type_s *dispatch_source_type_t;

typedef unsigned long dispatch_source_mach_send_flags_t;

typedef unsigned long dispatch_source_memorypressure_flags_t;

typedef unsigned long dispatch_source_proc_flags_t;

typedef unsigned long dispatch_source_vnode_flags_t;

typedef unsigned long dispatch_source_timer_flags_t;

dispatch_source_t
dispatch_source_create(dispatch_source_type_t type,
    uintptr_t handle,
    unsigned long mask,
    dispatch_queue_t _Nullable queue);

void
dispatch_source_set_event_handler(dispatch_source_t source,
    dispatch_block_t _Nullable handler);

void
dispatch_source_set_event_handler_f(dispatch_source_t source,
    dispatch_function_t _Nullable handler);

void
dispatch_source_set_cancel_handler(dispatch_source_t source,
    dispatch_block_t _Nullable handler);

void
dispatch_source_set_cancel_handler_f(dispatch_source_t source,
    dispatch_function_t _Nullable handler);
void
dispatch_source_cancel(dispatch_source_t source);

long
dispatch_source_testcancel(dispatch_source_t source);

uintptr_t
dispatch_source_get_handle(dispatch_source_t source);

unsigned long
dispatch_source_get_mask(dispatch_source_t source);

unsigned long
dispatch_source_get_data(dispatch_source_t source);

void
dispatch_source_merge_data(dispatch_source_t source, unsigned long value);

void
dispatch_source_set_timer(dispatch_source_t source,
    dispatch_time_t start,
    uint64_t interval,
    uint64_t leeway);

void
dispatch_source_set_registration_handler(dispatch_source_t source,
    dispatch_block_t _Nullable handler);

void
dispatch_source_set_registration_handler_f(dispatch_source_t source,
    dispatch_function_t _Nullable handler);

你可能感兴趣的:(source.h)