package documentation

Undocumented

Module notifications API for emitting macOS notifications.
Module _background No module docstring; 1/1 class documented
Module _interactions No module docstring; 0/1 type variable, 3/3 functions documented
Module _notifications No module docstring; 0/2 type alias, 0/1 constant, 1/5 function, 2/7 classes documented
Module _quickapp No module docstring; 0/1 type alias, 0/1 constant, 3/4 functions, 2/2 classes documented

From __init__.py:

Class Actionable Wrap a Python no-argument function call in an NSObject with a doIt: method.
Class DockIconManager Methods for managing the background dock icon status.
Class ItemState The state of a menu item.
Class Status Application status (top menu bar, on right)
Async Function answer Give the user a message.
Async Function ask Undocumented
Async Function choose Prompt the user to choose between the given values, on buttons labeled in the given way.
Function dockIconWhenVisible When the given main window is visible, we should have a dock icon (i.e.: be NSApplicationActivationPolicyRegular). When our application is activated, (i.e.: the user launches it from Spotlight, Finder, or similar) we should make the window visible so that the dock icon appears...
Async Function getpass Undocumented
Function mainpoint Add a .runMain attribute to function
Function menu Construct an NSMenu from a list of tuples describing it.
Function quit Quit.
async def answer(message: str, description: str = ''): (source)

Give the user a message.

async def ask(question: str, description: str = '', defaultValue: str = ''): (source)

Undocumented

async def choose(values: Iterable[tuple[T, str]], question: str, description: str = '') -> T: (source)

Prompt the user to choose between the given values, on buttons labeled in the given way.

def dockIconWhenVisible(mainWindow: NSWindow, hideIconOnOtherSpaces: bool = True, onSpaceChange: Callable[[], None] = lambda: None) -> DockIconManager: (source)

When the given main window is visible, we should have a dock icon (i.e.: be NSApplicationActivationPolicyRegular). When our application is activated, (i.e.: the user launches it from Spotlight, Finder, or similar) we should make the window visible so that the dock icon appears. When that window is then closed, or when our application is hidden, we should hide our dock icon (i.e.: be NSApplicationActivationPolicyAccessory).

async def getpass(question: str, description: str = '') -> str | None: (source)

Undocumented

def mainpoint() -> Callable[[Callable[[Any], None]], MainRunner]: (source)

Add a .runMain attribute to function

Returns
Callable[[Callable[[Any], None]], MainRunner]

A decorator that adds a .runMain attribute to a function.

The runMain attribute starts a reactor and calls the original function with a running, initialized, reactor.

def menu(title: str, items: ItemSeq) -> NSMenu: (source)

Construct an NSMenu from a list of tuples describing it.

Parameters
title:strUndocumented
items:ItemSeqlist of pairs of (menu item's name, click action).
Returns
NSMenua new Menu tha is not attached to anything.
Note
Since NSMenu's target attribute is a weak reference, the callable objects here are made immortal via an unpaired call to retain on their Actionable wrappers.
def quit(): (source)

Quit.