2004-05-28 16:59:21 +00:00
<Type Name= "Marshaller" FullName= "GLib.Marshaller" >
2003-08-30 02:35:39 +00:00
<TypeSignature Language= "C#" Value= "public class Marshaller" Maintainer= "auto" />
<AssemblyInfo >
<AssemblyName > glib-sharp</AssemblyName>
2003-12-04 21:09:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
2005-05-23 20:41:51 +00:00
<AssemblyVersion > 2.0.0.0</AssemblyVersion>
2003-08-30 02:35:39 +00:00
</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 > Marshalling utilities</summary>
<remarks > Utility class for internal wrapper use</remarks>
</Docs>
<Base >
<BaseTypeName > System.Object</BaseTypeName>
</Base>
<Interfaces />
<Members >
<Member MemberName= "PtrToStringGFree" >
<MemberSignature Language= "C#" Value= "public static string PtrToStringGFree (IntPtr ptr);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "ptr" Type= "System.IntPtr" />
</Parameters>
<Docs >
2005-03-04 19:04:57 +00:00
<summary > Marshals a utf8 string from native memory and frees the native string.</summary>
2003-08-30 02:35:39 +00:00
<param name= "ptr" > a <see cref= "T:System.IntPtr" /> </param>
<returns > a <see cref= "T:System.String" /> </returns>
2005-03-04 19:04:57 +00:00
<remarks />
2003-08-30 02:35:39 +00:00
</Docs>
</Member>
<Member MemberName= "PtrToStringGFree" >
2005-05-23 20:41:51 +00:00
<MemberSignature Language= "C#" Value= "public static string[] PtrToStringGFree (IntPtr[] ptrs);" />
2003-08-30 02:35:39 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.String[]</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "ptrs" Type= "System.IntPtr[]" />
</Parameters>
<Docs >
2005-03-04 19:04:57 +00:00
<summary > Marshals an array of utf8 string from native memory and frees the native strings.</summary>
2003-08-30 02:35:39 +00:00
<param name= "ptrs" > a <see cref= "T:System.IntPtr[]" /> </param>
<returns > a <see cref= "T:System.String[]" /> </returns>
2005-06-02 14:33:00 +00:00
<remarks />
2003-08-30 02:35:39 +00:00
</Docs>
</Member>
<Member MemberName= "StringToPtrGStrdup" >
<MemberSignature Language= "C#" Value= "public static IntPtr StringToPtrGStrdup (string str);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.IntPtr</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "str" Type= "System.String" />
</Parameters>
<Docs >
2005-03-04 19:04:57 +00:00
<summary > Marshal a string to a native Utf8 string using GLib memory allocation.</summary>
2003-08-30 02:35:39 +00:00
<param name= "str" > a <see cref= "T:System.String" /> </param>
<returns > a <see cref= "T:System.IntPtr" /> </returns>
2005-03-04 19:04:57 +00:00
<remarks />
2003-08-30 02:35:39 +00:00
</Docs>
</Member>
2004-03-09 06:02:51 +00:00
<Member MemberName= "ArgvToArrayPtr" >
2005-05-23 20:41:51 +00:00
<MemberSignature Language= "C#" Value= "public static IntPtr ArgvToArrayPtr (string[] args);" />
2004-03-09 06:02:51 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.IntPtr</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "args" Type= "System.String[]" />
</Parameters>
<Docs >
2005-06-02 14:33:00 +00:00
<summary > Obsolete.</summary>
2004-03-09 06:02:51 +00:00
<param name= "args" > a <see cref= "T:System.String" /> </param>
<returns > a <see cref= "T:System.IntPtr" /> </returns>
2005-06-02 14:33:00 +00:00
<remarks > Replaced by <see cref= "T:GLib.Argv" /> </remarks>
2004-03-09 06:02:51 +00:00
</Docs>
</Member>
<Member MemberName= "ArrayPtrToArgv" >
2005-05-23 20:41:51 +00:00
<MemberSignature Language= "C#" Value= "public static string[] ArrayPtrToArgv (IntPtr array, int argc);" />
2004-03-09 06:02:51 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.String[]</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "array" Type= "System.IntPtr" />
<Parameter Name= "argc" Type= "System.Int32" />
</Parameters>
<Docs >
2005-06-02 14:33:00 +00:00
<summary > Obsolete.</summary>
2004-03-09 06:02:51 +00:00
<param name= "array" > a <see cref= "T:System.IntPtr" /> </param>
<param name= "argc" > a <see cref= "T:System.Int32" /> </param>
<returns > a <see cref= "T:System.String[]" /> </returns>
2005-06-02 14:33:00 +00:00
<remarks > Replaced by <see cref= "T:GLib.Argv" /> </remarks>
2004-03-09 06:02:51 +00:00
</Docs>
</Member>
2004-05-27 19:02:19 +00:00
<Member MemberName= "DateTimeTotime_t" >
<MemberSignature Language= "C#" Value= "public static IntPtr DateTimeTotime_t (DateTime time);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.IntPtr</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "time" Type= "System.DateTime" />
</Parameters>
<Docs >
2005-06-02 14:33:00 +00:00
<summary > Marshals DateTime structures to native time_t values.</summary>
2004-05-27 19:02:19 +00:00
<param name= "time" > a <see cref= "T:System.DateTime" /> </param>
<returns > a <see cref= "T:System.IntPtr" /> </returns>
2005-06-02 14:33:00 +00:00
<remarks />
2004-05-27 19:02:19 +00:00
</Docs>
</Member>
<Member MemberName= "time_tToDateTime" >
<MemberSignature Language= "C#" Value= "public static DateTime time_tToDateTime (IntPtr time_t);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.DateTime</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "time_t" Type= "System.IntPtr" />
</Parameters>
<Docs >
2005-06-02 14:33:00 +00:00
<summary > Marshals native time_t values to DateTime values.</summary>
2004-05-27 19:02:19 +00:00
<param name= "time_t" > a <see cref= "T:System.IntPtr" /> </param>
<returns > a <see cref= "T:System.DateTime" /> </returns>
2005-06-02 14:33:00 +00:00
<remarks />
2004-05-27 19:02:19 +00:00
</Docs>
</Member>
2004-08-17 20:43:49 +00:00
<Member MemberName= "GUnicharToChar" >
<MemberSignature Language= "C#" Value= "public static char GUnicharToChar (uint ucs4_char);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Char</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "ucs4_char" Type= "System.UInt32" />
</Parameters>
<Docs >
<summary > Marshals a UCS4 character represented as an uint to a UTF16 char.</summary>
<param name= "ucs4_char" > a <see cref= "T:System.UInt32" /> </param>
<returns > a <see cref= "T:System.Char" /> </returns>
2004-08-18 16:08:02 +00:00
<remarks >
</remarks>
2004-08-17 20:43:49 +00:00
</Docs>
</Member>
<Member MemberName= "CharToGUnichar" >
<MemberSignature Language= "C#" Value= "public static uint CharToGUnichar (char c);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.UInt32</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "c" Type= "System.Char" />
</Parameters>
<Docs >
<summary > Marshals a UTF16 char to a UCS4 character represented as an uint.</summary>
<param name= "c" > a <see cref= "T:System.Char" /> </param>
<returns > a <see cref= "T:System.UInt32" /> </returns>
2004-08-18 16:08:02 +00:00
<remarks >
</remarks>
2004-08-17 20:43:49 +00:00
</Docs>
</Member>
2005-01-20 15:45:13 +00:00
<Member MemberName= "StringFormat" >
2005-05-23 20:41:51 +00:00
<MemberSignature Language= "C#" Value= "public static string StringFormat (string format, object[] args);" />
2005-01-20 15:45:13 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "format" Type= "System.String" />
2005-05-23 20:41:51 +00:00
<Parameter Name= "args" Type= "System.Object[]" >
<Attributes >
<Attribute >
<AttributeName > System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
2005-01-20 15:45:13 +00:00
</Parameters>
<Docs >
<summary > Wrapper for marshalling between String.Format-style methods and printf-style ones</summary>
<param name= "format" > a <see cref= "M:System.Format" /> -style format string</param>
<param name= "args" > arguments for <paramref name= "format" /> </param>
<returns > a <see cref= "T:System.String" /> </returns>
<remarks > This is a wrapper for marshalling between managed String.Format-style methods and unmanaged printf-style ones. The managed function should take a <see cref= "T:System.String" /> format, and a <see langword= "params" /> array of <see cref= "T:System.Object" /> , and pass that to <see cref= "M:GLib.Marshaller.StringFormat" /> . <see cref= "M:GLib.Marshaller.StringFormat" /> will format the data, and then make sure that any percent signs in the result are doubled so that they can safely be passed to an unmanaged method that expects a printf-style string (and following arguments).</remarks>
</Docs>
</Member>
2005-03-04 19:04:57 +00:00
<Member MemberName= "Utf8PtrToString" >
<MemberSignature Language= "C#" Value= "public static string Utf8PtrToString (IntPtr ptr);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "ptr" Type= "System.IntPtr" />
</Parameters>
<Docs >
<summary > Marshals a native Utf8 string to a managed string.</summary>
<param name= "ptr" > a <see cref= "T:System.IntPtr" /> </param>
<returns > a <see cref= "T:System.String" /> </returns>
<remarks />
</Docs>
</Member>
2005-04-22 19:43:46 +00:00
<Member MemberName= "Utf8PtrToString" >
2005-05-23 20:41:51 +00:00
<MemberSignature Language= "C#" Value= "public static string[] Utf8PtrToString (IntPtr[] ptrs);" />
2005-04-22 19:43:46 +00:00
<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>
2005-03-04 19:04:57 +00:00
<Member MemberName= "PtrToStructureAlloc" >
<MemberSignature Language= "C#" Value= "public static IntPtr PtrToStructureAlloc (object o);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.IntPtr</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "o" Type= "System.Object" />
</Parameters>
<Docs >
<summary > To be added</summary>
<param name= "o" > a <see cref= "T:System.Object" /> </param>
<returns > a <see cref= "T:System.IntPtr" /> </returns>
<remarks > To be added</remarks>
</Docs>
</Member>
2005-03-08 21:28:08 +00:00
<Member MemberName= "Free" >
<MemberSignature Language= "C#" Value= "public static void Free (IntPtr ptr);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "ptr" Type= "System.IntPtr" />
</Parameters>
<Docs >
2005-06-02 14:33:00 +00:00
<summary > Free a native pointer allocated by GLib.</summary>
2005-03-08 21:28:08 +00:00
<param name= "ptr" > a <see cref= "T:System.IntPtr" /> </param>
2005-06-02 14:33:00 +00:00
<remarks />
</Docs>
</Member>
<Member MemberName= "FilenamePtrToString" >
<MemberSignature Language= "C#" Value= "public static string FilenamePtrToString (IntPtr ptr);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "ptr" Type= "System.IntPtr" />
</Parameters>
<Docs >
<param name= "ptr" > A native filename-encoded string pointer.</param>
<summary > Marshals a native filename-encoded string to a managed string.</summary>
<returns > A managed string.</returns>
<remarks > The native pointer is not freed after marshaling. Use with const strings.</remarks>
</Docs>
</Member>
<Member MemberName= "FilenamePtrToStringGFree" >
<MemberSignature Language= "C#" Value= "public static string FilenamePtrToStringGFree (IntPtr ptr);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "ptr" Type= "System.IntPtr" />
</Parameters>
<Docs >
<param name= "ptr" > A native filename-encoded string pointer.</param>
<summary > Marshals a native filename-encoded string to a managed string.</summary>
<returns > A managed string.</returns>
<remarks > The native pointer is freed after marshaling.</remarks>
</Docs>
</Member>
<Member MemberName= "StringToFilenamePtr" >
<MemberSignature Language= "C#" Value= "public static IntPtr StringToFilenamePtr (string str);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.IntPtr</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "str" Type= "System.String" />
</Parameters>
<Docs >
<param name= "str" > A managed string to be marshaled.</param>
<summary > Marshals a string to a filename encoded native pointer.</summary>
<returns > A pointer to a newly allocated native string.</returns>
<remarks />
2005-03-08 21:28:08 +00:00
</Docs>
</Member>
2003-08-30 02:35:39 +00:00
</Members>
2005-05-23 20:41:51 +00:00
</Type>