From 8dbb61d2f57b32483d67434e9ac169b5f14e7460 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 31 Jul 2016 00:05:36 +0100 Subject: fix documentation of mouse state enumeration --- include/netsurf/mouse.h | 101 +++++++++++++++++++++++++----------------------- 1 file changed, 52 insertions(+), 49 deletions(-) diff --git a/include/netsurf/mouse.h b/include/netsurf/mouse.h index 19cd3ea5a..1b16998a9 100644 --- a/include/netsurf/mouse.h +++ b/include/netsurf/mouse.h @@ -27,56 +27,59 @@ #ifndef _NETSURF_MOUSE_H_ #define _NETSURF_MOUSE_H_ -/* Mouse state. 1 is primary mouse button (e.g. Select on RISC OS). - * 2 is secondary mouse button (e.g. Adjust on RISC OS). */ +/** + * Mouse state. 1 is primary mouse button (e.g. Select on RISC OS). + * 2 is secondary mouse button (e.g. Adjust on RISC OS). + * + * \note click meaning is different for different front ends. On RISC + * OS, it is standard to act on press, so a click is fired at + * the same time as a mouse button is pressed. With GTK, it is + * standard to act on release, so a click is fired when the + * mouse button is released, if the operation wasn't a drag. + * + * \note double and triple clicks are fired alongside a + * BROWSER_MOUSE_CLICK_[1|2] to indicate which button is used. + */ typedef enum browser_mouse_state { - BROWSER_MOUSE_HOVER = 0, /* No mouse buttons pressed, - * May be used to indicate - * hover or end of drag. */ - - BROWSER_MOUSE_PRESS_1 = (1 << 0), /* button 1 pressed */ - BROWSER_MOUSE_PRESS_2 = (1 << 1), /* button 2 pressed */ - - /* note: click meaning is different for - * different front ends. On RISC OS, it - * is standard to act on press, so a - * click is fired at the same time as a - * mouse button is pressed. With GTK, it - * is standard to act on release, so a - * click is fired when the mouse button - * is released, if the operation wasn't - * a drag. */ - - BROWSER_MOUSE_CLICK_1 = (1 << 2), /* button 1 clicked. */ - BROWSER_MOUSE_CLICK_2 = (1 << 3), /* button 2 clicked. */ - - BROWSER_MOUSE_DOUBLE_CLICK = (1 << 4), /* button double clicked */ - BROWSER_MOUSE_TRIPLE_CLICK = (1 << 5), /* button triple clicked */ - - /* note: double and triple clicks are - * fired alongside a - * BROWSER_MOUSE_CLICK_[1|2] - * to indicate which button - * is used. - */ - - BROWSER_MOUSE_DRAG_1 = (1 << 6), /* start of button 1 drag */ - BROWSER_MOUSE_DRAG_2 = (1 << 7), /* start of button 2 drag */ - - BROWSER_MOUSE_DRAG_ON = (1 << 8), /* a drag operation was started - * and a mouse button is still - * pressed */ - - BROWSER_MOUSE_HOLDING_1 = (1 << 9), /* during button 1 drag */ - BROWSER_MOUSE_HOLDING_2 = (1 << 10), /* during button 2 drag */ - - - BROWSER_MOUSE_MOD_1 = (1 << 11), /* 1st modifier key pressed - * (eg. Shift) */ - BROWSER_MOUSE_MOD_2 = (1 << 12), /* 2nd modifier key pressed - * (eg. Ctrl) */ - BROWSER_MOUSE_MOD_3 = (1 << 13) /* 3rd modifier key pressed - * (eg. Alt) */ + /** No mouse buttons pressed, May be used to indicate hover or + * end of drag. + */ + BROWSER_MOUSE_HOVER = 0, + + /** button 1 pressed */ + BROWSER_MOUSE_PRESS_1 = (1 << 0), + /** button 2 pressed */ + BROWSER_MOUSE_PRESS_2 = (1 << 1), + + /** button 1 clicked. */ + BROWSER_MOUSE_CLICK_1 = (1 << 2), + /** button 2 clicked. */ + BROWSER_MOUSE_CLICK_2 = (1 << 3), + + /** button double clicked */ + BROWSER_MOUSE_DOUBLE_CLICK = (1 << 4), + /** button triple clicked */ + BROWSER_MOUSE_TRIPLE_CLICK = (1 << 5), + + /** start of button 1 drag */ + BROWSER_MOUSE_DRAG_1 = (1 << 6), + /** start of button 2 drag */ + BROWSER_MOUSE_DRAG_2 = (1 << 7), + + /** a drag operation was started and a mouse button is still pressed */ + BROWSER_MOUSE_DRAG_ON = (1 << 8), + + /** during button 1 drag */ + BROWSER_MOUSE_HOLDING_1 = (1 << 9), + /** during button 2 drag */ + BROWSER_MOUSE_HOLDING_2 = (1 << 10), + + /** 1st modifier key pressed (eg. Shift) */ + BROWSER_MOUSE_MOD_1 = (1 << 11), + /** 2nd modifier key pressed (eg. Ctrl) */ + BROWSER_MOUSE_MOD_2 = (1 << 12), + /** 3rd modifier key pressed (eg. Alt) */ + BROWSER_MOUSE_MOD_3 = (1 << 13) } browser_mouse_state; -- cgit v1.2.3