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.ConstantExpression

Contents

- Exported types
- Methods
  - getValue
  - newForValue

Description

A constant value in a `GtkExpression`.

Synopsis

- newtype ConstantExpression = ConstantExpression (ManagedPtr ConstantExpression)
- class (BoxedPtr o, TypedObject o, IsDescendantOf ConstantExpression o) => IsConstantExpression o
- toConstantExpression :: (MonadIO m, IsConstantExpression o) => o -> m ConstantExpression
- constantExpressionGetValue :: (HasCallStack, MonadIO m, IsConstantExpression a) => a -> m GValue
- constantExpressionNewForValue :: (HasCallStack, MonadIO m) => GValue -> m ConstantExpression

# Exported types

newtype ConstantExpression Source #

Memory-managed wrapper type.

Constructors

ConstantExpression (ManagedPtr ConstantExpression) |

#### Instances

Instances details

Eq ConstantExpression Source # |
Instance details Defined in GI.Gtk.Objects.ConstantExpression Methods (==) :: ConstantExpression -> ConstantExpression -> Bool Source # (/=) :: ConstantExpression -> ConstantExpression -> Bool Source #
BoxedPtr ConstantExpression Source # |
Instance details Defined in GI.Gtk.Objects.ConstantExpression Methods boxedPtrCopy :: ConstantExpression -> IO ConstantExpression Source # boxedPtrFree :: ConstantExpression -> IO () Source #
ManagedPtrNewtype ConstantExpression Source # |
Instance details Defined in GI.Gtk.Objects.ConstantExpression Methods toManagedPtr :: ConstantExpression -> ManagedPtr ConstantExpression Source #
TypedObject ConstantExpression Source # |
Instance details Defined in GI.Gtk.Objects.ConstantExpression Methods glibType :: IO GType Source #
HasParentTypes ConstantExpression Source # |
Instance details Defined in GI.Gtk.Objects.ConstantExpression
type ParentTypes ConstantExpression Source # |
Instance details Defined in GI.Gtk.Objects.ConstantExpression type ParentTypes ConstantExpression = '[Expression]

class (BoxedPtr o, TypedObject o, IsDescendantOf ConstantExpression o) => IsConstantExpression o Source #

Type class for types which can be safely cast to `ConstantExpression`, for instance with `toConstantExpression`.

#### Instances

Instances details

(BoxedPtr o, TypedObject o, IsDescendantOf ConstantExpression o) => IsConstantExpression o Source # |
Instance details Defined in GI.Gtk.Objects.ConstantExpression

toConstantExpression :: (MonadIO m, IsConstantExpression o) => o -> m ConstantExpression Source #

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

bind, evaluate, isStatic, ref, unref, watch.

#### Getters

getValue, getValueType.

#### Setters

None.

## getValue

constantExpressionGetValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsConstantExpression a) |
=> a | `expression`: a constant `GtkExpression`
-> m GValue | Returns: the value

Gets the value that a constant expression evaluates to.

## newForValue

constantExpressionNewForValue Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> GValue | `value`: a `GValue`
-> m ConstantExpression | Returns: a new `GtkExpression`

Creates an expression that always evaluates to the given `value`.