mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 14:55:40 +00:00
2004-02-16 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide EventAny * gdk/Event.cs : make this a full EventAny implementation. * gdk/gdk-api.xml : regen * gdk/gdk-symbols.xml : map EventAny to Gdk.Event. * glue/event.cs : expose window and send_event fields. svn path=/trunk/gtk-sharp/; revision=23134
This commit is contained in:
parent
b44b408e52
commit
ad8ca4e74d
|
@ -1,3 +1,11 @@
|
|||
2004-02-16 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* gdk/Gdk.metadata : hide EventAny
|
||||
* gdk/Event.cs : make this a full EventAny implementation.
|
||||
* gdk/gdk-api.xml : regen
|
||||
* gdk/gdk-symbols.xml : map EventAny to Gdk.Event.
|
||||
* glue/event.cs : expose window and send_event fields.
|
||||
|
||||
2004-02-14 Todd Berman <tberman@sevenl.net>
|
||||
|
||||
* gtk/Gtk.metadata : hide Widget.SetState
|
||||
|
|
48
gdk/Event.cs
48
gdk/Event.cs
|
@ -1,22 +1,48 @@
|
|||
// Gdk.Event.cs - Custom event wrapper
|
||||
//
|
||||
// Author: Rachel Hestilow <hestilow@ximian.com>
|
||||
// Authors: Rachel Hestilow <hestilow@ximian.com>
|
||||
// Mike Kestner <mkestner@ximian.com>
|
||||
//
|
||||
// (c) 2002 Rachel Hestilow
|
||||
|
||||
// (c) 2004 Novell, Inc.
|
||||
|
||||
namespace Gdk {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class Event : GLib.Boxed {
|
||||
public class Event : GLib.IWrapper {
|
||||
|
||||
[DllImport("gtksharpglue")]
|
||||
static extern EventType gtksharp_gdk_event_get_event_type (IntPtr evt);
|
||||
|
||||
public Event(IntPtr raw) : base(raw) {}
|
||||
[DllImport("gtksharpglue")]
|
||||
static extern IntPtr gtksharp_gdk_event_get_window (IntPtr evt);
|
||||
|
||||
[DllImport("gtksharpglue")]
|
||||
static extern sbyte gtksharp_gdk_event_get_send_event (IntPtr evt);
|
||||
|
||||
[DllImport("libgdk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gdk_event_get_type ();
|
||||
|
||||
IntPtr raw;
|
||||
|
||||
public Event(IntPtr raw)
|
||||
{
|
||||
this.raw = raw;
|
||||
}
|
||||
|
||||
public IntPtr Handle {
|
||||
get {
|
||||
return raw;
|
||||
}
|
||||
}
|
||||
|
||||
public static GLib.GType GType {
|
||||
get {
|
||||
return new GLib.GType (gdk_event_get_type ());
|
||||
}
|
||||
}
|
||||
|
||||
public EventType Type {
|
||||
get {
|
||||
|
@ -24,11 +50,17 @@ namespace Gdk {
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsValid {
|
||||
public Window Window {
|
||||
get {
|
||||
return (Handle != IntPtr.Zero);
|
||||
return GLib.Object.GetObject (gtksharp_gdk_event_get_window (Handle)) as Window;
|
||||
}
|
||||
}
|
||||
|
||||
public bool SendEvent {
|
||||
get {
|
||||
return gtksharp_gdk_event_get_send_event (Handle) == 0 ? false : true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
<attr path="//object[@cname='GdkWindow']/method[@name='GetToplevels']" name="hidden">1</attr>
|
||||
<attr path="//object[@cname='GdkWindow']/method[@name='PeekChildren']" name="hidden">1</attr>
|
||||
<attr path="//object[@cname='GdkWindow']/method[@name='SetIconList']" name="hidden">1</attr>
|
||||
<attr path="//struct[@cname='GdkEventAny']" name="hidden">1</attr>
|
||||
<attr path="//struct[@cname='GdkPixmapObject']" name="hidden">1</attr>
|
||||
<attr path="//struct[@cname='GdkTimeCoord']/field[@cname='axes']" name="array_len">128</attr>
|
||||
<attr path="//struct[@cname='GdkWindowObject']" name="hidden">1</attr>
|
||||
|
|
|
@ -2265,7 +2265,7 @@
|
|||
</parameters>
|
||||
</callback>
|
||||
</struct>
|
||||
<struct name="EventAny" cname="GdkEventAny">
|
||||
<struct name="EventAny" cname="GdkEventAny" hidden="1">
|
||||
<field cname="type" type="GdkEventType" />
|
||||
<field cname="window" type="GdkWindow*" />
|
||||
<field cname="send_event" type="gint8" />
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<api>
|
||||
<symbol type="manual" cname="GdkEvent" name="Gdk.Event"/>
|
||||
<symbol type="manual" cname="GdkEventAny" name="Gdk.Event"/>
|
||||
</api>
|
||||
|
||||
|
|
18
glue/event.c
18
glue/event.c
|
@ -1,8 +1,10 @@
|
|||
/* event.c : Glue to access fields in GdkEvent.
|
||||
*
|
||||
* Author: Rachel Hestilow <hestilow@ximian.com>
|
||||
* Authors: Rachel Hestilow <hestilow@ximian.com>
|
||||
* Mike Kestner <mkestner@ximian.com>
|
||||
*
|
||||
* <c> 2002 Rachel Hestilow, Mike Kestner
|
||||
* (c) 2004 Novell, Inc.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -10,6 +12,8 @@
|
|||
|
||||
/* Forward declarations */
|
||||
GdkEventType gtksharp_gdk_event_get_event_type (GdkEvent *event);
|
||||
GdkWindow* gtksharp_gdk_event_get_window (GdkEventAny *event);
|
||||
gint8 gtksharp_gdk_event_get_send_event (GdkEventAny *event);
|
||||
/* */
|
||||
|
||||
GdkEventType
|
||||
|
@ -18,3 +22,15 @@ gtksharp_gdk_event_get_event_type (GdkEvent *event)
|
|||
return event->type;
|
||||
}
|
||||
|
||||
GdkWindow*
|
||||
gtksharp_gdk_event_get_window (GdkEventAny *event)
|
||||
{
|
||||
return event->window;
|
||||
}
|
||||
|
||||
gint8
|
||||
gtksharp_gdk_event_get_send_event (GdkEventAny *event)
|
||||
{
|
||||
return event->send_event;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue