mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 17:05:38 +00:00
2002-10-11 Martin Baulig <martin@gnome.org>
* glib/ListBase.cs (ListBase.Append): New public method. (ListBase.Prepend): New public method. svn path=/trunk/gtk-sharp/; revision=8168
This commit is contained in:
parent
52f04d5a61
commit
604034053a
|
@ -1,3 +1,8 @@
|
|||
2002-10-11 Martin Baulig <martin@gnome.org>
|
||||
|
||||
* glib/ListBase.cs (ListBase.Append): New public method.
|
||||
(ListBase.Prepend): New public method.
|
||||
|
||||
2002-10-11 Martin Baulig <martin@gnome.org>
|
||||
|
||||
* glib/FileUtils.cs: New file. Wrapped g_file_get_contents() here.
|
||||
|
|
16
glib/List.cs
16
glib/List.cs
|
@ -60,6 +60,22 @@ namespace GLib {
|
|||
g_list_free (list);
|
||||
}
|
||||
|
||||
[DllImport("glib-2.0")]
|
||||
static extern IntPtr g_list_append (IntPtr l, IntPtr raw);
|
||||
|
||||
internal override IntPtr Append (IntPtr list, IntPtr raw)
|
||||
{
|
||||
return g_list_append (list, raw);
|
||||
}
|
||||
|
||||
[DllImport("glib-2.0")]
|
||||
static extern IntPtr g_list_prepend (IntPtr l, IntPtr raw);
|
||||
|
||||
internal override IntPtr Prepend (IntPtr list, IntPtr raw)
|
||||
{
|
||||
return g_list_prepend (list, raw);
|
||||
}
|
||||
|
||||
public List (IntPtr raw) : base (raw)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -23,12 +23,14 @@ namespace GLib {
|
|||
private IntPtr list_ptr = IntPtr.Zero;
|
||||
private int length = -1;
|
||||
private bool managed = false;
|
||||
private Type element_type = null;
|
||||
protected Type element_type = null;
|
||||
|
||||
abstract internal IntPtr GetData (IntPtr current);
|
||||
abstract internal IntPtr Next (IntPtr current);
|
||||
abstract internal int Length (IntPtr list);
|
||||
abstract internal void Free (IntPtr list);
|
||||
abstract internal IntPtr Append (IntPtr current, IntPtr raw);
|
||||
abstract internal IntPtr Prepend (IntPtr current, IntPtr raw);
|
||||
|
||||
private ListBase ()
|
||||
{
|
||||
|
@ -81,6 +83,16 @@ namespace GLib {
|
|||
}
|
||||
}
|
||||
|
||||
public void Append (IntPtr raw)
|
||||
{
|
||||
list_ptr = Append (list_ptr, raw);
|
||||
}
|
||||
|
||||
public void Prepend (IntPtr raw)
|
||||
{
|
||||
list_ptr = Prepend (list_ptr, raw);
|
||||
}
|
||||
|
||||
// ICollection
|
||||
public int Count {
|
||||
get {
|
||||
|
|
|
@ -60,6 +60,22 @@ namespace GLib {
|
|||
g_slist_free (list);
|
||||
}
|
||||
|
||||
[DllImport("glib-2.0")]
|
||||
static extern IntPtr g_slist_append (IntPtr l, IntPtr raw);
|
||||
|
||||
internal override IntPtr Append (IntPtr list, IntPtr raw)
|
||||
{
|
||||
return g_slist_append (list, raw);
|
||||
}
|
||||
|
||||
[DllImport("glib-2.0")]
|
||||
static extern IntPtr g_slist_prepend (IntPtr l, IntPtr raw);
|
||||
|
||||
internal override IntPtr Prepend (IntPtr list, IntPtr raw)
|
||||
{
|
||||
return g_slist_prepend (list, raw);
|
||||
}
|
||||
|
||||
public SList (IntPtr raw) : base (raw)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue