Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
The effect GtkClipboard
allows an app to read from, write to, and subscribe to events from a clipboard.
Synopsis
- data GtkClipboard :: Effect where
- Read :: Selection -> GtkClipboard m (Maybe Text)
- Write :: Selection -> Text -> GtkClipboard m ()
- Events :: (Selection -> Text -> m ()) -> GtkClipboard m ()
- events :: forall r. Member GtkClipboard r => (Selection -> Text -> Sem r ()) -> Sem r ()
- write :: forall r. Member GtkClipboard r => Selection -> Text -> Sem r ()
- read :: forall r. Member GtkClipboard r => Selection -> Sem r (Maybe Text)
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
.
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.