A low-level, self-contained bridge to the macOS native API using purego for
direct system calls. A private backend for a higher-level, cross-platform PAL
I released it as a self-contained package because none exist for this purpose without using 'cgo' and I also abstracted joystick functionality which is also unique
The package is structured to provide direct access to the Objective-C runtime and various Core Foundation frameworks without external dependencies
init.go: Dynamic loading of system frameworks, registers Objective-C classes, and maps selectors for message-passingtypes.go: Go representations of native structs and Objective-C objectsapp.go: NativeNSApplicationlifecycle and menu bar creationwindow.go: Functions for creating and manipulating nativeNSWindowandNSOpenGLViewobjectsevents.go: Wrappers for retrieving data from nativeNSEventobjectscallbacks.go: Go functions that receive callbacks from the Objective-C runtime, bridging native events to Gothread.go:MainThreadfunction, a critical utility for dispatching code to the main OS thread as required by the AppKit frameworkclipboard.go: Clipboard access usingNSPasteboardjoystick.go: IOKit framework to handle joystick and gamepad inputmemory.go: Objective-C memory management calls (Retain,Release,Autorelease)helpers.go: Utility functions for Objective-C message sending and Go pointer management
This package is not intended for direct use by end-user applications