Raxol.Terminal.ClipboardBehaviour behaviour (Raxol v0.5.0)
View SourceDefines the behaviour for clipboard operations in the terminal.
This behaviour specifies the callbacks that must be implemented by any module that wants to handle clipboard operations in the terminal emulator.
Summary
Callbacks
Clears the clipboard content.
Gets the current content of the clipboard.
Gets the current selection content.
Sets the content of the clipboard.
Sets the selection content.
Callbacks
Clears the clipboard content.
Returns {:ok, updated_clipboard}
on success, or {:error, reason}
on failure.
Gets the current content of the clipboard.
Returns {:ok, content}
on success, or {:error, reason}
on failure.
Gets the current selection content.
Returns {:ok, content}
on success, or {:error, reason}
on failure.
@callback set_content(clipboard :: term(), content :: String.t()) :: {:ok, term()} | {:error, term()}
Sets the content of the clipboard.
Returns {:ok, updated_clipboard}
on success, or {:error, reason}
on failure.
@callback set_selection(clipboard :: term(), content :: String.t()) :: {:ok, term()} | {:error, term()}
Sets the selection content.
Returns {:ok, updated_clipboard}
on success, or {:error, reason}
on failure.