ExpressionWatchProtocol

public protocol ExpressionWatchProtocol

An opaque structure representing a watched GtkExpression.

The contents of GtkExpressionWatch should only be accessed through the provided API.

The ExpressionWatchProtocol protocol exposes the methods and properties of an underlying GtkExpressionWatch instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see ExpressionWatch. Alternatively, use ExpressionWatchRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkExpressionWatch instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • expression_watch_ptr Default implementation

    Typed pointer to the underlying GtkExpressionWatch instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkExpressionWatch instance.

    Declaration

    Swift

    var expression_watch_ptr: UnsafeMutablePointer<GtkExpressionWatch>! { get }
  • Required Initialiser for types conforming to ExpressionWatchProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

ExpressionWatch Record: ExpressionWatchProtocol extension (methods and fields)

  • evaluate(value:) Extension method

    Evaluates the watched expression and on success stores the result in value.

    This is equivalent to calling [methodGtk.Expression.evaluate] with the expression and this pointer originally used to create watch.

    Declaration

    Swift

    @inlinable
    func evaluate<ValueT>(value: ValueT) -> Bool where ValueT : ValueProtocol
  • ref() Extension method

    Acquires a reference on the given GtkExpressionWatch.

    Declaration

    Swift

    @discardableResult
    @inlinable
    func ref() -> ExpressionWatchRef!
  • unref() Extension method

    Releases a reference on the given GtkExpressionWatch.

    If the reference was the last, the resources associated to self are freed.

    Declaration

    Swift

    @inlinable
    func unref()
  • unwatch() Extension method

    Stops watching an expression.

    See [methodGtk.Expression.watch] for how the watch was established.

    Declaration

    Swift

    @inlinable
    func unwatch()