Merge pull request #38 from cra0zy/deltascroll

Add DeltaX and DeltaY to Gdk.EventScroll (fixes #37)
This commit is contained in:
Harry 2018-04-05 23:33:45 +02:00 committed by GitHub
commit 8a5daed3bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}
}
}
}