GtkSharp/gdk/DisplayManager.custom
Mike Kestner 766b004949 2004-02-12 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide the GSList API
	* gdk/*.custom : manually wrap GSList api using typed arrays
	* gdk/gdk-api.xml : regen.

svn path=/trunk/gtk-sharp/; revision=23031
2004-02-12 17:31:37 +00:00

22 lines
623 B
Plaintext

// DisplayManager.custom - customizations to Gdk.DisplayManager
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
[DllImport("libgdk-win32-2.0-0.dll")]
static extern IntPtr gdk_display_manager_list_displays (IntPtr raw);
public Display[] ListDisplays ()
{
IntPtr raw_ret = gdk_display_manager_list_displays (Handle);
if (raw_ret == IntPtr.Zero)
return new Display [0];
GLib.SList list = new GLib.SList(raw_ret);
Display[] result = new Display [list.Count];
for (int i = 0; i < list.Count; i++)
result [i] = list [i] as Display;
return result;
}