Ryujinx-GtkSharp/gdk/Event.cs
Mike Kestner 25000abee7 2001-09-27 Mike Kestner <mkestner@speakeasy.net>
*.cs : Added .dll extension to a load of DllImports.
	* makefile : now can make the project with one make windows and on
	both NT and Win98.
	* gdk/Event.cs : Fixed some invalid symbol names and commented out a
	load of stuff.
	* gdk/SimpleEvent.cs : Relocated file from unnecessary subdir and fixed
	several event keyword clashing bugs. Need to relocate the EventArgs
	class out of here into its own file. Fixed loads of typos.
	* glib/Object.cs : Killed the Constructor, this should be a purely
	abstract class. made Events property public until I can fix the Signal
	proxying system's broken reliance on it.
	* glib/SimpleSignal.cs : Relocated, namespaces, and named this Class.
	Loads of bugfixes. Still doesn't work worth a damn, but it builds.
	* glib/TypeFundamentals.cs : New enum for use in the Value code.
	* glib/Value.cs : Implemented a more opaque approach with heap allocated
	memory and g_value_init and friends.  Still doesn't work.  Will probably
	switch to a more C# like approach and avoid GValues altogether.
	* gtk/Button.cs : Commented out some brokeness until I can get around
	to fixing it later.
	* gtk/Widget.cs : Commented out a bunch of the new signal stuff until
	I get around to it.
	* gtk/Window.cs (Title): using g_object_set until I work out the
	details of the new Value/SetProperty system.  It looks like g_object_set
	will end up being easier to use via PInvoke.

svn path=/trunk/gtk-sharp/; revision=1008
2001-09-27 17:17:33 +00:00

87 lines
1.4 KiB
C#

namespace Gdk {
using System;
using System.Runtime.InteropServices;
public enum EventType
{
Nothing = -1,
Delete = 0,
Destroy = 1,
Expose = 2,
MotionNotify = 3,
ButtonPress = 4,
TwoButtonPress = 5,
ThreeButtonPress = 6,
ButtonRelease = 7,
KeyPress = 8,
KeyRelease = 9,
EnterNotify = 10,
LeaveNotify = 11,
FocusChange = 12,
Configure = 13,
Map = 14,
Unmap = 15,
PropertyNotify = 16,
SelectionClear = 17,
SelectionRequest = 18,
SelectionNotify = 19,
ProximityIn = 20,
ProximityOut = 21,
DragEnter = 22,
DragLeave = 23,
DragMotion = 24,
DragStatus = 25,
DropStart = 26,
DropFinished = 27,
ClientEvent = 28,
VisibilityNotify = 29,
NoExpose = 30,
Scroll = 31,
WindowState = 32,
Setting = 33
}
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;
}
}