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.Interfaces.Buildable

Contents

- Exported types
- Methods
  - getBuildableId

Description

Allows objects to extend and customize deserialization from ui files.

The `GtkBuildable` interface includes methods for setting names and properties of objects, parsing custom tags and constructing child objects.

It is implemented by all widgets and many of the non-widget objects that are provided by GTK. The main user of this interface is `Builder`. There should be very little need for applications to call any of these functions directly.

An object only needs to implement this interface if it needs to extend the `GtkBuilder` XML format or run any extra routines at deserialization time.

Synopsis

- newtype Buildable = Buildable (ManagedPtr Buildable)
- class (GObject o, IsDescendantOf Buildable o) => IsBuildable o
- toBuildable :: (MonadIO m, IsBuildable o) => o -> m Buildable
- buildableGetBuildableId :: (HasCallStack, MonadIO m, IsBuildable a) => a -> m (Maybe Text)

# Exported types

newtype Buildable Source #

Memory-managed wrapper type.

Constructors

Buildable (ManagedPtr Buildable) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf Buildable o) => IsBuildable o Source #

Type class for types which can be safely cast to `Buildable`, for instance with `toBuildable`.

#### Instances

Instances details

(GObject o, IsDescendantOf Buildable o) => IsBuildable o Source # |
Instance details Defined in GI.Gtk.Interfaces.Buildable

toBuildable :: (MonadIO m, IsBuildable o) => o -> m Buildable Source #

Cast to `Buildable`, 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

getBuildableId, getData, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## getBuildableId

buildableGetBuildableId Source #

Arguments

:: (HasCallStack, MonadIO m, IsBuildable a) |
=> a | `buildable`: a `GtkBuildable`
-> m (Maybe Text) | Returns: the ID of the buildable object

Gets the ID of the `buildable` object.

`GtkBuilder` sets the name based on the ID attribute of the `<object>` tag used to construct the `buildable`.