2002-03-28 Mike Kestner <mkestner@speakeasy.net>

* generator/SignalHandler.cs : switch to 2.0 libs
	* generator/SymbolTable.cs : switch to 2.0 libs
	* glib/Object.cs : switch to 2.0 libs
	* glib/SList.cs : switch to 2.0 libs
	* glib/Value.cs : switch to 2.0 libs
	* gtk/Application.cs : switch to 2.0 libs

svn path=/trunk/gtk-sharp/; revision=3468
This commit is contained in:
Mike Kestner 2002-03-28 21:16:43 +00:00
parent 4242ad7415
commit 28049f1c2b
8 changed files with 45 additions and 36 deletions

View File

@ -1,3 +1,12 @@
2002-03-28 Mike Kestner <mkestner@speakeasy.net>
* generator/SignalHandler.cs : switch to 2.0 libs
* generator/SymbolTable.cs : switch to 2.0 libs
* glib/Object.cs : switch to 2.0 libs
* glib/SList.cs : switch to 2.0 libs
* glib/Value.cs : switch to 2.0 libs
* gtk/Application.cs : switch to 2.0 libs
2002-03-26 Mike Kestner <mkestner@speakeasy.net> 2002-03-26 Mike Kestner <mkestner@speakeasy.net>
* generator/SignalHandler.cs : Use Path.DirectorySeparatorChar. * generator/SignalHandler.cs : Use Path.DirectorySeparatorChar.

View File

@ -149,7 +149,7 @@ namespace GtkSharp.Generation {
} }
sw.WriteLine("\t\t}"); sw.WriteLine("\t\t}");
sw.WriteLine(); sw.WriteLine();
sw.Write("\t\t[DllImport(\"gobject-1.3\", "); sw.Write("\t\t[DllImport(\"gobject-2.0\", ");
sw.WriteLine("CallingConvention=CallingConvention.Cdecl)]"); sw.WriteLine("CallingConvention=CallingConvention.Cdecl)]");
sw.Write("\t\tstatic extern void g_signal_connect_data("); sw.Write("\t\tstatic extern void g_signal_connect_data(");
sw.Write("IntPtr obj, String name, " + dname + " cb, int key, IntPtr p,"); sw.Write("IntPtr obj, String name, " + dname + " cb, int key, IntPtr p,");

View File

@ -66,10 +66,10 @@ namespace GtkSharp.Generation {
simple_types.Add ("GParamSpec", "IntPtr"); simple_types.Add ("GParamSpec", "IntPtr");
dlls = new Hashtable(); dlls = new Hashtable();
dlls.Add("Pango", "pango"); dlls.Add("Pango", "pango-1.0");
dlls.Add("Atk", "atk"); dlls.Add("Atk", "atk-1.0");
dlls.Add("Gdk", "gdk-x11-1.3"); dlls.Add("Gdk", "gdk-x11-2.0");
dlls.Add("Gtk", "gtk-x11-1.3"); dlls.Add("Gtk", "gtk-x11-2.0");
} }
public void AddType (IGeneratable gen) public void AddType (IGeneratable gen)

View File

@ -4,7 +4,7 @@ all:
@echo "'make unix' is broken for now." @echo "'make unix' is broken for now."
windows: windows:
$(CSC) /unsafe /out:codegen.exe /recurse:*.cs $(CSC) /unsafe /out:codegen.exe *.cs
./codegen gtkapi.xml ./codegen gtkapi.xml
linux: linux:

View File

@ -197,7 +197,7 @@ namespace GLib {
/// Accesses a string Property. /// Accesses a string Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_get (IntPtr obj, string name, static extern void g_object_get (IntPtr obj, string name,
out string val, IntPtr term); out string val, IntPtr term);
@ -214,7 +214,7 @@ namespace GLib {
/// Accesses a boolean Property. /// Accesses a boolean Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_get (IntPtr obj, string name, static extern void g_object_get (IntPtr obj, string name,
out bool val, IntPtr term); out bool val, IntPtr term);
@ -231,7 +231,7 @@ namespace GLib {
/// Accesses a double Property. /// Accesses a double Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_get (IntPtr obj, string name, static extern void g_object_get (IntPtr obj, string name,
out double val, IntPtr term); out double val, IntPtr term);
@ -248,7 +248,7 @@ namespace GLib {
/// Accesses a float Property. /// Accesses a float Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_get (IntPtr obj, string name, static extern void g_object_get (IntPtr obj, string name,
out float val, IntPtr term); out float val, IntPtr term);
@ -265,7 +265,7 @@ namespace GLib {
/// Accesses an integer Property. /// Accesses an integer Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_get (IntPtr obj, string name, static extern void g_object_get (IntPtr obj, string name,
out int val, IntPtr term); out int val, IntPtr term);
@ -282,7 +282,7 @@ namespace GLib {
/// Accesses an unsigned integer Property. /// Accesses an unsigned integer Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_get (IntPtr obj, string name, static extern void g_object_get (IntPtr obj, string name,
out uint val, IntPtr term); out uint val, IntPtr term);
@ -299,7 +299,7 @@ namespace GLib {
/// Accesses an Object Property. /// Accesses an Object Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_get (IntPtr obj, string name, static extern void g_object_get (IntPtr obj, string name,
out IntPtr val, IntPtr term); out IntPtr val, IntPtr term);
@ -346,7 +346,7 @@ namespace GLib {
/// Changes the value of a string Property. /// Changes the value of a string Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_set (IntPtr obj, string name, static extern void g_object_set (IntPtr obj, string name,
string val, IntPtr term); string val, IntPtr term);
@ -363,7 +363,7 @@ namespace GLib {
/// Changes the value of an integer Property. /// Changes the value of an integer Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_set (IntPtr obj, string name, static extern void g_object_set (IntPtr obj, string name,
int val, IntPtr term); int val, IntPtr term);
@ -380,7 +380,7 @@ namespace GLib {
/// Changes the value of an unsigned integer Property. /// Changes the value of an unsigned integer Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_set (IntPtr obj, string name, static extern void g_object_set (IntPtr obj, string name,
uint val, IntPtr term); uint val, IntPtr term);
@ -397,7 +397,7 @@ namespace GLib {
/// Changes the value of a boolean Property. /// Changes the value of a boolean Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_set (IntPtr obj, string name, static extern void g_object_set (IntPtr obj, string name,
bool val, IntPtr term); bool val, IntPtr term);
@ -414,7 +414,7 @@ namespace GLib {
/// Changes the value of a double Property. /// Changes the value of a double Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_set (IntPtr obj, string name, static extern void g_object_set (IntPtr obj, string name,
double val, IntPtr term); double val, IntPtr term);
@ -431,7 +431,7 @@ namespace GLib {
/// Changes the value of a float Property. /// Changes the value of a float Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_set (IntPtr obj, string name, static extern void g_object_set (IntPtr obj, string name,
float val, IntPtr term); float val, IntPtr term);
@ -448,7 +448,7 @@ namespace GLib {
/// Changes the value of an IntPtr Property. /// Changes the value of an IntPtr Property.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("gobject-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern void g_object_set (IntPtr obj, string name, static extern void g_object_set (IntPtr obj, string name,
IntPtr val, IntPtr term); IntPtr val, IntPtr term);
@ -485,7 +485,7 @@ namespace GLib {
/* /*
[DllImport("gtk-1.3")] [DllImport("gtk-2.0")]
static extern void g_object_set_data_full ( static extern void g_object_set_data_full (
IntPtr obj, IntPtr obj,
String key, String key,

View File

@ -65,7 +65,7 @@ namespace GLib {
/// The number of elements in the SList. /// The number of elements in the SList.
/// </remarks> /// </remarks>
[DllImport("glib-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("glib-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern int g_slist_length(IntPtr raw); static extern int g_slist_length(IntPtr raw);
public int Count { public int Count {
@ -168,7 +168,7 @@ namespace GLib {
/// Indexer to access members of the SList. /// Indexer to access members of the SList.
/// </remarks> /// </remarks>
[DllImport("glib-1.3", CallingConvention=CallingConvention.Cdecl)] [DllImport("glib-2.0", CallingConvention=CallingConvention.Cdecl)]
static extern IntPtr g_slist_nth_data(IntPtr raw, int index); static extern IntPtr g_slist_nth_data(IntPtr raw, int index);
public object this[int index] { public object this[int index] {

View File

@ -26,7 +26,7 @@ namespace GLib {
// Destructor is required since we are allocating unmananged // Destructor is required since we are allocating unmananged
// heap resources. // heap resources.
[DllImport("glib-1.3")] [DllImport("glib-2.0")]
static extern void g_free (IntPtr mem); static extern void g_free (IntPtr mem);
~Value () ~Value ()
@ -44,7 +44,7 @@ namespace GLib {
/// value to it. /// value to it.
/// </remarks> /// </remarks>
[DllImport("glib-1.3", [DllImport("glib-2.0",
CallingConvention=CallingConvention.Cdecl)] CallingConvention=CallingConvention.Cdecl)]
static extern IntPtr g_malloc0 (long n_bytes); static extern IntPtr g_malloc0 (long n_bytes);
@ -74,7 +74,7 @@ namespace GLib {
/// Constructs a Value from a specified boolean. /// Constructs a Value from a specified boolean.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", [DllImport("gobject-2.0",
CallingConvention=CallingConvention.Cdecl)] CallingConvention=CallingConvention.Cdecl)]
static extern void g_value_set_boolean (IntPtr val, static extern void g_value_set_boolean (IntPtr val,
bool data); bool data);
@ -92,7 +92,7 @@ namespace GLib {
/// Constructs a Value from a specified integer. /// Constructs a Value from a specified integer.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", [DllImport("gobject-2.0",
CallingConvention=CallingConvention.Cdecl)] CallingConvention=CallingConvention.Cdecl)]
static extern void g_value_set_int (IntPtr val, int data); static extern void g_value_set_int (IntPtr val, int data);
@ -110,7 +110,7 @@ namespace GLib {
/// Constructs a Value from a specified string. /// Constructs a Value from a specified string.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", [DllImport("gobject-2.0",
CallingConvention=CallingConvention.Cdecl)] CallingConvention=CallingConvention.Cdecl)]
static extern void g_value_set_string (IntPtr val, static extern void g_value_set_string (IntPtr val,
IntPtr data); IntPtr data);
@ -129,7 +129,7 @@ namespace GLib {
/// Prepares a raw value to hold a specified type. /// Prepares a raw value to hold a specified type.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", [DllImport("gobject-2.0",
CallingConvention=CallingConvention.Cdecl)] CallingConvention=CallingConvention.Cdecl)]
static extern void g_value_init (IntPtr val, static extern void g_value_init (IntPtr val,
TypeFundamentals type); TypeFundamentals type);
@ -149,7 +149,7 @@ namespace GLib {
/// boolean value. /// boolean value.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", [DllImport("gobject-2.0",
CallingConvention=CallingConvention.Cdecl)] CallingConvention=CallingConvention.Cdecl)]
static extern bool g_value_get_boolean (IntPtr val); static extern bool g_value_get_boolean (IntPtr val);
@ -170,7 +170,7 @@ namespace GLib {
/// integer value. /// integer value.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", [DllImport("gobject-2.0",
CallingConvention=CallingConvention.Cdecl)] CallingConvention=CallingConvention.Cdecl)]
static extern int g_value_get_int (IntPtr val); static extern int g_value_get_int (IntPtr val);
@ -191,7 +191,7 @@ namespace GLib {
/// string value. /// string value.
/// </remarks> /// </remarks>
[DllImport("gobject-1.3", [DllImport("gobject-2.0",
CallingConvention=CallingConvention.Cdecl)] CallingConvention=CallingConvention.Cdecl)]
static extern IntPtr g_value_get_string (IntPtr val); static extern IntPtr g_value_get_string (IntPtr val);

View File

@ -23,7 +23,7 @@ namespace Gtk {
public class Application { public class Application {
[DllImport("gtk-x11-1.3")] [DllImport("gtk-x11-2.0")]
static extern void gtk_init (int argc, IntPtr argv); static extern void gtk_init (int argc, IntPtr argv);
public static void Init () public static void Init ()
@ -31,7 +31,7 @@ namespace Gtk {
gtk_init (0, new IntPtr(0)); gtk_init (0, new IntPtr(0));
} }
[DllImport("gtk-x11-1.3")] [DllImport("gtk-x11-2.0")]
static extern void gtk_init (ref int argc, ref String[] argv); static extern void gtk_init (ref int argc, ref String[] argv);
/// <summary> /// <summary>
@ -56,7 +56,7 @@ namespace Gtk {
/// Begins the event loop iteration. /// Begins the event loop iteration.
/// </remarks> /// </remarks>
[DllImport("gtk-x11-1.3")] [DllImport("gtk-x11-2.0")]
static extern void gtk_main (); static extern void gtk_main ();
public static void Run () public static void Run ()
@ -73,7 +73,7 @@ namespace Gtk {
/// Terminates the event loop iteration. /// Terminates the event loop iteration.
/// </remarks> /// </remarks>
[DllImport("gtk-x11-1.3")] [DllImport("gtk-x11-2.0")]
static extern void gtk_main_quit (); static extern void gtk_main_quit ();
public static void Quit () public static void Quit ()