Class: Gtk::SelectionData
- Inherits:
-
Object
- Object
- Gtk::SelectionData
- Extended by:
- GLib::Deprecatable
- Defined in:
- lib/gtk3/deprecated.rb,
lib/gtk3/selection-data.rb
Instance Method Summary collapse
- #set(type, data, options = {}) ⇒ Object
- #set_raw ⇒ Object
- #set_text(text) ⇒ Object (also: #text=)
- #set_text_raw ⇒ Object
Instance Method Details
#set(type, data, options = {}) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/gtk3/selection-data.rb', line 20 def set(type, data, ={}) format ||= [:format] if format.nil? case type when Gdk::Selection::TYPE_INTEGER format = 32 when Gdk::Selection::TYPE_STRING format = 8 else = "specify :format as the number of bits of each data" raise ArgumentError, end end set_raw(type, format, data) end |
#set_raw ⇒ Object
19 |
# File 'lib/gtk3/selection-data.rb', line 19 alias_method :set_raw, :set |
#set_text(text) ⇒ Object Also known as: text=
37 38 39 |
# File 'lib/gtk3/selection-data.rb', line 37 def set_text(text) set_text_raw(text, text.bytesize) end |
#set_text_raw ⇒ Object
36 |
# File 'lib/gtk3/selection-data.rb', line 36 alias_method :set_text_raw, :set_text |