gi-gtk3-3.0.44: Gtk 3.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Structs.TargetList

Contents

- Exported types
- Methods
  - add
  - addImageTargets
  - addRichTextTargets
  - addTable
  - addTextTargets
  - addUriTargets
  - find
  - new
  - ref
  - remove
  - unref

Description

A `TargetList`-struct is a reference counted list of `TargetPair` and should be treated as opaque.

Synopsis

- newtype TargetList = TargetList (ManagedPtr TargetList)
- targetListAdd :: (HasCallStack, MonadIO m) => TargetList -> Atom -> Word32 -> Word32 -> m ()
- targetListAddImageTargets :: (HasCallStack, MonadIO m) => TargetList -> Word32 -> Bool -> m ()
- targetListAddRichTextTargets :: (HasCallStack, MonadIO m, IsTextBuffer a) => TargetList -> Word32 -> Bool -> a -> m ()
- targetListAddTable :: (HasCallStack, MonadIO m) => TargetList -> [TargetEntry] -> m ()
- targetListAddTextTargets :: (HasCallStack, MonadIO m) => TargetList -> Word32 -> m ()
- targetListAddUriTargets :: (HasCallStack, MonadIO m) => TargetList -> Word32 -> m ()
- targetListFind :: (HasCallStack, MonadIO m) => TargetList -> Atom -> m (Bool, Word32)
- targetListNew :: (HasCallStack, MonadIO m) => Maybe [TargetEntry] -> m TargetList
- targetListRef :: (HasCallStack, MonadIO m) => TargetList -> m TargetList
- targetListRemove :: (HasCallStack, MonadIO m) => TargetList -> Atom -> m ()
- targetListUnref :: (HasCallStack, MonadIO m) => TargetList -> m ()

# Exported types

newtype TargetList Source #

Memory-managed wrapper type.

Constructors

TargetList (ManagedPtr TargetList) |

#### Instances

Instances details

Eq TargetList Source # |
Instance details Defined in GI.Gtk.Structs.TargetList Methods (==) :: TargetList -> TargetList -> Bool Source # (/=) :: TargetList -> TargetList -> Bool Source #
GBoxed TargetList Source # |
Instance details Defined in GI.Gtk.Structs.TargetList
ManagedPtrNewtype TargetList Source # |
Instance details Defined in GI.Gtk.Structs.TargetList Methods toManagedPtr :: TargetList -> ManagedPtr TargetList Source #
TypedObject TargetList Source # |
Instance details Defined in GI.Gtk.Structs.TargetList Methods glibType :: IO GType Source #
HasParentTypes TargetList Source # |
Instance details Defined in GI.Gtk.Structs.TargetList
IsGValue (Maybe TargetList) Source # | Convert `TargetList` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Structs.TargetList Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe TargetList -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe TargetList) Source #
type ParentTypes TargetList Source # |
Instance details Defined in GI.Gtk.Structs.TargetList type ParentTypes TargetList = '[] :: [Type]

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

add, addImageTargets, addRichTextTargets, addTable, addTextTargets, addUriTargets, find, ref, remove, unref.

#### Getters

None.

#### Setters

None.

## add

targetListAdd Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetList | `list`: a `TargetList`
-> Atom | `target`: the interned atom representing the target
-> Word32 | `flags`: the flags for this target
-> Word32 | `info`: an ID that will be passed back to the application
-> m () |

Appends another target to a `TargetList`.

## addImageTargets

targetListAddImageTargets Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetList | `list`: a `TargetList`
-> Word32 | `info`: an ID that will be passed back to the application
-> Bool | `writable`: whether to add only targets for which GTK+ knows how to convert a pixbuf into the format
-> m () |

Appends the image targets supported by `SelectionData` to the target list. All targets are added with the same `info`.

Since: 2.6

## addRichTextTargets

targetListAddRichTextTargets Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextBuffer a) |
=> TargetList | `list`: a `TargetList`
-> Word32 | `info`: an ID that will be passed back to the application
-> Bool | `deserializable`: if `True`, then deserializable rich text formats will be added, serializable formats otherwise.
-> a | `buffer`: a `TextBuffer`.
-> m () |

Appends the rich text targets registered with `textBufferRegisterSerializeFormat` or `textBufferRegisterDeserializeFormat` to the target list. All targets are added with the same `info`.

Since: 2.10

## addTable

targetListAddTable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetList | `list`: a `TargetList`
-> [TargetEntry] | `targets`: the table of `TargetEntry`
-> m () |

Prepends a table of `TargetEntry` to a target list.

## addTextTargets

targetListAddTextTargets Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetList | `list`: a `TargetList`
-> Word32 | `info`: an ID that will be passed back to the application
-> m () |

Appends the text targets supported by `SelectionData` to the target list. All targets are added with the same `info`.

Since: 2.6

## addUriTargets

targetListAddUriTargets Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetList | `list`: a `TargetList`
-> Word32 | `info`: an ID that will be passed back to the application
-> m () |

Appends the URI targets supported by `SelectionData` to the target list. All targets are added with the same `info`.

Since 3.24.37, this includes the application/vnd.portal.files target when possible, to allow sending files between sandboxed apps via the FileTransfer portal.

Since: 2.6

## find

targetListFind Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetList | `list`: a `TargetList`
-> Atom | `target`: an interned atom representing the target to search for
-> m (Bool, Word32) | Returns: `True` if the target was found, otherwise `False`

Looks up a given target in a `TargetList`.

## new

targetListNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Maybe [TargetEntry] | `targets`: Pointer to an array of `TargetEntry`
-> m TargetList | Returns: the new `TargetList`.

Creates a new `TargetList` from an array of `TargetEntry`.

## ref

targetListRef Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetList | `list`: a `TargetList`
-> m TargetList | Returns: the passed in `TargetList`.

Increases the reference count of a `TargetList` by one.

## remove

targetListRemove Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetList | `list`: a `TargetList`
-> Atom | `target`: the interned atom representing the target
-> m () |

Removes a target from a target list.

## unref

targetListUnref Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetList | `list`: a `TargetList`
-> m () |

Decreases the reference count of a `TargetList` by one. If the resulting reference count is zero, frees the list.