diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-30 07:15:52 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-30 13:24:54 +0300 |
commit | 9e9932d4d79fee2cd03ea8b88ee7281a7858837f (patch) | |
tree | ee2ec3b7e1b6f00c4e0518668fbbc2e020265475 /input/input.h | |
parent | 56fec4dfdca623c36d29ed7cb30e7637d99fb942 (diff) | |
download | mpv-9e9932d4d79fee2cd03ea8b88ee7281a7858837f.tar.bz2 mpv-9e9932d4d79fee2cd03ea8b88ee7281a7858837f.tar.xz |
Create a context for input.c state
Start moving static variables to a context struct. Only autorepeat
state is moved to the struct in this commit.
mp_input_check_interrupt now requires the context variable. Change
stream functions to pass it. It's still stored in a static variable in
stream/.
Diffstat (limited to 'input/input.h')
-rw-r--r-- | input/input.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/input/input.h b/input/input.h index 4ee0376993..118f85ad4c 100644 --- a/input/input.h +++ b/input/input.h @@ -171,6 +171,8 @@ #define MP_MAX_KEY_DOWN 32 #endif +struct input_ctx; + typedef union mp_cmd_arg_value { int i; float f; @@ -252,7 +254,7 @@ mp_input_queue_cmd(mp_cmd_t* cmd); // This function retrieves the next available command waiting no more than time msec. // If pause is true, the next input will always return a pause command. mp_cmd_t* -mp_input_get_cmd(int time, int paused, int peek_only); +mp_input_get_cmd(struct input_ctx *ictx, int time, int paused, int peek_only); mp_cmd_t* mp_input_parse_cmd(char* str); @@ -286,15 +288,13 @@ char* mp_input_get_section(void); // When you create a new driver you should add it in these 2 functions. -void -mp_input_init(int use_gui); +struct input_ctx *mp_input_init(int use_gui); -void -mp_input_uninit(void); +void mp_input_uninit(struct input_ctx *ictx); // Interruptible usleep: (used by libmpdemux) int -mp_input_check_interrupt(int time); +mp_input_check_interrupt(struct input_ctx *ictx, int time); extern int async_quit_request; |