class Gtk::SelectionData
Public Instance Methods
set(type, data, options={})
click to toggle source
# File lib/gtk3/selection-data.rb, line 20 def set(type, data, options={}) format ||= options[:format] if format.nil? case type when Gdk::Selection::TYPE_INTEGER format = 32 when Gdk::Selection::TYPE_STRING format = 8 else message = "specify :format as the number of bits of each data" raise ArgumentError, message end end set_raw(type, format, data) end
Also aliased as: set_raw
set_text(text)
click to toggle source
# File lib/gtk3/selection-data.rb, line 37 def set_text(text) set_text_raw(text, text.bytesize) end
Also aliased as: set_text_raw, text=