class GLib::Variant

Defined in:

lib/gi-crystal/src/bindings/g_lib/variant.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(ptr : Pointer(Void), transfer : GICrystal::Transfer) #

def self.new(value) #

def self.parse(text : String) : Variant #

Parses a GVariant from a text representation.


Instance Method Detail

def ==(other : Variant) : Bool #

Returns true if other variant have the same type and value of this variant.


def as_bool : Bool #

def as_bool? : Bool | Nil #

def as_f : Float64 #

def as_f64 : Float64 #

def as_f64? : Float64 | Nil #

def as_f? : Float64 | Nil #

def as_i : Int32 #

def as_i16 : Int16 #

def as_i16? : Int16 | Nil #

def as_i32 : Int32 #

def as_i32? : Int32 | Nil #

def as_i64 : Int64 #

def as_i64? : Int64 | Nil #

def as_i? : Int32 | Nil #

def as_s : String #

def as_s? : String | Nil #

def as_u : UInt32 #

def as_u16 : UInt16 #

def as_u16? : UInt16 | Nil #

def as_u32 : UInt32 #

def as_u32? : UInt32 | Nil #

def as_u64 : UInt64 #

def as_u64? : UInt64 | Nil #

def as_u8 : UInt8 #

def as_u8? : UInt8 | Nil #

def as_u? : UInt32 | Nil #

def as_variant : GLib::Variant #

def as_variant? : GLib::Variant | Nil #

def classify : VariantClass #

def finalize #

def raw #

def to_s(io : IO, type_annotate : Bool) #

ditto


def to_s(type_annotate : Bool) #

Pretty-prints value in the format understood by #parse.


def to_s(io : IO) #

ditto


def type : GLib::VariantType #

def type_string : String #