GtkSharp/doc/en/GLib/ObjectManager.xml

101 lines
4.1 KiB
XML
Raw Normal View History

<Type Name="ObjectManager" FullName="GLib.ObjectManager">
<TypeSignature Language="C#" Value="public class ObjectManager" Maintainer="auto" />
<AssemblyInfo>
<AssemblyName>glib-sharp</AssemblyName>
<AssemblyPublicKey>
</AssemblyPublicKey>
<AssemblyVersion>2.12.0.0</AssemblyVersion>
</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>Manages GType to GLib.Object mapping and activation.</summary>
<remarks />
</Docs>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Members>
<Member MemberName="RegisterType">
<MemberSignature Language="C#" Value="public static void RegisterType (string native_name, string mangled);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="native_name" Type="System.String" />
<Parameter Name="mangled" Type="System.String" />
</Parameters>
<Docs>
<summary>Obsolete. Use the GType overload.</summary>
<param name="native_name">an object of type <see cref="T:System.String" /></param>
<param name="mangled">an object of type <see cref="T:System.String" /></param>
<remarks />
</Docs>
</Member>
<Member MemberName="RegisterType">
<MemberSignature Language="C#" Value="public static void RegisterType (string native_name, string managed_name, string assembly);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="native_name" Type="System.String" />
<Parameter Name="managed_name" Type="System.String" />
<Parameter Name="assembly" Type="System.String" />
</Parameters>
<Docs>
<summary>Obsolete. Use the GType overload.</summary>
<param name="native_name">an object of type <see cref="T:System.String" /></param>
<param name="managed_name">an object of type <see cref="T:System.String" /></param>
<param name="assembly">an object of type <see cref="T:System.String" /></param>
<remarks />
</Docs>
</Member>
<Member MemberName="CreateObject">
<MemberSignature Language="C#" Value="public static GLib.Object CreateObject (IntPtr raw);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>GLib.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="raw" Type="System.IntPtr" />
</Parameters>
<Docs>
<summary>Activates an object wrapper for a native object.</summary>
<param name="raw">an object of type <see cref="T:System.IntPtr" /></param>
<returns>an object of type <see cref="T:GLib.Object" /></returns>
<remarks>This should not need to be used by external code.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ObjectManager ();" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Do Not Use.</summary>
<remarks />
</Docs>
</Member>
<Member MemberName="RegisterType">
<MemberSignature Language="C#" Value="public static void RegisterType (GLib.GType native_type, Type type);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="native_type" Type="GLib.GType" />
<Parameter Name="type" Type="System.Type" />
</Parameters>
<Docs>
* parser/gapi2xml.pl: make note of _get_type methods for enums * */*-api.xml: Regen, adding gtype="..." to many enum types * generator/EnumGen.cs (Generate): if the enum has the "gtype" property, add a GTypeAttribute pointing to an internal FooGType class whose GType property can be used to get the enum's GType. * generator/ObjectGen.cs: s/ObjectManager.RegisterType/GType.Register/ * glib/GTypeAttribute.cs: attribute for indicating a property that will return the GType of a type (particularly for enums, which can't have GType properties added to them). * glib/GType.cs: renamed from Type.cs to match the type name (public static readonly GType ...): add a few missing types. (Register): moved from ObjectManager.RegisterType (LookupGType): moved from TypeConverter.LookupType and extended to handle GTypeAttribute. Also, fix mappings for sbyte/byte/char, and return specific GTypes for Object subclasses rather than always returning GType.Object. [Fixes #74699] (LookupType): moved from ObjectWrapper.LookupType (ToString): return the type name * glib/Object.cs (RegisterGType): s/ObjectManager.Register/GType.Register/ (LookupGType): Make this protected internal so GType can access it. * glib/ObjectManager.cs (RegisterType): deprecate in favor of GType.Register. (LookupType): moved to GType * glib/TypeConverter.cs (LookupType): now a deprecated wrapper around GType.LookupGType. * glib/Value.cs: Use GType casts rather than TypeConverter * gtk/NodeStore.cs (ScanType): * gtk/ListStore.custom (ListStore): * gtk/TreeStore.custom (TreeStore): Use (GType) cast rather than TypeConverter. Remove the error check and exception, since the cast never returns GType.Invalid. (The check probably predates GLib.ManagedValue.) * gnome/PanelAppletFactory.cs (Register): Use a GType cast rather than GLib.Object.LookupGType (which is no longer accessible after an mcs bugfix) * sample/GtkDemo/DemoIconView.cs (CreateStore): use the Type[] constructor rather than the GType[] constructor, since it translates typeof(Gdk.Pixbuf) correctly now. svn path=/trunk/gtk-sharp/; revision=44038
2005-05-04 16:54:24 +00:00
<summary>Obsolete. Replaced by <see cref="M:GLib.GType.Register" />.</summary>
<param name="native_type">a <see cref="T:GLib.GType" /></param>
<param name="type">a <see cref="T:System.Type" /></param>
<remarks />
<since version="Gtk# 2.4" />
</Docs>
</Member>
</Members>
</Type>