Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype SelectionData = SelectionData (ManagedPtr SelectionData)
- noSelectionData :: Maybe SelectionData
- selectionDataCopy :: (HasCallStack, MonadIO m) => SelectionData -> m SelectionData
- selectionDataFree :: (HasCallStack, MonadIO m) => SelectionData -> m ()
- selectionDataGetData :: (HasCallStack, MonadIO m) => SelectionData -> m ByteString
- selectionDataGetDataType :: (HasCallStack, MonadIO m) => SelectionData -> m Atom
- selectionDataGetDisplay :: (HasCallStack, MonadIO m) => SelectionData -> m Display
- selectionDataGetFormat :: (HasCallStack, MonadIO m) => SelectionData -> m Int32
- selectionDataGetLength :: (HasCallStack, MonadIO m) => SelectionData -> m Int32
- selectionDataGetPixbuf :: (HasCallStack, MonadIO m) => SelectionData -> m (Maybe Pixbuf)
- selectionDataGetSelection :: (HasCallStack, MonadIO m) => SelectionData -> m Atom
- selectionDataGetTarget :: (HasCallStack, MonadIO m) => SelectionData -> m Atom
- selectionDataGetTargets :: (HasCallStack, MonadIO m) => SelectionData -> m (Bool, [Atom])
- selectionDataGetText :: (HasCallStack, MonadIO m) => SelectionData -> m (Maybe Text)
- selectionDataGetUris :: (HasCallStack, MonadIO m) => SelectionData -> m [Text]
- selectionDataSet :: (HasCallStack, MonadIO m) => SelectionData -> Atom -> Int32 -> ByteString -> m ()
- selectionDataSetPixbuf :: (HasCallStack, MonadIO m, IsPixbuf a) => SelectionData -> a -> m Bool
- selectionDataSetText :: (HasCallStack, MonadIO m) => SelectionData -> Text -> Int32 -> m Bool
- selectionDataSetUris :: (HasCallStack, MonadIO m) => SelectionData -> [Text] -> m Bool
- selectionDataTargetsIncludeImage :: (HasCallStack, MonadIO m) => SelectionData -> Bool -> m Bool
- selectionDataTargetsIncludeRichText :: (HasCallStack, MonadIO m, IsTextBuffer a) => SelectionData -> a -> m Bool
- selectionDataTargetsIncludeText :: (HasCallStack, MonadIO m) => SelectionData -> m Bool
- selectionDataTargetsIncludeUri :: (HasCallStack, MonadIO m) => SelectionData -> m Bool
Exported types
newtype SelectionData Source #
Memory-managed wrapper type.
Instances
BoxedObject SelectionData Source # | |
Defined in GI.Gtk.Structs.SelectionData boxedType :: SelectionData -> IO GType # |
noSelectionData :: Maybe SelectionData Source #
A convenience alias for Nothing
:: Maybe
SelectionData
.
Methods
copy
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m SelectionData | Returns: a pointer to a copy of |
Makes a copy of a SelectionData
-struct and its data.
free
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m () |
Frees a SelectionData
-struct returned from
selectionDataCopy
.
getData
:: (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
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
selectionDataGetDisplay Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Display | Returns: the display of the selection. |
Retrieves the display of the selection.
Since: 2.14
getFormat
selectionDataGetFormat Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Int32 | Returns: the format of the selection. |
Retrieves the format of the selection.
Since: 2.14
getLength
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
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
selectionDataGetSelection Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Atom | Returns: the selection |
Retrieves the selection Atom
of the selection data.
Since: 2.16
getTarget
selectionDataGetTarget Source #
:: (HasCallStack, MonadIO m) | |
=> SelectionData |
|
-> m Atom | Returns: the target of the selection. |
Retrieves the target of the selection.
Since: 2.14
getTargets
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
:: (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
:: (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
:: (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
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
:: (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
:: (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
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
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
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
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