glfw: add joystick IDs

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-07-16 12:24:08 -07:00
parent 3b2f39daaa
commit fcc289a0eb
2 changed files with 24 additions and 0 deletions

23
glfw/src/joystick.zig Normal file
View file

@ -0,0 +1,23 @@
//! Joystick IDs.
//!
//! See glfw.setJoystickCallback for how these are used.
const c = @cImport(@cInclude("GLFW/glfw3.h"));
pub const one = C.GLFW_JOYSTICK_1;
pub const two = C.GLFW_JOYSTICK_2;
pub const three = C.GLFW_JOYSTICK_3;
pub const four = C.GLFW_JOYSTICK_4;
pub const five = C.GLFW_JOYSTICK_5;
pub const six = C.GLFW_JOYSTICK_6;
pub const seven = C.GLFW_JOYSTICK_7;
pub const eight = C.GLFW_JOYSTICK_8;
pub const nine = C.GLFW_JOYSTICK_9;
pub const ten = C.GLFW_JOYSTICK_10;
pub const eleven = C.GLFW_JOYSTICK_11;
pub const twelve = C.GLFW_JOYSTICK_12;
pub const thirteen = C.GLFW_JOYSTICK_13;
pub const fourteen = C.GLFW_JOYSTICK_14;
pub const fifteen = C.GLFW_JOYSTICK_15;
pub const sixteen = C.GLFW_JOYSTICK_16;
pub const last = C.GLFW_JOYSTICK_LAST;

View file

@ -5,6 +5,7 @@ const c = @cImport(@cInclude("GLFW/glfw3.h"));
pub const action = @import("action.zig");
pub const hat = @import("hat.zig");
pub const joystick = @import("joystick.zig");
pub const key = @import("key.zig");
pub const mod = @import("mod.zig");
pub const mouse_button = @import("mouse_button.zig");