gi-gtk4-4.0.12: Gtk 4.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.Objects.StringObject

Contents

- Exported types
- Methods
  - getString
  - new
- Properties
  - string

Description

The type of items in a `GtkStringList`.

A `GtkStringObject` is a wrapper around a `const char*`; it has a StringObject:string property that can be used for property bindings and expressions.

Synopsis

- newtype StringObject = StringObject (ManagedPtr StringObject)
- class (GObject o, IsDescendantOf StringObject o) => IsStringObject o
- toStringObject :: (MonadIO m, IsStringObject o) => o -> m StringObject
- stringObjectGetString :: (HasCallStack, MonadIO m, IsStringObject a) => a -> m Text
- stringObjectNew :: (HasCallStack, MonadIO m) => Text -> m StringObject
- getStringObjectString :: (MonadIO m, IsStringObject o) => o -> m Text

# Exported types

newtype StringObject Source #

Memory-managed wrapper type.

Constructors

StringObject (ManagedPtr StringObject) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf StringObject o) => IsStringObject o Source #

Type class for types which can be safely cast to `StringObject`, for instance with `toStringObject`.

#### Instances

Instances details

(GObject o, IsDescendantOf StringObject o) => IsStringObject o Source # |
Instance details Defined in GI.Gtk.Objects.StringObject

toStringObject :: (MonadIO m, IsStringObject o) => o -> m StringObject Source #

Cast to `StringObject`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

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

Expand

#### Methods

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getProperty, getQdata, getString.

#### Setters

setData, setDataFull, setProperty.

## getString

stringObjectGetString Source #

Arguments

:: (HasCallStack, MonadIO m, IsStringObject a) |
=> a | `self`: a `GtkStringObject`
-> m Text | Returns: the string of `self`

Returns the string contained in a `GtkStringObject`.

## new

stringObjectNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `string`: The string to wrap
-> m StringObject | Returns: a new `GtkStringObject`

Wraps a string in an object for use with `GListModel`.

# Properties

## string

The string.

getStringObjectString :: (MonadIO m, IsStringObject o) => o -> m Text Source #

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

    get stringObject #string