Ryujinx-GtkSharp/gdk/Event.cs
Mike Kestner c3b0ed58d9 2001-10-30 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : streamline mkdir stuff.  Prune the object
	list back to just Window for now. Suppress generation of the Prop
	get/set accessor methods.
	* codegen/gdk-types.defs : Updated the 2button/3button event types
	since I don't feel like automangling them now.
	* gdk/Event.cs : Killed the now redundant EventType declaration.
	* glib/Object.cs : Override the Equals and GetHashCode methods.

svn path=/trunk/gtk-sharp/; revision=1231
2001-10-31 01:31:05 +00:00

48 lines
742 B
C#

namespace Gdk {
using System;
using System.Runtime.InteropServices;
public class Event
{
public Event(IntPtr e)
{
_event = e;
}
protected IntPtr _event;
public EventType Type
{
get
{
IntPtr ptr = Marshal.ReadIntPtr (_event);
return (EventType)((int)ptr);
}
set
{
Marshal.WriteIntPtr(_event, new IntPtr((int)value));
}
}
/* FIXME: Fix or kill later.
public EventAny Any
{
get
{
return (EventAll)this;
}
}
public static explicit operator EventAll (Event e)
{
return Marshal.PtrToStructure(e._event, EventAll);
}
*/
}
[StructLayout(LayoutKind.Sequential)]
public struct EventAny
{
public IntPtr type;
public IntPtr window;
public SByte send_event;
}
}