ValueProtocol

public protocol ValueProtocol

The ValueProtocol protocol exposes the methods and properties of an underlying GValue 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 Value. Alternatively, use ValueRef as a lighweight, unowned reference if you already have an instance you just want to use.

An opaque structure used to hold different types of values. The data within the structure has protected scope: it is accessible only to functions within a GTypeValueTable structure, or implementations of the g_value_*() API. That is, code portions which implement new fundamental types. GValue users cannot make any assumptions about how data is stored within the 2 element data union, and the g_type member should only be accessed through the G_VALUE_TYPE() macro.

  • ptr

    Untyped pointer to the underlying GValue instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer { get }
  • value_ptr Default implementation

    Typed pointer to the underlying GValue instance.

    Default Implementation

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

    Declaration

    Swift

    var value_ptr: UnsafeMutablePointer<GValue> { get }
  • bindingFlags Extension method

    Return the value as bindingFlags

    Declaration

    Swift

    var bindingFlags: BindingFlags { get }
  • set(type:) Extension method

    Set the receiver up to hold a value of the given type

    Declaration

    Swift

    func set(type: GType)

    Parameters

    type

    the type of value to hold

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> String

    Return Value

    an optional String if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> Bool

    Return Value

    a Bool if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> Double

    Return Value

    a Double if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> Float

    Return Value

    a Float if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> Int

    Return Value

    an Int if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> UInt

    Return Value

    a UInt if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> Int64

    Return Value

    an Int if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> UInt64

    Return Value

    a UInt if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> Int32

    Return Value

    an Int if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> UInt32

    Return Value

    a UInt if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> Int8

    Return Value

    an Int8 if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get() -> UInt8

    Return Value

    an optional UInt if stored as the value

  • get() Extension method

    Generic Value copier.

    Declaration

    Swift

    func get() -> Value

    Return Value

    a Value containing a copy of the receiver

  • get() Extension method

    ObjectRef Value accessor.

    Declaration

    Swift

    func get() -> ObjectRef?

    Return Value

    an optional Object reference if stored as the value

  • get() Extension method

    ParamSpec Value accessor.

    Declaration

    Swift

    func get() -> ParamSpec?

    Return Value

    an optional ParamSpec reference if stored as the value

  • get() Extension method

    Variant Value accessor.

    Declaration

    Swift

    func get() -> Variant?

    Return Value

    an optional Variant reference if stored as the value

  • get() Extension method

    BindingFlags Value accessor.

    Declaration

    Swift

    func get() -> BindingFlags?

    Return Value

    optional BindingFlags if stored as the value

  • get() Extension method

    Generic Value accessor.

    Declaration

    Swift

    func get<T>() -> UnsafeMutablePointer<T>?

    Return Value

    an optional pointer if stored as the value

  • get() Extension method

    Generic Value accessor for unknown types.

    Declaration

    Swift

    func get<T>() -> T?

    Return Value

    nil

  • dataPointer() Extension method

    Generic Value accessor for Object classes.

    Declaration

    Swift

    func dataPointer<T>() -> UnsafePointer<T>

    Return Value

    nil

  • mutableDataPointer() Extension method

    Generic Value accessor for Object classes.

    Declaration

    Swift

    func mutableDataPointer<T>() -> UnsafeMutablePointer<T>

    Return Value

    nil

  • set(_:) Extension method

    Generic value copier.

    Declaration

    Swift

    func set(_ value: ValueBase)

    Parameters

    value

    original Value to copy

  • set(_:) Extension method

    Generic value copier.

    Declaration

    Swift

    func set(_ value: ValueRef)

    Parameters

    value

    original ValueRef to copy

  • set(_:) Extension method

    Generic value copier.

    Declaration

    Swift

    func set(_ value: ValueProtocol)

    Parameters

    value

    original value of kind ValueProtocol to copy

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: String)

    Parameters

    value

    String value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ s: StaticString)

    Parameters

    value

    static String value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: Bool)

    Parameters

    value

    Bool value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: Double)

    Parameters

    value

    Double value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: Int)

    Parameters

    value

    Int value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: UInt)

    Parameters

    value

    UInt value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: Int64)

    Parameters

    value

    Int64 value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: UInt64)

    Parameters

    value

    UInt64 value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: Int32)

    Parameters

    value

    Int32 value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: UInt32)

    Parameters

    value

    UInt32 value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: Int8)

    Parameters

    value

    Int8 value to set

  • set(_:) Extension method

    Generic value setter.

    Declaration

    Swift

    func set(_ value: UInt8)

    Parameters

    value

    UInt8 value to set

  • set(_:) Extension method

    Generic object setter.

    Declaration

    Swift

    func set<O>(_ object: O) where O : ObjectProtocol

    Parameters

    object

    GObject or subclass to set

  • set(_:) Extension method

    Generic ParamSpec setter.

    Declaration

    Swift

    func set<P>(_ spec: P) where P : ParamSpecProtocol

    Parameters

    spec

    ParamSpec to set

  • set(_:) Extension method

    Generic Optional setter.

    Declaration

    Swift

    func set<O>(_ optional: O?)

    Parameters

    spec

    optional value to set (or unset if nil)

  • set(_:) Extension method

    Generic Variant setter.

    Declaration

    Swift

    func set<V>(_ v: V) where V : VariantProtocol

    Parameters

    variant

    Variant to set

  • transform(_:) Extension method

    Generic Transformer

    Declaration

    Swift

    func transform<T, U>(_ f: (T?) -> U?) -> U?

    Parameters

    f

    transformation function or closure

    Return Value

    true if destination value has been set, false if unset

  • transform(_:) Extension method

    Generic Transformer

    Declaration

    Swift

    func transform<T, U>(_ f: (T) -> U?) -> U?

    Parameters

    f

    transformation function or closure

    Return Value

    true if destination value has been set, false if unset

  • transform(to:_:) Extension method

    Generic Transformer

    Declaration

    Swift

    func transform<T, U, V>(to dest_value: V, _ f: (T) -> U?) -> Bool where V : ValueProtocol

    Parameters

    dest_value

    destination value to fill

    f

    transformation function or closure

    Return Value

    true if destination value has been set, false if unset

  • transform(to:_:) Extension method

    Generic Transformer

    Declaration

    Swift

    func transform<T, U, V>(to dest_value: V, _ f: (T?) -> U?) -> Bool where V : ValueProtocol

    Parameters

    dest_value

    destination value to fill

    f

    transformation function or closure

    Return Value

    true if destination value has been set, false if unset

