Author: danw
Date: 2005-04-22 15:43:46 -0400 (Fri, 22 Apr 2005)
New Revision: 43461

Removed:
   trunk/gtk-sharp/doc/en/Gtk/ModuleDisplayInitFunc.xml
   trunk/gtk-sharp/doc/en/Gtk/ModuleInitFunc.xml
Modified:
   trunk/gtk-sharp/ChangeLog
   trunk/gtk-sharp/doc/ChangeLog
   trunk/gtk-sharp/doc/en/GLib/Marshaller.xml
   trunk/gtk-sharp/glib/Marshaller.cs
   trunk/gtk-sharp/gnome/Gnome.metadata
   trunk/gtk-sharp/gtk/Gtk.metadata
Log:
        * gnome/Gnome.metadata: mark GnomeTriggerActionFunction's char**
        param const

        * glib/Marshaller.cs (Utf8PtrToString): Add an IntPtr[]->string[]
        overload, since that's what we actually need in the case where
        it's used (above). Leave the IntPtr[]->string[] overload of
        PtrToStringGFree in case anyone is using it manually.

        * gtk/Gtk.metadata: hide GtkModuleInitFunc and
        GtkModuleDisplayInitFunc; they are the signatures of user-defined
        methods that gtk only ever resolves via g_module_symbol(), so
        they're not useful from C#. (And the marshalling was all wrong
        anyway...)


Modified: trunk/gtk-sharp/ChangeLog
===================================================================
--- trunk/gtk-sharp/ChangeLog   2005-04-22 19:31:42 UTC (rev 43460)
+++ trunk/gtk-sharp/ChangeLog   2005-04-22 19:43:46 UTC (rev 43461)
@@ -1,5 +1,19 @@
 2005-04-22  Dan Winship  <[EMAIL PROTECTED]>
 
+       * gnome/Gnome.metadata: mark GnomeTriggerActionFunction's char**
+       param const
+
+       * glib/Marshaller.cs (Utf8PtrToString): Add an IntPtr[]->string[]
+       overload, since that's what we actually need in the case where
+       it's used (above). Leave the IntPtr[]->string[] overload of
+       PtrToStringGFree in case anyone is using it manually.
+
+       * gtk/Gtk.metadata: hide GtkModuleInitFunc and
+       GtkModuleDisplayInitFunc; they are the signatures of user-defined
+       methods that gtk only ever resolves via g_module_symbol(), so
+       they're not useful from C#. (And the marshalling was all wrong
+       anyway...)
+
        * glib/Type.cs: 
        * glib/TypeConverter.cs: 
        * glib/Value.cs: sort lists of GTypes into TypeFundamental order

