Mercurial > mplayer.hg
changeset 35768:51a8ea7542a0
Cosmetic: Rename uiEventHandling() uiMainEvent().
author | ib |
---|---|
date | Thu, 24 Jan 2013 17:44:38 +0000 |
parents | 23e241430e9c |
children | f69df13687ae |
files | gui/dialog/fileselect.c gui/dialog/menu.c gui/dialog/url.c gui/interface.c gui/ui/actions.c gui/ui/main.c gui/ui/menu.c gui/ui/playbar.c gui/ui/ui.h |
diffstat | 9 files changed, 44 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/dialog/fileselect.c Thu Jan 24 17:37:49 2013 +0000 +++ b/gui/dialog/fileselect.c Thu Jan 24 17:44:38 2013 +0000 @@ -541,7 +541,7 @@ item=item->next; } if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name_utf8() ); - if ( uiMainAutoPlay ) { uiMainAutoPlay=False; uiEventHandling( evPlay,0 ); } + if ( uiMainAutoPlay ) { uiMainAutoPlay=False; uiMainEvent( evPlay,0 ); } else gui( GUI_SET_STATE,(void *) GUI_STOP ); }
--- a/gui/dialog/menu.c Thu Jan 24 17:37:49 2013 +0000 +++ b/gui/dialog/menu.c Thu Jan 24 17:44:38 2013 +0000 @@ -91,7 +91,7 @@ // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 ); gtkPopupMenu=Item & 0x0000ffff; gtkPopupMenuParam=Item >> 16; - uiEventHandling( Item & 0x0000ffff,Item >> 16 ); + uiMainEvent( Item & 0x0000ffff,Item >> 16 ); } static GtkWidget * AddMenuCheckItem(GtkWidget *window1, const char * immagine_xpm, GtkWidget* Menu,const char* label, gboolean state, int Number)
--- a/gui/dialog/url.c Thu Jan 24 17:37:49 2013 +0000 +++ b/gui/dialog/url.c Thu Jan 24 17:44:38 2013 +0000 @@ -105,7 +105,7 @@ uiSetFile( NULL,str,STREAMTYPE_STREAM ); guiInfo.NewPlay=GUI_FILE_NEW; listMgr(PLAYLIST_DELETE, 0); add_to_gui_playlist(str, PLAYLIST_ITEM_APPEND); - uiEventHandling( evPlay,0 ); + uiMainEvent( evPlay,0 ); } } HideURLDialogBox();
--- a/gui/interface.c Thu Jan 24 17:37:49 2013 +0000 +++ b/gui/interface.c Thu Jan 24 17:44:38 2013 +0000 @@ -376,23 +376,23 @@ switch ((int)data) { case MP_CMD_VO_FULLSCREEN: - uiEventHandling(evFullScreen, True); + uiMainEvent(evFullScreen, True); break; case MP_CMD_PLAY_TREE_STEP: - uiEventHandling(evNext, 0); + uiMainEvent(evNext, 0); break; case -MP_CMD_PLAY_TREE_STEP: - uiEventHandling(evPrev, 0); + uiMainEvent(evPrev, 0); break; case MP_CMD_STOP: - uiEventHandling(evStop, 0); + uiMainEvent(evStop, 0); break; case MP_CMD_QUIT: - uiEventHandling(evExit, 0); + uiMainEvent(evExit, 0); break; } @@ -404,7 +404,7 @@ msg = appFindMessage((const char *)data); if ((msg == evMenu) || appFindItem(msg)) - uiEventHandling(msg, 0); + uiMainEvent(msg, 0); break; @@ -761,7 +761,7 @@ case GUI_REDRAW: - uiEventHandling(ivRedraw, 0); + uiMainEvent(ivRedraw, 0); break; case GUI_SETUP_VIDEO_WINDOW: @@ -777,7 +777,7 @@ } if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen) - uiEventHandling(evFullScreen, True); + uiMainEvent(evFullScreen, True); if (guiWinID >= 0) wsWindowMove(&guiApp.mainWindow, True, 0, guiInfo.VideoHeight); @@ -796,7 +796,7 @@ guiInfo.sh_video = NULL; - uiEventHandling(ivRedraw, True); + uiMainEvent(ivRedraw, True); if (guiInfo.Playing) { if (!guiInfo.PlaylistNext) { @@ -859,7 +859,7 @@ wsWindowVisibility(&guiApp.videoWindow, wsShowWindow); if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen) - uiEventHandling(evFullScreen, False); + uiMainEvent(evFullScreen, False); } else { wsWindowVisibility(&guiApp.videoWindow, wsHideWindow); guiInfo.VideoWindow = False;
--- a/gui/ui/actions.c Thu Jan 24 17:37:49 2013 +0000 +++ b/gui/ui/actions.c Thu Jan 24 17:44:38 2013 +0000 @@ -335,7 +335,7 @@ } if (guiInfo.Playing == GUI_PLAY) - uiEventHandling(evPlay, 0); + uiMainEvent(evPlay, 0); } /** @@ -397,10 +397,10 @@ } if (stop) - uiEventHandling(evStop, 0); + uiMainEvent(evStop, 0); if (guiInfo.Playing == GUI_PLAY) - uiEventHandling(evPlay, 0); + uiMainEvent(evPlay, 0); else if (!stop && !prev && unset) uiUnsetMedia(True); } @@ -457,10 +457,10 @@ } if (stop) - uiEventHandling(evStop, 0); + uiMainEvent(evStop, 0); if (guiInfo.Playing == GUI_PLAY) - uiEventHandling(evPlay, 0); + uiMainEvent(evPlay, 0); else if (!stop && !next && unset) uiUnsetMedia(True); }
--- a/gui/ui/main.c Thu Jan 24 17:37:49 2013 +0000 +++ b/gui/ui/main.c Thu Jan 24 17:44:38 2013 +0000 @@ -125,7 +125,7 @@ static unsigned last_redraw_time = 0; -void uiEventHandling( int msg,float param ) +void uiMainEvent( int msg,float param ) { int iparam = (int)param, osd; mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext); @@ -172,21 +172,21 @@ #ifdef CONFIG_DVDREAD case ivSetDVDSubtitle: dvdsub_id=iparam; - uiEventHandling( ivPlayDVD, 0 ); + uiMainEvent( ivPlayDVD, 0 ); break; case ivSetDVDAudio: audio_id=iparam; - uiEventHandling( ivPlayDVD, 0 ); + uiMainEvent( ivPlayDVD, 0 ); break; case ivSetDVDChapter: guiInfo.Chapter=iparam; - uiEventHandling( ivPlayDVD, 0 ); + uiMainEvent( ivPlayDVD, 0 ); break; case ivSetDVDTitle: guiInfo.Track=iparam; guiInfo.Chapter=1; guiInfo.Angle=1; - uiEventHandling( ivPlayDVD, 0 ); + uiMainEvent( ivPlayDVD, 0 ); break; case evPlayDVD: guiInfo.Chapter=1; @@ -308,7 +308,7 @@ mixer_setbalance( mixer,(guiInfo.Balance - 50.0 ) / 50.0 ); // transform 0..100 to -1..1 osd = osd_level; osd_level = 0; - uiEventHandling(evSetVolume, guiInfo.Volume); + uiMainEvent(evSetVolume, guiInfo.Volume); osd_level = osd; if ( osd_level ) { @@ -389,8 +389,8 @@ case 1: default: movie_aspect=-1; } - if ( guiInfo.StreamType == STREAMTYPE_VCD ) uiEventHandling( evPlayVCD, 0 ); - else if ( guiInfo.StreamType == STREAMTYPE_DVD ) uiEventHandling( ivPlayDVD, 0 ); + if ( guiInfo.StreamType == STREAMTYPE_VCD ) uiMainEvent( evPlayVCD, 0 ); + else if ( guiInfo.StreamType == STREAMTYPE_DVD ) uiMainEvent( ivPlayDVD, 0 ); else guiInfo.NewPlay=GUI_FILE_NEW; break; @@ -411,10 +411,10 @@ break; /* system events */ case evNone: - mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] uiEventHandling: evNone\n" ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] uiMainEvent: evNone\n" ); break; default: - mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] uiEventHandling: unknown event %d, param %.2f\n", msg, param ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] uiMainEvent: unknown event %d, param %.2f\n", msg, param ); break; } } @@ -479,16 +479,16 @@ case itPotmeter: case itHPotmeter: btnModify( item->message,(float)( X - item->x ) / item->width * 100.0f ); - uiEventHandling( item->message,item->value ); + uiMainEvent( item->message,item->value ); value=item->value; break; case itVPotmeter: btnModify( item->message, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f ); - uiEventHandling( item->message,item->value ); + uiMainEvent( item->message,item->value ); value=item->value; break; } - uiEventHandling( item->message,value ); + uiMainEvent( item->message,value ); itemtype=0; break; @@ -507,7 +507,7 @@ { item->value+=value; btnModify( item->message,item->value ); - uiEventHandling( item->message,item->value ); + uiMainEvent( item->message,item->value ); } } break; @@ -534,7 +534,7 @@ potihandled: if ( item->value > 100.0f ) item->value=100.0f; if ( item->value < 0.0f ) item->value=0.0f; - uiEventHandling( item->message,item->value ); + uiMainEvent( item->message,item->value ); break; } break; @@ -578,13 +578,13 @@ case wsEscape: if ( guiInfo.VideoWindow && guiInfo.Playing && guiApp.videoWindow.isFullScreen ) { - uiEventHandling( evNormalSize,0 ); + uiMainEvent( evNormalSize,0 ); return; } default: vo_x11_putkey( Key ); return; } } - if ( msg != evNone ) uiEventHandling( msg,0 ); + if ( msg != evNone ) uiMainEvent( msg,0 ); } /* this will be used to handle drag & drop files */ @@ -659,8 +659,8 @@ if (file) { uiSetFile( NULL,file,STREAMTYPE_FILE ); - if ( guiInfo.Playing == GUI_PLAY ) uiEventHandling( evStop,0 ); - uiEventHandling( evPlay,0 ); + if ( guiInfo.Playing == GUI_PLAY ) uiMainEvent( evStop,0 ); + uiMainEvent( evPlay,0 ); } if (subtitles) { nfree(guiInfo.SubtitleFilename);
--- a/gui/ui/menu.c Thu Jan 24 17:37:49 2013 +0000 +++ b/gui/ui/menu.c Thu Jan 24 17:44:38 2013 +0000 @@ -169,6 +169,6 @@ guiApp.menuItems[i].x+guiApp.menuItems[i].width, guiApp.menuItems[i].y+guiApp.menuItems[i].height ) ) { - uiEventHandling( guiApp.menuItems[i].message,(float)w ); + uiMainEvent( guiApp.menuItems[i].message,(float)w ); } }
--- a/gui/ui/playbar.c Thu Jan 24 17:37:49 2013 +0000 +++ b/gui/ui/playbar.c Thu Jan 24 17:44:38 2013 +0000 @@ -177,16 +177,16 @@ case itPotmeter: case itHPotmeter: btnModify( item->message,(float)( X - item->x ) / item->width * 100.0f ); - uiEventHandling( item->message,item->value ); + uiMainEvent( item->message,item->value ); value=item->value; break; case itVPotmeter: btnModify( item->message, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f ); - uiEventHandling( item->message,item->value ); + uiMainEvent( item->message,item->value ); value=item->value; break; } - uiEventHandling( item->message,value ); + uiMainEvent( item->message,value ); itemtype=0; break; @@ -201,7 +201,7 @@ { item->value+=value; btnModify( item->message,item->value ); - uiEventHandling( item->message,item->value ); + uiMainEvent( item->message,item->value ); } } break; @@ -224,7 +224,7 @@ potihandled: if ( item->value > 100.0f ) item->value=100.0f; if ( item->value < 0.0f ) item->value=0.0f; - uiEventHandling( item->message,item->value ); + uiMainEvent( item->message,item->value ); break; } break;
--- a/gui/ui/ui.h Thu Jan 24 17:37:49 2013 +0000 +++ b/gui/ui/ui.h Thu Jan 24 17:44:38 2013 +0000 @@ -31,7 +31,7 @@ void uiInit( void * disp ); void uiMainDraw( void ); -void uiEventHandling( int msg, float param ); +void uiMainEvent( int msg, float param ); void uiMainMouse( int Button, int X, int Y, int RX, int RY ); void uiMainKey( int KeyCode, int Type, int Key ); void uiMainDND(int num, char** files);