Add DeltaX and DeltaY to Gdk.EventScroll (fixes #37)

This commit is contained in:
cra0zy 2018-04-05 23:25:19 +02:00
parent 1d5d482126
commit 3bfa6e7295

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