gi-gtk-3.0.26: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Structs.SelectionData

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

newtype SelectionData Source #

Memory-managed wrapper type.

Instances
BoxedObject SelectionData Source # 
Instance details

Defined in GI.Gtk.Structs.SelectionData

Methods

copy

selectionDataCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

data: a pointer to a SelectionData-struct.

-> m SelectionData

Returns: a pointer to a copy of data.

Makes a copy of a SelectionData-struct and its data.

free

selectionDataFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

data: a pointer to a SelectionData-struct.

-> m () 

Frees a SelectionData-struct returned from selectionDataCopy.

getData

selectionDataGetData Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a pointer to a SelectionData-struct.

-> 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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a pointer to a SelectionData-struct.

-> m Atom

Returns: the data type of the selection.

Retrieves the data type of the selection.

Since: 2.14

getDisplay

selectionDataGetDisplay Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a pointer to a SelectionData-struct.

-> m Display

Returns: the display of the selection.

Retrieves the display of the selection.

Since: 2.14

getFormat

selectionDataGetFormat Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a pointer to a SelectionData-struct.

-> m Int32

Returns: the format of the selection.

Retrieves the format of the selection.

Since: 2.14

getLength

selectionDataGetLength Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a pointer to a SelectionData-struct.

-> 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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a SelectionData

-> m (Maybe Pixbuf)

Returns: if the selection data contained a recognized image type and it could be converted to a Pixbuf, a newly allocated pixbuf is returned, otherwise Nothing. If the result is non-Nothing it must be freed with objectUnref.

Gets the contents of the selection data as a Pixbuf.

Since: 2.6

getSelection

selectionDataGetSelection Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a pointer to a SelectionData-struct.

-> m Atom

Returns: the selection Atom of the selection data.

Retrieves the selection Atom of the selection data.

Since: 2.16

getTarget

selectionDataGetTarget Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a pointer to a SelectionData-struct.

-> m Atom

Returns: the target of the selection.

Retrieves the target of the selection.

Since: 2.14

getTargets

selectionDataGetTargets Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a SelectionData object

-> m (Bool, [Atom])

Returns: True if selectionData contains a valid array of targets, otherwise False.

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

selectionDataGetText Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a 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 Nothing. If the result is non-Nothing it must be freed with free.

Gets the contents of the selection data as a UTF-8 string.

getUris

selectionDataGetUris Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a SelectionData

-> m [Text]

Returns: if the selection data contains a list of URIs, a newly allocated Nothing-terminated string array containing the URIs, otherwise Nothing. If the result is non-Nothing it must be freed with strfreev.

Gets the contents of the selection data as array of URIs.

Since: 2.6

set

selectionDataSet Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a pointer to a SelectionData-struct.

-> Atom

type: the type of selection data

-> Int32

format: format (number of bits in a unit)

-> ByteString

data: pointer to the data (will be copied)

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsPixbuf a) 
=> SelectionData

selectionData: a SelectionData

-> a

pixbuf: a Pixbuf

-> m Bool

Returns: True if the selection was successfully set, otherwise False.

Sets the contents of the selection from a Pixbuf The pixbuf is converted to the form determined by selectionData->target.

Since: 2.6

setText

selectionDataSetText Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a SelectionData

-> Text

str: a UTF-8 string

-> Int32

len: the length of str, or -1 if str is nul-terminated.

-> m Bool

Returns: True if the selection was successfully set, otherwise False.

Sets the contents of the selection from a UTF-8 encoded string. The string is converted to the form determined by selectionData->target.

setUris

selectionDataSetUris Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a SelectionData

-> [Text]

uris: a Nothing-terminated array of strings holding URIs

-> m Bool

Returns: True if the selection was successfully set, otherwise False.

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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a SelectionData object

-> Bool

writable: whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format

-> m Bool

Returns: True if selectionData holds a list of targets, and a suitable target for images is included, otherwise False.

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 #

Arguments

:: (HasCallStack, MonadIO m, IsTextBuffer a) 
=> SelectionData

selectionData: a SelectionData object

-> a

buffer: a TextBuffer

-> m Bool

Returns: True if selectionData holds a list of targets, and a suitable target for rich text is included, otherwise False.

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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a SelectionData object

-> m Bool

Returns: True if selectionData holds a list of targets, and a suitable target for text is included, otherwise False.

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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> SelectionData

selectionData: a SelectionData object

-> m Bool

Returns: True if selectionData holds a list of targets, and a suitable target for URI lists is included, otherwise False.

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