Browse Source

Add handy mouse button enum

Signed-off-by: falkTX <falktx@falktx.com>
pull/321/head
falkTX 2 years ago
parent
commit
32916adb82
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 23 additions and 0 deletions
  1. +23
    -0
      dgl/Base.hpp

+ 23
- 0
dgl/Base.hpp View File

@@ -130,6 +130,29 @@ enum CrossingMode {
kCrossingUngrab ///< Crossing due to a grab release
};

/**
A mouse button.

Mouse button numbers start from 1, and are ordered: primary, secondary, middle.
So, on a typical right-handed mouse, the button numbers are:

Left: 1
Right: 2
Middle (often a wheel): 3

Higher button numbers are reported in the same order they are represented on the system.
There is no universal standard here, but buttons 4 and 5 are typically a pair of buttons or a rocker,
which are usually bound to "back" and "forward" operations.

Note that these numbers may differ from those used on the underlying
platform, since they are manipulated to provide a consistent portable API.
*/
enum MouseButton {
kMouseButtonLeft = 1,
kMouseButtonRight,
kMouseButtonMiddle,
};

/**
A mouse cursor type.



Loading…
Cancel
Save