KittyImageRegistry class
In-memory registry mapping 32-bit Kitty imageIds to KittyImageData.
Can be instantiated per terminal pane/session (and bound to a region via Buffer.registerKittyRegistry) or accessed via KittyImageRegistry.global for host-level KittyImage widgets.
Constructors
- KittyImageRegistry()
- Creates an empty KittyImageRegistry.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasImages → bool
-
Whether this registry currently holds at least one registered image.
no setter
-
registeredImageIds
→ Iterable<
int> -
Returns all 32-bit image IDs currently stored in this registry.
no setter
- revision → int
-
Monotonically increasing revision counter incremented whenever images are
registered, updated, unregistered, or cleared.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearImages(
) → void - Removes all images from this registry.
-
lookupImage(
int imageId) → KittyImageData? -
Looks up the KittyImageData for
imageIdin this registry, ornull. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerImage(
KittyImageData data) → void -
Registers or updates
datain this registry under its 32-bitimageId. -
toString(
) → String -
A string representation of this object.
inherited
-
unregisterImage(
int imageId) → void -
Removes the registered KittyImageData for
imageIdfrom this registry.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- global → KittyImageRegistry
-
Process-wide default registry used by host KittyImage widgets.
final
Static Methods
-
clear(
) → void - Removes all registered images from global.
-
lookup(
int imageId) → KittyImageData? -
Looks up
imageIdin global, or returnsnull. -
register(
KittyImageData data) → void -
Registers or updates
datain global. -
unregister(
int imageId) → void -
Removes
imageIdfrom global, if present.