Kill dead EnumWrapper type from the early days.

* glib/EnumWrapper.cs: remove
* glib/Makefile.am: remove file
* glib/Value.cs: remove obsolete EnumWrapper cast/ctor
This commit is contained in:
Mike Kestner 2011-02-10 20:51:09 -06:00
parent 86e4b4c170
commit 72cca1f93f
3 changed files with 0 additions and 78 deletions

View File

@ -1,42 +0,0 @@
// EnumWrapper.cs - Class to hold arbitrary glib enums
//
// Author: Rachel Hestilow <hestilow@ximian.com>
//
// Copyright (c) 2002 Rachel Hestilow
//
// 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.
namespace GLib {
using System;
using System.Runtime.InteropServices;
[Obsolete ("Replaced by direct enum type casts to/from GLib.Value")]
public class EnumWrapper {
int val;
public bool flags;
public EnumWrapper (int val, bool flags) {
this.val = val;
this.flags = flags;
}
public static explicit operator int (EnumWrapper wrap) {
return wrap.val;
}
}
}

View File

@ -25,7 +25,6 @@ sources = \
DefaultSignalHandlerAttribute.cs \
DelegateWrapper.cs \
DestroyNotify.cs \
EnumWrapper.cs \
ExceptionManager.cs \
FileUtils.cs \
GException.cs \

View File

@ -110,19 +110,6 @@ namespace GLib {
g_value_set_uint64 (ref this, val);
}
[Obsolete ("Replaced by Value(object) constructor")]
public Value (EnumWrapper wrap, string type_name)
{
type = IntPtr.Zero;
pad1 = new Padding ();
pad2 = new Padding ();
g_value_init (ref this, GType.FromName (type_name).Val);
if (wrap.flags)
g_value_set_flags (ref this, (uint) (int) wrap);
else
g_value_set_enum (ref this, (int) wrap);
}
public Value (float val) : this (GType.Float)
{
g_value_set_float (ref this, val);
@ -177,19 +164,6 @@ namespace GLib {
InitForProperty (obj, prop_name);
}
[Obsolete]
public Value (GLib.Object obj, string prop_name, EnumWrapper wrap)
{
type = IntPtr.Zero;
pad1 = new Padding ();
pad2 = new Padding ();
InitForProperty (obj.NativeType, prop_name);
if (wrap.flags)
g_value_set_flags (ref this, (uint) (int) wrap);
else
g_value_set_enum (ref this, (int) wrap);
}
[Obsolete]
public Value (IntPtr obj, string prop_name, Opaque val)
{
@ -277,15 +251,6 @@ namespace GLib {
return g_value_get_uint64 (ref val);
}
[Obsolete ("Replaced by Enum cast")]
public static explicit operator EnumWrapper (Value val)
{
if (val.HoldsFlags)
return new EnumWrapper ((int)g_value_get_flags (ref val), true);
else
return new EnumWrapper (g_value_get_enum (ref val), false);
}
public static explicit operator Enum (Value val)
{
if (val.HoldsFlags)