From ce2367725e43124f8be5ef43650cd9514ae1c335 Mon Sep 17 00:00:00 2001 From: albeu Date: Fri, 8 Feb 2002 18:10:56 +0000 Subject: Added support for key combination and mouse buttons key code git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4590 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'input/input.h') diff --git a/input/input.h b/input/input.h index 6254e0d359..6806fb9400 100644 --- a/input/input.h +++ b/input/input.h @@ -32,6 +32,13 @@ #define MP_INPUT_DEAD -2 #define MP_INPUT_NOTHING -3 +#define MP_KEY_DOWN (1<<30) +// Key up is the default + +#ifndef MP_MAX_KEY_DOWN +#define MP_MAX_KEY_DOWN 32 +#endif + typedef union mp_cmd_arg_value { int i; float f; @@ -52,10 +59,15 @@ typedef struct mp_cmd { typedef struct mp_cmd_bind { - int input; + int input[MP_MAX_KEY_DOWN+1]; char* cmd; } mp_cmd_bind_t; +typedef struct mp_key_name { + int key; + char* name; +} mp_key_name_t; + typedef int (*mp_key_func_t)(int fd); typedef int (*mp_cmd_func_t)(int fd,char* dest,int size); typedef void (*mp_close_func_t)(int fd); -- cgit v1.2.3