mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
![Rachel Hestilow](/assets/img/avatar_default.png)
* generator/ClassBase.cs: New base class for classes and interfaces. * generator/InterfaceGen.cs: Inherit from ClassBase, generate declarations. * generator/ObjectGen.cs: Move half of this into ClassBase. * generator/Method.cs: Turn all applicable Get/Set functions into .NET accessors. Remove redundant == overload and move into Equals, as it was confusing "!= null". * generator/Parameters.cs: Alter signature creation to accept "is_set" option, add support for variable arguments. Add properties "Count", "IsVarArgs", "VAType". * generator/Ctor.cs: Fixup for changes in Parameters (indenting, signature creation). * generator/Signal.cs: Support generating declarations. * generator/SymbolTable: Change GetObjectGen to GetClassGen. * glib/IWrapper.cs: Move "Handle" declaration to here, so both classes and interfaces can benefit from it. * glib/Object.cs: Inherit from IWrapper.cs * parser/Metadata.pm: Support attribute changes on constructors, methods, signals, and paramater lists. * parser/gapi2xml.pl: Parse init funcs for interfaces. Ignore "_" functions here. * parser/gapi_pp.pl: Remove boxed_type_register check, as it will be caught in the init funcs. * parser/Atk.metadata: Added. * parser/Gtk.metadata: Add all needed signal/method collision renames. Rename GtkEditable.Editable accessors to IsEditable, as .NET does not like accessors with the same name as their declaring type. Tag TreeStore constructor as varargs. * samples/ButtonApp.cs: s/EmitAdd/Add. * samples/Menu.cs: s/EmitAdd/Add, s/Activate/Activated. svn path=/trunk/gtk-sharp/; revision=5394
87 lines
1.3 KiB
C#
87 lines
1.3 KiB
C#
// GtkSharp.Boxed.cs - Base class for deriving marshallable structures.
|
|
//
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
//
|
|
// (c) 2001-2002 Mike Kestner
|
|
|
|
namespace GLib {
|
|
|
|
using System;
|
|
|
|
/// <summary>
|
|
/// Boxed Class
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// An abstract base class to derive structures and marshal them.
|
|
/// </remarks>
|
|
|
|
public abstract class Boxed {
|
|
|
|
private IntPtr raw;
|
|
|
|
public Boxed () : this (IntPtr.Zero) {}
|
|
|
|
/// <summary>
|
|
/// Boxed Constructor
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Constructs a Boxed type from a raw ref.
|
|
/// </remarks>
|
|
|
|
public Boxed (IntPtr raw)
|
|
{
|
|
this.raw = raw;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Handle Property
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Gets a marshallable IntPtr.
|
|
/// </remarks>
|
|
|
|
public virtual IntPtr Handle {
|
|
get {
|
|
return raw;
|
|
}
|
|
set {
|
|
raw = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Raw Property
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Gets or sets a marshallable IntPtr.
|
|
/// </remarks>
|
|
|
|
protected IntPtr Raw {
|
|
get {
|
|
return raw;
|
|
}
|
|
set {
|
|
raw = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// FromNative Method
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Gets a Boxed type from a raw IntPtr.
|
|
/// </remarks>
|
|
|
|
public static GLib.Boxed FromNative (IntPtr raw)
|
|
{
|
|
// FIXME:
|
|
return null;
|
|
}
|
|
}
|
|
}
|