Ryujinx-GtkSharp/gnome/IconList.custom
Mike Kestner f692bf6d37 2004-02-12 Mike Kestner <mkestner@ximian.com>
* gnome/Gnome.metadata : hide the GList API
	* gnome/*.custom : manually wrap GList api using typed arrays
	* gnome/gnome-api.xml : regen.

svn path=/trunk/gtk-sharp/; revision=23045
2004-02-12 22:38:43 +00:00

25 lines
597 B
Plaintext

// IconList.custom - customizations to Gnome.IconList
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
[DllImport("gnomeui-2")]
static extern IntPtr gnome_icon_list_get_selection (IntPtr raw);
public int[] Selection {
get {
IntPtr list_ptr = gnome_icon_list_get_selection (Handle);
if (list_ptr == IntPtr.Zero)
return new int [0];
GLib.List list = new GLib.List (list_ptr, typeof (int));
int[] result = new int [list.Count];
int i = 0;
foreach (int val in list)
result [i++] = val;
return result;
}
}