Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- newtype SelectionData = SelectionData (ManagedPtr SelectionData)
- noSelectionData :: Maybe SelectionData
- data SelectionDataCopyMethodInfo
- selectionDataCopy :: (HasCallStack, MonadIO m) => SelectionData -> m SelectionData
- data SelectionDataFreeMethodInfo
- selectionDataFree :: (HasCallStack, MonadIO m) => SelectionData -> m ()
- data SelectionDataGetDataMethodInfo
- selectionDataGetData :: (HasCallStack, MonadIO m) => SelectionData -> m ByteString
- data SelectionDataGetDataTypeMethodInfo
- selectionDataGetDataType :: (HasCallStack, MonadIO m) => SelectionData -> m Atom
- data SelectionDataGetDisplayMethodInfo
- selectionDataGetDisplay :: (HasCallStack, MonadIO m) => SelectionData -> m Display
- data SelectionDataGetFormatMethodInfo
- selectionDataGetFormat :: (HasCallStack, MonadIO m) => SelectionData -> m Int32
- data SelectionDataGetLengthMethodInfo
- selectionDataGetLength :: (HasCallStack, MonadIO m) => SelectionData -> m Int32
- data SelectionDataGetPixbufMethodInfo
- selectionDataGetPixbuf :: (HasCallStack, MonadIO m) => SelectionData -> m (Maybe Pixbuf)
- data SelectionDataGetSelectionMethodInfo
- selectionDataGetSelection :: (HasCallStack, MonadIO m) => SelectionData -> m Atom
- data SelectionDataGetTargetMethodInfo
- selectionDataGetTarget :: (HasCallStack, MonadIO m) => SelectionData -> m Atom
- data SelectionDataGetTargetsMethodInfo
- selectionDataGetTargets :: (HasCallStack, MonadIO m) => SelectionData -> m (Bool, [Atom])
- data SelectionDataGetTextMethodInfo
- selectionDataGetText :: (HasCallStack, MonadIO m) => SelectionData -> m (Maybe Text)
- data SelectionDataGetUrisMethodInfo
- selectionDataGetUris :: (HasCallStack, MonadIO m) => SelectionData -> m [Text]
- data SelectionDataSetMethodInfo
- selectionDataSet :: (HasCallStack, MonadIO m) => SelectionData -> Atom -> Int32 -> ByteString -> m ()
- data SelectionDataSetPixbufMethodInfo
- selectionDataSetPixbuf :: (HasCallStack, MonadIO m, IsPixbuf a) => SelectionData -> a -> m Bool
- data SelectionDataSetTextMethodInfo
- selectionDataSetText :: (HasCallStack, MonadIO m) => SelectionData -> Text -> Int32 -> m Bool
- data SelectionDataSetUrisMethodInfo
- selectionDataSetUris :: (HasCallStack, MonadIO m) => SelectionData -> [Text] -> m Bool
- data SelectionDataTargetsIncludeImageMethodInfo
- selectionDataTargetsIncludeImage :: (HasCallStack, MonadIO m) => SelectionData -> Bool -> m Bool
- data SelectionDataTargetsIncludeRichTextMethodInfo
- selectionDataTargetsIncludeRichText :: (HasCallStack, MonadIO m, IsTextBuffer a) => SelectionData -> a -> m Bool
- data SelectionDataTargetsIncludeTextMethodInfo
- selectionDataTargetsIncludeText :: (HasCallStack, MonadIO m) => SelectionData -> m Bool
- data SelectionDataTargetsIncludeUriMethodInfo
- selectionDataTargetsIncludeUri :: (HasCallStack, MonadIO m) => SelectionData -> m Bool
Exported types
newtype SelectionData Source #
Methods
copy
data SelectionDataCopyMethodInfo Source #
((~) * signature (m SelectionData), MonadIO m) => MethodInfo * SelectionDataCopyMethodInfo SelectionData signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m SelectionData | Returns: a pointer to a copy of |
Makes a copy of a SelectionData
-struct and its data.
free
data SelectionDataFreeMethodInfo Source #
((~) * signature (m ()), MonadIO m) => MethodInfo * SelectionDataFreeMethodInfo SelectionData signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m () |
Frees a SelectionData
-struct returned from
selectionDataCopy
.
getData
data SelectionDataGetDataMethodInfo Source #
((~) * signature (m ByteString), MonadIO m) => MethodInfo * SelectionDataGetDataMethodInfo SelectionData signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m ByteString | Returns: the raw data of the selection |
Retrieves the raw data of the selection along with its length.
Since: 3.0
getDataType
data SelectionDataGetDataTypeMethodInfo Source #
((~) * signature (m Atom), MonadIO m) => MethodInfo * SelectionDataGetDataTypeMethodInfo SelectionData signature Source # | |
selectionDataGetDataType Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Atom | Returns: the data type of the selection. |
Retrieves the data type of the selection.
Since: 2.14
getDisplay
data SelectionDataGetDisplayMethodInfo Source #
((~) * signature (m Display), MonadIO m) => MethodInfo * SelectionDataGetDisplayMethodInfo SelectionData signature Source # | |
selectionDataGetDisplay Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Display | Returns: the display of the selection. |
Retrieves the display of the selection.
Since: 2.14
getFormat
data SelectionDataGetFormatMethodInfo Source #
((~) * signature (m Int32), MonadIO m) => MethodInfo * SelectionDataGetFormatMethodInfo SelectionData signature Source # | |
selectionDataGetFormat Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Int32 | Returns: the format of the selection. |
Retrieves the format of the selection.
Since: 2.14
getLength
data SelectionDataGetLengthMethodInfo Source #
((~) * signature (m Int32), MonadIO m) => MethodInfo * SelectionDataGetLengthMethodInfo SelectionData signature Source # | |
selectionDataGetLength Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Int32 | Returns: the length of the data of the selection. |
Retrieves the length of the raw data of the selection.
Since: 2.14
getPixbuf
data SelectionDataGetPixbufMethodInfo Source #
((~) * signature (m (Maybe Pixbuf)), MonadIO m) => MethodInfo * SelectionDataGetPixbufMethodInfo SelectionData signature Source # | |
selectionDataGetPixbuf Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m (Maybe Pixbuf) | Returns: if the selection data
contained a recognized image type and it could be converted to a
|
Gets the contents of the selection data as a Pixbuf
.
Since: 2.6
getSelection
data SelectionDataGetSelectionMethodInfo Source #
((~) * signature (m Atom), MonadIO m) => MethodInfo * SelectionDataGetSelectionMethodInfo SelectionData signature Source # | |
selectionDataGetSelection Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Atom | Returns: the selection |
Retrieves the selection Atom
of the selection data.
Since: 2.16
getTarget
data SelectionDataGetTargetMethodInfo Source #
((~) * signature (m Atom), MonadIO m) => MethodInfo * SelectionDataGetTargetMethodInfo SelectionData signature Source # | |
selectionDataGetTarget Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Atom | Returns: the target of the selection. |
Retrieves the target of the selection.
Since: 2.14
getTargets
data SelectionDataGetTargetsMethodInfo Source #
((~) * signature (m (Bool, [Atom])), MonadIO m) => MethodInfo * SelectionDataGetTargetsMethodInfo SelectionData signature Source # | |
selectionDataGetTargets Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m (Bool, [Atom]) | Returns: |
Gets the contents of selectionData
as an array of targets.
This can be used to interpret the results of getting
the standard TARGETS target that is always supplied for
any selection.
getText
data SelectionDataGetTextMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m) => MethodInfo * SelectionDataGetTextMethodInfo SelectionData signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m (Maybe Text) | Returns: if the selection data contained a
recognized text type and it could be converted to UTF-8, a newly
allocated string containing the converted text, otherwise |
Gets the contents of the selection data as a UTF-8 string.
getUris
data SelectionDataGetUrisMethodInfo Source #
((~) * signature (m [Text]), MonadIO m) => MethodInfo * SelectionDataGetUrisMethodInfo SelectionData signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m [Text] | Returns: if
the selection data contains a list of
URIs, a newly allocated |
Gets the contents of the selection data as array of URIs.
Since: 2.6
set
data SelectionDataSetMethodInfo Source #
((~) * signature (Atom -> Int32 -> ByteString -> m ()), MonadIO m) => MethodInfo * SelectionDataSetMethodInfo SelectionData signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> Atom |
|
-> Int32 |
|
-> ByteString |
|
-> m () |
Stores new data into a SelectionData
object. Should
only be called from a selection handler callback.
Zero-terminates the stored data.
setPixbuf
data SelectionDataSetPixbufMethodInfo Source #
((~) * signature (a -> m Bool), MonadIO m, IsPixbuf a) => MethodInfo * SelectionDataSetPixbufMethodInfo SelectionData signature Source # | |
selectionDataSetPixbuf Source #
:: (HasCallStack, MonadIO m, IsPixbuf a) | |
=> SelectionData |
|
-> a |
|
-> m Bool | Returns: |
Sets the contents of the selection from a Pixbuf
The pixbuf is converted to the form determined by
selectionData
->target.
Since: 2.6
setText
data SelectionDataSetTextMethodInfo Source #
((~) * signature (Text -> Int32 -> m Bool), MonadIO m) => MethodInfo * SelectionDataSetTextMethodInfo SelectionData signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> Text |
|
-> Int32 |
|
-> m Bool | Returns: |
Sets the contents of the selection from a UTF-8 encoded string.
The string is converted to the form determined by
selectionData
->target.
setUris
data SelectionDataSetUrisMethodInfo Source #
((~) * signature ([Text] -> m Bool), MonadIO m) => MethodInfo * SelectionDataSetUrisMethodInfo SelectionData signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> [Text] |
|
-> m Bool | Returns: |
Sets the contents of the selection from a list of URIs.
The string is converted to the form determined by
selectionData
->target.
Since: 2.6
targetsIncludeImage
data SelectionDataTargetsIncludeImageMethodInfo Source #
((~) * signature (Bool -> m Bool), MonadIO m) => MethodInfo * SelectionDataTargetsIncludeImageMethodInfo SelectionData signature Source # | |
selectionDataTargetsIncludeImage Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> Bool |
|
-> m Bool | Returns: |
Given a SelectionData
object holding a list of targets,
determines if any of the targets in targets
can be used to
provide a Pixbuf
.
Since: 2.6
targetsIncludeRichText
data SelectionDataTargetsIncludeRichTextMethodInfo Source #
((~) * signature (a -> m Bool), MonadIO m, IsTextBuffer a) => MethodInfo * SelectionDataTargetsIncludeRichTextMethodInfo SelectionData signature Source # | |
selectionDataTargetsIncludeRichText Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> SelectionData |
|
-> a |
|
-> m Bool | Returns: |
Given a SelectionData
object holding a list of targets,
determines if any of the targets in targets
can be used to
provide rich text.
Since: 2.10
targetsIncludeText
data SelectionDataTargetsIncludeTextMethodInfo Source #
((~) * signature (m Bool), MonadIO m) => MethodInfo * SelectionDataTargetsIncludeTextMethodInfo SelectionData signature Source # | |
selectionDataTargetsIncludeText Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Bool | Returns: |
Given a SelectionData
object holding a list of targets,
determines if any of the targets in targets
can be used to
provide text.
targetsIncludeUri
data SelectionDataTargetsIncludeUriMethodInfo Source #
((~) * signature (m Bool), MonadIO m) => MethodInfo * SelectionDataTargetsIncludeUriMethodInfo SelectionData signature Source # | |
selectionDataTargetsIncludeUri Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Bool | Returns: |
Given a SelectionData
object holding a list of targets,
determines if any of the targets in targets
can be used to
provide a list or URIs.
Since: 2.10