main.cesium.ScreenSpaceEventHandler.kt Maven / Gradle / Ivy
// Automatically generated - do not modify!
package cesium
/**
* Handles user input events. Custom functions can be added to be executed on
* when the user enters input.
* @see Online Documentation
*
* @constructor
* @param [element] The element to add events to.
* Default value - `document`
* @see Online Documentation
*/
@JsName("\$cesium__ScreenSpaceEventHandler")
external class ScreenSpaceEventHandler(element: org.w3c.dom.HTMLCanvasElement? = definedExternally) {
/**
* Set a function to be executed on an input event.
* @param [action] Function to be executed when the input event occurs.
* @param [type] The ScreenSpaceEventType of input event.
* @param [modifier] A KeyboardEventModifier key that is held when a `type`
* event occurs.
* @see Online Documentation
*/
fun setInputAction(
action: Function<*>,
type: Double,
modifier: Double? = definedExternally,
)
/**
* Returns the function to be executed on an input event.
* @param [type] The ScreenSpaceEventType of input event.
* @param [modifier] A KeyboardEventModifier key that is held when a `type`
* event occurs.
* @return The function to be executed on an input event.
* @see Online Documentation
*/
fun getInputAction(
type: Double,
modifier: Double? = definedExternally,
): Function<*>
/**
* Removes the function to be executed on an input event.
* @param [type] The ScreenSpaceEventType of input event.
* @param [modifier] A KeyboardEventModifier key that is held when a `type`
* event occurs.
* @see Online Documentation
*/
fun removeInputAction(
type: Double,
modifier: Double? = definedExternally,
)
/**
* Returns true if this object was destroyed; otherwise, false.
*
* If this object was destroyed, it should not be used; calling any function other than
* `isDestroyed` will result in a [DeveloperError] exception.
* @return `true` if this object was destroyed; otherwise, `false`.
* @see Online Documentation
*/
fun isDestroyed(): Boolean
/**
* Removes listeners held by this object.
*
* Once an object is destroyed, it should not be used; calling any function other than
* `isDestroyed` will result in a [DeveloperError] exception. Therefore,
* assign the return value (`undefined`) to the object as done in the example.
* ```
* handler = handler && handler.destroy();
* ```
* @see Online Documentation
*/
fun destroy()
companion object {
/**
* The amount of time, in milliseconds, that mouse events will be disabled after
* receiving any touch events, such that any emulated mouse events will be ignored.
* @see Online Documentation
*/
var mouseEmulationIgnoreMilliseconds: Double
/**
* The amount of time, in milliseconds, before a touch on the screen becomes a
* touch and hold.
* @see Online Documentation
*/
var touchHoldDelayMilliseconds: Double
}
}