cf

package
v1.17.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: BSD-3-Clause Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cf is the part of Core Foundation that the macOS and iOS backends use (SPEC §29.2, §29.3): strings, dictionaries, the run loop, and the version-0 run loop sources and the timers that carry Post and the timer heap of the UI thread.

Reference counting

Core Foundation follows the Create rule, and so does this package: a function whose name starts with New returns a reference that the caller owns (+1) and must give back with Release; every other function that returns a Ref returns one that the caller does not own and must Retain to keep (the run loops, the modes, the value that a dictionary holds). A Source or a Timer owns its Core Foundation object and gives it back in Close, which every owner calls exactly once.

Threads

A run loop belongs to a thread. Only the UI thread, which is the main thread, adds sources and timers to the main run loop and runs it; Source.Signal and WakeUp are the calls that other goroutines may make (the one thing Core Foundation documents as thread safe for a source).

The package has files for darwin only; this file keeps it listed on every OS.

Flutter: no counterpart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Range

type Range struct {
	Location int64 `c:"location"`
	Length   int64 `c:"length"`
}

Range is Core Foundation's CFRange: a location and a length.

Flutter: no counterpart

type SourceContext

type SourceContext struct {
	Version         int64   `c:"version"`
	Info            uintptr `c:"info"`
	Retain          uintptr `c:"retain"`
	Release         uintptr `c:"release"`
	CopyDescription uintptr `c:"copyDescription"`
	Equal           uintptr `c:"equal"`
	Hash            uintptr `c:"hash"`
	Schedule        uintptr `c:"schedule"`
	Cancel          uintptr `c:"cancel"`
	Perform         uintptr `c:"perform"`
}

SourceContext is CFRunLoopSourceContext as it is for a version-0 source: the info that Core Foundation hands back, and the perform function. The function pointers that this package does not use are zero.

Flutter: no counterpart

type TimerContext

type TimerContext struct {
	Version         int64   `c:"version"`
	Info            uintptr `c:"info"`
	Retain          uintptr `c:"retain"`
	Release         uintptr `c:"release"`
	CopyDescription uintptr `c:"copyDescription"`
}

TimerContext is CFRunLoopTimerContext.

Flutter: no counterpart

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL