From 948bb15432ed8a06e5528f753b821fa827a41d89 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Sat, 22 Jun 2002 22:12:51 +0000 Subject: [PATCH] 2002-06-22 Mike Kestner * */makefile.win32 : add docs target * generator/ClassBase.cs : Make GenMethods public for interface gen * generator/Method.cs : Lose the CallingConvention * generator/Parameters.cs : fix uninitialized var * generator/SignalHandler.cs : Lose the CallingConvention * generator/StructBase.cs : Lose the CallingConvention svn path=/trunk/gtk-sharp/; revision=5418 --- ChangeLog | 9 +++++++++ atk/makefile.win32 | 3 +++ gdk/makefile.win32 | 3 +++ generator/ClassBase.cs | 2 +- generator/Method.cs | 3 +-- generator/Parameters.cs | 2 +- generator/SignalHandler.cs | 3 +-- generator/StructBase.cs | 6 ++---- generator/makefile.win32 | 3 +++ glib/makefile.win32 | 3 +++ gtk/makefile.win32 | 3 +++ makefile.win32 | 5 +++++ pango/makefile.win32 | 3 +++ sample/makefile.win32 | 3 +++ 14 files changed, 41 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ba42ca63..d7a378f29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-06-22 Mike Kestner + + * */makefile.win32 : add docs target + * generator/ClassBase.cs : Make GenMethods public for interface gen + * generator/Method.cs : Lose the CallingConvention + * generator/Parameters.cs : fix uninitialized var + * generator/SignalHandler.cs : Lose the CallingConvention + * generator/StructBase.cs : Lose the CallingConvention + 2002-06-21 Michael Meeks * sample/Makefile.in: re-factor slightly. diff --git a/atk/makefile.win32 b/atk/makefile.win32 index e348bcc9a..9e9ec49c4 100644 --- a/atk/makefile.win32 +++ b/atk/makefile.win32 @@ -1,5 +1,8 @@ all: windows windows: + $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /out:atk-sharp.dll /recurse:*.cs + +docs: $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /doc:atk-sharp-docs.xml /out:atk-sharp.dll /recurse:*.cs diff --git a/gdk/makefile.win32 b/gdk/makefile.win32 index 7874c6e82..2e62fed7b 100644 --- a/gdk/makefile.win32 +++ b/gdk/makefile.win32 @@ -1,5 +1,8 @@ all: windows windows: + $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /r:../atk/atk-sharp.dll /out:gdk-sharp.dll /recurse:*.cs + +docs: $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /r:../atk/atk-sharp.dll /doc:gdk-sharp-docs.xml /out:gdk-sharp.dll /recurse:*.cs diff --git a/generator/ClassBase.cs b/generator/ClassBase.cs index c850c6c94..bfe2dfdf4 100644 --- a/generator/ClassBase.cs +++ b/generator/ClassBase.cs @@ -125,7 +125,7 @@ namespace GtkSharp.Generation { (props != null) && props.ContainsKey(mname.Substring(3))); } - protected void GenMethods (StreamWriter sw) + public void GenMethods (StreamWriter sw) { if (methods == null) return; diff --git a/generator/Method.cs b/generator/Method.cs index c28c3e797..cdf2a40a1 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -211,8 +211,7 @@ namespace GtkSharp.Generation { protected void GenerateImport (StreamWriter sw) { - sw.WriteLine("\t\t[DllImport(\"" + libname + - "\", CallingConvention=CallingConvention.Cdecl)]"); + sw.WriteLine("\t\t[DllImport(\"" + libname + "\")]"); sw.Write("\t\tstatic extern " + safety + m_ret + " " + cname + isig); sw.WriteLine(); } diff --git a/generator/Parameters.cs b/generator/Parameters.cs index d6c555121..7104ecd30 100644 --- a/generator/Parameters.cs +++ b/generator/Parameters.cs @@ -77,7 +77,7 @@ namespace GtkSharp.Generation { bool need_sep = false; int len = 0; - XmlElement last_param; + XmlElement last_param = null; foreach (XmlNode parm in elem.ChildNodes) { if (parm.Name != "parameter") { continue; diff --git a/generator/SignalHandler.cs b/generator/SignalHandler.cs index b6dfdeea8..e17909eb6 100644 --- a/generator/SignalHandler.cs +++ b/generator/SignalHandler.cs @@ -149,8 +149,7 @@ namespace GtkSharp.Generation { } sw.WriteLine("\t\t}"); sw.WriteLine(); - sw.Write("\t\t[DllImport(\"gobject-2.0\", "); - sw.WriteLine("CallingConvention=CallingConvention.Cdecl)]"); + sw.Write("\t\t[DllImport(\"gobject-2.0\")]"); sw.Write("\t\tstatic extern void g_signal_connect_data("); sw.Write("IntPtr obj, String name, " + dname + " cb, int key, IntPtr p,"); sw.WriteLine(" int flags);"); diff --git a/generator/StructBase.cs b/generator/StructBase.cs index 9299e41b7..af05152c5 100644 --- a/generator/StructBase.cs +++ b/generator/StructBase.cs @@ -46,8 +46,7 @@ namespace GtkSharp.Generation { String cname = ctor.GetAttribute("cname"); - sw.WriteLine("\t\t[DllImport(\"" + LibraryName + - "\", CallingConvention=CallingConvention.Cdecl)]"); + sw.WriteLine("\t\t[DllImport(\"" + LibraryName + "\")]"); sw.WriteLine("\t\tstatic extern IntPtr " + cname + isig); sw.WriteLine(); @@ -149,8 +148,7 @@ namespace GtkSharp.Generation { return true; } - sw.WriteLine("\t\t[DllImport(\"" + LibraryName + - "\", CallingConvention=CallingConvention.Cdecl)]"); + sw.WriteLine("\t\t[DllImport(\"" + LibraryName + "\")]"); sw.Write("\t\tstatic extern " + m_ret + " " + cname + isig); sw.WriteLine(); diff --git a/generator/makefile.win32 b/generator/makefile.win32 index b35aeb414..c7d2de699 100644 --- a/generator/makefile.win32 +++ b/generator/makefile.win32 @@ -4,3 +4,6 @@ windows: *.cs $(CSC) /unsafe /out:codegen.exe *.cs ./codegen gtkapi.xml +docs: windows + + diff --git a/glib/makefile.win32 b/glib/makefile.win32 index 6a61178c4..6e63149fd 100644 --- a/glib/makefile.win32 +++ b/glib/makefile.win32 @@ -1,5 +1,8 @@ all: windows windows: + $(CSC) /unsafe /target:library /out:glib-sharp.dll /recurse:*.cs + +docs: $(CSC) /unsafe /target:library /doc:glib-sharp-docs.xml /out:glib-sharp.dll /recurse:*.cs diff --git a/gtk/makefile.win32 b/gtk/makefile.win32 index 2632cca14..829d6fcc7 100644 --- a/gtk/makefile.win32 +++ b/gtk/makefile.win32 @@ -1,5 +1,8 @@ all: windows windows: + $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /r:../atk/atk-sharp.dll /r:../gdk/gdk-sharp.dll /out:gtk-sharp.dll /recurse:*.cs + +docs: $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /r:../atk/atk-sharp.dll /r:../gdk/gdk-sharp.dll /doc:gtk-sharp-docs.xml /out:gtk-sharp.dll /recurse:*.cs diff --git a/makefile.win32 b/makefile.win32 index de0076b6a..ef668ffad 100755 --- a/makefile.win32 +++ b/makefile.win32 @@ -9,3 +9,8 @@ windows: (cd $$i; CSC=$(CSC) make -f makefile.win32) || exit 1;\ done; +docs: + for i in $(DIRS); do \ + (cd $$i; CSC=$(CSC) make -f makefile.win32 docs) || exit 1;\ + done; + diff --git a/pango/makefile.win32 b/pango/makefile.win32 index b3ec2bfe2..b61daca39 100644 --- a/pango/makefile.win32 +++ b/pango/makefile.win32 @@ -1,5 +1,8 @@ all: windows windows: + $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /out:pango-sharp.dll /recurse:*.cs + +docs: $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /doc:pango-sharp-docs.xml /out:pango-sharp.dll /recurse:*.cs diff --git a/sample/makefile.win32 b/sample/makefile.win32 index a9500f769..7c3c943d2 100644 --- a/sample/makefile.win32 +++ b/sample/makefile.win32 @@ -5,3 +5,6 @@ windows: $(CSC) /unsafe /out:button.exe /r:../glib/glib-sharp.dll /r:../gtk/gtk-sharp.dll ButtonApp.cs $(CSC) /unsafe /out:menu.exe /r:../glib/glib-sharp.dll /r:../gtk/gtk-sharp.dll Menu.cs +docs: + @echo "No docs to make." +