2002-01-17 00:26:46 +00:00
|
|
|
// GtkSharp.Boxed.cs - Base class for deriving marshallable structures.
|
|
|
|
//
|
|
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
|
|
//
|
2004-06-25 18:42:19 +00:00
|
|
|
// Copyright (c) 2001-2002 Mike Kestner
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of version 2 of the Lesser GNU General
|
|
|
|
// Public License as published by the Free Software Foundation.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this program; if not, write to the
|
|
|
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
// Boston, MA 02111-1307, USA.
|
2002-01-17 00:26:46 +00:00
|
|
|
|
2002-05-02 21:57:41 +00:00
|
|
|
namespace GLib {
|
2002-01-17 00:26:46 +00:00
|
|
|
|
|
|
|
using System;
|
|
|
|
|
2004-10-21 01:08:10 +00:00
|
|
|
[Obsolete]
|
2002-07-26 06:08:52 +00:00
|
|
|
public class Boxed {
|
2002-07-30 23:02:12 +00:00
|
|
|
object obj;
|
|
|
|
IntPtr raw;
|
2002-01-17 00:26:46 +00:00
|
|
|
|
2002-07-26 06:08:52 +00:00
|
|
|
public Boxed (object o)
|
2002-02-19 19:46:44 +00:00
|
|
|
{
|
2003-02-14 01:16:05 +00:00
|
|
|
this.obj = o;
|
2002-07-30 23:02:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public Boxed (IntPtr ptr)
|
|
|
|
{
|
|
|
|
this.raw = ptr;
|
2002-02-19 19:46:44 +00:00
|
|
|
}
|
|
|
|
|
2002-07-30 23:02:12 +00:00
|
|
|
public virtual IntPtr Handle {
|
2002-05-02 21:57:41 +00:00
|
|
|
get {
|
|
|
|
return raw;
|
|
|
|
}
|
2002-06-21 Rachel Hestilow <hestilow@ximian.com>
* 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
2002-06-21 17:15:19 +00:00
|
|
|
set {
|
|
|
|
raw = value;
|
|
|
|
}
|
2002-02-19 19:46:44 +00:00
|
|
|
}
|
2002-07-30 23:02:12 +00:00
|
|
|
|
|
|
|
public static explicit operator System.IntPtr (Boxed boxed) {
|
|
|
|
return boxed.Handle;
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual object Obj {
|
|
|
|
get {
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
set {
|
|
|
|
obj = value;
|
|
|
|
}
|
|
|
|
}
|
2002-01-17 00:26:46 +00:00
|
|
|
}
|
|
|
|
}
|