some more API docs

This commit is contained in:
Josh Tynjala
2025-09-12 12:24:38 -07:00
parent 86283df77e
commit afbac6d35f
3 changed files with 59 additions and 0 deletions

View File

@@ -2,6 +2,14 @@ package lime.ui;
import lime._internal.backend.native.NativeCFFI;
/**
Used by keyboard event listeners to identify which key was pressed
down or released.
@see `lime.ui.Window.onKeyDown`
@see `lime.ui.Window.onKeyUp`
@see `lime.ui.ScanCode`
**/
@:access(lime._internal.backend.native.NativeCFFI)
#if (haxe_ver >= 4.0) enum #else @:enum #end abstract KeyCode(Int) from Int to Int from UInt to UInt
{

View File

@@ -2,6 +2,14 @@ package lime.ui;
import lime._internal.backend.native.NativeCFFI;
/**
May be used to identify the scan code associated with the `KeyCode` passed
to keyboard event listeners.
@see `lime.ui.Window.onKeyDown`
@see `lime.ui.Window.onKeyUp`
@see `lime.ui.KeyCode`
**/
@:access(lime._internal.backend.native.NativeCFFI)
@:access(lime.ui.KeyCode)
#if (haxe_ver >= 4.0) enum #else @:enum #end abstract ScanCode(Int) from Int to Int from UInt to UInt

View File

@@ -67,25 +67,68 @@ class Window
public var onFocusOut(default, null) = new Event<Void->Void>();
public var onFullscreen(default, null) = new Event<Void->Void>();
public var onHide(default, null) = new Event<Void->Void>();
/**
Fired when the user presses a key down when this window has focus.
**/
public var onKeyDown(default, null) = new Event<KeyCode->KeyModifier->Void>();
/**
Fired when the user releases a key that was down.
**/
public var onKeyUp(default, null) = new Event<KeyCode->KeyModifier->Void>();
public var onLeave(default, null) = new Event<Void->Void>();
/**
Fired when the window is maximized.
**/
public var onMaximize(default, null) = new Event<Void->Void>();
/**
Fired when the window is minimized.
**/
public var onMinimize(default, null) = new Event<Void->Void>();
/**
Fired when the user pressed a mouse button down.
**/
public var onMouseDown(default, null) = new Event<Float->Float->MouseButton->Void>();
/**
Fired when the mouse is moved over the window.
**/
public var onMouseMove(default, null) = new Event<Float->Float->Void>();
public var onMouseMoveRelative(default, null) = new Event<Float->Float->Void>();
/**
Fired when the user releases a mouse button that was pressed down.
**/
public var onMouseUp(default, null) = new Event<Float->Float->Int->Void>();
/**
Fired when the user interacts with the mouse wheel.
**/
public var onMouseWheel(default, null) = new Event<Float->Float->MouseWheelMode->Void>();
/**
Fired when the window is moved to a new position.
**/
public var onMove(default, null) = new Event<Float->Float->Void>();
public var onRender(default, null) = new Event<RenderContext->Void>();
public var onRenderContextLost(default, null) = new Event<Void->Void>();
public var onRenderContextRestored(default, null) = new Event<RenderContext->Void>();
/**
Fired when the window is resized with new dimensions.
**/
public var onResize(default, null) = new Event<Int->Int->Void>();
public var onRestore(default, null) = new Event<Void->Void>();
public var onShow(default, null) = new Event<Void->Void>();
public var onTextEdit(default, null) = new Event<String->Int->Int->Void>();
public var onTextInput(default, null) = new Event<String->Void>();
public var opacity(get, set):Float;
public var parameters:Dynamic;
public var resizable(get, set):Bool;