Modified: trunk/gtk-sharp/doc/ChangeLog
===================================================================
--- trunk/gtk-sharp/doc/ChangeLog       2005-04-22 19:31:42 UTC (rev 43460)
+++ trunk/gtk-sharp/doc/ChangeLog       2005-04-22 19:43:46 UTC (rev 43461)
@@ -1,3 +1,10 @@
+2005-04-21  Dan Winship  <[EMAIL PROTECTED]>
+
+       * en/GLib/Marshaller.xml: update
+
+       * en/Gtk/ModuleDisplayInitFunc.xml:
+       * en/Gtk/ModuleInitFunc.xml: gone
+
 2005-04-22  John Luke  <[EMAIL PROTECTED]>
 
        * en/*/*.xml: run gen*.exe to fill in some docs

Modified: trunk/gtk-sharp/doc/en/GLib/Marshaller.xml
===================================================================
--- trunk/gtk-sharp/doc/en/GLib/Marshaller.xml  2005-04-22 19:31:42 UTC (rev 
43460)
+++ trunk/gtk-sharp/doc/en/GLib/Marshaller.xml  2005-04-22 19:43:46 UTC (rev 
43461)
@@ -201,6 +201,22 @@
         <remarks />
       </Docs>
     </Member>
+    <Member MemberName="Utf8PtrToString">
+      <MemberSignature Language="C#" Value="public static string [] 
Utf8PtrToString (IntPtr [] ptrs);" />
+      <MemberType>Method</MemberType>
+      <ReturnValue>
+        <ReturnType>System.String[]</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="ptrs" Type="System.IntPtr[]" />
+      </Parameters>
+      <Docs>
+        <summary>Marshals an array of native Utf8 strings to an array of 
managed strings.</summary>
+        <param name="ptrs">a <see cref="T:System.IntPtr" /></param>
+        <returns>a <see cref="T:System.String[]" /></returns>
+        <remarks />
+      </Docs>
+    </Member>
     <Member MemberName="PtrToStructureAlloc">
       <MemberSignature Language="C#" Value="public static IntPtr 
PtrToStructureAlloc (object o);" />
       <MemberType>Method</MemberType>

Deleted: trunk/gtk-sharp/doc/en/Gtk/ModuleDisplayInitFunc.xml
===================================================================
--- trunk/gtk-sharp/doc/en/Gtk/ModuleDisplayInitFunc.xml        2005-04-22 
19:31:42 UTC (rev 43460)
+++ trunk/gtk-sharp/doc/en/Gtk/ModuleDisplayInitFunc.xml        2005-04-22 
19:43:46 UTC (rev 43461)
@@ -1,34 +0,0 @@
-<Type Name="ModuleDisplayInitFunc" FullName="Gtk.ModuleDisplayInitFunc">
-  <TypeSignature Language="C#" Value="public sealed delegate void 
ModuleDisplayInitFunc (Gdk.Display display);" Maintainer="auto" />
-  <AssemblyInfo>
-    <AssemblyName>gtk-sharp</AssemblyName>
-    <AssemblyPublicKey />
-    <AssemblyVersion>0.0.0.0</AssemblyVersion>
-    <AssemblyCulture>neutral</AssemblyCulture>
-    <Attributes />
-  </AssemblyInfo>
-  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the 
<link location="node:gtk-sharp/programming/threads">Gtk# Thread 
Programming</link> for details.</ThreadSafetyStatement>
-  <Docs>
-    <summary>Do not use.</summary>
-    <remarks />
-  </Docs>
-  <Base>
-    <BaseTypeName>System.Delegate</BaseTypeName>
-  </Base>
-  <Interfaces>
-    <Interface>
-      <InterfaceName>System.ICloneable</InterfaceName>
-    </Interface>
-    <Interface>
-      <InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName>
-    </Interface>
-  </Interfaces>
-  <Attributes />
-  <Members />
-  <Parameters>
-    <Parameter Name="display" Type="Gdk.Display" />
-  </Parameters>
-  <ReturnValue>
-    <ReturnType>System.Void</ReturnType>
-  </ReturnValue>
-</Type>
\ No newline at end of file

Deleted: trunk/gtk-sharp/doc/en/Gtk/ModuleInitFunc.xml
===================================================================
--- trunk/gtk-sharp/doc/en/Gtk/ModuleInitFunc.xml       2005-04-22 19:31:42 UTC 
(rev 43460)
+++ trunk/gtk-sharp/doc/en/Gtk/ModuleInitFunc.xml       2005-04-22 19:43:46 UTC 
(rev 43461)
@@ -1,33 +0,0 @@
-<Type Name="ModuleInitFunc" FullName="Gtk.ModuleInitFunc">
-  <TypeSignature Language="C#" Maintainer="auto" Value="public sealed delegate 
void ModuleInitFunc (out int argc, string [] argv);" />
-  <AssemblyInfo>
-    <AssemblyName>gtk-sharp</AssemblyName>
-    <AssemblyVersion>0.0.0.0</AssemblyVersion>
-    <Attributes />
-  </AssemblyInfo>
-  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the 
<link location="node:gtk-sharp/programming/threads">Gtk# Thread 
Programming</link> for details.</ThreadSafetyStatement>
-  <Docs>
-    <summary>Do not use.</summary>
-    <remarks />
-  </Docs>
-  <Base>
-    <BaseTypeName>System.Delegate</BaseTypeName>
-  </Base>
-  <Interfaces>
-    <Interface>
-      <InterfaceName>System.ICloneable</InterfaceName>
-    </Interface>
-    <Interface>
-      <InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName>
-    </Interface>
-  </Interfaces>
-  <Attributes />
-  <Members />
-  <Parameters>
-    <Parameter Name="argc" Type="System.Int32" />
-    <Parameter Name="argv" Type="System.String" />
-  </Parameters>
-  <ReturnValue>
-    <ReturnType>System.Void</ReturnType>
-  </ReturnValue>
-</Type>
\ No newline at end of file

Modified: trunk/gtk-sharp/glib/Marshaller.cs
===================================================================
--- trunk/gtk-sharp/glib/Marshaller.cs  2005-04-22 19:31:42 UTC (rev 43460)
+++ trunk/gtk-sharp/glib/Marshaller.cs  2005-04-22 19:43:46 UTC (rev 43461)
@@ -51,6 +51,14 @@
                        return System.Text.Encoding.UTF8.GetString (bytes);
                }
 
+               public static string[] Utf8PtrToString (IntPtr[] ptrs) {
+                       // The last pointer is a null terminator.
+                       string[] ret = new string[ptrs.Length - 1];
+                       for (int i = 0; i < ret.Length; i++)
+                               ret[i] = Utf8PtrToString (ptrs[i]);
+                       return ret;
+               }
+
                public static string PtrToStringGFree (IntPtr ptr) 
                {
                        string ret = Utf8PtrToString (ptr);
@@ -58,9 +66,6 @@
                        return ret;
                }
 
-               [DllImport("libglib-2.0-0.dll")]
-               static extern void g_strfreev (IntPtr mem);
-
                public static string[] PtrToStringGFree (IntPtr[] ptrs) {
                        // The last pointer is a null terminator.
                        string[] ret = new string[ptrs.Length - 1];

Modified: trunk/gtk-sharp/gnome/Gnome.metadata
===================================================================
--- trunk/gtk-sharp/gnome/Gnome.metadata        2005-04-22 19:31:42 UTC (rev 
43460)
+++ trunk/gtk-sharp/gnome/Gnome.metadata        2005-04-22 19:43:46 UTC (rev 
43461)
@@ -9,6 +9,7 @@
   <attr path="/api/namespace/[EMAIL 
PROTECTED]'GnomeGlyphList']/method/*/[EMAIL PROTECTED]'const-guchar*']" 
name="type">const-gchar*</attr>
   <attr path="/api/namespace/[EMAIL 
