From: Rich J W. <ric...@us...> - 2002-05-30 16:32:15
|
Update of /cvsroot/xine/xine-ui/src/xitk In directory usw-pr-cvs1:/tmp/cvs-serv7502/src/xitk Modified Files: actions.c actions.h main.c Log Message: Added implementation of aspect ratio change hint Index: actions.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/actions.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- actions.c 23 May 2002 11:33:19 -0000 1.62 +++ actions.c 30 May 2002 16:32:12 -0000 1.63 @@ -254,6 +254,17 @@ } } +void gui_set_aspect_ratio(int ratio_code) { + + gGui->vo_driver->set_property (gGui->vo_driver, VO_PROP_ASPECT_RATIO, ratio_code); + + if (panel_is_visible()) { + XRaiseWindow (gGui->display, gGui->panel_window); + XSetTransientForHint (gGui->display, + gGui->panel_window, gGui->video_window); + } +} + void gui_toggle_interlaced(void) { gGui->vo_driver->set_property (gGui->vo_driver, VO_PROP_INTERLACED, Index: actions.h =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/actions.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- actions.h 23 May 2002 11:33:19 -0000 1.21 +++ actions.h 30 May 2002 16:32:12 -0000 1.22 @@ -48,6 +48,8 @@ void gui_toggle_aspect(void); +void gui_set_aspect_ratio(int ratio_code); + void gui_toggle_interlaced(void); void gui_change_audio_channel(xitk_widget_t *w, void *data); Index: main.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/main.c,v retrieving revision 1.91 retrieving revision 1.92 diff -u -r1.91 -r1.92 --- main.c 23 May 2002 11:33:19 -0000 1.91 +++ main.c 30 May 2002 16:32:12 -0000 1.92 @@ -63,6 +63,7 @@ #include "event.h" #include "videowin.h" #include "panel.h" +#include "actions.h" #ifdef HAVE_ORBIT #include "../corba/xine-server.h" @@ -552,7 +553,15 @@ case XINE_EVENT_BRANCHED: gui_branched_callback (); break; + + case XINE_EVENT_ASPECT_CHANGE: + { + xine_aspect_ratio_event_t *aevent = (xine_aspect_ratio_event_t*)event; + gui_set_aspect_ratio(aevent->ratio_code); + } + break; } + } |