added clickCount to lime's haxe files
cffi binding are uneeded because they pass dynamics, added the information for NativeApplication, Window, Application
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package lime._internal.backend.native;
|
||||
|
||||
import haxe.Int64;
|
||||
import haxe.Timer;
|
||||
import lime._internal.backend.native.NativeCFFI;
|
||||
import lime.app.Application;
|
||||
@@ -335,10 +336,10 @@ class NativeApplication
|
||||
switch (mouseEventInfo.type)
|
||||
{
|
||||
case MOUSE_DOWN:
|
||||
window.onMouseDown.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button);
|
||||
window.onMouseDown.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button, mouseEventInfo.clickCount);
|
||||
|
||||
case MOUSE_UP:
|
||||
window.onMouseUp.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button);
|
||||
window.onMouseUp.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button, mouseEventInfo.clickCount);
|
||||
|
||||
case MOUSE_MOVE:
|
||||
window.onMouseMove.dispatch(mouseEventInfo.x, mouseEventInfo.y);
|
||||
@@ -779,6 +780,7 @@ class NativeApplication
|
||||
@:keep /*private*/ class MouseEventInfo
|
||||
{
|
||||
public var button:Int;
|
||||
public var clickCount:Int;
|
||||
public var movementX:Float;
|
||||
public var movementY:Float;
|
||||
public var type:MouseEventType;
|
||||
@@ -786,7 +788,7 @@ class NativeApplication
|
||||
public var x:Float;
|
||||
public var y:Float;
|
||||
|
||||
public function new(type:MouseEventType = null, windowID:Int = 0, x:Float = 0, y:Float = 0, button:Int = 0, movementX:Float = 0, movementY:Float = 0)
|
||||
public function new(type:MouseEventType = null, windowID:Int = 0, x:Float = 0, y:Float = 0, button:Int = 0, movementX:Float = 0, movementY:Float = 0, clickCount:Int = 0)
|
||||
{
|
||||
this.type = type;
|
||||
this.windowID = 0;
|
||||
@@ -795,6 +797,7 @@ class NativeApplication
|
||||
this.button = button;
|
||||
this.movementX = movementX;
|
||||
this.movementY = movementY;
|
||||
this.clickCount = clickCount;
|
||||
}
|
||||
|
||||
public function clone():MouseEventInfo
|
||||
|
||||
@@ -260,7 +260,7 @@ class Application extends Module
|
||||
@param y The current y coordinate of the mouse
|
||||
@param button The ID of the mouse button that was pressed
|
||||
**/
|
||||
public function onMouseDown(x:Float, y:Float, button:MouseButton):Void {}
|
||||
public function onMouseDown(x:Float, y:Float, button:MouseButton, clickCount:Int):Void {}
|
||||
|
||||
/**
|
||||
Called when a mouse move event is fired on the primary window
|
||||
@@ -282,7 +282,7 @@ class Application extends Module
|
||||
@param y The current y coordinate of the mouse
|
||||
@param button The ID of the button that was released
|
||||
**/
|
||||
public function onMouseUp(x:Float, y:Float, button:MouseButton):Void {}
|
||||
public function onMouseUp(x:Float, y:Float, button:MouseButton, clickCount:Int):Void {}
|
||||
|
||||
/**
|
||||
Called when a mouse wheel event is fired on the primary window
|
||||
|
||||
@@ -67,10 +67,10 @@ class Window
|
||||
public var onLeave(default, null) = new Event<Void->Void>();
|
||||
public var onMaximize(default, null) = new Event<Void->Void>();
|
||||
public var onMinimize(default, null) = new Event<Void->Void>();
|
||||
public var onMouseDown(default, null) = new Event<Float->Float->MouseButton->Void>();
|
||||
public var onMouseDown(default, null) = new Event<Float->Float->MouseButton->Int->Void>();
|
||||
public var onMouseMove(default, null) = new Event<Float->Float->Void>();
|
||||
public var onMouseMoveRelative(default, null) = new Event<Float->Float->Void>();
|
||||
public var onMouseUp(default, null) = new Event<Float->Float->Int->Void>();
|
||||
public var onMouseUp(default, null) = new Event<Float->Float->Int->Int->Void>();
|
||||
public var onMouseWheel(default, null) = new Event<Float->Float->MouseWheelMode->Void>();
|
||||
public var onMove(default, null) = new Event<Float->Float->Void>();
|
||||
public var onRender(default, null) = new Event<RenderContext->Void>();
|
||||
|
||||
Reference in New Issue
Block a user