mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-22 12:31:09 +00:00
2004-02-18 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide EventScroll * gdk/EventScroll.cs : glue-based manual implementation. * gdk/EventScroll.custom : kill * gdk/gdk-api.xml : regen * gdk/gdk-symbols.xml : manual mapping for EventScroll. * glue/event.cs : expose Scroll struct fields. svn path=/trunk/gtk-sharp/; revision=23222
This commit is contained in:
parent
2665037c0e
commit
1ca02083f6
|
@ -1,3 +1,12 @@
|
||||||
|
2004-02-18 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
|
* gdk/Gdk.metadata : hide EventScroll
|
||||||
|
* gdk/EventScroll.cs : glue-based manual implementation.
|
||||||
|
* gdk/EventScroll.custom : kill
|
||||||
|
* gdk/gdk-api.xml : regen
|
||||||
|
* gdk/gdk-symbols.xml : manual mapping for EventScroll.
|
||||||
|
* glue/event.cs : expose Scroll struct fields.
|
||||||
|
|
||||||
2004-02-18 Mike Kestner <mkestner@ximian.com>
|
2004-02-18 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
* gdk/Gdk.metadata : hide EventButton
|
* gdk/Gdk.metadata : hide EventButton
|
||||||
|
|
89
gdk/EventScroll.cs
Normal file
89
gdk/EventScroll.cs
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
// Gdk.EventScroll.cs - Custom scroll event wrapper
|
||||||
|
//
|
||||||
|
// Author: Mike Kestner <mkestner@ximian.com>
|
||||||
|
//
|
||||||
|
// (c) 2004 Novell, Inc.
|
||||||
|
|
||||||
|
namespace Gdk {
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
public class EventScroll : Event {
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern uint gtksharp_gdk_event_scroll_get_time (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern double gtksharp_gdk_event_scroll_get_x (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern double gtksharp_gdk_event_scroll_get_y (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern double gtksharp_gdk_event_scroll_get_x_root (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern double gtksharp_gdk_event_scroll_get_y_root (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern uint gtksharp_gdk_event_scroll_get_state (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern ScrollDirection gtksharp_gdk_event_scroll_get_direction (IntPtr evt);
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern IntPtr gtksharp_gdk_event_scroll_get_device (IntPtr evt);
|
||||||
|
|
||||||
|
public EventScroll (IntPtr raw) : base (raw) {}
|
||||||
|
|
||||||
|
public uint Time {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_scroll_get_time (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ModifierType State {
|
||||||
|
get {
|
||||||
|
return (ModifierType) gtksharp_gdk_event_scroll_get_state (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double X {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_scroll_get_x (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Y {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_scroll_get_y (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double XRoot {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_scroll_get_x_root (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double YRoot {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_scroll_get_y_root (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScrollDirection Direction {
|
||||||
|
get {
|
||||||
|
return gtksharp_gdk_event_scroll_get_direction (Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Device Device {
|
||||||
|
get {
|
||||||
|
return GLib.Object.GetObject (gtksharp_gdk_event_scroll_get_device (Handle)) as Device;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
//
|
|
||||||
// gdk/EventScroll.custom
|
|
||||||
//
|
|
||||||
// Author: Gustavo Giraldez <gustavo.giraldez@gmx.net>
|
|
||||||
//
|
|
||||||
// Copyright (C) 2004 Gustavo Giraldez.
|
|
||||||
//
|
|
||||||
|
|
||||||
[DllImport("libgdk-win32-2.0-0.dll")]
|
|
||||||
static extern IntPtr gdk_event_get_type();
|
|
||||||
|
|
||||||
public static GLib.GType GType {
|
|
||||||
get {
|
|
||||||
IntPtr raw_ret = gdk_event_get_type();
|
|
||||||
GLib.GType ret = new GLib.GType(raw_ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -66,6 +66,7 @@
|
||||||
<attr path="//struct[@cname='GdkEventAny']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkEventAny']" name="hidden">1</attr>
|
||||||
<attr path="//struct[@cname='GdkEventButton']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkEventButton']" name="hidden">1</attr>
|
||||||
<attr path="//struct[@cname='GdkEventKey']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkEventKey']" name="hidden">1</attr>
|
||||||
|
<attr path="//struct[@cname='GdkEventScroll']" name="hidden">1</attr>
|
||||||
<attr path="//struct[@cname='GdkPixmapObject']" 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='GdkTimeCoord']/field[@cname='axes']" name="array_len">128</attr>
|
||||||
<attr path="//struct[@cname='GdkWindowObject']" name="hidden">1</attr>
|
<attr path="//struct[@cname='GdkWindowObject']" name="hidden">1</attr>
|
||||||
|
|
|
@ -2385,7 +2385,7 @@
|
||||||
<field cname="time" type="guint32" />
|
<field cname="time" type="guint32" />
|
||||||
<field cname="device" type="GdkDevice*" />
|
<field cname="device" type="GdkDevice*" />
|
||||||
</struct>
|
</struct>
|
||||||
<struct name="EventScroll" cname="GdkEventScroll">
|
<struct name="EventScroll" cname="GdkEventScroll" hidden="1">
|
||||||
<field cname="type" type="GdkEventType" />
|
<field cname="type" type="GdkEventType" />
|
||||||
<field cname="window" type="GdkWindow*" />
|
<field cname="window" type="GdkWindow*" />
|
||||||
<field cname="send_event" type="gint8" />
|
<field cname="send_event" type="gint8" />
|
||||||
|
|
|
@ -4,5 +4,6 @@
|
||||||
<symbol type="manual" cname="GdkEventAny" name="Gdk.Event"/>
|
<symbol type="manual" cname="GdkEventAny" name="Gdk.Event"/>
|
||||||
<symbol type="manual" cname="GdkEventButton" name="Gdk.EventButton"/>
|
<symbol type="manual" cname="GdkEventButton" name="Gdk.EventButton"/>
|
||||||
<symbol type="manual" cname="GdkEventKey" name="Gdk.EventKey"/>
|
<symbol type="manual" cname="GdkEventKey" name="Gdk.EventKey"/>
|
||||||
|
<symbol type="manual" cname="GdkEventScroll" name="Gdk.EventScroll"/>
|
||||||
</api>
|
</api>
|
||||||
|
|
||||||
|
|
56
glue/event.c
56
glue/event.c
|
@ -28,6 +28,14 @@ gdouble gtksharp_gdk_event_button_get_x_root (GdkEventButton *event);
|
||||||
gdouble gtksharp_gdk_event_button_get_y_root (GdkEventButton *event);
|
gdouble gtksharp_gdk_event_button_get_y_root (GdkEventButton *event);
|
||||||
gdouble* gtksharp_gdk_event_button_get_axes (GdkEventButton *event);
|
gdouble* gtksharp_gdk_event_button_get_axes (GdkEventButton *event);
|
||||||
GdkDevice* gtksharp_gdk_event_button_get_device (GdkEventButton *event);
|
GdkDevice* gtksharp_gdk_event_button_get_device (GdkEventButton *event);
|
||||||
|
guint32 gtksharp_gdk_event_scroll_get_time (GdkEventScroll *event);
|
||||||
|
guint gtksharp_gdk_event_scroll_get_state (GdkEventScroll *event);
|
||||||
|
guint gtksharp_gdk_event_scroll_get_scroll_direction (GdkEventScroll *event);
|
||||||
|
gdouble gtksharp_gdk_event_scroll_get_x (GdkEventScroll *event);
|
||||||
|
gdouble gtksharp_gdk_event_scroll_get_y (GdkEventScroll *event);
|
||||||
|
gdouble gtksharp_gdk_event_scroll_get_x_root (GdkEventScroll *event);
|
||||||
|
gdouble gtksharp_gdk_event_scroll_get_y_root (GdkEventScroll *event);
|
||||||
|
GdkDevice* gtksharp_gdk_event_scroll_get_device (GdkEventScroll *event);
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
GdkEventType
|
GdkEventType
|
||||||
|
@ -132,3 +140,51 @@ gtksharp_gdk_event_button_get_axes (GdkEventButton *event)
|
||||||
return event->axes;
|
return event->axes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guint32
|
||||||
|
gtksharp_gdk_event_scroll_get_time (GdkEventScroll *event)
|
||||||
|
{
|
||||||
|
return event->time;
|
||||||
|
}
|
||||||
|
|
||||||
|
guint
|
||||||
|
gtksharp_gdk_event_scroll_get_state (GdkEventScroll *event)
|
||||||
|
{
|
||||||
|
return event->state;
|
||||||
|
}
|
||||||
|
|
||||||
|
GdkScrollDirection
|
||||||
|
gtksharp_gdk_event_scroll_get_direction (GdkEventScroll *event)
|
||||||
|
{
|
||||||
|
return event->direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
GdkDevice*
|
||||||
|
gtksharp_gdk_event_scroll_get_device (GdkEventScroll *event)
|
||||||
|
{
|
||||||
|
return event->device;
|
||||||
|
}
|
||||||
|
|
||||||
|
gdouble
|
||||||
|
gtksharp_gdk_event_scroll_get_x (GdkEventScroll *event)
|
||||||
|
{
|
||||||
|
return event->x;
|
||||||
|
}
|
||||||
|
|
||||||
|
gdouble
|
||||||
|
gtksharp_gdk_event_scroll_get_y (GdkEventScroll *event)
|
||||||
|
{
|
||||||
|
return event->y;
|
||||||
|
}
|
||||||
|
|
||||||
|
gdouble
|
||||||
|
gtksharp_gdk_event_scroll_get_x_root (GdkEventScroll *event)
|
||||||
|
{
|
||||||
|
return event->x_root;
|
||||||
|
}
|
||||||
|
|
||||||
|
gdouble
|
||||||
|
gtksharp_gdk_event_scroll_get_y_root (GdkEventScroll *event)
|
||||||
|
{
|
||||||
|
return event->y_root;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue