Module: GObject::Value::Overrides
- Included in:
- GObject::Value
- Defined in:
- lib/ffi-gobject/value.rb
Overview
Overrides for existing Value methods
Instance Method Summary collapse
- #current_fundamental_type ⇒ Object
- #current_gtype ⇒ Object
- #current_gtype_name ⇒ Object
- #get_value ⇒ Object
- #get_value_plain ⇒ Object
- #init(type) ⇒ Object
- #set_value(val) ⇒ Object (also: #value=)
- #uninitialized? ⇒ Boolean
Instance Method Details
#current_fundamental_type ⇒ Object
90 91 92 |
# File 'lib/ffi-gobject/value.rb', line 90 def current_fundamental_type GObject.type_fundamental current_gtype end |
#current_gtype ⇒ Object
86 87 88 |
# File 'lib/ffi-gobject/value.rb', line 86 def current_gtype struct[:g_type] end |
#current_gtype_name ⇒ Object
94 95 96 |
# File 'lib/ffi-gobject/value.rb', line 94 def current_gtype_name GObject.type_name current_gtype end |
#get_value ⇒ Object
98 99 100 101 102 103 104 105 |
# File 'lib/ffi-gobject/value.rb', line 98 def get_value value = get_value_plain if current_fundamental_type == TYPE_BOXED wrap_boxed value else value end end |
#get_value_plain ⇒ Object
107 108 109 |
# File 'lib/ffi-gobject/value.rb', line 107 def get_value_plain send get_method end |
#init(type) ⇒ Object
115 116 117 118 |
# File 'lib/ffi-gobject/value.rb', line 115 def init(type) Lib.g_value_init self, type unless [TYPE_NONE, TYPE_INVALID].include? type self end |
#set_value(val) ⇒ Object Also known as: value=
80 81 82 |
# File 'lib/ffi-gobject/value.rb', line 80 def set_value(val) send set_method, val end |
#uninitialized? ⇒ Boolean
111 112 113 |
# File 'lib/ffi-gobject/value.rb', line 111 def uninitialized? current_gtype == TYPE_INVALID end |