diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-03-11 12:57:33 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-03-11 12:57:33 +0000 |
commit | 41e4928e25039119b97035640cf97b1949a129d4 (patch) | |
tree | a5867b83fcf36e2478e55400028a7898891db9cc /desktop/scrollbar.h | |
parent | f3b515540e17c6742fa601057bf632763885d027 (diff) | |
download | netsurf-41e4928e25039119b97035640cf97b1949a129d4.tar.gz netsurf-41e4928e25039119b97035640cf97b1949a129d4.tar.bz2 |
Fix pointer shape and status bar messages for textareas and their scrollbars.
Diffstat (limited to 'desktop/scrollbar.h')
-rw-r--r-- | desktop/scrollbar.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/desktop/scrollbar.h b/desktop/scrollbar.h index 2ce4a154e..fb1773761 100644 --- a/desktop/scrollbar.h +++ b/desktop/scrollbar.h @@ -152,6 +152,23 @@ void scrollbar_set_extents(struct scrollbar *s, int length, */ bool scrollbar_is_horizontal(struct scrollbar *s); +/* Scrollbar mouse input status flags */ +typedef enum { + SCROLLBAR_MOUSE_NONE = 0, /**< Not relevant */ + SCROLLBAR_MOUSE_USED = (1 << 0), /**< Took action with input */ + SCROLLBAR_MOUSE_BOTH = (1 << 1), /**< Scrolling both bars */ + SCROLLBAR_MOUSE_UP = (1 << 2), /**< Hover: scroll up */ + SCROLLBAR_MOUSE_PUP = (1 << 3), /**< Hover: scroll page up */ + SCROLLBAR_MOUSE_VRT = (1 << 4), /**< Hover: vert. drag bar */ + SCROLLBAR_MOUSE_PDWN = (1 << 5), /**< Hover: scroll page down */ + SCROLLBAR_MOUSE_DWN = (1 << 6), /**< Hover: scroll down */ + SCROLLBAR_MOUSE_LFT = (1 << 7), /**< Hover: scroll left */ + SCROLLBAR_MOUSE_PLFT = (1 << 8), /**< Hover: scroll page left */ + SCROLLBAR_MOUSE_HRZ = (1 << 9), /**< Hover: horiz. drag bar */ + SCROLLBAR_MOUSE_PRGT = (1 << 10), /**< Hover: scroll page right */ + SCROLLBAR_MOUSE_RGT = (1 << 11) /**< Hover: scroll right */ +} scrollbar_mouse_status; + /** * Handle mouse actions other then drag ends. * @@ -159,12 +176,20 @@ bool scrollbar_is_horizontal(struct scrollbar *s); * \param mouse mouse state * \param x X coordinate of the mouse * \param y Y coordinate of the mouse - * \return message for the status bar or NULL on failure + * \return the scrollbar mouse status */ -const char *scrollbar_mouse_action(struct scrollbar *s, +scrollbar_mouse_status scrollbar_mouse_action(struct scrollbar *s, browser_mouse_state mouse, int x, int y); /** + * Get a status bar message from a scrollbar mouse input status. + * + * \param status Status to convert to message + * \return Message for the status bar or NULL on failure + */ +const char *scrollbar_mouse_status_to_message(scrollbar_mouse_status status); + +/** * Handle end of mouse drags. * * \param s the scrollbar for which the drag ends |