mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
2004-12-03 Jorge Garcia <jgarcia@ac.upc.es>
* glib/Type.cs: add Int64 and UInt64 support. * glib/TypeConverter.cs: add Int64 and UInt64 support. * glib/Value.cs: add Int64 and UInt64 support. svn path=/trunk/gtk-sharp/; revision=37049
This commit is contained in:
parent
5f9a153c7f
commit
3d6cb09562
@ -1,3 +1,9 @@
|
|||||||
|
2004-12-03 Jorge Garcia <jgarcia@ac.upc.es>
|
||||||
|
|
||||||
|
* glib/Type.cs: add Int64 and UInt64 support.
|
||||||
|
* glib/TypeConverter.cs: add Int64 and UInt64 support.
|
||||||
|
* glib/Value.cs: add Int64 and UInt64 support.
|
||||||
|
|
||||||
2004-12-03 Mike Kestner <mkestner@novell.com>
|
2004-12-03 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* gtk/Dialog.custom : correct return value for AddButton overload.
|
* gtk/Dialog.custom : correct return value for AddButton overload.
|
||||||
|
@ -39,6 +39,9 @@ namespace GLib {
|
|||||||
public static readonly GType String = new GType ((IntPtr) TypeFundamentals.TypeString);
|
public static readonly GType String = new GType ((IntPtr) TypeFundamentals.TypeString);
|
||||||
public static readonly GType Boolean = new GType ((IntPtr) TypeFundamentals.TypeBoolean);
|
public static readonly GType Boolean = new GType ((IntPtr) TypeFundamentals.TypeBoolean);
|
||||||
public static readonly GType Int = new GType ((IntPtr) TypeFundamentals.TypeInt);
|
public static readonly GType Int = new GType ((IntPtr) TypeFundamentals.TypeInt);
|
||||||
|
public static readonly GType Int64 = new GType ((IntPtr) TypeFundamentals.TypeInt64);
|
||||||
|
public static readonly GType UInt64 = new GType ((IntPtr) TypeFundamentals.TypeUInt64);
|
||||||
|
|
||||||
public static readonly GType Double = new GType ((IntPtr) TypeFundamentals.TypeDouble);
|
public static readonly GType Double = new GType ((IntPtr) TypeFundamentals.TypeDouble);
|
||||||
public static readonly GType Float = new GType ((IntPtr) TypeFundamentals.TypeFloat);
|
public static readonly GType Float = new GType ((IntPtr) TypeFundamentals.TypeFloat);
|
||||||
public static readonly GType Char = new GType ((IntPtr) TypeFundamentals.TypeChar);
|
public static readonly GType Char = new GType ((IntPtr) TypeFundamentals.TypeChar);
|
||||||
|
@ -36,6 +36,10 @@ namespace GLib {
|
|||||||
return GType.Boolean;
|
return GType.Boolean;
|
||||||
if (type.Equals (typeof (int)))
|
if (type.Equals (typeof (int)))
|
||||||
return GType.Int;
|
return GType.Int;
|
||||||
|
if (type.Equals (typeof (long)))
|
||||||
|
return GType.Int64;
|
||||||
|
if (type.Equals (typeof (ulong)))
|
||||||
|
return GType.UInt64;
|
||||||
if (type.Equals (typeof (double)))
|
if (type.Equals (typeof (double)))
|
||||||
return GType.Double;
|
return GType.Double;
|
||||||
if (type.Equals (typeof (float)))
|
if (type.Equals (typeof (float)))
|
||||||
|
@ -126,6 +126,23 @@ namespace GLib {
|
|||||||
g_value_set_int (ref this, val);
|
g_value_set_int (ref this, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
|
static extern void g_value_set_int64 (ref Value val, long data);
|
||||||
|
|
||||||
|
public Value (long val) : this (GType.Int64)
|
||||||
|
{
|
||||||
|
g_value_set_int64 (ref this, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
|
static extern void g_value_set_uint64 (ref Value val, ulong data);
|
||||||
|
|
||||||
|
public Value (ulong val) : this (GType.UInt64)
|
||||||
|
{
|
||||||
|
g_value_set_uint64 (ref this, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[DllImport("libgobject-2.0-0.dll")]
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
static extern void g_value_set_object (ref Value val, IntPtr data);
|
static extern void g_value_set_object (ref Value val, IntPtr data);
|
||||||
|
|
||||||
@ -253,6 +270,23 @@ namespace GLib {
|
|||||||
return g_value_get_int (ref val);
|
return g_value_get_int (ref val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
|
static extern long g_value_get_int64 (ref Value val);
|
||||||
|
|
||||||
|
public static explicit operator long (Value val)
|
||||||
|
{
|
||||||
|
return g_value_get_int64 (ref val);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
|
static extern ulong g_value_get_uint64 (ref Value val);
|
||||||
|
|
||||||
|
public static explicit operator ulong (Value val)
|
||||||
|
{
|
||||||
|
return g_value_get_uint64 (ref val);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[DllImport("libgobject-2.0-0.dll")]
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
static extern IntPtr g_value_get_object (ref Value val);
|
static extern IntPtr g_value_get_object (ref Value val);
|
||||||
|
|
||||||
@ -334,6 +368,10 @@ namespace GLib {
|
|||||||
return (bool) this;
|
return (bool) this;
|
||||||
else if (type == GType.Int)
|
else if (type == GType.Int)
|
||||||
return (int) this;
|
return (int) this;
|
||||||
|
else if (type == GType.Int64)
|
||||||
|
return (long) this;
|
||||||
|
else if (type == GType.UInt64)
|
||||||
|
return (ulong) this;
|
||||||
else if (type == GType.Double)
|
else if (type == GType.Double)
|
||||||
return (double) this;
|
return (double) this;
|
||||||
else if (type == GType.Float)
|
else if (type == GType.Float)
|
||||||
@ -358,6 +396,10 @@ namespace GLib {
|
|||||||
g_value_set_boolean (ref this, (bool) value);
|
g_value_set_boolean (ref this, (bool) value);
|
||||||
else if (type == GType.Int)
|
else if (type == GType.Int)
|
||||||
g_value_set_int (ref this, (int) value);
|
g_value_set_int (ref this, (int) value);
|
||||||
|
else if (type == GType.Int64)
|
||||||
|
g_value_set_int64 (ref this, (long) value);
|
||||||
|
else if (type == GType.UInt64)
|
||||||
|
g_value_set_uint64 (ref this, (ulong) value);
|
||||||
else if (type == GType.Double)
|
else if (type == GType.Double)
|
||||||
g_value_set_double (ref this, (double) value);
|
g_value_set_double (ref this, (double) value);
|
||||||
else if (type == GType.Float)
|
else if (type == GType.Float)
|
||||||
|
Loading…
Reference in New Issue
Block a user