From 8d6ef8f90eebabd14ba5d98deabb09b236aa01c3 Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Thu, 18 Oct 2001 23:46:40 +0000 Subject: defining menu events CVS patchset: 834 CVS date: 2001/10/18 23:46:40 --- src/input/input_plugin.h | 9 ++++++++- src/xine-engine/events.h | 8 ++++++++ src/xine-engine/xine.c | 19 +++++++++++++++++-- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index 979ff9ca1..890787e87 100644 --- a/src/input/input_plugin.h +++ b/src/input/input_plugin.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_plugin.h,v 1.13 2001/10/17 20:33:09 guenter Exp $ + * $Id: input_plugin.h,v 1.14 2001/10/18 23:46:40 guenter Exp $ */ #ifndef HAVE_INPUT_PLUGIN_H @@ -308,6 +308,13 @@ struct input_plugin_s #define INPUT_EVENT_MOUSEBUTTON 1 #define INPUT_EVENT_KEYPRESS 2 #define INPUT_EVENT_MOUSEMOVE 3 +#define INPUT_EVENT_UP 4 +#define INPUT_EVENT_DOWN 5 +#define INPUT_EVENT_LEFT 6 +#define INPUT_EVENT_RIGHT 7 +#define INPUT_EVENT_MENU1 8 +#define INPUT_EVENT_MENU2 9 +#define INPUT_EVENT_MENU3 10 /* * each input plugin _must_ implement this function: diff --git a/src/xine-engine/events.h b/src/xine-engine/events.h index b6a6e698b..305351647 100644 --- a/src/xine-engine/events.h +++ b/src/xine-engine/events.h @@ -103,8 +103,16 @@ typedef struct ui_event_s { /* EOF UI sub-types */ +/** + * MENU events + */ +#define XINE_MENU1_EVENT 0x0005 +#define XINE_MENU2_EVENT 0x0006 +#define XINE_MENU3_EVENT 0x0007 + #ifdef __cplusplus } #endif #endif /* HAVE_EVENTS_H */ + diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 6480bf670..d7fb4f34c 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.68 2001/10/18 14:43:00 richwareham Exp $ + * $Id: xine.c,v 1.69 2001/10/18 23:46:40 guenter Exp $ * * top-level xine functions * @@ -408,10 +408,25 @@ static void event_handler(xine_t *xine, event_t *event, void *data) { } } break; + case XINE_MENU1_EVENT: + xine->cur_input_plugin->handle_input_event(xine->cur_input_plugin, + INPUT_EVENT_MENU1, + 0, 0, 0); + break; + case XINE_MENU2_EVENT: + xine->cur_input_plugin->handle_input_event(xine->cur_input_plugin, + INPUT_EVENT_MENU2, + 0, 0, 0); + break; + case XINE_MENU3_EVENT: + xine->cur_input_plugin->handle_input_event(xine->cur_input_plugin, + INPUT_EVENT_MENU3, + 0, 0, 0); + break; case XINE_SPU_EVENT: if (xine->cur_spu_decoder_plugin) xine->cur_spu_decoder_plugin->event(xine->cur_spu_decoder_plugin, - (spu_event_t*) event); + (spu_event_t*) event); break; } } -- cgit v1.2.3