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) #

[View source]
def self.new(value) #

[View source]
def self.parse(text : String) : Variant #

Parses a GVariant from a text representation.


[View source]

Instance Method Detail

def ==(other : Variant) : Bool #

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


[View source]
def as_bool : Bool #

[View source]
def as_bool? : Bool | Nil #

[View source]
def as_f : Float64 #

[View source]
def as_f64 : Float64 #

[View source]
def as_f64? : Float64 | Nil #

[View source]
def as_f? : Float64 | Nil #

[View source]
def as_i : Int32 #

[View source]
def as_i16 : Int16 #

[View source]
def as_i16? : Int16 | Nil #

[View source]
def as_i32 : Int32 #

[View source]
def as_i32? : Int32 | Nil #

[View source]
def as_i64 : Int64 #

[View source]
def as_i64? : Int64 | Nil #

[View source]
def as_i? : Int32 | Nil #

[View source]
def as_s : String #

[View source]
def as_s? : String | Nil #

[View source]
def as_u : UInt32 #

[View source]
def as_u16 : UInt16 #

[View source]
def as_u16? : UInt16 | Nil #

[View source]
def as_u32 : UInt32 #

[View source]
def as_u32? : UInt32 | Nil #

[View source]
def as_u64 : UInt64 #

[View source]
def as_u64? : UInt64 | Nil #

[View source]
def as_u8 : UInt8 #

[View source]
def as_u8? : UInt8 | Nil #

[View source]
def as_u? : UInt32 | Nil #

[View source]
def as_variant : GLib::Variant #

[View source]
def as_variant? : GLib::Variant | Nil #

[View source]
def classify : VariantClass #

[View source]
def finalize #

[View source]
def raw #

[View source]
def to_s(io : IO, type_annotate : Bool) #

ditto


[View source]
def to_s(type_annotate : Bool) #

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


[View source]
def to_s(io : IO) #

ditto


[View source]
def type : GLib::VariantType #

[View source]
def type_string : String #

[View source]