Skip to main content

Module handlers

Module handlers 

Source
Expand description

AssetTypeHandler — extensibility seam for the Asset Browser.

Each handler owns one asset_type_name (the lower-case identifier produced by the index builder) and decides:

  • which tile-kind / icon / category to show in the browser;
  • what happens when the user double-clicks it.

Built-in handlers are registered through inventory::submit! from builtins. Plugins can register their own by submitting to AssetTypeHandlerRegistration from any crate that depends on khora-editor (or via a future plugin loader).

Modules§

builtins

Structs§

AssetTypeHandlerRegistration
Inventory entry — registered through inventory::submit!.

Enums§

ActivationKind
Action to take after the user activates (double-clicks) an asset.

Traits§

AssetTypeHandler
Pluggable handler for one asset type.

Functions§

handler_for
Lookup the handler for a given asset_type_name. Returns None only if no built-in or plugin handler matched (caller should fall back to the unknown-type tile + open-external behaviour).
tile_kind_for
Tile kind by type name — convenience for the panel grid.