FlagsValueProtocol

public protocol FlagsValueProtocol

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

A structure which contains a single flags value, its name, and its nickname.

  • ptr

    Untyped pointer to the underlying GFlagsValue instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer { get }
  • _ptr Default implementation

    Typed pointer to the underlying GFlagsValue instance.

    Default Implementation

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

    Declaration

    Swift

    var _ptr: UnsafeMutablePointer<GFlagsValue> { get }

FlagsValue Record: FlagsValueProtocol extension (methods and fields)

  • This function is meant to be called from the complete_type_info() function of a GTypePlugin implementation, see the example for g_enum_complete_type_info() above.

    Declaration

    Swift

    func flagsCompleteTypeInfo(gFlagsType g_flags_type: GType, info: TypeInfoProtocol)
  • flagsRegisterStatic(name:) Extension method

    Registers a new static flags type with the name name.

    It is normally more convenient to let glib-mkenums generate a my_flags_get_type() function from a usual C enumeration definition than to write one yourself using g_flags_register_static().

    Declaration

    Swift

    func flagsRegisterStatic(name: UnsafePointer<gchar>) -> GType
  • value Extension method

    the flags value

    Declaration

    Swift

    var value: Int { get set }
  • valueName Extension method

    the name of the value

    Declaration

    Swift

    var valueName: UnsafePointer<CChar> { get set }
  • valueNick Extension method

    the nickname of the value

    Declaration

    Swift

    var valueNick: UnsafePointer<CChar> { get set }