{-# LINE 2 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}-- -*-haskell-*--- GIMP Toolkit (GTK) Clipboard---- Author : Axel Simon---- Created: 26 March 2007---- Copyright (C) 2007 Axel Simon---- This library is free software; you can redistribute it and/or-- modify it under the terms of the GNU Lesser General Public-- License as published by the Free Software Foundation; either-- version 2.1 of the License, or (at your option) any later version.---- This library is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU-- Lesser General Public License for more details.---- I removed all definitions for the clipboard by Juergen Nicklisch since-- the way the clipboards were selected didn't tie in with the Selection-- module.---- |-- Maintainer : gtk2hs-users@lists.sourceforge.net-- Stability : provisional-- Portability : portable (depends on GHC)---- Storing data on clipboards--moduleGraphics.UI.Gtk.General.Clipboard(-- * Detail---- | The 'Clipboard' object represents a clipboard of data shared between-- different processes or between different widgets in the same process. Each-- clipboard is identified by a 'SelectionTag' which itself is an 'Atom'. The-- default clipboard corresponds to the 'selectionClipboard' tag; another-- commonly used clipboard is the 'selectionPrimary' tag, which, in X,-- traditionally contains the currently selected text.---- To support having a number of different formats on the clipboard at the-- same time, the clipboard mechanism allows providing callbacks instead of-- the actual data. When you set the contents of the clipboard, you can either-- supply the data directly (via functions like 'clipboardSetText'), or you-- can supply a callback to be called at a later time when the data is needed-- (via 'clipboardSetWithData'). Providing a callback also avoids having to-- make copies of the data when it is not needed.---- Setting clipboard data is done using 'clipboardSetWithData' and-- 'clipboardSetWithOwner'. Both functions are quite similar; the choice-- between the two depends mostly on which is more convenient in a particular-- situation. The former is most useful when you want to have a blob of data-- with callbacks to convert it into the various data types that you-- advertise. When the @clearFunc@ you provided is called, you simply free the-- data blob. The latter is more useful when the contents of clipboard reflect-- the internal state of a 'GObject' (As an example, for the-- 'selectionPrimary' clipboard, when an entry widget provides the clipboard's-- contents the contents are simply the text within the selected region.) If-- the contents change, the entry widget can call 'clipboardSetWithOwner' to-- update the timestamp for clipboard ownership, without having to worry about-- @clearFunc@ being called.---- Requesting the data from the clipboard is essentially asynchronous. If the-- contents of the clipboard are provided within the same process, then a-- direct function call will be made to retrieve the data, but if they are-- provided by another process, then the data needs to be retrieved from the-- other process, which may take some time. To avoid blocking the user-- interface, the call to request the selection, 'clipboardRequestContents'-- takes a callback that will be called when the contents are received (or-- when the request fails.) If you don't want to deal with providing a-- separate callback, you can also use 'clipboardWaitForContents'. What this-- does is run the GLib main loop recursively waiting for the contents. This-- can simplify the code flow, but you still have to be aware that other-- callbacks in your program can be called while this recursive mainloop is-- running.---- Along with the functions to get the clipboard contents as an arbitrary data-- chunk, there are also functions to retrieve it as text,-- 'clipboardRequestText' and 'clipboardWaitForText'. These functions take-- care of determining which formats are advertised by the clipboard provider,-- asking for the clipboard in the best available format and converting the-- its content.-- * Class Hierarchy---- |-- @-- | 'GObject'-- | +----Clipboard-- @-- * TypesClipboard,ClipboardClass,castToClipboard,gTypeClipboard,toClipboard,-- * ConstantsselectionPrimary,selectionSecondary,selectionClipboard,-- * MethodsclipboardGet,clipboardGetForDisplay,clipboardGetDisplay,clipboardSetWithData,{-
clipboardSetWithOwner,
clipboardGetOwner,
clipboardClear,
-}clipboardSetText,clipboardSetImage,clipboardRequestContents,clipboardRequestText,clipboardRequestImage,clipboardRequestTargets,clipboardRequestRichText,clipboardSetCanStore,clipboardStore,)whereimportSystem.Glib.FFIimportSystem.Glib.UTFStringimportGraphics.UI.Gtk.Types{-# LINE 141 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}importGraphics.UI.Gtk.General.DNDTypes(SelectionTag,TargetTag,atomNew,Atom(..))importGraphics.UI.Gtk.General.Selection(InfoId,SelectionDataM)importGraphics.UI.Gtk.General.Structs(selectionPrimary,selectionSecondary,selectionClipboard,withTargetEntries)importControl.Monad(liftM)importControl.Monad.Trans(liftIO)importControl.Monad.Reader(runReaderT,ask)importData.IORef(newIORef,readIORef,writeIORef){-# LINE 155 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}---------------------- Methods-- %hash c:d8d1 d:febf-- | Returns the clipboard object for the given selection. See-- 'clipboardGetForDisplay' for complete details.--clipboardGet::SelectionTag-- ^ @selection@ - a 'SelectionTag' which-- identifies the clipboard to use.->IOClipboard-- ^ returns the appropriate clipboard object. If no-- clipboard already exists, a new one will be created. Once a-- clipboard object has been created, it is persistent.clipboardGet(Atomselection)=makeNewGObjectmkClipboard$gtk_clipboard_getselection-- %hash c:251 d:39fa-- | Returns the clipboard object for the given selection. Cut\/copy\/paste-- menu items and keyboard shortcuts should use the default clipboard,-- returned by passing 'selectionClipboard' for @selection@. The-- currently-selected object or text should be provided on the clipboard-- identified by 'selectionPrimary'. Cut\/copy\/paste menu items conceptually-- copy the contents of the 'selectionPrimary' clipboard to the default-- clipboard, i.e. they copy the selection to what the user sees as the-- clipboard.---- See-- <http:-- discussion of the 'selectionClipboard' vs. 'selectionPrimary' selections-- under the X window system. On Win32 the 'selectionPrimary' clipboard is-- essentially ignored.---- It's possible to have arbitrary named clipboards; if you do invent new-- clipboards, you should prefix the selection name with an underscore-- (because the ICCCM requires that nonstandard atoms are-- underscore-prefixed), and namespace it as well. For example, if your-- application called \"Foo\" has a special-purpose clipboard, you could-- create it using 'Graphics.UI.Gtk.General.Selection.atomNew'-- \"_FOO_SPECIAL_CLIPBOARD\".---- * Available since Gtk+ version 2.2--clipboardGetForDisplay::Display-- ^ @display@ - the display for which the clipboard is to be-- retrieved or created->SelectionTag-- ^ @selection@ - a 'SelectionTag' which-- identifies the clipboard to use.->IOClipboard-- ^ returns the appropriate clipboard object. If no-- clipboard already exists, a new one will be created. Once a-- clipboard object has been created, it is persistent.clipboardGetForDisplaydisplay(Atomselection)=makeNewGObjectmkClipboard$(\(Displayarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_clipboard_get_for_displayargPtr1arg2){-# LINE 212 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}displayselection-- %hash c:3931 d:93f1-- | Gets the 'Display' associated with @clipboard@---- * Available since Gtk+ version 2.2--clipboardGetDisplay::ClipboardClassself=>self->IODisplay-- ^ returns the 'Display' associated with @clipboard@clipboardGetDisplayself=makeNewGObjectmkDisplay$(\(Clipboardarg1)->withForeignPtrarg1$\argPtr1->gtk_clipboard_get_displayargPtr1){-# LINE 224 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)-- The memory management of the ClipboardGetFunc and ClipboardClearFunc sucks badly-- in that there is no consistent way in which the latter could free the function-- closure of the former, since it is *not* called when the data of the same-- object is changed. What we do is that we store the function pointers as attributes-- of the Clipboard. Overwriting or finalizing these attributes will call their-- destructors and thereby free them. Thus, by setting these attributes each time we-- install new data functions, we cuningly finalized the previous closures. Hooray.{-# NOINLINE getFuncQuark #-}getFuncQuark::QuarkgetFuncQuark=unsafePerformIO$quarkFromString"hsClipboardGetFuncClosure"{-# NOINLINE clearFuncQuark #-}clearFuncQuark::QuarkclearFuncQuark=unsafePerformIO$quarkFromString"hsClipboardClearFuncClosure"-- %hash c:c65a d:b402-- | Virtually sets the contents of the specified clipboard by providing a-- list of supported formats for the clipboard data and a function to call to-- get the actual data when it is requested.--clipboardSetWithData::ClipboardClassself=>self->[(TargetTag,InfoId)]-- ^ @targets@ - a list containing information-- about the available forms for the clipboard-- data->(InfoId->SelectionDataM())-- ^ @getFunc@ - function to call to get the-- actual clipboard data, should call-- 'selectionDataSet'.->IO()-- ^ @clearFunc@ - when the clipboard contents-- are set again, this function will be called,-- and @getFunc@ will not be subsequently called.->IOBool-- ^ returns @True@ if setting the clipboard-- data succeeded.clipboardSetWithDataselftargetsgetFuncclearFunc=dogFunPtr<-mkClipboardGetFunc(\_sPtrinfo->runReaderT(getFuncinfo)sPtr>>return())cFunPtr<-mkClipboardClearFunc(\__->clearFunc)res<-withTargetEntriestargets$\nTargetstargets->liftMtoBool$(\(Clipboardarg1)arg2arg3arg4arg5arg6->withForeignPtrarg1$\argPtr1->gtk_clipboard_set_with_dataargPtr1arg2arg3arg4arg5arg6){-# LINE 269 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)targets(fromIntegralnTargets)gFunPtrcFunPtrnullPtr(\(GObjectarg1)arg2arg3arg4->withForeignPtrarg1$\argPtr1->g_object_set_qdata_fullargPtr1arg2arg3arg4)(toGObjectself)getFuncQuark(castFunPtrToPtrgFunPtr)destroyFunPtr(\(GObjectarg1)arg2arg3arg4->withForeignPtrarg1$\argPtr1->g_object_set_qdata_fullargPtr1arg2arg3arg4)(toGObjectself)clearFuncQuark(castFunPtrToPtrcFunPtr)destroyFunPtrreturnrestypeClipboardGetFunc=FunPtr(((PtrClipboard)->((Ptr())->(CUInt->((Ptr())->(IO())))))){-# LINE 282 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}typeClipboardClearFunc=FunPtr(((PtrClipboard)->((Ptr())->(IO())))){-# LINE 283 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}foreignimportccall"wrapper"mkClipboardGetFunc::(PtrClipboard->Ptr()->(CUInt)->IO())->IOClipboardGetFuncforeignimportccall"wrapper"mkClipboardClearFunc::(PtrClipboard->Ptr()->IO())->IOClipboardClearFunc-- %hash c:e778 d:7b3f-- | Virtually sets the contents of the specified clipboard by providing a-- list of supported formats for the clipboard data and a function to call to-- get the actual data when it is requested.---- The difference between this function and 'clipboardSetWithData' is that-- a 'GObject' is passed in.--clipboardSetWithOwner::(ClipboardClassself,GObjectClassowner)=>self->[(TargetTag,InfoId)]-- ^ @targets@ - a list containing information-- about the available forms for the clipboard-- data->(InfoId->SelectionDataM())-- ^ @getFunc@ - function to call to get the-- actual clipboard data, should call-- 'selectionDataSet'.->IO()-- ^ @clearFunc@ - when the clipboard contents-- are set again, this function will be called,-- and @getFunc@ will not be subsequently called.->owner-- ^ @owner@ - an object that \"owns\" the data.->IOBool-- ^ returns @True@ if setting the clipboard-- data succeeded. If setting the clipboard data-- failed the provided callback functions will be-- ignored.clipboardSetWithOwnerselftargetsgetFuncclearFuncowner=dogFunPtr<-mkClipboardGetFunc(\_sPtrinfo->runReaderT(getFuncinfo)sPtr>>return())cFunPtr<-mkClipboardClearFunc(\__->clearFunc)res<-withTargetEntriestargets$\nTargetstargets->liftMtoBool$(\(Clipboardarg1)arg2arg3arg4arg5(GObjectarg6)->withForeignPtrarg1$\argPtr1->withForeignPtrarg6$\argPtr6->gtk_clipboard_set_with_ownerargPtr1arg2arg3arg4arg5argPtr6){-# LINE 322 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)targets(fromIntegralnTargets)gFunPtrcFunPtr(toGObjectowner)(\(GObjectarg1)arg2arg3arg4->withForeignPtrarg1$\argPtr1->g_object_set_qdata_fullargPtr1arg2arg3arg4)(toGObjectself)getFuncQuark(castFunPtrToPtrgFunPtr)destroyFunPtr(\(GObjectarg1)arg2arg3arg4->withForeignPtrarg1$\argPtr1->g_object_set_qdata_fullargPtr1arg2arg3arg4)(toGObjectself)clearFuncQuark(castFunPtrToPtrcFunPtr)destroyFunPtrreturnres-- %hash c:dba2 d:efc2-- | If the clipboard contents callbacks were set with-- 'clipboardSetWithOwner', and the 'clipboardSetWithData' or 'clipboardClear'-- has not subsequently called, returns the owner set by-- 'clipboardSetWithOwner'.--clipboardGetOwner::ClipboardClassself=>self->IO(MaybeGObject)-- ^ returns the owner of the clipboard, if any; otherwise-- @Nothing@.clipboardGetOwnerself=maybeNull(makeNewGObjectmkGObject)$(\(Clipboardarg1)->withForeignPtrarg1$\argPtr1->gtk_clipboard_get_ownerargPtr1){-# LINE 346 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)-- %hash c:d6f8 d:486-- | Clears the contents of the clipboard. Generally this should only be-- called between the time you call 'clipboardSetWithOwner' or-- 'clipboardSetWithData', and when the @clearFunc@ you supplied is called.-- Otherwise, the clipboard may be owned by someone else.--clipboardClear::ClipboardClassself=>self->IO()clipboardClearself=(\(Clipboardarg1)->withForeignPtrarg1$\argPtr1->gtk_clipboard_clearargPtr1){-# LINE 357 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)-- %hash c:5211 d:14c6-- | Sets the contents of the clipboard to the given UTF-8 string. Gtk+ will-- make a copy of the text and take responsibility for responding for requests-- for the text, and for converting the text into the requested format.--clipboardSetText::ClipboardClassself=>self->String-- ^ @text@ - the text to be set as clipboard content->IO()clipboardSetTextselftext=withUTFStringLentext$\(textPtr,len)->(\(Clipboardarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gtk_clipboard_set_textargPtr1arg2arg3){-# LINE 370 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)textPtr(fromIntegrallen)-- %hash c:5172 d:e4dd-- | Sets the contents of the clipboard to the given 'Pixbuf'. Gtk+ will take-- responsibility for responding for requests for the image, and for converting-- the image into the requested format.---- * Available since Gtk+ version 2.6--clipboardSetImage::ClipboardClassself=>self->Pixbuf-- ^ @pixbuf@ - a 'Pixbuf'->IO()clipboardSetImageselfpixbuf=(\(Clipboardarg1)(Pixbufarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_clipboard_set_imageargPtr1argPtr2){-# LINE 387 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)pixbuf-- %hash c:22cd d:f72d-- | Requests the contents of clipboard as the given target. When the results-- of the result are later received the supplied callback will be called.--clipboardRequestContents::ClipboardClassself=>self->TargetTag-- ^ @target@ - an atom representing the form-- into which the clipboard owner should-- convert the selection.->SelectionDataM()-- ^ @callback@ - A function to call when the-- results are received (or the retrieval-- fails). If the retrieval fails,-- 'selectionDataIsValid' returns @False@.->IO()clipboardRequestContentsself(Atomtarget)callback=docbRef<-newIORefnullFunPtrcbPtr<-mkClipboardReceivedFunc(\_sPtr->dofreeHaskellFunPtr=<<readIORefcbRefrunReaderTcallbacksPtrreturn())writeIORefcbRefcbPtr(\(Clipboardarg1)arg2arg3arg4->withForeignPtrarg1$\argPtr1->gtk_clipboard_request_contentsargPtr1arg2arg3arg4){-# LINE 413 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)targetcbPtrnullPtrtypeClipboardReceivedFunc=FunPtr(((PtrClipboard)->((Ptr())->((Ptr())->(IO()))))){-# LINE 419 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}foreignimportccall"wrapper"mkClipboardReceivedFunc::(PtrClipboard->Ptr()->IO())->IOClipboardReceivedFunc-- %hash c:7bb1 d:4ef1-- | Requests the contents of the clipboard as text. When the text is later-- received, it will be converted if it is stored in a different character set-- if necessary, and @callback@ will be called.---- The @text@ parameter to @callback@ will contain the resulting text if the-- request succeeded, or @Nothing@ if it failed. This could happen for various reasons, in-- particular if the clipboard was empty or if the contents of the clipboard-- could not be converted into text form.--clipboardRequestText::ClipboardClassself=>self->(MaybeString->IO())-- ^ @callback@ - a function to call when-- the text is received, or the retrieval-- fails. (It will always be called one-- way or the other.)->IO()clipboardRequestTextselfcallback=docbRef<-newIORefnullFunPtrcbPtr<-mkClipboardTextReceivedFunc(\_sPtr->dofreeHaskellFunPtr=<<readIORefcbRefmStr<-ifsPtr==nullPtrthenreturnNothingelseliftMJust$peekUTFStringsPtrcallbackmStr)writeIORefcbRefcbPtr(\(Clipboardarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gtk_clipboard_request_textargPtr1arg2arg3){-# LINE 449 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)cbPtrnullPtrtypeClipboardTextReceivedFunc=FunPtr(((PtrClipboard)->((PtrCChar)->((Ptr())->(IO()))))){-# LINE 454 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}foreignimportccall"wrapper"mkClipboardTextReceivedFunc::(PtrClipboard->CString->IO())->IOClipboardTextReceivedFunc-- %hash c:3207 d:e3c1-- | Requests the contents of the clipboard as image. When the image is later-- received, it will be converted to a 'Pixbuf', and @callback@ will be called.---- The @pixbuf@ parameter to @callback@ will contain the resulting 'Pixbuf'-- if the request succeeded, or @Nothing@ if it failed. This could happen for various-- reasons, in particular if the clipboard was empty or if the contents of the-- clipboard could not be converted into an image.---- * Available since Gtk+ version 2.6--clipboardRequestImage::ClipboardClassself=>self->(MaybePixbuf->IO())-- ^ @callback@ - a function to call-- when the image is received, or the-- retrieval fails. (It will always be-- called one way or the other.)->IO()clipboardRequestImageselfcallback=docbRef<-newIORefnullFunPtrcbPtr<-mkClipboardImageReceivedFunc(\_sPtr->dofreeHaskellFunPtr=<<readIORefcbRefmPixbuf<-maybeNull(makeNewGObjectmkPixbuf)(returnsPtr)callbackmPixbuf)writeIORefcbRefcbPtr(\(Clipboardarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gtk_clipboard_request_imageargPtr1arg2arg3){-# LINE 486 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)cbPtrnullPtrtypeClipboardImageReceivedFunc=FunPtr(((PtrClipboard)->((PtrPixbuf)->((Ptr())->(IO()))))){-# LINE 491 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}foreignimportccall"wrapper"mkClipboardImageReceivedFunc::(PtrClipboard->PtrPixbuf->IO())->IOClipboardImageReceivedFunc-- %hash c:63f6 d:c0e1-- | Requests the contents of the clipboard as list of supported targets. When-- the list is later received, @callback@ will be called.---- The @targets@ parameter to @callback@ will contain the resulting targets-- if the request succeeded, or @Nothing@ if it failed.---- * Available since Gtk+ version 2.4--clipboardRequestTargets::ClipboardClassself=>self->(Maybe[TargetTag]->IO())-- ^ @callback@ - a function to call-- when the targets are received, or-- the retrieval fails. (It will always-- be called one way or the other.)->IO()clipboardRequestTargetsselfcallback=docbRef<-newIORefnullFunPtrcbPtr<-mkClipboardTargetsReceivedFunc(\_tPtrlen->do-- We must free Haskell pointer *in* the callback to avoid segfault.freeHaskellFunPtr=<<readIORefcbRefmTargets<-iftPtr==nullPtrthenreturnNothingelseliftM(Just.mapAtom)$peekArray(fromIntegrallen)tPtrcallbackmTargets)writeIORefcbRefcbPtr(\(Clipboardarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gtk_clipboard_request_targetsargPtr1arg2arg3){-# LINE 524 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)cbPtrnullPtrtypeClipboardTargetsReceivedFunc=FunPtr(((PtrClipboard)->((Ptr(Ptr()))->(CInt->((Ptr())->(IO())))))){-# LINE 529 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}foreignimportccall"wrapper"mkClipboardTargetsReceivedFunc::(PtrClipboard->Ptr(Ptr())->(CInt)->IO())->IOClipboardTargetsReceivedFunc-- %hash c:5601 d:d6a6-- | Requests the contents of the clipboard as rich text. When the rich text-- is later received, @callback@ will be called.---- The @text@ parameter to @callback@ will contain the resulting rich text if-- the request succeeded, or @Nothing@ if it failed. This function can fail-- for various reasons, in particular if the clipboard was empty or if the-- contents of the clipboard could not be converted into rich text form.---- * Available since Gtk+ version 2.10--clipboardRequestRichText::(ClipboardClassself,TextBufferClassbuffer)=>self->buffer-- ^ @buffer@ - a 'TextBuffer' that determines the supported rich text formats->(Maybe(TargetTag,String)->IO())-- ^ @callback@ - a function to call-- when the text is received, or the-- retrieval fails. (It will always be-- called one way or the other.)->IO()clipboardRequestRichTextselfbuffercallback=docbRef<-newIORefnullFunPtrcbPtr<-mkClipboardRichTextReceivedFunc(\_tPtrsPtrlen->dofreeHaskellFunPtr=<<readIORefcbRefmRes<-ifsPtr==nullPtrthenreturnNothingelseliftMJust$dostr<-peekUTFStringLen(sPtr,fromIntegrallen)return(AtomtPtr,str)callbackmRes)writeIORefcbRefcbPtr(\(Clipboardarg1)(TextBufferarg2)arg3arg4->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_clipboard_request_rich_textargPtr1argPtr2arg3arg4){-# LINE 563 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)(toTextBufferbuffer)cbPtrnullPtrtypeClipboardRichTextReceivedFunc=FunPtr(((PtrClipboard)->((Ptr())->((PtrCUChar)->(CUInt->((Ptr())->(IO()))))))){-# LINE 569 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}foreignimportccall"wrapper"mkClipboardRichTextReceivedFunc::(PtrClipboard->Ptr()->CString->(CUInt)->IO())->IOClipboardRichTextReceivedFunc-- %hash c:6e6a d:f98a-- | Hints that the clipboard data should be stored somewhere when the-- application exits or when 'clipboardStore' is called.---- This value is reset when the clipboard owner changes. Where the clipboard-- data is stored is platform dependent, see 'displayStoreClipboard' for more-- information.---- * Available since Gtk+ version 2.6--clipboardSetCanStore::ClipboardClassself=>self->Maybe[(TargetTag,InfoId)]-- ^ @targets@ - list containing information-- about which forms should be stored or-- @Nothing@ to indicate that all forms-- should be stored.->IO()clipboardSetCanStoreselfNothing=(\(Clipboardarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gtk_clipboard_set_can_storeargPtr1arg2arg3){-# LINE 595 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)nullPtr0clipboardSetCanStoreself(Justtargets)=withTargetEntriestargets$\nTargetstargets->(\(Clipboardarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gtk_clipboard_set_can_storeargPtr1arg2arg3){-# LINE 601 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)targets(fromIntegralnTargets)-- %hash c:f98a d:ded8-- | Stores the current clipboard data somewhere so that it will stay around-- after the application has quit.---- * Available since Gtk+ version 2.6--clipboardStore::ClipboardClassself=>self->IO()clipboardStoreself=(\(Clipboardarg1)->withForeignPtrarg1$\argPtr1->gtk_clipboard_storeargPtr1){-# LINE 614 "./Graphics/UI/Gtk/General/Clipboard.chs" #-}(toClipboardself)foreignimportccallsafe"gtk_clipboard_get"gtk_clipboard_get::((Ptr())->(IO(PtrClipboard)))foreignimportccallsafe"gtk_clipboard_get_for_display"gtk_clipboard_get_for_display::((PtrDisplay)->((Ptr())->(IO(PtrClipboard))))foreignimportccallsafe"gtk_clipboard_get_display"gtk_clipboard_get_display::((PtrClipboard)->(IO(PtrDisplay)))foreignimportccallsafe"gtk_clipboard_set_with_data"gtk_clipboard_set_with_data::((PtrClipboard)->((Ptr())->(CUInt->((FunPtr((PtrClipboard)->((Ptr())->(CUInt->((Ptr())->(IO()))))))->((FunPtr((PtrClipboard)->((Ptr())->(IO()))))->((Ptr())->(IOCInt)))))))foreignimportccallunsafe"g_object_set_qdata_full"g_object_set_qdata_full::((PtrGObject)->(CUInt->((Ptr())->((FunPtr((Ptr())->(IO())))->(IO())))))foreignimportccallsafe"gtk_clipboard_set_with_owner"gtk_clipboard_set_with_owner::((PtrClipboard)->((Ptr())->(CUInt->((FunPtr((PtrClipboard)->((Ptr())->(CUInt->((Ptr())->(IO()))))))->((FunPtr((PtrClipboard)->((Ptr())->(IO()))))->((PtrGObject)->(IOCInt)))))))foreignimportccallsafe"gtk_clipboard_get_owner"gtk_clipboard_get_owner::((PtrClipboard)->(IO(PtrGObject)))foreignimportccallsafe"gtk_clipboard_clear"gtk_clipboard_clear::((PtrClipboard)->(IO()))foreignimportccallsafe"gtk_clipboard_set_text"gtk_clipboard_set_text::((PtrClipboard)->((PtrCChar)->(CInt->(IO()))))foreignimportccallsafe"gtk_clipboard_set_image"gtk_clipboard_set_image::((PtrClipboard)->((PtrPixbuf)->(IO())))foreignimportccallsafe"gtk_clipboard_request_contents"gtk_clipboard_request_contents::((PtrClipboard)->((Ptr())->((FunPtr((PtrClipboard)->((Ptr())->((Ptr())->(IO())))))->((Ptr())->(IO())))))foreignimportccallsafe"gtk_clipboard_request_text"gtk_clipboard_request_text::((PtrClipboard)->((FunPtr((PtrClipboard)->((PtrCChar)->((Ptr())->(IO())))))->((Ptr())->(IO()))))foreignimportccallsafe"gtk_clipboard_request_image"gtk_clipboard_request_image::((PtrClipboard)->((FunPtr((PtrClipboard)->((PtrPixbuf)->((Ptr())->(IO())))))->((Ptr())->(IO()))))foreignimportccallsafe"gtk_clipboard_request_targets"gtk_clipboard_request_targets::((PtrClipboard)->((FunPtr((PtrClipboard)->((Ptr(Ptr()))->(CInt->((Ptr())->(IO()))))))->((Ptr())->(IO()))))foreignimportccallsafe"gtk_clipboard_request_rich_text"gtk_clipboard_request_rich_text::((PtrClipboard)->((PtrTextBuffer)->((FunPtr((PtrClipboard)->((Ptr())->((PtrCUChar)->(CUInt->((Ptr())->(IO())))))))->((Ptr())->(IO())))))foreignimportccallsafe"gtk_clipboard_set_can_store"gtk_clipboard_set_can_store::((PtrClipboard)->((Ptr())->(CInt->(IO()))))foreignimportccallsafe"gtk_clipboard_store"gtk_clipboard_store::((PtrClipboard)->(IO()))