|
Ultralight C API 2.0.0
|
Mouse event interface.
#include <Ultralight/CAPI/CAPI_MouseEvent.h>
This file defines the C API for mouse events.
Functions | |
| ULMouseEvent | ulCreateMouseEvent (ULMouseEventType type, int x, int y, ULMouseButton button) |
| Create a mouse event. | |
| void | ulDestroyMouseEvent (ULMouseEvent evt) |
| Destroy a mouse event created by ulCreateMouseEvent(). | |
| ULMouseEventType | ulMouseEventGetType (ULMouseEvent evt) |
| Get the type of a mouse event. | |
| int | ulMouseEventGetX (ULMouseEvent evt) |
| Get the x-position of the mouse. | |
| int | ulMouseEventGetY (ULMouseEvent evt) |
| Get the y-position of the mouse. | |
| ULMouseButton | ulMouseEventGetButton (ULMouseEvent evt) |
| Get the mouse button that was pressed or released. | |
| ULMouseEvent ulCreateMouseEvent | ( | ULMouseEventType | type, |
| int | x, | ||
| int | y, | ||
| ULMouseButton | button ) |
Create a mouse event.
Modifier keys reported to the page come from the last key event fired on the View, so you should forward modifier key presses and releases as key events. A right-button click also fires contextmenu on the page (after the release on Windows, after the press elsewhere); the library shows no menu of its own.
| type | The type of mouse event. |
| x | The current x-position of the mouse, in logical pixels relative to the View. |
| y | The current y-position of the mouse, in logical pixels relative to the View. |
| button | The mouse button that was pressed/released, if any. |
| void ulDestroyMouseEvent | ( | ULMouseEvent | evt | ) |
Destroy a mouse event created by ulCreateMouseEvent().
| ULMouseButton ulMouseEventGetButton | ( | ULMouseEvent | evt | ) |
Get the mouse button that was pressed or released.
| evt | The mouse event. |
| ULMouseEventType ulMouseEventGetType | ( | ULMouseEvent | evt | ) |
Get the type of a mouse event.
| evt | The mouse event. |
| int ulMouseEventGetX | ( | ULMouseEvent | evt | ) |
Get the x-position of the mouse.
| evt | The mouse event. |
| int ulMouseEventGetY | ( | ULMouseEvent | evt | ) |
Get the y-position of the mouse.
| evt | The mouse event. |