Skip to main content

Module methods

Module methods 

Source
Expand description

Names of the methods a plugin can invoke through HostApi::call.

Arguments and results are JSON; the argument type of each method is noted.

Constants§

APP_CYCLE_PANE
OffsetArgs → null
APP_CYCLE_TAB
OffsetArgs → null
APP_SERIES
SeriesArgs → null
BADGE_SET
BadgeArgs → null. Shows (or with text: None removes) a short notice fixed to the corner of every pane showing a slide, which does not move with the view (e.g. “Predicted — research use only”).
BATCH_FINISH
BatchFinishArgs → null: a batch run’s slide is done.
BATCH_PROGRESS
BatchProgressArgs → null: how far a batch run’s slide is.
BATCH_REGISTER
BatchCommandSpec → null: offers a command for headless batch runs over many slides (eov batch run <plugin>:<command> SLIDES). Register it in create; slides then arrive as HostEvent::BatchRun.
CLIPBOARD_SET_TEXT
TextArgs → null
DIALOG_CONFIRM
ConfirmArgs → RequestId (result arrives as ConfirmResult)
DIALOG_OPEN_FILE
FileDialogArgs → RequestId (result arrives as DialogResult)
DIALOG_SAVE_FILE
FileDialogArgs → RequestId (result arrives as DialogResult)
EVENTS_SUBSCRIBE
SubscribeArgs → null. Restricts the events delivered to the plugin; by default every event is delivered.
FILE_INFO
FileArgs → FileInfo
FILE_OPEN
OpenFileArgs → null
FILE_PROPERTIES
FileArgs → { "<name>": "<value>" } (all slide properties)
FILTER_REGISTER
FilterSpec → null
FILTER_SET_ENABLED
FilterEnableArgs → null
FILTER_UNREGISTER
IdArgs { id: filter_id } → null
HOTKEY_REGISTER
HotkeySpec → null. A key binding of its own, not tied to a toolbar button or tool; presses arrive as HotkeyPressed.
HOTKEY_UNREGISTER
IdArgs { id: hotkey_id } → null
HUD_ADD
HudButtonSpec → null
HUD_REMOVE
IdArgs { id: button_id } → null
HUD_UPDATE
ButtonUpdate → null
JOB_FINISH
JobFinishArgs → null
JOB_START
JobStartArgs → JobStarted
JOB_UPDATE
JobUpdateArgs → null
LAYER_CLEAR
IdArgs { id: layer_id } → null. Removes every object.
LAYER_CREATE
LayerSpec → null (replaces an existing layer with the same id)
LAYER_HIGHLIGHT
SelectArgs → null. Draws these objects with the layer’s hover style (an empty list clears it), e.g. while a list row is hovered.
LAYER_REMOVE
IdArgs { id: layer_id } → null
LAYER_REMOVE_OBJECTS
RemoveObjectsArgs → null
LAYER_SELECT
SelectArgs → null
LAYER_SET_MIN_ZOOM
MinZoomArgs → null. Hides the layer below a zoom level.
LAYER_SET_PANES
PaneFilterArgs → null. Shows the layer only in these panes (None: in every pane), including panes opened later.
LAYER_SET_PANE_VISIBILITY
PaneVisibilityArgs → null. Shows or hides the layer in one pane (on top of the layer’s own visibility).
LAYER_UPDATE
LayerUpdate → null
LAYER_UPSERT
UpsertObjectsArgs → null. Parsed and indexed on the calling thread; call it from a worker thread for large batches.
LOG
LogArgs → null
MEASUREMENTS_LIST
FileArgs → Vec<MeasurementInfo>
MODEL_FETCH
ModelFetchArgs → RequestId: makes a model available in eov’s model store, downloading it (after the user agrees, with progress in the status bar) when it is not stored yet, and verifying every file against its SHA-256. The answer arrives as HostEvent::ModelFetched.
MODEL_LIST
{} → Vec<ModelRecord>: every stored model.
MODEL_RESOLVE
ModelResolveArgs → Option<ModelRecord>: the stored model whose main file has this SHA-256, if any (never downloads).
NOTIFY
NotifyArgs → null. Shows a toast and records it in the log.
POST
PostArgs → null. Delivers Posted { token } on the UI thread.
RENDER_REQUEST
{} → null
ROI_GET
FileArgs → Option<Rect> (the host region of interest of a slide)
SETTINGS_GET
KeyArgs → value or null
SETTINGS_SET
SettingsSetArgs → null (persisted by the host)
SNAPSHOT
{} → HostSnapshot
STATUS
StatusArgs → null. Plugin-owned status bar segment.
SURFACE_CLOSE
IdArgs { id: surface_id } → null
SURFACE_IS_OPEN
IdArgs { id: surface_id } → bool
SURFACE_OPEN
SurfaceSpec → SurfaceOpened
SURFACE_SET
SurfaceProperties → null. Values the surface already shows are left alone.
TOOLBAR_ADD
ToolbarButtonSpec → null
TOOLBAR_REMOVE
IdArgs { id: button_id } → null
TOOLBAR_UPDATE
ButtonUpdate → null
TOOL_ACTIVATE
IdArgs { id: tool_id } → null
TOOL_DEACTIVATE
{} → null. Returns to Navigate if one of this plugin’s tools is active.
TOOL_REGISTER
ToolSpec → null
TOOL_UNREGISTER
IdArgs { id: tool_id } → null
UNDO_CLEAR
UndoClearArgs → null
UNDO_PUSH
UndoPushArgs → null
VIEW_DISPLAY
PaneArgs → DisplayAdjustments: how the pane renders the slide, so overlays derived from slide pixels can match it.
VIEW_FIT
PaneArgs → null
VIEW_FRAME
ViewFrameArgs → null
VIEW_ORIENTATION
ViewOrientationArgs → null: turns a pane’s view, by any angle (it must be finite), about the pane centre.
VIEW_PAN
ViewPanArgs → null
VIEW_SET
ViewSetArgs → null
VIEW_ZOOM
ViewZoomArgs → null