diff --git a/ChangeLog b/ChangeLog index 34d3110d6..50377646c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-02-12 Mike Kestner + + * gdk/Gdk.metadata : hide the GSList API + * gdk/*.custom : manually wrap GSList api using typed arrays + * gdk/gdk-api.xml : regen. + 2004-02-12 Mike Kestner * gtk/Accel.custom : s/List/SList diff --git a/gdk/DisplayManager.custom b/gdk/DisplayManager.custom new file mode 100644 index 000000000..9081b86e2 --- /dev/null +++ b/gdk/DisplayManager.custom @@ -0,0 +1,21 @@ +// DisplayManager.custom - customizations to Gdk.DisplayManager +// +// Authors: Mike Kestner +// +// 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; + } + diff --git a/gdk/Gdk.metadata b/gdk/Gdk.metadata index 0c2812418..104d06c88 100644 --- a/gdk/Gdk.metadata +++ b/gdk/Gdk.metadata @@ -18,6 +18,7 @@ 1 ref 1 + 1 1 1 out @@ -28,6 +29,7 @@ 1 1 libgdk-win32-2.0-0.dll + 1 libgdk-win32-2.0-0.dll 1 libgdk-win32-2.0-0.dll diff --git a/gdk/Pixbuf.custom b/gdk/Pixbuf.custom index 1b10c615c..36a70279a 100644 --- a/gdk/Pixbuf.custom +++ b/gdk/Pixbuf.custom @@ -3,6 +3,7 @@ // Authors: // Vladimir Vukicevic // Miguel de Icaza +// Mike Kestner // Duncan Mak // Gonzalo Paniagua Javier // Martin Willemoes Hansen @@ -12,6 +13,7 @@ // (C) 2003 Ximian, Inc. (Duncan Mak) // (C) 2003 Ximian, Inc. (Gonzalo Paniagua Javier) // (C) 2003 Martin Willemoes Hansen +// (C) 2004 Novell, Inc. // // This code is inserted after the automatically generated code. @@ -165,3 +167,20 @@ return ret; } } + + [DllImport("libgdk_pixbuf-2.0-0.dll")] + static extern IntPtr gdk_pixbuf_get_formats(); + + public static PixbufFormat[] Formats { + get { + IntPtr list_ptr = gdk_pixbuf_get_formats (); + if (list_ptr == IntPtr.Zero) + return new PixbufFormat [0]; + GLib.SList list = new GLib.SList (list_ptr, typeof (PixbufFormat)); + PixbufFormat[] result = new PixbufFormat [list.Count]; + for (int i = 0; i < list.Count; i++) + result [i] = (PixbufFormat) list [i]; + return result; + } + } + diff --git a/gdk/gdk-api.xml b/gdk/gdk-api.xml index c2e68a1f4..21b9e8c15 100644 --- a/gdk/gdk-api.xml +++ b/gdk/gdk-api.xml @@ -766,7 +766,7 @@ - + @@ -3714,7 +3714,7 @@ - +