Class: Gtk::TreePath

Inherits:
Object
  • Object
show all
Defined in:
lib/gir_ffi-gtk/tree_path.rb

Overview

Overrides for GtkTreePath

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new_from_indices(*args) ⇒ Object



15
16
17
18
19
# File 'lib/gir_ffi-gtk/tree_path.rb', line 15

def self.new_from_indices(*args)
  obj = allocate
  obj.send :initialize_from_indices, *args
  obj
end

Instance Method Details

#get_indicesObject



32
33
34
35
36
# File 'lib/gir_ffi-gtk/tree_path.rb', line 32

def get_indices
  depth = get_depth
  ptr = Gtk::Lib.gtk_tree_path_get_indices self
  GirFFI::SizedArray.wrap(:gint32, depth, ptr)
end

#initialize_from_indices(indices) ⇒ Object



21
22
23
24
25
# File 'lib/gir_ffi-gtk/tree_path.rb', line 21

def initialize_from_indices(indices)
  args = indices.flat_map { |index| [:int, index] }
  ptr = Gtk::Lib.gtk_tree_path_new_from_indices(*args, :int, -1)
  store_pointer ptr
end