Class: GirFFI::GType

Inherits:
Object
  • Object
show all
Defined in:
lib/gir_ffi/g_type.rb

Overview

Wrapper class providing extended functionality for a GType, which is normally just a kind of integer

Instance Method Summary collapse

Constructor Details

#initialize(gtype) ⇒ GType

Returns a new instance of GType.



4
5
6
# File 'lib/gir_ffi/g_type.rb', line 4

def initialize gtype
  @gtype = gtype
end

Instance Method Details

#class_sizeObject



12
13
14
# File 'lib/gir_ffi/g_type.rb', line 12

def class_size
  type_query.class_size
end

#instance_sizeObject



16
17
18
# File 'lib/gir_ffi/g_type.rb', line 16

def instance_size
  type_query.instance_size
end

#to_iObject



8
9
10
# File 'lib/gir_ffi/g_type.rb', line 8

def to_i
  @gtype
end