CAClockAddListener

Function CAClockAddListener 

Source
pub unsafe extern "C-unwind" fn CAClockAddListener(
    in_ca_clock: CAClockRef,
    in_listener_proc: CAClockListenerProc,
    in_user_data: NonNull<c_void>,
) -> i32
Expand description

Adds a callback function to receive notifications of changes to the clock’s state.

Note: The CAClockListenerProc may be called on a realtime thread internal to the clock object.

Parameter inCAClock: The clock object.

Parameter inListenerProc: The callback function.

Parameter inUserData: This value is passed to the callback function, in the userData parameter.

Returns: An OSStatus error code.

§Safety

  • in_ca_clock must be a valid pointer.
  • in_listener_proc must be implemented correctly.
  • in_user_data must be a valid pointer.