PROTECTED]'GnomePrintUnit']/method/*/[EMAIL PROTECTED]'const-guchar*']" 
name="type">const-gchar*</attr>
   <attr path="/api/namespace/[EMAIL PROTECTED]'GnomePrintUnit']/[EMAIL 
PROTECTED]'GetIdentity']/*/[EMAIL PROTECTED]'base']" name="name">Base</attr>
+  <attr path="/api/namespace/[EMAIL 
PROTECTED]'GnomeTriggerActionFunction']/*/[EMAIL PROTECTED]'supinfo']" 
name="type">const-char*</attr>
   <attr path="/api/[EMAIL PROTECTED]'gnomeprintui-2-2']/[EMAIL 
PROTECTED]'GnomePrint_']" name="name">PrintWidget</attr>
   <attr path="/api/[EMAIL PROTECTED]'gnomeprintui-2-2']/[EMAIL 
PROTECTED]'GnomePrint_']" name="cname">GnomePrintWidget_</attr>
   <attr path="/api/namespace/[EMAIL PROTECTED]'GnomeConfig_']/[EMAIL 
PROTECTED]'SetSetHandler']" name="hidden">1</attr>

Modified: trunk/gtk-sharp/gtk/Gtk.metadata
===================================================================
--- trunk/gtk-sharp/gtk/Gtk.metadata    2005-04-22 19:31:42 UTC (rev 43460)
+++ trunk/gtk-sharp/gtk/Gtk.metadata    2005-04-22 19:43:46 UTC (rev 43461)
@@ -27,7 +27,8 @@
   <attr path="/api/namespace/[EMAIL PROTECTED]'GtkTreePath']/[EMAIL 
PROTECTED]'gtk_tree_path_new_from_indices']" name="hidden">1</attr>
   <attr path="/api/namespace/[EMAIL PROTECTED]'GtkTreePath']/[EMAIL 
PROTECTED]'GetIndices']" name="hidden">1</attr>
   <attr path="/api/namespace/[EMAIL PROTECTED]'GtkItemFactoryCallback2']" 
name="hidden">1</attr>
-  <attr path="/api/namespace/[EMAIL PROTECTED]'GtkModuleInitFunc']/*/[EMAIL 
PROTECTED]'argv']" name="array">1</attr>
+  <attr path="/api/namespace/[EMAIL PROTECTED]'GtkModuleDisplayInitFunc']" 
name="hidden">1</attr>
+  <attr path="/api/namespace/[EMAIL PROTECTED]'GtkModuleInitFunc']" 
name="hidden">1</attr>
   <attr path="/api/namespace/[EMAIL PROTECTED]'GtkAccel_']/[EMAIL 
PROTECTED]'GroupsFromObject']" name="hidden">1</attr>
   <attr path="/api/namespace/[EMAIL PROTECTED]'GtkAccelerator_']/[EMAIL 
PROTECTED]'GetDefaultModMask']/return-type" name="type">GdkModifierType</attr>
   <attr path="/api/namespace/[EMAIL PROTECTED]'GtkBindings_']/[EMAIL 
PROTECTED]'Activate']" name="name">BindingsActivate</attr>

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to