Class: GObjectIntrospection::IFieldInfo

Inherits:
IBaseInfo
  • Object
show all
Includes:
GirFFI::InfoExt::IFieldInfo
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 Attribute Summary

Attributes inherited from IBaseInfo

#pointer

Instance Method Summary collapse

Methods included from GirFFI::InfoExt::IFieldInfo

#layout_specification, #related_array_length_field

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



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

def field_type
  @field_type ||= ITypeInfo.wrap Lib.g_field_info_get_type(self)
end

#flagsObject



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

def flags
  Lib.g_field_info_get_flags self
end

#offsetObject



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

def offset
  Lib.g_field_info_get_offset self
end

#readable?Boolean

Returns:

  • (Boolean)


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

def readable?
  flags[:readable]
end

#sizeObject



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

def size
  Lib.g_field_info_get_size self
end

#writable?Boolean

Returns:

  • (Boolean)


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

def writable?
  flags[:writable]
end