mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-11 05:35:40 +00:00
2004-05-05 Mike Kestner <mkestner@ximian.com>
* generator/BoxedGen.cs : remove g_value_init DllImport and change (g|s)et_boxed to use a glue method to simplify dllmapping. * glib/Value.cs : add Init method. * glib/glue/value.cs : add get/set_boxed glue methods. * */*.config.in : remove libgobject mappings for dlls that no longer need them. svn path=/trunk/gtk-sharp/; revision=26787
This commit is contained in:
parent
e57c608330
commit
31ef54a54a
12
ChangeLog
12
ChangeLog
|
@ -1,7 +1,15 @@
|
|||
2004-04-30 Larry Ewing <lewing@ximian.com>
|
||||
2004-05-05 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* generator/BoxedGen.cs : remove g_value_init DllImport and change
|
||||
(g|s)et_boxed to use a glue method to simplify dllmapping.
|
||||
* glib/Value.cs : add Init method.
|
||||
* glib/glue/value.cs : add get/set_boxed glue methods.
|
||||
* */*.config.in : remove libgobject mappings for dlls that no longer
|
||||
need them.
|
||||
|
||||
2004-05-05 Larry Ewing <lewing@ximian.com>
|
||||
|
||||
* gtk/Adjustment.custom: add an a set method for StepIncrement.
|
||||
|
||||
* gtk/glue/adjustment.c: add gtk_adjustment_set_step_increment.
|
||||
|
||||
2004-05-05 Mike Kestner <mkestner@ximian.com>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<configuration>
|
||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||
<dllmap dll="libatk-1.0-0.dll" target="libatk-1.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||
</configuration>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<configuration>
|
||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||
<dllmap dll="gda-2" target="libgda-2@LIB_PREFIX@.1@LIB_SUFFIX@"/>
|
||||
</configuration>
|
||||
|
|
|
@ -24,28 +24,25 @@ namespace GtkSharp.Generation {
|
|||
{
|
||||
StreamWriter sw = gen_info.Writer = gen_info.OpenStream (Name);
|
||||
base.Generate (gen_info);
|
||||
sw.WriteLine ("\t\t[DllImport(\"libgobject-2.0-0.dll\")]");
|
||||
sw.WriteLine ("\t\tstatic extern IntPtr g_value_init (ref GLib.Value val, GLib.GType gtype);");
|
||||
sw.WriteLine ("\t\t[DllImport(\"glibsharpglue\")]");
|
||||
sw.WriteLine ("\t\tstatic extern IntPtr glibsharp_value_get_boxed (ref GLib.Value val);");
|
||||
sw.WriteLine ();
|
||||
sw.WriteLine ("\t\t[DllImport(\"libgobject-2.0-0.dll\")]");
|
||||
sw.WriteLine ("\t\tstatic extern IntPtr g_value_get_boxed (ref GLib.Value val);");
|
||||
sw.WriteLine ();
|
||||
sw.WriteLine ("\t\t[DllImport(\"libgobject-2.0-0.dll\")]");
|
||||
sw.WriteLine ("\t\tstatic extern void g_value_set_boxed (ref GLib.Value val, ref " + QualifiedName + " boxed);");
|
||||
sw.WriteLine ("\t\t[DllImport(\"glibsharpglue\")]");
|
||||
sw.WriteLine ("\t\tstatic extern void glibsharp_value_set_boxed (ref GLib.Value val, ref " + QualifiedName + " boxed);");
|
||||
sw.WriteLine ();
|
||||
sw.WriteLine ("\t\tpublic static explicit operator GLib.Value (" + QualifiedName + " boxed)");
|
||||
sw.WriteLine ("\t\t{");
|
||||
|
||||
sw.WriteLine ("\t\t\tGLib.Value val = GLib.Value.Empty;");
|
||||
sw.WriteLine ("\t\t\tg_value_init (ref val, " + QualifiedName + ".GType);");
|
||||
sw.WriteLine ("\t\t\tg_value_set_boxed (ref val, ref boxed);");
|
||||
sw.WriteLine ("\t\t\tval.Init (" + QualifiedName + ".GType);");
|
||||
sw.WriteLine ("\t\t\tglibsharp_value_set_boxed (ref val, ref boxed);");
|
||||
sw.WriteLine ("\t\t\treturn val;");
|
||||
sw.WriteLine ("\t\t}");
|
||||
sw.WriteLine ();
|
||||
sw.WriteLine ("\t\tpublic static explicit operator " + QualifiedName + " (GLib.Value val)");
|
||||
sw.WriteLine ("\t\t{");
|
||||
|
||||
sw.WriteLine ("\t\t\tIntPtr boxed_ptr = g_value_get_boxed (ref val);");
|
||||
sw.WriteLine ("\t\t\tIntPtr boxed_ptr = glibsharp_value_get_boxed (ref val);");
|
||||
sw.WriteLine ("\t\t\treturn New (boxed_ptr);");
|
||||
sw.WriteLine ("\t\t}");
|
||||
|
||||
|
|
|
@ -35,6 +35,11 @@ namespace GLib {
|
|||
g_value_unset (ref this);
|
||||
}
|
||||
|
||||
public void Init (GLib.GType gtype)
|
||||
{
|
||||
g_value_init (ref this, gtype.Val);
|
||||
}
|
||||
|
||||
public Value (GLib.GType gtype)
|
||||
{
|
||||
type = GType.Invalid;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
/* Forward declarations */
|
||||
void gtksharp_value_create_from_property (GValue *value, GObject *obj, const gchar* name);
|
||||
GType gtksharp_value_get_value_type (GValue *value);
|
||||
gpointer glibsharp_value_get_boxed (GValue *value);
|
||||
void glibsharp_value_set_boxed (GValue *value, gpointer boxed);
|
||||
/* */
|
||||
|
||||
void
|
||||
|
@ -27,3 +29,15 @@ gtksharp_value_get_value_type (GValue *value)
|
|||
return G_VALUE_TYPE (value);
|
||||
}
|
||||
|
||||
gpointer
|
||||
glibsharp_value_get_boxed (GValue *value)
|
||||
{
|
||||
return g_value_get_boxed (value);
|
||||
}
|
||||
|
||||
void
|
||||
glibsharp_value_set_boxed (GValue *value, gpointer boxed)
|
||||
{
|
||||
g_value_set_boxed (value, boxed);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<configuration>
|
||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||
<dllmap dll="gnomedb-2" target="libgnomedb-2@LIB_PREFIX@.3@LIB_SUFFIX@"/>
|
||||
</configuration>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<configuration>
|
||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||
<dllmap dll="gtkhtml-3.0" target="libgtkhtml-@GTKHTML_VERSION@@LIB_PREFIX@.@GTKHTML_SOVERSION@@LIB_SUFFIX@"/>
|
||||
</configuration>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<configuration>
|
||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||
<dllmap dll="libpango-1.0-0.dll" target="libpango-1.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||
</configuration>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<configuration>
|
||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||
<dllmap dll="libatk-1.0-0.dll" target="libatk-1.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||
<dllmap dll="vte" target="libvte@LIB_PREFIX@.4@LIB_SUFFIX@"/>
|
||||
</configuration>
|
||||
|
|
Loading…
Reference in a new issue