Value Record: ValueProtocol extension (methods and fields)

  • copy(destValue:) Extension method

    Copies the value of src_value into dest_value.

    Declaration

    Swift

    func copy(destValue dest_value: ValueProtocol)
  • dupBoxed() Extension method

    Get the contents of a G_TYPE_BOXED derived GValue. Upon getting, the boxed value is duplicated and needs to be later freed with g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (value), return_value);

    Declaration

    Swift

    func dupBoxed() -> UnsafeMutableRawPointer!
  • dupObject() Extension method

    Get the contents of a G_TYPE_OBJECT derived GValue, increasing its reference count. If the contents of the GValue are nil, then nil will be returned.

    Declaration

    Swift

    func dupObject() -> UnsafeMutableRawPointer!
  • dupParam() Extension method

    Get the contents of a G_TYPE_PARAM GValue, increasing its reference count.

    Declaration

    Swift

    func dupParam() -> UnsafeMutablePointer<GParamSpec>!
  • dupString() Extension method

    Get a copy the contents of a G_TYPE_STRING GValue.

    Declaration

    Swift

    func dupString() -> String!
  • dupVariant() Extension method

    Get the contents of a variant GValue, increasing its refcount. The returned GVariant is never floating.

    Declaration

    Swift

    func dupVariant() -> UnsafeMutablePointer<GVariant>!
  • fitsPointer() Extension method

    Determines if value will fit inside the size of a pointer value. This is an internal function introduced mainly for C marshallers.

    Declaration

    Swift

    func fitsPointer() -> Bool
  • getBoolean() Extension method

    Get the contents of a G_TYPE_BOOLEAN GValue.

    Declaration

    Swift

    func getBoolean() -> Bool
  • getBoxed() Extension method

    Get the contents of a G_TYPE_BOXED derived GValue.

    Declaration

    Swift

    func getBoxed() -> UnsafeMutableRawPointer!
  • getChar() Extension method

    Do not use this function; it is broken on platforms where the char type is unsigned, such as ARM and PowerPC. See g_value_get_schar().

    Get the contents of a G_TYPE_CHAR GValue.

    get_char is deprecated: This function’s return type is broken, see g_value_get_schar()

    Declaration

    Swift

    @available(*, deprecated)
    func getChar() -> gchar
  • getDouble() Extension method

    Get the contents of a G_TYPE_DOUBLE GValue.

    Declaration

    Swift

    func getDouble() -> Double
  • getEnum() Extension method

    Get the contents of a G_TYPE_ENUM GValue.

    Declaration

    Swift

    func getEnum() -> Int
  • getFlags() Extension method

    Get the contents of a G_TYPE_FLAGS GValue.

    Declaration

    Swift

    func getFlags() -> Int
  • getFloat() Extension method

    Get the contents of a G_TYPE_FLOAT GValue.

    Declaration

    Swift

    func getFloat() -> Float
  • getGtype() Extension method

    Get the contents of a G_TYPE_GTYPE GValue.

    Declaration

    Swift

    func getGtype() -> GType
  • getInt() Extension method

    Get the contents of a G_TYPE_INT GValue.

    Declaration

    Swift

    func getInt() -> Int
  • getInt64() Extension method

    Get the contents of a G_TYPE_INT64 GValue.

    Declaration

    Swift

    func getInt64() -> Int64
  • getLong() Extension method

    Get the contents of a G_TYPE_LONG GValue.

    Declaration

    Swift

    func getLong() -> Int
  • getObject() Extension method

    Get the contents of a G_TYPE_OBJECT derived GValue.

    Declaration

    Swift

    func getObject() -> UnsafeMutableRawPointer!
  • getParam() Extension method

    Get the contents of a G_TYPE_PARAM GValue.

    Declaration

    Swift

    func getParam() -> UnsafeMutablePointer<GParamSpec>!
  • getPointer() Extension method

    Get the contents of a pointer GValue.

    Declaration

    Swift

    func getPointer() -> UnsafeMutableRawPointer!
  • getSchar() Extension method

    Get the contents of a G_TYPE_CHAR GValue.

    Declaration

    Swift

    func getSchar() -> Int8
  • getString() Extension method

    Get the contents of a G_TYPE_STRING GValue.

    Declaration

    Swift

    func getString() -> String!
  • getUchar() Extension method

    Get the contents of a G_TYPE_UCHAR GValue.

    Declaration

    Swift

    func getUchar() -> guchar
  • getUint() Extension method

    Get the contents of a G_TYPE_UINT GValue.

    Declaration

    Swift

    func getUint() -> Int
  • getUint64() Extension method

    Get the contents of a G_TYPE_UINT64 GValue.

    Declaration

    Swift

    func getUint64() -> UInt64
  • getUlong() Extension method

    Get the contents of a G_TYPE_ULONG GValue.

    Declaration

    Swift

    func getUlong() -> Int
  • getVariant() Extension method

    Get the contents of a variant GValue.

    Declaration

    Swift

    func getVariant() -> UnsafeMutablePointer<GVariant>!
  • init_(gType:) Extension method

    Initializes value with the default value of type.

    Declaration

    Swift

    func init_(gType g_type: GType) -> UnsafeMutablePointer<GValue>!
  • initFrom(instance:) Extension method

    Initializes and sets value from an instantiatable type via the value_table’s collect_value() function.

    Note: The value will be initialised with the exact type of instance. If you wish to set the value‘s type to a different GType (such as a parent class GType), you need to manually call g_value_init() and g_value_set_instance().

    Declaration

    Swift

    func initFrom(instance: TypeInstanceProtocol)
  • peekPointer() Extension method

    Returns the value contents as pointer. This function asserts that g_value_fits_pointer() returned true for the passed in value. This is an internal function introduced mainly for C marshallers.

    Declaration

    Swift

    func peekPointer() -> UnsafeMutableRawPointer!
  • reset() Extension method

    Clears the current value in value and resets it to the default value (as if the value had just been initialized).

    Declaration

    Swift

    func reset() -> UnsafeMutablePointer<GValue>!
  • setBoolean(vBoolean:) Extension method

    Set the contents of a G_TYPE_BOOLEAN GValue to v_boolean.

    Declaration

    Swift

    func setBoolean(vBoolean v_boolean: Bool)
  • setBoxed(vBoxed:) Extension method

    Set the contents of a G_TYPE_BOXED derived GValue to v_boxed.

    Declaration

    Swift

    func setBoxed(vBoxed v_boxed: gconstpointer)
  • This is an internal function introduced mainly for C marshallers.

    set_boxed_take_ownership is deprecated: Use g_value_take_boxed() instead.

    Declaration

    Swift

    @available(*, deprecated)
    func setBoxedTakeOwnership(vBoxed v_boxed: gconstpointer)
  • setChar(vChar:) Extension method

    Set the contents of a G_TYPE_CHAR GValue to v_char.

    set_char is deprecated: This function’s input type is broken, see g_value_set_schar()

    Declaration

    Swift

    @available(*, deprecated)
    func setChar(vChar v_char: gchar)
  • setDouble(vDouble:) Extension method

    Set the contents of a G_TYPE_DOUBLE GValue to v_double.

    Declaration

    Swift

    func setDouble(vDouble v_double: gdouble)
  • setEnum(vEnum:) Extension method

    Set the contents of a G_TYPE_ENUM GValue to v_enum.

    Declaration

    Swift

    func setEnum(vEnum v_enum: CInt)
  • setFlags(vFlags:) Extension method

    Set the contents of a G_TYPE_FLAGS GValue to v_flags.

    Declaration

    Swift

    func setFlags(vFlags v_flags: CUnsignedInt)
  • setFloat(vFloat:) Extension method

    Set the contents of a G_TYPE_FLOAT GValue to v_float.

    Declaration

    Swift

    func setFloat(vFloat v_float: gfloat)
  • setGtype(vGtype:) Extension method

    Set the contents of a G_TYPE_GTYPE GValue to v_gtype.

    Declaration

    Swift

    func setGtype(vGtype v_gtype: GType)
  • set(instance:) Extension method

    Sets value from an instantiatable type via the value_table’s collect_value() function.

    Declaration

    Swift

    func set(instance: UnsafeMutableRawPointer)
  • setInt(vInt:) Extension method

    Set the contents of a G_TYPE_INT GValue to v_int.

    Declaration

    Swift

    func setInt(vInt v_int: CInt)
  • setInt64(vInt64:) Extension method

    Set the contents of a G_TYPE_INT64 GValue to v_int64.

    Declaration

    Swift

    func setInt64(vInt64 v_int64: Int64)
  • setLong(vLong:) Extension method

    Set the contents of a G_TYPE_LONG GValue to v_long.

    Declaration

    Swift

    func setLong(vLong v_long: CLong)
  • setObject(vObject:) Extension method

    Set the contents of a G_TYPE_OBJECT derived GValue to v_object.

    g_value_set_object() increases the reference count of v_object (the GValue holds a reference to v_object). If you do not wish to increase the reference count of the object (i.e. you wish to pass your current reference to the GValue because you no longer need it), use g_value_take_object() instead.

    It is important that your GValue holds a reference to v_object (either its own, or one it has taken) to ensure that the object won’t be destroyed while the GValue still exists).

    Declaration

    Swift

    func setObject(vObject v_object: ObjectProtocol)
  • This is an internal function introduced mainly for C marshallers.

    set_object_take_ownership is deprecated: Use g_value_take_object() instead.

    Declaration

    Swift

    @available(*, deprecated)
    func setObjectTakeOwnership(vObject v_object: UnsafeMutableRawPointer)
  • set(param:) Extension method

    Set the contents of a G_TYPE_PARAM GValue to param.

    Declaration

    Swift

    func set(param: ParamSpecProtocol)
  • This is an internal function introduced mainly for C marshallers.

    set_param_take_ownership is deprecated: Use g_value_take_param() instead.

    Declaration

    Swift

    @available(*, deprecated)
    func setParamTakeOwnership(param: ParamSpecProtocol)
  • setPointer(vPointer:) Extension method

    Set the contents of a pointer GValue to v_pointer.

    Declaration

    Swift

    func setPointer(vPointer v_pointer: UnsafeMutableRawPointer)
  • setSchar(vChar:) Extension method

    Set the contents of a G_TYPE_CHAR GValue to v_char.

    Declaration

    Swift

    func setSchar(vChar v_char: Int8)
  • setStaticBoxed(vBoxed:) Extension method

    Set the contents of a G_TYPE_BOXED derived GValue to v_boxed. The boxed value is assumed to be static, and is thus not duplicated when setting the GValue.

    Declaration

    Swift

    func setStaticBoxed(vBoxed v_boxed: gconstpointer)
  • setStaticString(vString:) Extension method

    Set the contents of a G_TYPE_STRING GValue to v_string. The string is assumed to be static, and is thus not duplicated when setting the GValue.

    Declaration

    Swift

    func setStaticString(vString v_string: UnsafePointer<gchar>)
  • setString(vString:) Extension method

    Set the contents of a G_TYPE_STRING GValue to v_string.

    Declaration

    Swift

    func setString(vString v_string: UnsafePointer<gchar>)
  • This is an internal function introduced mainly for C marshallers.

    set_string_take_ownership is deprecated: Use g_value_take_string() instead.

    Declaration

    Swift

    @available(*, deprecated)
    func setStringTakeOwnership(vString v_string: UnsafeMutablePointer<gchar>)
  • setUchar(vUchar:) Extension method

    Set the contents of a G_TYPE_UCHAR GValue to v_uchar.

    Declaration

    Swift

    func setUchar(vUchar v_uchar: UInt8)
  • setUint(vUint:) Extension method

    Set the contents of a G_TYPE_UINT GValue to v_uint.

    Declaration

    Swift

    func setUint(vUint v_uint: CUnsignedInt)
  • setUint64(vUint64:) Extension method

    Set the contents of a G_TYPE_UINT64 GValue to v_uint64.

    Declaration

    Swift

    func setUint64(vUint64 v_uint64: UInt64)
  • setUlong(vUlong:) Extension method

    Set the contents of a G_TYPE_ULONG GValue to v_ulong.

    Declaration

    Swift

    func setUlong(vUlong v_ulong: CUnsignedLong)
  • set(variant:) Extension method

    Set the contents of a variant GValue to variant. If the variant is floating, it is consumed.

    Declaration

    Swift

    func set(variant: VariantProtocol)
  • takeBoxed(vBoxed:) Extension method

    Sets the contents of a G_TYPE_BOXED derived GValue to v_boxed and takes over the ownership of the caller’s reference to v_boxed; the caller doesn’t have to unref it any more.

    Declaration

    Swift

    func takeBoxed(vBoxed v_boxed: gconstpointer)
  • takeObject(vObject:) Extension method

    Sets the contents of a G_TYPE_OBJECT derived GValue to v_object and takes over the ownership of the caller’s reference to v_object; the caller doesn’t have to unref it any more (i.e. the reference count of the object is not increased).

    If you want the GValue to hold its own reference to v_object, use g_value_set_object() instead.

    Declaration

    Swift

    func takeObject(vObject v_object: UnsafeMutableRawPointer)
  • take(param:) Extension method

    Sets the contents of a G_TYPE_PARAM GValue to param and takes over the ownership of the caller’s reference to param; the caller doesn’t have to unref it any more.

    Declaration

    Swift

    func take(param: ParamSpecProtocol)
  • takeString(vString:) Extension method

    Sets the contents of a G_TYPE_STRING GValue to v_string.

    Declaration

    Swift

    func takeString(vString v_string: UnsafeMutablePointer<gchar>)
  • take(variant:) Extension method

    Set the contents of a variant GValue to variant, and takes over the ownership of the caller’s reference to variant; the caller doesn’t have to unref it any more (i.e. the reference count of the variant is not increased).

    If variant was floating then its floating reference is converted to a hard reference.

    If you want the GValue to hold its own reference to variant, use g_value_set_variant() instead.

    This is an internal function introduced mainly for C marshallers.

    Declaration

    Swift

    func take(variant: VariantProtocol)
  • transform(destValue:) Extension method

    Tries to cast the contents of src_value into a type appropriate to store in dest_value, e.g. to transform a G_TYPE_INT value into a G_TYPE_FLOAT value. Performing transformations between value types might incur precision lossage. Especially transformations into strings might reveal seemingly arbitrary results and shouldn’t be relied upon for production code (such as rcfile value or object property serialization).

    Declaration

    Swift

    func transform(destValue dest_value: ValueProtocol) -> Bool
  • unset() Extension method

    Clears the current value in value (if any) and “unsets” the type, this releases all resources associated with this GValue. An unset value is the same as an uninitialized (zero-filled) GValue structure.

    Declaration

    Swift

    func unset()
  • A GClosureMarshal function for use with signals with handlers that take two boxed pointers as arguments and return a boolean. If you have such a signal, you will probably also need to use an accumulator, such as g_signal_accumulator_true_handled().

    Declaration

    Swift

    func cclosureMarshalBOOLEAN_BOXEDBOXED(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data) where the gint parameter denotes a flags type.

    Declaration

    Swift

    func cclosureMarshalBOOLEAN_FLAGS(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalSTRING_OBJECTPOINTER(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gboolean arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_BOOLEAN(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_BOXED(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gchar arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_CHAR(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gdouble arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_DOUBLE(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gint arg1, gpointer user_data) where the gint parameter denotes an enumeration type..

    Declaration

    Swift

    func cclosureMarshalVOID_ENUM(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gint arg1, gpointer user_data) where the gint parameter denotes a flags type.

    Declaration

    Swift

    func cclosureMarshalVOID_FLAGS(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gfloat arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_FLOAT(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gint arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_INT(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, glong arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_LONG(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, GObject *arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_OBJECT(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_PARAM(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gpointer arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_POINTER(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_STRING(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, guchar arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_UCHAR(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, guint arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_UINT(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_UINTPOINTER(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gulong arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_ULONG(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_VARIANT(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A marshaller for a GCClosure with a callback of type void (*callback) (gpointer instance, gpointer user_data).

    Declaration

    Swift

    func cclosureMarshalVOID_VOID(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • A generic marshaller function implemented via libffi.

    Normally this function is not passed explicitly to g_signal_new(), but used automatically by GLib when specifying a nil marshaller.

    Declaration

    Swift

    func cclosureMarshalGeneric(closure: ClosureProtocol, nParamValues n_param_values: CUnsignedInt, paramValues param_values: ValueProtocol, invocationHint invocation_hint: UnsafeMutableRawPointer, marshalData marshal_data: UnsafeMutableRawPointer)
  • Transforms src_value into dest_value if possible, and then validates dest_value, in order for it to conform to pspec. If strict_validation is true this function will only succeed if the transformed dest_value complied to pspec without modifications.

    See also g_value_type_transformable(), g_value_transform() and g_param_value_validate().

    Declaration

    Swift

    func paramValueConvert(pspec: ParamSpecProtocol, destValue dest_value: ValueProtocol, strictValidation strict_validation: Bool) -> Bool
  • paramValueDefaults(pspec:) Extension method

    Checks whether value contains the default value as specified in pspec.

    Declaration

    Swift

    func paramValueDefaults(pspec: ParamSpecProtocol) -> Bool
  • paramValueSetDefault(pspec:) Extension method

    Sets value to its default value as specified in pspec.

    Declaration

    Swift

    func paramValueSetDefault(pspec: ParamSpecProtocol)
  • paramValueValidate(pspec:) Extension method

    Ensures that the contents of value comply with the specifications set out by pspec. For example, a GParamSpecInt might require that integers stored in value may not be smaller than -42 and not be greater than +42. If value contains an integer outside of this range, it is modified accordingly, so the resulting value will fit into the range -42 .. +42.

    Declaration

    Swift

    func paramValueValidate(pspec: ParamSpecProtocol) -> Bool
  • Compares value1 with value2 according to pspec, and return -1, 0 or +1, if value1 is found to be less than, equal to or greater than value2, respectively.

    Declaration

    Swift

    func paramValuesCmp(pspec: ParamSpecProtocol, value2: ValueProtocol) -> Int
  • A predefined GSignalAccumulator for signals intended to be used as a hook for application code to provide a particular value. Usually only one such value is desired and multiple handlers for the same signal don’t make much sense (except for the case of the default handler defined in the class structure, in which case you will usually want the signal connection to override the class handler).

    This accumulator will use the return value from the first signal handler that is run as the return value for the signal and not run any further handlers (ie: the first handler “wins”).

    Declaration

    Swift

    func signalAccumulatorFirstWins(ihint: SignalInvocationHintProtocol, handlerReturn handler_return: ValueProtocol, dummy: UnsafeMutableRawPointer) -> Bool
  • A predefined GSignalAccumulator for signals that return a boolean values. The behavior that this accumulator gives is that a return of true stops the signal emission: no further callbacks will be invoked, while a return of false allows the emission to continue. The idea here is that a true return indicates that the callback handled the signal, and no further handling is needed.

    Declaration

    Swift

    func signalAccumulatorTrueHandled(ihint: SignalInvocationHintProtocol, handlerReturn handler_return: ValueProtocol, dummy: UnsafeMutableRawPointer) -> Bool
  • Calls the original class closure of a signal. This function should only be called from an overridden class closure; see g_signal_override_class_closure() and g_signal_override_class_handler().

    Declaration

    Swift

    func signalChainFromOverridden(instanceAndParams instance_and_params: UnsafePointer<GValue>)
  • Emits a signal.

    Note that g_signal_emitv() doesn’t change return_value if no handlers are connected, in contrast to g_signal_emit() and g_signal_emit_valist().

    Declaration

    Swift

    func signalEmitv(instanceAndParams instance_and_params: UnsafePointer<GValue>, signalID signal_id: CUnsignedInt, detail: GLib.Quark)
  • strdupValueContents() Extension method

    Return a newly allocated string, which describes the contents of a GValue. The main purpose of this function is to describe GValue contents for debugging output, the way in which the contents are described may change between different GLib versions.

    Declaration

    Swift

    func strdupValueContents() -> String!
  • typeCheckValue() Extension method

    Undocumented

    Declaration

    Swift

    func typeCheckValue() -> Bool
  • typeCheckValueHolds(type:) Extension method

    Undocumented

    Declaration

    Swift

    func typeCheckValueHolds(type: GType) -> Bool
  • boolean Extension method

    Get the contents of a G_TYPE_BOOLEAN GValue.

    Declaration

    Swift

    var boolean: Bool { get nonmutating set }
  • boxed Extension method

    Get the contents of a G_TYPE_BOXED derived GValue.

    Declaration

    Swift

    var boxed: UnsafeMutableRawPointer! { get nonmutating set }
  • char Extension method

    Do not use this function; it is broken on platforms where the char type is unsigned, such as ARM and PowerPC. See g_value_get_schar().

    Get the contents of a G_TYPE_CHAR GValue.

    get_char is deprecated: This function’s return type is broken, see g_value_get_schar()

    Declaration

    Swift

    var char: gchar { get nonmutating set }
  • double Extension method

    Get the contents of a G_TYPE_DOUBLE GValue.

    Declaration

    Swift

    var double: Double { get nonmutating set }
  • enum Extension method

    Get the contents of a G_TYPE_ENUM GValue.

    Declaration

    Swift

    var `enum`: Int { get nonmutating set }
  • flags Extension method

    Get the contents of a G_TYPE_FLAGS GValue.

    Declaration

    Swift

    var flags: Int { get nonmutating set }
  • float Extension method

    Get the contents of a G_TYPE_FLOAT GValue.

    Declaration

    Swift

    var float: Float { get nonmutating set }
  • gtype Extension method

    Get the contents of a G_TYPE_GTYPE GValue.

    Declaration

    Swift

    var gtype: GType { get nonmutating set }
  • int Extension method

    Get the contents of a G_TYPE_INT GValue.

    Declaration

    Swift

    var int: Int { get nonmutating set }
  • int64 Extension method

    Get the contents of a G_TYPE_INT64 GValue.

    Declaration

    Swift

    var int64: Int64 { get nonmutating set }
  • long Extension method

    Get the contents of a G_TYPE_LONG GValue.

    Declaration

    Swift

    var long: Int { get nonmutating set }
  • object Extension method

    Get the contents of a G_TYPE_OBJECT derived GValue.

    Declaration

    Swift

    var object: UnsafeMutableRawPointer! { get nonmutating set }
  • param Extension method

    Get the contents of a G_TYPE_PARAM GValue.

    Declaration

    Swift

    var param: UnsafeMutablePointer<GParamSpec>! { get nonmutating set }
  • pointer Extension method

    Get the contents of a pointer GValue.

    Declaration

    Swift

    var pointer: UnsafeMutableRawPointer! { get nonmutating set }
  • schar Extension method

    Get the contents of a G_TYPE_CHAR GValue.

    Declaration

    Swift

    var schar: Int8 { get nonmutating set }
  • string Extension method

    Get the contents of a G_TYPE_STRING GValue.

    Declaration

    Swift

    var string: String! { get nonmutating set }
  • uchar Extension method

    Get the contents of a G_TYPE_UCHAR GValue.

    Declaration

    Swift

    var uchar: guchar { get nonmutating set }
  • uint Extension method

    Get the contents of a G_TYPE_UINT GValue.

    Declaration

    Swift

    var uint: Int { get nonmutating set }
  • uint64 Extension method

    Get the contents of a G_TYPE_UINT64 GValue.

    Declaration

    Swift

    var uint64: UInt64 { get nonmutating set }
  • ulong Extension method

    Get the contents of a G_TYPE_ULONG GValue.

    Declaration

    Swift

    var ulong: Int { get nonmutating set }
  • variant Extension method

    Get the contents of a variant GValue.

    Declaration

    Swift

    var variant: UnsafeMutablePointer<GVariant>! { get nonmutating set }