helic-0.6.1.0: Clipboard Manager
Safe HaskellSafe-Inferred
LanguageGHC2021

Helic.Effect.GtkClipboard

Description

The effect GtkClipboard allows an app to read from, write to, and subscribe to events from a clipboard.

Synopsis

Documentation

data GtkClipboard :: Effect where Source #

This effect GtkClipboard allows an app to read from, write to, and subscribe to events from a clipboard. It is intended to be scoped with a GTK display by interpretWithGtk.

Constructors

Read :: Selection -> GtkClipboard m (Maybe Text)

Fetch the text content of the X11 clipboard identified by the argument.

Write :: Selection -> Text -> GtkClipboard m ()

Set the text content of the X11 clipboard identified by the first argument.

Events :: (Selection -> Text -> m ()) -> GtkClipboard m ()

Listen to clipboard events and invoke the callback.

events :: forall r. Member GtkClipboard r => (Selection -> Text -> Sem r ()) -> Sem r () Source #

Listen to clipboard events and invoke the callback.

write :: forall r. Member GtkClipboard r => Selection -> Text -> Sem r () Source #

Set the text content of the X11 clipboard identified by the first argument.

read :: forall r. Member GtkClipboard r => Selection -> Sem r (Maybe Text) Source #

Fetch the text content of the X11 clipboard identified by the argument.