Class: GObjectIntrospection::IFieldInfo

Inherits:
IBaseInfo
  • Object
show all
Defined in:
lib/ffi-gobject_introspection/i_field_info.rb

Overview

Wraps a GIFieldInfo struct. Represents a field of an IStructInfo or an IUnionInfo.

Instance Method Summary collapse

Methods inherited from IBaseInfo

#==, #attribute, build_array_method, build_finder_method, #container, #deprecated?, #info_type, #initialize, make_finalizer, #name, #namespace, #safe_namespace, #to_ptr, wrap

Constructor Details

This class inherits a constructor from GObjectIntrospection::IBaseInfo

Instance Method Details

#field_typeObject



18
19
20
# File 'lib/ffi-gobject_introspection/i_field_info.rb', line 18

def field_type
  ITypeInfo.wrap Lib.g_field_info_get_type(@gobj)
end

#flagsObject



6
7
8
# File 'lib/ffi-gobject_introspection/i_field_info.rb', line 6

def flags
  Lib.g_field_info_get_flags @gobj
end

#offsetObject



14
15
16
# File 'lib/ffi-gobject_introspection/i_field_info.rb', line 14

def offset
  Lib.g_field_info_get_offset @gobj
end

#readable?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/ffi-gobject_introspection/i_field_info.rb', line 22

def readable?
  flags[:readable]
end

#sizeObject



10
11
12
# File 'lib/ffi-gobject_introspection/i_field_info.rb', line 10

def size
  Lib.g_field_info_get_size @gobj
end

#writable?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/ffi-gobject_introspection/i_field_info.rb', line 26

def writable?
  flags[:writable]
end