|
Ultralight C API 2.0.0
|
Scroll event interface.
#include <Ultralight/CAPI/CAPI_ScrollEvent.h>
This file defines the C API for scroll events.
Functions | |
| ULScrollEvent | ulCreateScrollEvent (ULScrollEventType type, int delta_x, int delta_y, int x, int y) |
| Create a scroll event. | |
| void | ulDestroyScrollEvent (ULScrollEvent evt) |
| Destroy a scroll event created by ulCreateScrollEvent(). | |
| ULScrollEventType | ulScrollEventGetType (ULScrollEvent evt) |
| Get the scroll granularity type of a scroll event. | |
| int | ulScrollEventGetDeltaX (ULScrollEvent evt) |
| Get the horizontal scroll amount. | |
| int | ulScrollEventGetDeltaY (ULScrollEvent evt) |
| Get the vertical scroll amount. | |
| int | ulScrollEventGetX (ULScrollEvent evt) |
| Get the x-position of the cursor when the event occurred. | |
| int | ulScrollEventGetY (ULScrollEvent evt) |
| Get the y-position of the cursor when the event occurred. | |
| ULScrollEvent ulCreateScrollEvent | ( | ULScrollEventType | type, |
| int | delta_x, | ||
| int | delta_y, | ||
| int | x, | ||
| int | y ) |
Create a scroll event.
Positive deltas scroll up (or left), like a mouse wheel turned away from the user. Pages that read the legacy wheelDelta properties see 120 for every 100 pixels (or every page) of delta. Modifier keys reported to the page come from the last key event fired on the View.
| type | The scroll granularity type. |
| delta_x | Horizontal scroll amount, in the unit named by type (logical pixels, or pages). |
| delta_y | Vertical scroll amount, in the unit named by type (logical pixels, or pages). |
| x | The x-position of the cursor when the event occurred, in logical pixels relative to the View. Pass a negative value to dispatch at the last known cursor position instead; if either coordinate is negative, both are ignored. |
| y | The y-position of the cursor when the event occurred, in logical pixels relative to the View. Same sentinel rule as x. |
| void ulDestroyScrollEvent | ( | ULScrollEvent | evt | ) |
Destroy a scroll event created by ulCreateScrollEvent().
| int ulScrollEventGetDeltaX | ( | ULScrollEvent | evt | ) |
Get the horizontal scroll amount.
| evt | The scroll event. |
| int ulScrollEventGetDeltaY | ( | ULScrollEvent | evt | ) |
Get the vertical scroll amount.
| evt | The scroll event. |
| ULScrollEventType ulScrollEventGetType | ( | ULScrollEvent | evt | ) |
Get the scroll granularity type of a scroll event.
| evt | The scroll event. |
| int ulScrollEventGetX | ( | ULScrollEvent | evt | ) |
Get the x-position of the cursor when the event occurred.
| evt | The scroll event. |
| int ulScrollEventGetY | ( | ULScrollEvent | evt | ) |
Get the y-position of the cursor when the event occurred.
| evt | The scroll event. |