2001-09-21 14:03:17 +00:00
|
|
|
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));
|
|
|
|
}
|
|
|
|
}
|
2001-09-27 17:17:33 +00:00
|
|
|
|
|
|
|
/* FIXME: Fix or kill later.
|
2001-09-25 15:56:50 +00:00
|
|
|
public EventAny Any
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return (EventAll)this;
|
|
|
|
}
|
|
|
|
}
|
2001-09-27 17:17:33 +00:00
|
|
|
public static explicit operator EventAll (Event e)
|
2001-09-25 15:56:50 +00:00
|
|
|
{
|
|
|
|
return Marshal.PtrToStructure(e._event, EventAll);
|
|
|
|
}
|
2001-09-27 17:17:33 +00:00
|
|
|
*/
|
2001-09-25 15:56:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
public struct EventAny
|
|
|
|
{
|
|
|
|
public IntPtr type;
|
|
|
|
public IntPtr window;
|
|
|
|
public SByte send_event;
|
2001-09-21 14:03:17 +00:00
|
|
|
}
|
|
|
|
}
|