gi-gtk-3.0.43: Gtk 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.TargetEntry

Contents

- Exported types
- Methods
  - copy
  - free
  - new
- Properties
  - flags
  - info
  - target

Description

A `TargetEntry` represents a single type of data than can be supplied for by a widget for a selection or for supplied or received during drag-and-drop.

Synopsis

- newtype TargetEntry = TargetEntry (ManagedPtr TargetEntry)
- newZeroTargetEntry :: MonadIO m => m TargetEntry
- targetEntryCopy :: (HasCallStack, MonadIO m) => TargetEntry -> m TargetEntry
- targetEntryFree :: (HasCallStack, MonadIO m) => TargetEntry -> m ()
- targetEntryNew :: (HasCallStack, MonadIO m) => Text -> Word32 -> Word32 -> m TargetEntry
- getTargetEntryFlags :: MonadIO m => TargetEntry -> m Word32
- setTargetEntryFlags :: MonadIO m => TargetEntry -> Word32 -> m ()
- getTargetEntryInfo :: MonadIO m => TargetEntry -> m Word32
- setTargetEntryInfo :: MonadIO m => TargetEntry -> Word32 -> m ()
- clearTargetEntryTarget :: MonadIO m => TargetEntry -> m ()
- getTargetEntryTarget :: MonadIO m => TargetEntry -> m (Maybe Text)
- setTargetEntryTarget :: MonadIO m => TargetEntry -> CString -> m ()

# Exported types

newtype TargetEntry Source #

Memory-managed wrapper type.

Constructors

TargetEntry (ManagedPtr TargetEntry) |

#### Instances

Instances details

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

newZeroTargetEntry :: MonadIO m => m TargetEntry Source #

Construct a `TargetEntry` struct initialized to zero.

# Methods

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

Expand

#### Methods

copy, free.

#### Getters

None.

#### Setters

None.

## copy

targetEntryCopy Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetEntry | `data`: a pointer to a `TargetEntry`
-> m TargetEntry | Returns: a pointer to a copy of `data`. Free with `targetEntryFree`

Makes a copy of a `TargetEntry` and its data.

## free

targetEntryFree Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TargetEntry | `data`: a pointer to a `TargetEntry`.
-> m () |

Frees a `TargetEntry` returned from `targetEntryNew` or `targetEntryCopy`.

## new

targetEntryNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `target`: String identifier for target
-> Word32 | `flags`: Set of flags, see `TargetFlags`
-> Word32 | `info`: an ID that will be passed back to the application
-> m TargetEntry | Returns: a pointer to a new `TargetEntry`. Free with `targetEntryFree`

Makes a new `TargetEntry`.

# Properties

## flags

`TargetFlags` for DND

getTargetEntryFlags :: MonadIO m => TargetEntry -> m Word32 Source #

Get the value of the “`flags`” field. When overloading is enabled, this is equivalent to

    get targetEntry #flags

setTargetEntryFlags :: MonadIO m => TargetEntry -> Word32 -> m () Source #

Set the value of the “`flags`” field. When overloading is enabled, this is equivalent to

    set targetEntry [ #flags := value ]

## info

an application-assigned integer ID which will get passed as a parameter to e.g the Widget::selectionGet signal. It allows the application to identify the target type without extensive string compares.

getTargetEntryInfo :: MonadIO m => TargetEntry -> m Word32 Source #

Get the value of the “`info`” field. When overloading is enabled, this is equivalent to

    get targetEntry #info

setTargetEntryInfo :: MonadIO m => TargetEntry -> Word32 -> m () Source #

Set the value of the “`info`” field. When overloading is enabled, this is equivalent to

    set targetEntry [ #info := value ]

## target

a string representation of the target type

clearTargetEntryTarget :: MonadIO m => TargetEntry -> m () Source #

Set the value of the “`target`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #target

getTargetEntryTarget :: MonadIO m => TargetEntry -> m (Maybe Text) Source #

Get the value of the “`target`” field. When overloading is enabled, this is equivalent to

    get targetEntry #target

setTargetEntryTarget :: MonadIO m => TargetEntry -> CString -> m () Source #

Set the value of the “`target`” field. When overloading is enabled, this is equivalent to

    set targetEntry [ #target := value ]