Raxol.Terminal.NotificationManager (Raxol v0.5.0)

View Source

Manages terminal notifications, telemetry events, and callbacks.

This module is responsible for:

  • Sending notifications to runtime processes
  • Emitting telemetry events
  • Managing callback execution
  • Logging notification events

Summary

Functions

notify_clipboard_event(runtime_pid, callback_module, type, data)

@spec notify_clipboard_event(pid() | nil, module() | nil, atom(), any()) :: :ok

Notifies about a clipboard event.

Parameters

  • runtime_pid - The PID of the runtime process to notify
  • callback_module - The callback module to execute
  • type - The clipboard operation type
  • data - The clipboard data

notify_cursor_event(runtime_pid, callback_module, cursor)

@spec notify_cursor_event(pid() | nil, module() | nil, map()) :: :ok

Notifies about a cursor event.

Parameters

  • runtime_pid - The PID of the runtime process to notify
  • callback_module - The callback module to execute
  • cursor - The cursor data

notify_focus_changed(runtime_pid, callback_module, focused?)

@spec notify_focus_changed(pid() | nil, module() | nil, boolean()) :: :ok

Notifies about a focus change event.

Parameters

  • runtime_pid - The PID of the runtime process to notify
  • callback_module - The callback module to execute
  • focused? - Whether the terminal is focused

notify_mode_changed(runtime_pid, callback_module, new_mode)

@spec notify_mode_changed(pid() | nil, module() | nil, atom()) :: :ok

Notifies about a mode change event.

Parameters

  • runtime_pid - The PID of the runtime process to notify
  • callback_module - The callback module to execute
  • new_mode - The new mode

notify_paste_event(runtime_pid, callback_module, text, pos)

@spec notify_paste_event(
  pid() | nil,
  module() | nil,
  String.t(),
  {integer(), integer()}
) :: :ok

Notifies about a paste event.

Parameters

  • runtime_pid - The PID of the runtime process to notify
  • callback_module - The callback module to execute
  • text - The pasted text
  • pos - The paste position

notify_resized(runtime_pid, callback_module, width, height)

@spec notify_resized(pid() | nil, module() | nil, integer(), integer()) :: :ok

Notifies about a terminal resize event.

Parameters

  • runtime_pid - The PID of the runtime process to notify
  • callback_module - The callback module to execute
  • width - The new width
  • height - The new height

notify_scroll_event(runtime_pid, callback_module, dir, delta, pos)

@spec notify_scroll_event(
  pid() | nil,
  module() | nil,
  atom(),
  integer(),
  {integer(), integer()}
) :: :ok

Notifies about a scroll event.

Parameters

  • runtime_pid - The PID of the runtime process to notify
  • callback_module - The callback module to execute
  • dir - The scroll direction
  • delta - The scroll delta
  • pos - The scroll position

notify_selection_changed(runtime_pid, callback_module, selection)

@spec notify_selection_changed(pid() | nil, module() | nil, map()) :: :ok

Notifies about a selection change event.

Parameters

  • runtime_pid - The PID of the runtime process to notify
  • callback_module - The callback module to execute
  • selection - The selection data