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

Contents

- Exported types
- Methods
  - new

Description

A variant of `GtkClosureExpression` using a C closure.

Synopsis

- newtype CClosureExpression = CClosureExpression (ManagedPtr CClosureExpression)
- class (BoxedPtr o, TypedObject o, IsDescendantOf CClosureExpression o) => IsCClosureExpression o
- toCClosureExpression :: (MonadIO m, IsCClosureExpression o) => o -> m CClosureExpression
- cClosureExpressionNew :: (HasCallStack, MonadIO m) => GType -> Maybe ClosureMarshal -> [Expression] -> Callback -> m CClosureExpression

# Exported types

newtype CClosureExpression Source #

Memory-managed wrapper type.

Constructors

CClosureExpression (ManagedPtr CClosureExpression) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf CClosureExpression o) => IsCClosureExpression o Source #

Type class for types which can be safely cast to `CClosureExpression`, for instance with `toCClosureExpression`.

#### Instances

Instances details

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

toCClosureExpression :: (MonadIO m, IsCClosureExpression o) => o -> m CClosureExpression Source #

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

getValueType.

#### Setters

None.

## new

cClosureExpressionNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> GType | `valueType`: the type of the value that this expression evaluates to
-> Maybe ClosureMarshal | `marshal`: marshaller used for creating a closure
-> [Expression] | `params`: expressions for each parameter
-> Callback | `callbackFunc`: callback used for creating a closure
-> m CClosureExpression | Returns: a new `GtkExpression`

Creates a `GtkExpression` that calls `callback_func` when it is evaluated.

This function is a variant of `closureExpressionNew` that creates a `GClosure` by calling `g_cclosure_new()` with the given `callback_func`, `user_data` and `user_destroy`.