diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-25 13:14:27 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-25 13:14:27 +0000 |
commit | 4b6f1667dbc44aebfae5de7d92ae5b8a2095c243 (patch) | |
tree | db311478b0e3e25e7ad976f6c998d0b3d9cc4105 /Gui | |
parent | c256e5a766f673797a505727a8437ce78fd0dcdf (diff) | |
download | mpv-4b6f1667dbc44aebfae5de7d92ae5b8a2095c243.tar.bz2 mpv-4b6f1667dbc44aebfae5de7d92ae5b8a2095c243.tar.xz |
add half new input support for gui
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4859 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r-- | Gui/interface.c | 28 | ||||
-rw-r--r-- | Gui/mplayer/mw.h | 10 |
2 files changed, 32 insertions, 6 deletions
diff --git a/Gui/interface.c b/Gui/interface.c index ccb107f386..d0f368573e 100644 --- a/Gui/interface.c +++ b/Gui/interface.c @@ -13,6 +13,7 @@ #include "mplayer/mplayer.h" #include "app.h" #include "../libvo/x11_common.h" +#include "../input/input.h" guiInterface_t guiIntfStruct; @@ -30,6 +31,19 @@ void guiDone( void ) wsXDone(); } +int guiCMDArray[] = + { + evLoad, + evLoadSubtitle, + evAbout, + evPlay, + evStop, + evPlayList, + evPreferences, + evFullScreen, + evSkinBrowser + }; + void guiGetEvent( int type,char * arg ) { switch ( type ) @@ -40,6 +54,20 @@ void guiGetEvent( int type,char * arg ) break; case guiCEvent: break; + case guiIEvent: + printf( "cmd: %d\n",(int)arg ); + switch( (int)arg ) + { + case MP_CMD_QUIT: + mplEventHandling( evExit,0 ); + break; + case MP_CMD_VO_FULLSCREEN: + mplEventHandling( evFullScreen,0 ); + break; + default: + mplEventHandling( guiCMDArray[ (int)arg - MP_CMD_GUI_EVENTS - 1 ],0 ); + } + break; } } diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h index 2de88e348a..92333e3847 100644 --- a/Gui/mplayer/mw.h +++ b/Gui/mplayer/mw.h @@ -559,9 +559,11 @@ int keyPressed = 0; void mplMainKeyHandle( int State,int Type,int Key ) { int msg = evNone; +// return; if ( Type != wsKeyPressed ) return; switch ( Key ) { +#ifndef HAVE_NEW_INPUT case '.': case '>': msg=evNext; break; case ',': @@ -589,6 +591,7 @@ void mplMainKeyHandle( int State,int Type,int Key ) case wsS: msg=evStop; break; case wsp: case wsP: msg=evPlayList; break; +#endif case wsXF86LowerVolume: msg=evDecVolume; break; case wsXF86RaiseVolume: msg=evIncVolume; break; @@ -601,10 +604,5 @@ void mplMainKeyHandle( int State,int Type,int Key ) default: vo_x11_putkey( Key ); return; } - if ( msg != evNone ) - { - mplEventHandling( msg,0 ); -// mplMainRender=1; -// wsPostRedisplay( &appMPlayer.mainWindow ); - } + if ( msg != evNone ) mplEventHandling( msg,0 ); } |