helic-0.5.2.0: Clipboard Manager
Safe HaskellNone
LanguageHaskell2010

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.