#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
enum lscroll_options {
LIBSCROLL_IMPRECISE_SCROLLS_SMOOTHLY = 0x1, };
struct lscroll_scrollview* lscroll_create_scrollview();
void lscroll_destroy_scrollview(struct lscroll_scrollview* handle);
void lscroll_set_geometry(
struct lscroll_scrollview* handle,
uint64_t content_height,
uint64_t content_width,
uint64_t viewport_height,
uint64_t viewport_width
);
void lscroll_force_pan(
struct lscroll_scrollview* handle,
int64_t x_dp,
int64_t y_dp
);
void lscroll_force_jump(
struct lscroll_scrollview* handle,
int64_t x_dp,
int64_t y_dp
);
void lscroll_set_predict(
struct lscroll_scrollview* handle,
float ms_to_vsync,
float ms_avg_frametime
);
bool lscroll_query_pan_active(struct lscroll_scrollview* handle);
int64_t lscroll_get_pan_x(struct lscroll_scrollview* handle);
int64_t lscroll_get_pan_y(struct lscroll_scrollview* handle);
int64_t lscroll_get_pos_x(struct lscroll_scrollview* handle);
int64_t lscroll_get_pos_y(struct lscroll_scrollview* handle);
enum lscroll_input_source_t {
LSCROLL_SOURCE_UNDEFINED, LSCROLL_SOURCE_TOUCHSCREEN,
LSCROLL_SOURCE_TOUCHPAD,
LSCROLL_SOURCE_MOUSEWHEEL,
LSCROLL_SOURCE_MOUSEWHEEL_PRECISE,
LSCROLL_SOURCE_PASSTHROUGH, LSCROLL_SOURCE_PASSTHROUGH_KINETIC, };
void lscroll_set_input_source(enum lscroll_input_source_t input_source);
void lscroll_add_scroll(
struct lscroll_scrollview* handle,
int64_t motion_x, int64_t motion_y );
void lscroll_add_scroll_x(struct lscroll_scrollview* handle, int64_t motion_x);
void lscroll_add_scroll_y(struct lscroll_scrollview* handle, int64_t motion_y);
void lscroll_add_scroll_interrupt(struct lscroll_scrollview* handle);
void lscroll_add_scroll_release(struct lscroll_scrollview* handle);
void lscroll_mark_frame(struct lscroll_scrollview* handle);
#ifdef __cplusplus
}
#endif