mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 23:55:26 +00:00
c3b0ed58d9
* 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
48 lines
742 B
C#
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;
|
|
}
|
|
}
|