diff options
author | daid <daid303@gmail.com> | 2014-01-24 15:14:40 +0100 |
---|---|---|
committer | daid <daid303@gmail.com> | 2014-01-24 15:14:40 +0100 |
commit | a059c6c59c6fc789dd67579c88d8ca59f25b1d14 (patch) | |
tree | 3423acd1c61c9b1d201ace063a21238c874876d5 /include | |
parent | 199b89e4dc0b781310f40d0e5743bf355077f9ab (diff) | |
download | uGFX-a059c6c59c6fc789dd67579c88d8ca59f25b1d14.tar.gz uGFX-a059c6c59c6fc789dd67579c88d8ca59f25b1d14.tar.bz2 uGFX-a059c6c59c6fc789dd67579c88d8ca59f25b1d14.zip |
Add smooth scrolling option to ugfx list.
Diffstat (limited to 'include')
-rw-r--r-- | include/gwin/list.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/gwin/list.h b/include/gwin/list.h index 4052f53f..cfe6aeb2 100644 --- a/include/gwin/list.h +++ b/include/gwin/list.h @@ -46,22 +46,30 @@ typedef struct GEventGWinList { typedef struct GListObject { GWidgetObject w; + #if GINPUT_NEED_MOUSE + coord_t start_mouse_x; + coord_t start_mouse_y; + coord_t last_mouse_y; + #endif #if GINPUT_NEED_TOGGLE uint16_t t_up; uint16_t t_dn; #endif int cnt; // Number of items currently in the list (quicker than counting each time) - int top; // The element at the top of the visible list area + int top; // Viewing offset in pixels from the top of the list gfxQueueASync list_head; // The list of items } GListObject; /** * @brief Enum to change the behaviour of the scroll bar * - * @note This might be used with @p gwinListSetScroll() + * @note Used with @p gwinListSetScroll() + * @note @p scrollAlways always show the scrollbar + * @note @p scrollAuto show the scrollbar when there are more items on the list then fit on the screen + * @note @p scrollSmooth enable touch screen smooth scrolling */ -typedef enum scroll_t { scrollAlways, scrollAuto } scroll_t; +typedef enum scroll_t { scrollAlways, scrollAuto, scrollSmooth } scroll_t; #ifdef __cplusplus extern "C" { @@ -97,7 +105,7 @@ GHandle gwinGListCreate(GDisplay *g, GListObject *widget, GWidgetInit *pInit, bo /** * @brief Change the behaviour of the scroll bar * - * @note Current possible values: @p scrollAlways and @p scrollAuto + * @note Current possible values: @p scrollAlways, @p scrollAuto and @p scrollSmooth * * @param[in] gh The widget handle (must be a list handle) * @param[in] flag The behaviour to be set |