Mercurial > mplayer.hg
changeset 35773:c688b0dcbe66
Cosmetic: Rename uiMainEvent() uiEvent().
This completes r35865 and r35866.
Additionally, rename parameter msg ev.
author | ib |
---|---|
date | Fri, 25 Jan 2013 10:43:15 +0000 |
parents | 3fec1d4b2736 |
children | 7224e8f93665 |
files | gui/dialog/fileselect.c gui/dialog/menu.c gui/dialog/url.c gui/interface.c gui/ui/actions.c gui/ui/actions.h gui/ui/main.c gui/ui/menu.c gui/ui/playbar.c |
diffstat | 9 files changed, 46 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/dialog/fileselect.c Fri Jan 25 10:28:38 2013 +0000 +++ b/gui/dialog/fileselect.c Fri Jan 25 10:43:15 2013 +0000 @@ -542,7 +542,7 @@ item=item->next; } if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name_utf8() ); - if ( uiLoadPlay ) { uiLoadPlay=False; uiMainEvent( evPlay,0 ); } + if ( uiLoadPlay ) { uiLoadPlay=False; uiEvent( evPlay,0 ); } else gui( GUI_SET_STATE,(void *) GUI_STOP ); }
--- a/gui/dialog/menu.c Fri Jan 25 10:28:38 2013 +0000 +++ b/gui/dialog/menu.c Fri Jan 25 10:43:15 2013 +0000 @@ -91,7 +91,7 @@ // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 ); gtkPopupMenu=Item & 0x0000ffff; gtkPopupMenuParam=Item >> 16; - uiMainEvent( Item & 0x0000ffff,Item >> 16 ); + uiEvent( 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 Fri Jan 25 10:28:38 2013 +0000 +++ b/gui/dialog/url.c Fri Jan 25 10:43:15 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); - uiMainEvent( evPlay,0 ); + uiEvent( evPlay,0 ); } } HideURLDialogBox();
--- a/gui/interface.c Fri Jan 25 10:28:38 2013 +0000 +++ b/gui/interface.c Fri Jan 25 10:43:15 2013 +0000 @@ -377,23 +377,23 @@ switch ((int)data) { case MP_CMD_VO_FULLSCREEN: - uiMainEvent(evFullScreen, True); + uiEvent(evFullScreen, True); break; case MP_CMD_PLAY_TREE_STEP: - uiMainEvent(evNext, 0); + uiEvent(evNext, 0); break; case -MP_CMD_PLAY_TREE_STEP: - uiMainEvent(evPrev, 0); + uiEvent(evPrev, 0); break; case MP_CMD_STOP: - uiMainEvent(evStop, 0); + uiEvent(evStop, 0); break; case MP_CMD_QUIT: - uiMainEvent(evExit, 0); + uiEvent(evExit, 0); break; } @@ -405,7 +405,7 @@ msg = appFindMessage((const char *)data); if ((msg == evMenu) || appFindItem(msg)) - uiMainEvent(msg, 0); + uiEvent(msg, 0); break; @@ -762,7 +762,7 @@ case GUI_REDRAW: - uiMainEvent(ivRedraw, 0); + uiEvent(ivRedraw, 0); break; case GUI_SETUP_VIDEO_WINDOW: @@ -778,7 +778,7 @@ } if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen) - uiMainEvent(evFullScreen, True); + uiEvent(evFullScreen, True); if (guiWinID >= 0) wsWindowMove(&guiApp.mainWindow, True, 0, guiInfo.VideoHeight); @@ -797,7 +797,7 @@ guiInfo.sh_video = NULL; - uiMainEvent(ivRedraw, True); + uiEvent(ivRedraw, True); if (guiInfo.Playing) { if (!guiInfo.PlaylistNext) { @@ -860,7 +860,7 @@ wsWindowVisibility(&guiApp.videoWindow, wsShowWindow); if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen) - uiMainEvent(evFullScreen, False); + uiEvent(evFullScreen, False); } else { wsWindowVisibility(&guiApp.videoWindow, wsHideWindow); guiInfo.VideoWindow = False;
--- a/gui/ui/actions.c Fri Jan 25 10:28:38 2013 +0000 +++ b/gui/ui/actions.c Fri Jan 25 10:43:15 2013 +0000 @@ -82,12 +82,12 @@ } } -void uiMainEvent(int msg, float param) +void uiEvent(int ev, float param) { int iparam = (int)param, osd; mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext); - switch (msg) { + switch (ev) { /* user events */ case evExit: mplayer(MPLAYER_EXIT_GUI, EXIT_QUIT, 0); @@ -138,24 +138,24 @@ #ifdef CONFIG_DVDREAD case ivSetDVDSubtitle: dvdsub_id = iparam; - uiMainEvent(ivPlayDVD, 0); + uiEvent(ivPlayDVD, 0); break; case ivSetDVDAudio: audio_id = iparam; - uiMainEvent(ivPlayDVD, 0); + uiEvent(ivPlayDVD, 0); break; case ivSetDVDChapter: guiInfo.Chapter = iparam; - uiMainEvent(ivPlayDVD, 0); + uiEvent(ivPlayDVD, 0); break; case ivSetDVDTitle: guiInfo.Track = iparam; guiInfo.Chapter = 1; guiInfo.Angle = 1; - uiMainEvent(ivPlayDVD, 0); + uiEvent(ivPlayDVD, 0); break; case evPlayDVD: @@ -171,7 +171,7 @@ case evPlaySwitchToPause: play: - if ((msg == evPlaySwitchToPause) && (guiInfo.Playing == GUI_PAUSE)) + if ((ev == evPlaySwitchToPause) && (guiInfo.Playing == GUI_PAUSE)) goto NoPause; MediumPrepare(guiInfo.StreamType); @@ -346,7 +346,7 @@ mixer_setbalance(mixer, (guiInfo.Balance - 50.0) / 50.0); // transform 0..100 to -1..1 osd = osd_level; osd_level = 0; - uiMainEvent(evSetVolume, guiInfo.Volume); + uiEvent(evSetVolume, guiInfo.Volume); osd_level = osd; if (osd_level) { @@ -458,9 +458,9 @@ } if (guiInfo.StreamType == STREAMTYPE_VCD) - uiMainEvent(evPlayVCD, 0); + uiEvent(evPlayVCD, 0); else if (guiInfo.StreamType == STREAMTYPE_DVD) - uiMainEvent(ivPlayDVD, 0); + uiEvent(ivPlayDVD, 0); else guiInfo.NewPlay = GUI_FILE_NEW; @@ -485,11 +485,11 @@ /* system events */ case evNone: - mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[actions] uiMainEvent: evNone\n"); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[actions] uiEvent: evNone\n"); break; default: - mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[actions] uiMainEvent: unknown event %d, param %.2f\n", msg, param); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[actions] uiEvent: unknown event %d, param %.2f\n", ev, param); break; } } @@ -785,7 +785,7 @@ } if (guiInfo.Playing == GUI_PLAY) - uiMainEvent(evPlay, 0); + uiEvent(evPlay, 0); } /** @@ -847,10 +847,10 @@ } if (stop) - uiMainEvent(evStop, 0); + uiEvent(evStop, 0); if (guiInfo.Playing == GUI_PLAY) - uiMainEvent(evPlay, 0); + uiEvent(evPlay, 0); else if (!stop && !prev && unset) uiUnsetMedia(True); } @@ -907,10 +907,10 @@ } if (stop) - uiMainEvent(evStop, 0); + uiEvent(evStop, 0); if (guiInfo.Playing == GUI_PLAY) - uiMainEvent(evPlay, 0); + uiEvent(evPlay, 0); else if (!stop && !next && unset) uiUnsetMedia(True); }
--- a/gui/ui/actions.h Fri Jan 25 10:28:38 2013 +0000 +++ b/gui/ui/actions.h Fri Jan 25 10:43:15 2013 +0000 @@ -22,7 +22,7 @@ void uiAbsSeek(float sec); void uiChangeSkin(char *name); void uiCurr(void); -void uiMainEvent(int msg, float param); +void uiEvent(int ev, float param); void uiFullScreen(void); void uiNext(void); void uiPause(void);
--- a/gui/ui/main.c Fri Jan 25 10:28:38 2013 +0000 +++ b/gui/ui/main.c Fri Jan 25 10:43:15 2013 +0000 @@ -149,16 +149,16 @@ case itPotmeter: case itHPotmeter: btnModify( item->message,(float)( X - item->x ) / item->width * 100.0f ); - uiMainEvent( item->message,item->value ); + uiEvent( item->message,item->value ); value=item->value; break; case itVPotmeter: btnModify( item->message, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f ); - uiMainEvent( item->message,item->value ); + uiEvent( item->message,item->value ); value=item->value; break; } - uiMainEvent( item->message,value ); + uiEvent( item->message,value ); itemtype=0; break; @@ -177,7 +177,7 @@ { item->value+=value; btnModify( item->message,item->value ); - uiMainEvent( item->message,item->value ); + uiEvent( item->message,item->value ); } } break; @@ -204,7 +204,7 @@ potihandled: if ( item->value > 100.0f ) item->value=100.0f; if ( item->value < 0.0f ) item->value=0.0f; - uiMainEvent( item->message,item->value ); + uiEvent( item->message,item->value ); break; } break; @@ -248,13 +248,13 @@ case wsEscape: if ( guiInfo.VideoWindow && guiInfo.Playing && guiApp.videoWindow.isFullScreen ) { - uiMainEvent( evNormalSize,0 ); + uiEvent( evNormalSize,0 ); return; } default: vo_x11_putkey( Key ); return; } } - if ( msg != evNone ) uiMainEvent( msg,0 ); + if ( msg != evNone ) uiEvent( msg,0 ); } /* this will be used to handle drag & drop files */ @@ -329,8 +329,8 @@ if (file) { uiSetFile( NULL,file,STREAMTYPE_FILE ); - if ( guiInfo.Playing == GUI_PLAY ) uiMainEvent( evStop,0 ); - uiMainEvent( evPlay,0 ); + if ( guiInfo.Playing == GUI_PLAY ) uiEvent( evStop,0 ); + uiEvent( evPlay,0 ); } if (subtitles) { nfree(guiInfo.SubtitleFilename);
--- a/gui/ui/menu.c Fri Jan 25 10:28:38 2013 +0000 +++ b/gui/ui/menu.c Fri Jan 25 10:43:15 2013 +0000 @@ -170,6 +170,6 @@ guiApp.menuItems[i].x+guiApp.menuItems[i].width, guiApp.menuItems[i].y+guiApp.menuItems[i].height ) ) { - uiMainEvent( guiApp.menuItems[i].message,(float)w ); + uiEvent( guiApp.menuItems[i].message,(float)w ); } }
--- a/gui/ui/playbar.c Fri Jan 25 10:28:38 2013 +0000 +++ b/gui/ui/playbar.c Fri Jan 25 10:43:15 2013 +0000 @@ -177,16 +177,16 @@ case itPotmeter: case itHPotmeter: btnModify( item->message,(float)( X - item->x ) / item->width * 100.0f ); - uiMainEvent( item->message,item->value ); + uiEvent( item->message,item->value ); value=item->value; break; case itVPotmeter: btnModify( item->message, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f ); - uiMainEvent( item->message,item->value ); + uiEvent( item->message,item->value ); value=item->value; break; } - uiMainEvent( item->message,value ); + uiEvent( item->message,value ); itemtype=0; break; @@ -201,7 +201,7 @@ { item->value+=value; btnModify( item->message,item->value ); - uiMainEvent( item->message,item->value ); + uiEvent( 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; - uiMainEvent( item->message,item->value ); + uiEvent( item->message,item->value ); break; } break;