Class: Gtk::Container
- Inherits:
-
Object
- Object
- Gtk::Container
- Defined in:
- lib/gir_ffi-gtk/container.rb
Overview
Overrides for GtkContainer
Instance Method Summary collapse
- #add_with_properties(widget, properties) ⇒ Object
- #child_get_property_with_override(widget, property_name) ⇒ Object (also: #child_get_property)
Instance Method Details
#add_with_properties(widget, properties) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/gir_ffi-gtk/container.rb', line 7 def add_with_properties(, properties) add properties.each do |property_name, value| child_set_property , property_name.to_s, value end end |
#child_get_property_with_override(widget, property_name) ⇒ Object Also known as: child_get_property
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/gir_ffi-gtk/container.rb', line 16 def child_get_property_with_override(, property_name) param_spec = class_struct.find_child_property property_name unless param_spec raise(ArgumentError, "child property named '#{property_name}' not found in #{self.class}") end gtype = param_spec.value_type gvalue = GObject::Value.for_gtype gtype child_get_property_without_override , property_name, gvalue gvalue.get_value end |