Hclip-3.0.0.4: A small cross-platform library for reading and modifying the system clipboard.

Copyright | (c) Jens Thomas
License | BSD3
Maintainer | Jens Thomas <jetho@gmx.de>
Stability | experimental
Portability | non-portable (GADTs, CPP, DeriveDataTypeable)
Safe Haskell | Safe-Inferred
Language | Haskell2010

System.Hclip

Description

A small cross-platform library for reading and modifying the system clipboard.

Synopsis

- getClipboard :: IO String
- setClipboard :: String -> IO ()
- modifyClipboard :: (String -> String) -> IO String
- modifyClipboard_ :: (String -> String) -> IO ()
- clearClipboard :: IO ()
- data ClipboardException
  - = UnsupportedOS String
  - | NoTextualData
  - | MissingCommands [String]

# Documentation

getClipboard :: IO String Source #

Read clipboard contents.

setClipboard :: String -> IO () Source #

Set clipboard contents.

modifyClipboard :: (String -> String) -> IO String Source #

Apply function to clipboard and return its new contents.

modifyClipboard_ :: (String -> String) -> IO () Source #

Apply function to clipboard.

clearClipboard :: IO () Source #

Delete Clipboard contents.

data ClipboardException Source #

Exceptions

Constructors

UnsupportedOS String |
NoTextualData |
MissingCommands [String] |

#### Instances

Instances details

Exception ClipboardException Source # |
Instance details Defined in System.Hclip Methods toException :: ClipboardException -> SomeException Source # fromException :: SomeException -> Maybe ClipboardException Source # displayException :: ClipboardException -> String Source #
Show ClipboardException Source # |
Instance details Defined in System.Hclip Methods showsPrec :: Int -> ClipboardException -> ShowS Source # show :: ClipboardException -> String Source # showList :: [ClipboardException] -> ShowS Source #