mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 00:05:35 +00:00
Merge pull request #38 from cra0zy/deltascroll
Add DeltaX and DeltaY to Gdk.EventScroll (fixes #37)
This commit is contained in:
commit
8a5daed3bc
|
@ -41,6 +41,8 @@ namespace Gdk {
|
|||
public IntPtr device;
|
||||
public double x_root;
|
||||
public double y_root;
|
||||
public double delta_x;
|
||||
public double delta_y;
|
||||
}
|
||||
|
||||
NativeStruct Native {
|
||||
|
@ -101,6 +103,15 @@ namespace Gdk {
|
|||
}
|
||||
}
|
||||
|
||||
public double DeltaX {
|
||||
get { return Native.delta_x; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.delta_x = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double Y {
|
||||
get { return Native.y; }
|
||||
set {
|
||||
|
@ -118,6 +129,15 @@ namespace Gdk {
|
|||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
|
||||
public double DeltaY {
|
||||
get { return Native.delta_y; }
|
||||
set {
|
||||
NativeStruct native = Native;
|
||||
native.delta_y = value;
|
||||
Marshal.StructureToPtr (native, Handle, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue