spingle/source/input.h

58 lines
1.6 KiB
C
Raw Normal View History

2019-11-24 20:45:15 -08:00
/*
Copyright (C) 1996-2001 Id Software, Inc.
Copyright (C) 2010-2014 QuakeSpasm developers
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _QUAKE_INPUT_H
#define _QUAKE_INPUT_H
// input.h -- external (non-keyboard) input devices
2019-11-25 17:40:18 -08:00
void IN_Init(void);
2019-11-24 20:45:15 -08:00
2019-11-25 17:40:18 -08:00
void IN_Shutdown(void);
2019-11-24 20:45:15 -08:00
2019-11-25 17:40:18 -08:00
void IN_Commands(void);
2019-11-24 20:45:15 -08:00
// oportunity for devices to stick commands on the script buffer
// mouse moved by dx and dy pixels
2019-11-25 16:49:58 -08:00
void IN_MouseMotion(int32_t dx, int32_t dy);
2019-11-24 20:45:15 -08:00
2019-11-25 17:40:18 -08:00
void IN_SendKeyEvents(void);
2019-11-24 20:45:15 -08:00
// used as a callback for Sys_SendKeyEvents() by some drivers
2019-11-25 17:40:18 -08:00
void IN_UpdateInputMode(void);
2019-11-24 20:45:15 -08:00
// do stuff if input mode (text/non-text) changes matter to the keyboard driver
2019-11-25 17:40:18 -08:00
void IN_Move(usercmd_t *cmd);
2019-11-24 20:45:15 -08:00
// add additional movement on top of the keyboard move cmd
2019-11-25 17:40:18 -08:00
void IN_ClearStates(void);
2019-11-24 20:45:15 -08:00
// restores all button and position states to defaults
// called when the app becomes active
2019-11-25 17:40:18 -08:00
void IN_Activate();
2019-11-24 20:45:15 -08:00
// called when the app becomes inactive
2019-11-25 17:40:18 -08:00
void IN_Deactivate(bool free_cursor);
2019-11-24 20:45:15 -08:00
2019-11-25 17:40:18 -08:00
#endif /* _QUAKE_INPUT_H */
2019-11-24 20:45:15 -08:00