mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 19:05:28 +00:00
34cf63f0cc
* parser/Gtk.metadata: Change gtk_label_new to be the preferred constructor. * gdk/Event.cs: Add "IsValid" property (sometimes NULL events get sent in signals). * sample/GnomeHelloWorld.cs: Check to make sure iconlist event is valid. svn path=/trunk/gtk-sharp/; revision=5462
35 lines
594 B
C#
35 lines
594 B
C#
// Gdk.Event.cs - Custom event wrapper
|
|
//
|
|
// Author: Rachel Hestilow <hestilow@ximian.com>
|
|
//
|
|
// (c) 2002 Rachel Hestilow
|
|
|
|
|
|
namespace Gdk {
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Runtime.InteropServices;
|
|
|
|
public class Event : GLib.Object {
|
|
|
|
[DllImport("gtksharpglue")]
|
|
static extern EventType gtksharp_gdk_event_get_event_type (IntPtr evt);
|
|
|
|
public Event(IntPtr raw) : base(raw) {}
|
|
|
|
public EventType Type {
|
|
get {
|
|
return gtksharp_gdk_event_get_event_type (Handle);
|
|
}
|
|
}
|
|
|
|
public bool IsValid {
|
|
get {
|
|
return (Handle != IntPtr.Zero);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|