Sha256: bf350fac66391e3827dae31cbf24a4982b32da4105e9b003576c9a0064269d5a
Contents?: true
Size: 879 Bytes
Versions: 2
Compression:
Stored size: 879 Bytes
Contents
Gtk.load_class :RadioButton module Gtk # Add non-introspected functions to Gtk::Lib module Lib attach_function :gtk_radio_button_new, [:pointer], :pointer attach_function :gtk_radio_button_new_from_widget, [:pointer], :pointer end # Overrides for GtkRadioButton class RadioButton def self.new_from_widget(*args) obj = allocate obj.send :initialize_from_widget, *args obj end alias_method :old_initialize, :initialize def initialize(group) list = GLib::SList.from(Gtk::RadioButton, group) ptr = Gtk::Lib.gtk_radio_button_new(list) store_pointer(ptr) end remove_method :old_initialize def initialize_from_widget(radio_group_member) widget = Gtk::RadioButton.from(radio_group_member) ptr = Gtk::Lib.gtk_radio_button_new_from_widget(widget) store_pointer(ptr) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gir_ffi-gtk-0.10.0 | lib/gir_ffi-gtk/gtk2/radio_button.rb |
gir_ffi-gtk-0.9.0 | lib/gir_ffi-gtk/gtk2/radio_button.rb |