glfw: add mouse button IDs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
a5cc868643
commit
3b2f39daaa
4 changed files with 22 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
//! Keyboard key IDs.
|
//! Keyboard key IDs.
|
||||||
//!
|
//!
|
||||||
//! See glfw.SetKeyCallback for how these are used.
|
//! See glfw.setKeyCallback for how these are used.
|
||||||
//!
|
//!
|
||||||
//! These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60), but re-arranged to
|
//! These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60), but re-arranged to
|
||||||
//! map to 7-bit ASCII for printable keys (function keys are put in the 256+ range).
|
//! map to 7-bit ASCII for printable keys (function keys are put in the 256+ range).
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ pub const action = @import("action.zig");
|
||||||
pub const hat = @import("hat.zig");
|
pub const hat = @import("hat.zig");
|
||||||
pub const key = @import("key.zig");
|
pub const key = @import("key.zig");
|
||||||
pub const mod = @import("mod.zig");
|
pub const mod = @import("mod.zig");
|
||||||
|
pub const mouse_button = @import("mouse_button.zig");
|
||||||
pub const version = @import("version.zig");
|
pub const version = @import("version.zig");
|
||||||
|
|
||||||
pub fn basicTest() void {
|
pub fn basicTest() void {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
//! Modifier key flags
|
//! Modifier key flags
|
||||||
//!
|
//!
|
||||||
//! See glfw.SetKeyCallback for how these are used.
|
//! See glfw.setKeyCallback for how these are used.
|
||||||
|
|
||||||
const c = @cImport(@cInclude("GLFW/glfw3.h"));
|
const c = @cImport(@cInclude("GLFW/glfw3.h"));
|
||||||
|
|
||||||
|
|
|
||||||
19
glfw/src/mouse_button.zig
Normal file
19
glfw/src/mouse_button.zig
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
//! Mouse button IDs.
|
||||||
|
//!
|
||||||
|
//! See glfw.setMouseButtonCallback for how these are used.
|
||||||
|
|
||||||
|
const c = @cImport(@cInclude("GLFW/glfw3.h"));
|
||||||
|
|
||||||
|
pub const one = C.GLFW_MOUSE_BUTTON_1;
|
||||||
|
pub const two = C.GLFW_MOUSE_BUTTON_2;
|
||||||
|
pub const three = C.GLFW_MOUSE_BUTTON_3;
|
||||||
|
pub const four = C.GLFW_MOUSE_BUTTON_4;
|
||||||
|
pub const five = C.GLFW_MOUSE_BUTTON_5;
|
||||||
|
pub const six = C.GLFW_MOUSE_BUTTON_6;
|
||||||
|
pub const seven = C.GLFW_MOUSE_BUTTON_7;
|
||||||
|
pub const eight = C.GLFW_MOUSE_BUTTON_8;
|
||||||
|
|
||||||
|
pub const last = eight;
|
||||||
|
pub const left = one;
|
||||||
|
pub const right = two;
|
||||||
|
pub const middle = three;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue