1 // TextChildAnchor.cs - customizations to Gtk.TextChildAnchor 2 // 3 // Authors: Mike Kestner <mkestner@ximian.com> 4 // 5 // Copyright (c) 2004 Novell, Inc. 6 // 7 // This program is free software; you can redistribute it and/or 8 // modify it under the terms of version 2 of the Lesser GNU General 9 // Public License as published by the Free Software Foundation. 10 // 11 // This program is distributed in the hope that it will be useful, 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 // Lesser General Public License for more details. 15 // 16 // You should have received a copy of the GNU Lesser General Public 17 // License along with this program; if not, write to the 18 // Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 // Boston, MA 02111-1307, USA. 20 21 namespace Gtk { 22 23 using System; 24 using System.Runtime.InteropServices; 25 26 public partial class TextChildAnchor { 27 28 [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] gtk_text_child_anchor_get_widgets(IntPtr raw)29 static extern IntPtr gtk_text_child_anchor_get_widgets (IntPtr raw); 30 31 public Widget[] Widgets { 32 get { 33 IntPtr raw_ret = gtk_text_child_anchor_get_widgets (Handle); 34 if (raw_ret == IntPtr.Zero) 35 return new Widget [0]; 36 GLib.List list = new GLib.List(raw_ret); 37 Widget[] result = new Widget [list.Count]; 38 for (int i = 0; i < list.Count; i++) 39 result [i] = list [i] as Widget; 40 return result; 41 } 42 } 43 } 44 } 45