Skip to content

@caoergou/windows-xp / registry / DefineAppConfig

Interface: DefineAppConfig<TProps>

Defined in: src/registry/defineApp.tsx:36

Type Parameters

TProps

TProps extends SerializableProps

Properties

associations?

> optional associations?: AppAssociation<FileNode, unknown>[]

Defined in: src/registry/defineApp.tsx:52

Make the app openable from a filesystem node whose .app equals appField.


component

> component: ComponentType<TProps & object>

Defined in: src/registry/defineApp.tsx:63

The app component. It may also receive an injected windowId. Its own props (TProps) must be JSON-serializable (see SerializableProps).


icon?

> optional icon?: string

Defined in: src/registry/defineApp.tsx:44

XPIcon id. Defaults to 'app_window'.


id

> id: string

Defined in: src/registry/defineApp.tsx:38

Unique app id (used to open the app and match filesystem .app fields).


lifecycle?

> optional lifecycle?: AppLifecycle

Defined in: src/registry/defineApp.tsx:50

Open/close/focus callbacks (runtime only — never persisted).


locales?

> optional locales?: string[]

Defined in: src/registry/defineApp.tsx:46

Restrict to culture ids (e.g. ['zh']); omit for all cultures.


> optional menus?: AppMenu[]

Defined in: src/registry/defineApp.tsx:56

Menu command data rendered by the active OS package.


name

> name: string

Defined in: src/registry/defineApp.tsx:40

Fallback display name; prefer nameKey for i18n.


nameKey?

> optional nameKey?: string

Defined in: src/registry/defineApp.tsx:42

i18n key for the window title; falls back to name.


onMenuCommand?

> optional onMenuCommand?: (commandId, windowId) => void

Defined in: src/registry/defineApp.tsx:58

Runtime command sink for menus; receives the active window id.

Parameters

commandId

string

windowId

string

Returns

void


role?

> optional role?: AppRole

Defined in: src/registry/defineApp.tsx:54

Semantic implementation role selected indirectly by OS packages.


window?

> optional window?: AppWindowConfig

Defined in: src/registry/defineApp.tsx:48

Window size/behavior. Defaults to 400×300, non-singleton, resizable.