mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 17:35:33 +00:00
2004-02-11 Mike Kestner <mkestner@ximian.com>
* gtk/*.custom : don't use element_type ctor for GObject lists. svn path=/trunk/gtk-sharp/; revision=22996
This commit is contained in:
parent
2419dff1d9
commit
835866aab8
|
@ -1,3 +1,7 @@
|
|||
2004-02-11 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* gtk/*.custom : don't use element_type ctor for GObject lists.
|
||||
|
||||
2004-02-11 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* gtk/*.custom : return 0 length arrays, not null.
|
||||
|
|
|
@ -13,7 +13,7 @@ public Widget[] Children {
|
|||
if (list_ptr == IntPtr.Zero)
|
||||
return new Widget [0];
|
||||
|
||||
GLib.List list = new GLib.List (list_ptr, typeof (Gtk.Widget));
|
||||
GLib.List list = new GLib.List (list_ptr);
|
||||
Widget[] result = new Widget [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result [i] = list [i] as Widget;
|
||||
|
@ -34,14 +34,14 @@ public Widget[] FocusChain {
|
|||
if (!success)
|
||||
return new Widget [0];
|
||||
|
||||
GLib.List list = new GLib.List (list_ptr, typeof (Gtk.Widget));
|
||||
GLib.List list = new GLib.List (list_ptr);
|
||||
Widget[] result = new Widget [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result [i] = list [i] as Widget;
|
||||
return result;
|
||||
}
|
||||
set {
|
||||
GLib.List list = new GLib.List (IntPtr.Zero, typeof (Gtk.Widget));
|
||||
GLib.List list = new GLib.List (IntPtr.Zero);
|
||||
foreach (Widget val in value)
|
||||
list.Append (val.Handle);
|
||||
gtk_container_set_focus_chain (Handle, list.Handle);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
IntPtr raw_ret = gtk_text_child_anchor_get_widgets (Handle);
|
||||
if (raw_ret == IntPtr.Zero)
|
||||
return new Widget [0];
|
||||
GLib.List list = new GLib.List(raw_ret, typeof (Widget));
|
||||
GLib.List list = new GLib.List(raw_ret);
|
||||
Widget[] result = new Widget [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result [i] = list [i] as Widget;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
IntPtr raw_ret = gtk_tree_view_get_columns (Handle);
|
||||
if (raw_ret == IntPtr.Zero)
|
||||
return new TreeViewColumn [0];
|
||||
GLib.List list = new GLib.List (raw_ret, typeof (Gtk.TreeViewColumn));
|
||||
GLib.List list = new GLib.List (raw_ret);
|
||||
TreeViewColumn[] result = new TreeViewColumn [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result [i] = list [i] as TreeViewColumn;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
IntPtr raw_ret = gtk_tree_view_column_get_cell_renderers (Handle);
|
||||
if (raw_ret == IntPtr.Zero)
|
||||
return new CellRenderer [0];
|
||||
GLib.List list = new GLib.List (raw_ret, typeof (CellRenderer));
|
||||
GLib.List list = new GLib.List (raw_ret);
|
||||
CellRenderer[] result = new CellRenderer [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result [i] = list [i] as CellRenderer;
|
||||
|
|
|
@ -37,14 +37,14 @@
|
|||
IntPtr raw_ret = gtk_window_get_default_icon_list();
|
||||
if (raw_ret == IntPtr.Zero)
|
||||
return new Gdk.Pixbuf [0];
|
||||
GLib.List list = new GLib.List(raw_ret, typeof (Gdk.Pixbuf));
|
||||
GLib.List list = new GLib.List(raw_ret);
|
||||
Gdk.Pixbuf[] result = new Gdk.Pixbuf [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result [i] = list [i] as Gdk.Pixbuf;
|
||||
return result;
|
||||
}
|
||||
set {
|
||||
GLib.List list = new GLib.List(IntPtr.Zero, typeof (Gdk.Pixbuf));
|
||||
GLib.List list = new GLib.List(IntPtr.Zero);
|
||||
foreach (Gdk.Pixbuf val in value)
|
||||
list.Append (val.Handle);
|
||||
gtk_window_set_default_icon_list(list.Handle);
|
||||
|
@ -73,14 +73,14 @@
|
|||
IntPtr raw_ret = gtk_window_get_icon_list(Handle);
|
||||
if (raw_ret == IntPtr.Zero)
|
||||
return new Gdk.Pixbuf [0];
|
||||
GLib.List list = new GLib.List(raw_ret, typeof (Gdk.Pixbuf));
|
||||
GLib.List list = new GLib.List(raw_ret);
|
||||
Gdk.Pixbuf[] result = new Gdk.Pixbuf [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result [i] = list [i] as Gdk.Pixbuf;
|
||||
return result;
|
||||
}
|
||||
set {
|
||||
GLib.List list = new GLib.List(IntPtr.Zero, typeof (Gdk.Pixbuf));
|
||||
GLib.List list = new GLib.List(IntPtr.Zero);
|
||||
foreach (Gdk.Pixbuf val in value)
|
||||
list.Append (val.Handle);
|
||||
gtk_window_set_icon_list(Handle, list.Handle);
|
||||
|
@ -116,7 +116,7 @@
|
|||
if (raw_ret == IntPtr.Zero)
|
||||
return new Window [0];
|
||||
|
||||
GLib.List list = new GLib.List(raw_ret, typeof (Gtk.Window));
|
||||
GLib.List list = new GLib.List(raw_ret);
|
||||
Window[] result = new Window [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result [i] = list [i] as Window;
|
||||
|
|
Loading…
Reference in a new issue