mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
2004-05-28 Mike Kestner <mkestner@ximian.com>
* generator/ObjectGen.cs : adjust to ObjectManager ns change. * glib/ManagedValue.cs : move to GLib and internalize. * glib/Object.cs : adjust to ObjectManager ns change. * glib/ObjectManager.cs : move to GLib. * glib/TypeConverter.cs : move to GLib. return ManagedValue.GType when we can't match a type instead of GType.None. * gtk/*.custom: adjust for new TypeConverter ns and behavior. 2004-05-28 Mike Kestner <mkestner@ximian.com> * en/* : run updater. fix a few *Sharp copy/pastisms. svn path=/trunk/gtk-sharp/; revision=28362
This commit is contained in:
parent
71d07af98a
commit
73632b2747
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2004-05-28 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* generator/ObjectGen.cs : adjust to ObjectManager ns change.
|
||||
* glib/ManagedValue.cs : move to GLib and internalize.
|
||||
* glib/Object.cs : adjust to ObjectManager ns change.
|
||||
* glib/ObjectManager.cs : move to GLib.
|
||||
* glib/TypeConverter.cs : move to GLib. return ManagedValue.GType
|
||||
when we can't match a type instead of GType.None.
|
||||
* gtk/*.custom: adjust for new TypeConverter ns and behavior.
|
||||
|
||||
2004-05-28 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* gtk/Makefile.am : add new custom.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2004-05-28 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* en/* : run updater. fix a few *Sharp copy/pastisms.
|
||||
|
||||
2004-05-27 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* en/* : run updater
|
||||
|
@ -18,7 +18,7 @@ gtk-sharp-docs.zip gtk-sharp-docs.tree: $(srcdir)/en/*/*.xml $(srcdir)/en/*.xml
|
||||
|
||||
update:
|
||||
for i in $(DIRS); do \
|
||||
$(UPDATER) ../$$i/*.dll -o ./en -f || exit 1; \
|
||||
$(UPDATER) ../$$i/*.dll -o ./en || exit 1; \
|
||||
done
|
||||
|
||||
sources = \
|
||||
|
1
doc/en/.cvsignore
Normal file
1
doc/en/.cvsignore
Normal file
@ -0,0 +1 @@
|
||||
*Sharp
|
@ -1,4 +1,4 @@
|
||||
<Type Name="Marshaller" FullName="GLibSharp.Marshaller">
|
||||
<Type Name="Marshaller" FullName="GLib.Marshaller">
|
||||
<TypeSignature Language="C#" Value="public class Marshaller" Maintainer="auto" />
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>glib-sharp</AssemblyName>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<Type Name="ObjectManager" FullName="GtkSharp.ObjectManager">
|
||||
<Type Name="ObjectManager" FullName="GLib.ObjectManager">
|
||||
<TypeSignature Language="C#" Value="public class ObjectManager" Maintainer="auto" />
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>glib-sharp</AssemblyName>
|
||||
@ -78,7 +78,7 @@
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>an object of type <see cref="T:GtkSharp.ObjectManager" /></returns>
|
||||
<returns>an object of type <see cref="T:GLib.ObjectManager" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
@ -1,4 +1,4 @@
|
||||
<Type Name="SignalArgs" FullName="GtkSharp.SignalArgs">
|
||||
<Type Name="SignalArgs" FullName="GLib.SignalArgs">
|
||||
<TypeSignature Language="C#" Value="public class SignalArgs : System.EventArgs" Maintainer="auto" />
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>glib-sharp</AssemblyName>
|
||||
@ -27,7 +27,7 @@
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Creates a SignalArgs object with no return value and no arguments.</summary>
|
||||
<returns>an object of type <see cref="T:GtkSharp.SignalArgs" /></returns>
|
||||
<returns>an object of type <see cref="T:GLib.SignalArgs" /></returns>
|
||||
<remarks>
|
||||
</remarks>
|
||||
</Docs>
|
||||
@ -42,7 +42,7 @@
|
||||
<Docs>
|
||||
<summary>Creates a SignalArgs object with a return value and no arguments.</summary>
|
||||
<param name="retval">an object of type <see cref="T:System.Object" /></param>
|
||||
<returns>an object of type <see cref="T:GtkSharp.SignalArgs" /></returns>
|
||||
<returns>an object of type <see cref="T:GLib.SignalArgs" /></returns>
|
||||
<remarks>
|
||||
</remarks>
|
||||
</Docs>
|
||||
@ -59,7 +59,7 @@
|
||||
<summary>Creates a SignalArgs object with a return value and a list of arguments.</summary>
|
||||
<param name="retval">an object of type <see cref="T:System.Object" /></param>
|
||||
<param name="args">an object of type <see cref="T:System.Object" /> []</param>
|
||||
<returns>an object of type <see cref="T:GtkSharp.SignalArgs" /></returns>
|
||||
<returns>an object of type <see cref="T:GLib.SignalArgs" /></returns>
|
||||
<remarks>
|
||||
</remarks>
|
||||
</Docs>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<Type Name="SignalCallback" FullName="GtkSharp.SignalCallback">
|
||||
<Type Name="SignalCallback" FullName="GLib.SignalCallback">
|
||||
<TypeSignature Language="C#" Value="public abstract class SignalCallback" Maintainer="auto" />
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>glib-sharp</AssemblyName>
|
||||
@ -175,7 +175,7 @@
|
||||
<param name="obj">a <see cref="T:GLib.Object" /></param>
|
||||
<param name="eh">a <see cref="T:System.Delegate" /></param>
|
||||
<param name="argstype">a <see cref="T:System.Type" /></param>
|
||||
<returns>a <see cref="T:GtkSharp.SignalCallback" /></returns>
|
||||
<returns>a <see cref="T:GLib.SignalCallback" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
|
@ -2,7 +2,8 @@
|
||||
<TypeSignature Language="C#" Value="public class Type" Maintainer="auto" />
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>glib-sharp</AssemblyName>
|
||||
<AssemblyPublicKey></AssemblyPublicKey>
|
||||
<AssemblyPublicKey>
|
||||
</AssemblyPublicKey>
|
||||
<AssemblyVersion>0.0.0.0</AssemblyVersion>
|
||||
<AssemblyCulture>neutral</AssemblyCulture>
|
||||
<Attributes />
|
||||
@ -10,7 +11,8 @@
|
||||
<ThreadSafetyStatement>To be added</ThreadSafetyStatement>
|
||||
<Docs>
|
||||
<summary>An arbitrary data type similar to a CORBA Any which is used to get and set properties on Objects.</summary>
|
||||
<remarks></remarks>
|
||||
<remarks>
|
||||
</remarks>
|
||||
</Docs>
|
||||
<Base>
|
||||
<BaseTypeName>System.Object</BaseTypeName>
|
||||
@ -29,7 +31,8 @@
|
||||
<summary>Constructs a new Type from a native GType value.</summary>
|
||||
<param name="val">an object of type <see cref="T:System.UInt32" /></param>
|
||||
<returns>an object of type <see cref="T:GLib.Type" /></returns>
|
||||
<remarks></remarks>
|
||||
<remarks>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Value">
|
||||
@ -41,7 +44,8 @@
|
||||
<Docs>
|
||||
<summary>The native value of a Type object.</summary>
|
||||
<returns>an object of type <see cref="T:System.UInt32" /></returns>
|
||||
<remarks></remarks>
|
||||
<remarks>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="ToString">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<Type Name="TypeConverter" FullName="GLibSharp.TypeConverter">
|
||||
<Type Name="TypeConverter" FullName="GLib.TypeConverter">
|
||||
<TypeSignature Language="C#" Value="public class TypeConverter" Maintainer="auto" />
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>glib-sharp</AssemblyName>
|
@ -2,7 +2,8 @@
|
||||
<TypeSignature Language="C#" Value="public class WrapperClassAttribute : System.Attribute" Maintainer="auto" />
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>glib-sharp</AssemblyName>
|
||||
<AssemblyPublicKey></AssemblyPublicKey>
|
||||
<AssemblyPublicKey>
|
||||
</AssemblyPublicKey>
|
||||
<AssemblyVersion>0.0.0.0</AssemblyVersion>
|
||||
<AssemblyCulture>neutral</AssemblyCulture>
|
||||
<Attributes />
|
||||
|
@ -1,110 +0,0 @@
|
||||
<Type Name="ManagedValue" FullName="GLibSharp.ManagedValue">
|
||||
<TypeSignature Language="C#" Value="public class ManagedValue" Maintainer="auto" />
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>glib-sharp</AssemblyName>
|
||||
<AssemblyPublicKey>
|
||||
</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>Managed types boxer</summary>
|
||||
<remarks>Utility class for creating GBoxed wrappers around managed types</remarks>
|
||||
</Docs>
|
||||
<Base>
|
||||
<BaseTypeName>System.Object</BaseTypeName>
|
||||
</Base>
|
||||
<Interfaces />
|
||||
<Attributes />
|
||||
<Members>
|
||||
<Member MemberName="Copy">
|
||||
<MemberSignature Language="C#" Value="public static IntPtr Copy (IntPtr ptr);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.IntPtr</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="ptr" Type="System.IntPtr" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<param name="ptr">a <see cref="T:System.IntPtr" /></param>
|
||||
<returns>a <see cref="T:System.IntPtr" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<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>
|
||||
<summary>To be added</summary>
|
||||
<param name="ptr">a <see cref="T:System.IntPtr" /></param>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="WrapObject">
|
||||
<MemberSignature Language="C#" Value="public static IntPtr WrapObject (object obj);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.IntPtr</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="obj" Type="System.Object" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<param name="obj">a <see cref="T:System.Object" /></param>
|
||||
<returns>a <see cref="T:System.IntPtr" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="ObjectForWrapper">
|
||||
<MemberSignature Language="C#" Value="public static object ObjectForWrapper (IntPtr ptr);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Object</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="ptr" Type="System.IntPtr" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<param name="ptr">a <see cref="T:System.IntPtr" /></param>
|
||||
<returns>a <see cref="T:System.Object" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName=".ctor">
|
||||
<MemberSignature Language="C#" Value="public ManagedValue ();" />
|
||||
<MemberType>Constructor</MemberType>
|
||||
<ReturnValue />
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:GLibSharp.ManagedValue" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="GType">
|
||||
<MemberSignature Language="C#" Value="public static GLib.GType GType { get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>GLib.GType</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:GLib.GType" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
@ -215,5 +215,135 @@
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="CursorBlink">
|
||||
<MemberSignature Language="C#" Value="public bool CursorBlink { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Boolean</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:System.Boolean" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="CursorBlinkTime">
|
||||
<MemberSignature Language="C#" Value="public int CursorBlinkTime { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Int32</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:System.Int32" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="DndDragThreshold">
|
||||
<MemberSignature Language="C#" Value="public int DndDragThreshold { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Int32</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:System.Int32" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="DoubleClickTime">
|
||||
<MemberSignature Language="C#" Value="public int DoubleClickTime { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Int32</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:System.Int32" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="FontName">
|
||||
<MemberSignature Language="C#" Value="public string FontName { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.String</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:System.String" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="IconSizes">
|
||||
<MemberSignature Language="C#" Value="public string IconSizes { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.String</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:System.String" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="KeyThemeName">
|
||||
<MemberSignature Language="C#" Value="public string KeyThemeName { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.String</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:System.String" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="MenuBarAccel">
|
||||
<MemberSignature Language="C#" Value="public string MenuBarAccel { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.String</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:System.String" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="SplitCursor">
|
||||
<MemberSignature Language="C#" Value="public bool SplitCursor { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Boolean</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:System.Boolean" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="ThemeName">
|
||||
<MemberSignature Language="C#" Value="public string ThemeName { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.String</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>To be added</summary>
|
||||
<returns>a <see cref="T:System.String" /></returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
@ -319,7 +319,7 @@ namespace GtkSharp.Generation {
|
||||
|
||||
foreach (string key in dir_info.objects.Keys) {
|
||||
if (GetExpected(key) != ((string) dir_info.objects[key] + "," + dir_info.assembly_name))
|
||||
sw.WriteLine ("\t\t\tGtkSharp.ObjectManager.RegisterType(\"" + key + "\", \"" + dir_info.objects [key] + "," + dir_info.assembly_name + "\");");
|
||||
sw.WriteLine ("\t\t\tGLib.ObjectManager.RegisterType(\"" + key + "\", \"" + dir_info.objects [key] + "," + dir_info.assembly_name + "\");");
|
||||
}
|
||||
|
||||
sw.WriteLine ("\t\t}");
|
||||
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
// (c) 2002 Rachel Hestilow
|
||||
|
||||
namespace GLibSharp {
|
||||
namespace GLib {
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
@ -25,7 +25,7 @@ namespace GLibSharp {
|
||||
// arbitrary pointer values is fine. Still, it might be useful
|
||||
// to use GCHandle later on.
|
||||
|
||||
public class ManagedValue {
|
||||
internal class ManagedValue {
|
||||
private class ValueHolder {
|
||||
public object val;
|
||||
public int ref_count;
|
||||
|
@ -85,7 +85,7 @@ namespace GLib {
|
||||
return obj;
|
||||
}
|
||||
|
||||
obj = GtkSharp.ObjectManager.CreateObject(o);
|
||||
obj = GLib.ObjectManager.CreateObject(o);
|
||||
if (obj == null)
|
||||
return null;
|
||||
|
||||
@ -129,7 +129,7 @@ namespace GLib {
|
||||
{
|
||||
GType parent_gtype = LookupGType (t.BaseType);
|
||||
string name = t.FullName.Replace(".", "_");
|
||||
GtkSharp.ObjectManager.RegisterType (name, t.FullName, t.Assembly.GetName().Name);
|
||||
GLib.ObjectManager.RegisterType (name, t.FullName, t.Assembly.GetName().Name);
|
||||
GType gtype = new GType (gtksharp_register_type (name, parent_gtype.Val));
|
||||
ConnectDefaultHandlers (gtype, t);
|
||||
g_types[t] = gtype;
|
||||
|
@ -1,7 +1,11 @@
|
||||
// Generated File. Do not modify.
|
||||
// <c> 2001-2002 Mike Kestner
|
||||
// GLib.ObjectManager.cs - GLib ObjectManager class implementation
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@speakeasy.net>
|
||||
//
|
||||
// Copyright <c> 2001-2002 Mike Kestner
|
||||
// Copyright <c> 2004 Novell, Inc.
|
||||
|
||||
namespace GtkSharp {
|
||||
namespace GLib {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
@ -4,11 +4,10 @@
|
||||
//
|
||||
// (c) 2002 Rachel Hestilow
|
||||
|
||||
namespace GLibSharp {
|
||||
namespace GLib {
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using GLib;
|
||||
|
||||
public class TypeConverter {
|
||||
|
||||
@ -40,7 +39,7 @@ namespace GLibSharp {
|
||||
if (type.IsValueType)
|
||||
return GType.Pointer;
|
||||
|
||||
return GType.None;
|
||||
return ManagedValue.GType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ namespace GLib {
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using GLibSharp;
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
public struct Value : IDisposable {
|
||||
@ -175,9 +174,7 @@ namespace GLib {
|
||||
pad_1 = pad_2 = 0;
|
||||
|
||||
GType gtype = TypeConverter.LookupType (obj.GetType ());
|
||||
if (gtype == GType.None) {
|
||||
g_value_init (ref this, ManagedValue.GType.Val);
|
||||
} else if (gtype == GType.Object) {
|
||||
if (gtype == GType.Object) {
|
||||
g_value_init (ref this, ((GLib.Object) obj).NativeType.Val);
|
||||
} else {
|
||||
g_value_init (ref this, gtype.Val);
|
||||
@ -320,8 +317,8 @@ namespace GLib {
|
||||
}
|
||||
set {
|
||||
IntPtr buf;
|
||||
GType type = GLibSharp.TypeConverter.LookupType (value.GetType());
|
||||
if (type == GType.None)
|
||||
GType type = TypeConverter.LookupType (value.GetType());
|
||||
if (type == ManagedValue.GType)
|
||||
g_value_set_boxed (ref this, ManagedValue.WrapObject (value));
|
||||
else if (type == GType.String)
|
||||
g_value_set_string (ref this, (string) value);
|
||||
|
@ -91,14 +91,10 @@
|
||||
GLib.GType[] gtypes = new GLib.GType[types.Length];
|
||||
int i = 0;
|
||||
foreach (Type type in types) {
|
||||
GLib.GType ctype = GLibSharp.TypeConverter.LookupType (type);
|
||||
if (ctype == GLib.GType.None) {
|
||||
gtypes[i] = GLibSharp.ManagedValue.GType;
|
||||
} else if (ctype == GLib.GType.Invalid) {
|
||||
GLib.GType ctype = GLib.TypeConverter.LookupType (type);
|
||||
if (ctype == GLib.GType.Invalid)
|
||||
throw new Exception ("Unknown type");
|
||||
} else {
|
||||
gtypes[i] = ctype;
|
||||
}
|
||||
gtypes[i] = ctype;
|
||||
i++;
|
||||
}
|
||||
|
||||
|
@ -305,14 +305,10 @@ namespace Gtk {
|
||||
int col = tnva.Column;
|
||||
pi = mi as PropertyInfo;
|
||||
getters [col] = pi;
|
||||
GLib.GType ctype = GLibSharp.TypeConverter.LookupType (pi.PropertyType);
|
||||
if (ctype == GLib.GType.None) {
|
||||
ctypes[col] = GLibSharp.ManagedValue.GType;
|
||||
} else if (ctype == GLib.GType.Invalid) {
|
||||
GLib.GType ctype = GLib.TypeConverter.LookupType (pi.PropertyType);
|
||||
if (ctype == GLib.GType.Invalid)
|
||||
throw new Exception ("Unknown type");
|
||||
} else {
|
||||
ctypes[col] = ctype;
|
||||
}
|
||||
ctypes[col] = ctype;
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine ("Unknown custom attr: " + attr);
|
||||
|
@ -138,14 +138,10 @@
|
||||
GLib.GType[] gtypes = new GLib.GType[types.Length];
|
||||
int i = 0;
|
||||
foreach (Type type in types) {
|
||||
GLib.GType ctype = GLibSharp.TypeConverter.LookupType (type);
|
||||
if (ctype == GLib.GType.None) {
|
||||
gtypes[i] = GLibSharp.ManagedValue.GType;
|
||||
} else if (ctype == GLib.GType.Invalid) {
|
||||
GLib.GType ctype = GLib.TypeConverter.LookupType (type);
|
||||
if (ctype == GLib.GType.Invalid)
|
||||
throw new Exception ("Unknown type");
|
||||
} else {
|
||||
gtypes[i] = ctype;
|
||||
}
|
||||
gtypes[i] = ctype;
|
||||
i++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user