summaryrefslogtreecommitdiff
path: root/desktop/browser.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2008-06-06 13:58:56 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2008-06-06 13:58:56 +0000
commit2319b6032e7f9b58bb5d6510e286052971e42eca (patch)
treed99fb03fd986d16c2e437c289a45deafb18d1c6c /desktop/browser.h
parentf1b1a9737fecf026fa335a84e7345227cb822df3 (diff)
downloadnetsurf-2319b6032e7f9b58bb5d6510e286052971e42eca.tar.gz
netsurf-2319b6032e7f9b58bb5d6510e286052971e42eca.tar.bz2
+ Change core to handle different front end click behaviour
styles. (Act on mouse button press or on button release.) + Click hold on CSS scrollbar arrows now pauses before starting to auto-repeat. + Click hold on scrollbar wells will now auto-repeat. svn path=/trunk/netsurf/; revision=4268
Diffstat (limited to 'desktop/browser.h')
-rw-r--r--desktop/browser.h42
1 files changed, 31 insertions, 11 deletions
diff --git a/desktop/browser.h b/desktop/browser.h
index bdada0c73..45a930c6a 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -174,18 +174,38 @@ struct browser_window {
};
+/* Mouse state. 1 is primary mouse button (e.g. Select on RISC OS).
+ * 2 is secondary mouse button (e.g. Adjust on RISC OS). */
typedef enum {
- BROWSER_MOUSE_CLICK_1 = 1, /* primary mouse button down (eg. Select) */
- BROWSER_MOUSE_CLICK_2 = 2,
-
- BROWSER_MOUSE_DRAG_1 = 8, /* start of drag operation */
- BROWSER_MOUSE_DRAG_2 = 16,
-
- BROWSER_MOUSE_HOLDING_1 = 64, /* whilst drag is in progress */
- BROWSER_MOUSE_HOLDING_2 = 128,
-
- BROWSER_MOUSE_MOD_1 = 512, /* primary modifier key pressed (eg. Shift) */
- BROWSER_MOUSE_MOD_2 = 1024
+ BROWSER_MOUSE_PRESS_1 = 1, /* button 1 pressed */
+ BROWSER_MOUSE_PRESS_2 = 2, /* 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 = 4, /* button 1 clicked. */
+ BROWSER_MOUSE_CLICK_2 = 8, /* button 2 clicked. */
+
+ BROWSER_MOUSE_DRAG_1 = 16, /* start of button 1 drag operation */
+ BROWSER_MOUSE_DRAG_2 = 32, /* start of button 2 drag operation */
+
+ BROWSER_MOUSE_DRAG_ON = 64, /* a drag operation was started and
+ * a mouse button is still pressed */
+
+ BROWSER_MOUSE_HOLDING_1 = 128, /* while button 1 drag is in progress */
+ BROWSER_MOUSE_HOLDING_2 = 256, /* while button 2 drag is in progress */
+
+
+ BROWSER_MOUSE_MOD_1 = 512, /* primary modifier key pressed
+ * (eg. Shift) */
+ BROWSER_MOUSE_MOD_2 = 1024 /* secondary modifier key pressed
+ * (eg. Ctrl) */
} browser_mouse_state;