From: James Courtier-D. <jcd...@us...> - 2002-09-11 01:28:35
|
Update of /cvsroot/xine/gnome-xine/src In directory usw-pr-cvs1:/tmp/cvs-serv7364/gnome-xine/src Modified Files: actions.c actions.h main.c Log Message: Add DVD Menu navigation with keyboard only, no mouse support yet. Index: actions.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/actions.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- actions.c 20 Aug 2002 22:17:49 -0000 1.3 +++ actions.c 11 Sep 2002 01:28:32 -0000 1.4 @@ -102,3 +102,33 @@ gtk_window_set_focus(GTK_WINDOW (app), NULL); } +void action_menu_up (void) { + printf("Action MENU UP\n"); + xine_event_t xine_event; + xine_event.type = XINE_EVENT_INPUT_UP; + gtk_xine_send_event (GTK_XINE (gtx) , &xine_event); +} +void action_menu_down (void) { + printf("Action MENU DOWN\n"); + xine_event_t xine_event; + xine_event.type = XINE_EVENT_INPUT_DOWN; + gtk_xine_send_event (GTK_XINE (gtx) , &xine_event); +} +void action_menu_left (void) { + printf("Action MENU LEFT\n"); + xine_event_t xine_event; + xine_event.type = XINE_EVENT_INPUT_LEFT; + gtk_xine_send_event (GTK_XINE (gtx) , &xine_event); +} +void action_menu_right (void) { + printf("Action MENU RIGHT\n"); + xine_event_t xine_event; + xine_event.type = XINE_EVENT_INPUT_RIGHT; + gtk_xine_send_event (GTK_XINE (gtx) , &xine_event); +} +void action_menu_select (void) { + printf("Action MENU RIGHT\n"); + xine_event_t xine_event; + xine_event.type = XINE_EVENT_INPUT_SELECT; + gtk_xine_send_event (GTK_XINE (gtx) , &xine_event); +} Index: actions.h =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/actions.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- actions.h 19 Mar 2002 02:36:50 -0000 1.1 +++ actions.h 11 Sep 2002 01:28:32 -0000 1.2 @@ -38,5 +38,10 @@ void action_seek_relative (int off_sec) ; +void action_menu_up (void); +void action_menu_down (void); +void action_menu_left (void); +void action_menu_right (void); +void action_menu_select (void); #endif Index: main.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/main.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- main.c 3 Sep 2002 00:21:18 -0000 1.26 +++ main.c 11 Sep 2002 01:28:32 -0000 1.27 @@ -510,6 +510,21 @@ case GDK_Right: action_seek_relative (60); break; + case GDK_KP_Up: + action_menu_up (); + break; + case GDK_KP_Down: + action_menu_down (); + break; + case GDK_KP_Left: + action_menu_left (); + break; + case GDK_KP_Right: + action_menu_right (); + break; + case GDK_KP_Enter: + action_menu_select (); + break; } return TRUE; |