mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 18:05:29 +00:00
* glib/Object.cs: Changed getData, setData to a single Data property
Different keys are allowed now. svn path=/trunk/gtk-sharp/; revision=15915
This commit is contained in:
parent
35079d1f3d
commit
55683e5118
|
@ -1,3 +1,8 @@
|
|||
2003-07-05 Martin Willemoes Hansen <mwh@sysrq.dk>
|
||||
|
||||
* glib/Object.cs: Changed getData, setData to a single Data property
|
||||
Different keys are allowed now.
|
||||
|
||||
2003-07-02 Shane Hyde <shane@enactive.org>
|
||||
|
||||
* generator/GenBase.cs : put #line directive after the
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace GLib {
|
|||
protected bool needs_ref = true;
|
||||
EventHandlerList _events;
|
||||
bool disposed = false;
|
||||
Hashtable Data;
|
||||
Hashtable data;
|
||||
static Hashtable Objects = new Hashtable();
|
||||
static Queue PendingDestroys = new Queue ();
|
||||
static bool idle_queued;
|
||||
|
@ -327,35 +327,20 @@ namespace GLib {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetData Method
|
||||
/// Data property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Accesses arbitrary data storage on the Object.
|
||||
/// Stores and Accesses arbitrary data on the Object.
|
||||
/// </remarks>
|
||||
|
||||
public object GetData (string key)
|
||||
{
|
||||
if (Data == null)
|
||||
return String.Empty;
|
||||
|
||||
return Data [key];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SetData Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Stores arbitrary data on the Object.
|
||||
/// </remarks>
|
||||
|
||||
public void SetData (string key, object val)
|
||||
{
|
||||
if (Data == null)
|
||||
Data = new Hashtable ();
|
||||
|
||||
Data [key] = val;
|
||||
public Hashtable Data {
|
||||
get {
|
||||
if (data == null)
|
||||
data = new Hashtable ();
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("libgobject-2.0-0.dll")]
|
||||
|
|
Loading…
Reference in a new issue