objcx

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 objcx is Glutter's thin layer over purego's objc package (SPEC §29.2): selectors made once, Foundation values (NSString, NSNumber, NSArray, NSURL, NSError) to and from Go, autorelease pools, blocks, and the registry of the Objective-C classes that Go implements (the app delegate, the view, the accessibility elements), whose instances find their Go object by a handle.

The rules of the package are those of SPEC §29.2:

  • Objects that a function makes and a caller must release are made by functions named New... (they return a +1 reference); the others return objects that the caller does not own.
  • Every call that makes Objective-C objects runs inside WithPool, which locks the goroutine to its thread for the time it takes, because an autorelease pool belongs to a thread.
  • Classes are made once per process, with the Glutter prefix and the process id in their name. Their methods are purego callbacks, counted in package dl (a process can have about 2,000).

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

Flutter: no counterpart.

Jump to

Keyboard shortcuts

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