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_indicesObject



12
13
14
15
16
# File 'lib/gir_ffi-gtk/tree_path.rb', line 12

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

Instance Method Details

#get_indicesObject



28
29
30
31
32
# File 'lib/gir_ffi-gtk/tree_path.rb', line 28

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



18
19
20
21
22
23
# File 'lib/gir_ffi-gtk/tree_path.rb', line 18

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