Contents

CFRunLoopSourceGetContext(_:_:)

Returns the context information for a CFRunLoopSource object.

Declaration

func CFRunLoopSourceGetContext(_ source: CFRunLoopSource!, _ context: UnsafeMutablePointer<CFRunLoopSourceContext>!)

Parameters

  • source:

    The run loop source to examine.

  • context:

    A pointer to the structure into which the context information for source is to be copied. The information being returned is the same information passed to Cfrunloopsourcecreate(_:_:_:) when creating source.

Discussion

Run loop sources come in two versions with different-sized context structures. context must point to the correct version of the structure for source. Before calling this function, you need to initialize the version member of context with the version number (either 0 or 1) of source.

See Also

CFRunLoopSource Miscellaneous Functions