19. StdClipboard
Prev |  | Next

## 19. StdClipboard

The current clipboard implementation supports only string data type

    data ClipboardItem
            = ClipboardString String                -- Support for strings

    class Clipboard item where
            toClipboard     :: item                 -> ClipboardItem
            fromClipboard   :: ClipboardItem        -> Maybe item

    instance Clipboard String where
            toClipboard string = ClipboardString string
            fromClipboard (ClipboardString string) = Just string

    setClipboard :: [ClipboardItem] -> GUI ps ()

    getClipboard :: GUI ps [ClipboardItem]
    clipboardHasChanged :: GUI ps Bool

Prev |  | Next
18. StdSound | Home | Index