1// 2// This program is free software; you can redistribute it and/or 3// modify it under the terms of version 2 of the Lesser GNU General 4// Public License as published by the Free Software Foundation. 5// 6// This program is distributed in the hope that it will be useful, 7// but WITHOUT ANY WARRANTY; without even the implied warranty of 8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9// Lesser General Public License for more details. 10// 11// You should have received a copy of the GNU Lesser General Public 12// License along with this program; if not, write to the 13// Free Software Foundation, Inc., 59 Temple Place - Suite 330, 14// Boston, MA 02111-1307, USA. 15 16 // Patch submitted by malte on bug #49518 17 [DllImport("libgtk-win32-2.0-0.dll", CallingConvention=CallingConvention.Cdecl)] 18 static extern IntPtr gtk_tree_path_get_indices(IntPtr raw); 19 20 public int [] Indices { 21 get { 22 IntPtr ptr = gtk_tree_path_get_indices(Handle); 23 int [] arr = new int [Depth]; 24 Marshal.Copy (ptr, arr, 0, Depth); 25 return arr; 26 } 27 } 28 29 public TreePath (int[] indices) : this () 30 { 31 foreach (int i in indices) 32 AppendIndex (i); 33 } 34 35 public override bool Equals (object o) 36 { 37 if (!(o is TreePath)) 38 return false; 39 40 return (Compare (o as TreePath) == 0); 41 } 42