[MPlayer-cvslog] r33702 - in trunk: gui/interface.c gui/interface.h gui/ui/actions.c gui/ui/gtk/fileselect.c gui/ui/main.c gui/win32/dialogs.c gui/win32/interface.c gui/win32/preferences.c mplayer.c
ib
subversion at mplayerhq.hu
Wed Jun 22 14:12:50 CEST 2011
Author: ib
Date: Wed Jun 22 14:12:50 2011
New Revision: 33702
Log:
Rename the symbolic playback state constants.
They should not be confused with the guiGetEvent types.
Upper case charcaters shall reflect that they are (integer) constants.
Additionally, adjust their casts.
Modified:
trunk/gui/interface.c
trunk/gui/interface.h
trunk/gui/ui/actions.c
trunk/gui/ui/gtk/fileselect.c
trunk/gui/ui/main.c
trunk/gui/win32/dialogs.c
trunk/gui/win32/interface.c
trunk/gui/win32/preferences.c
trunk/mplayer.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Wed Jun 22 14:09:01 2011 (r33701)
+++ trunk/gui/interface.c Wed Jun 22 14:12:50 2011 (r33702)
@@ -575,17 +575,17 @@ int guiGetEvent(int type, void *arg)
case guiSetState:
switch ((int)arg) {
- case guiSetPlay:
+ case GUI_PLAY:
guiInfo.Playing = 1;
// if ( !gtkShowVideoWindow ) wsVisibleWindow( &guiApp.subWindow,wsHideWindow );
break;
- case guiSetStop:
+ case GUI_STOP:
guiInfo.Playing = 0;
// if ( !gtkShowVideoWindow ) wsVisibleWindow( &guiApp.subWindow,wsHideWindow );
break;
- case guiSetPause:
+ case GUI_PAUSE:
guiInfo.Playing = 2;
break;
}
Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h Wed Jun 22 14:09:01 2011 (r33701)
+++ trunk/gui/interface.h Wed Jun 22 14:12:50 2011 (r33702)
@@ -55,9 +55,9 @@ extern int use_gui; // this
#define guiSetAfilter 17
#define guiSetContext 18
-#define guiSetStop 0
-#define guiSetPlay 1
-#define guiSetPause 2
+#define GUI_STOP 0
+#define GUI_PLAY 1
+#define GUI_PAUSE 2
#define guiDVD 1
#define guiVCD 2
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Wed Jun 22 14:09:01 2011 (r33701)
+++ trunk/gui/ui/actions.c Wed Jun 22 14:12:50 2011 (r33702)
@@ -128,7 +128,7 @@ void uiEnd(void)
} else
wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
- guiGetEvent(guiSetState, (void *)guiSetStop);
+ guiGetEvent(guiSetState, (void *)GUI_STOP);
uiSubRender = 1;
wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
wsClearWindow(guiApp.subWindow);
@@ -148,7 +148,7 @@ void uiPlay(void)
return;
}
- guiGetEvent(guiSetState, (void *)guiSetPlay);
+ guiGetEvent(guiSetState, (void *)GUI_PLAY);
uiSubRender = 0;
wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0);
wsClearWindow(guiApp.subWindow);
Modified: trunk/gui/ui/gtk/fileselect.c
==============================================================================
--- trunk/gui/ui/gtk/fileselect.c Wed Jun 22 14:09:01 2011 (r33701)
+++ trunk/gui/ui/gtk/fileselect.c Wed Jun 22 14:12:50 2011 (r33702)
@@ -510,7 +510,7 @@ static void fs_Ok_released( GtkButton *
}
if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name_utf8() );
if ( uiMainAutoPlay ) { uiMainAutoPlay=0; uiEventHandling( evPlay,0 ); }
- else guiGetEvent( guiSetState,(void *) guiSetStop );
+ else guiGetEvent( guiSetState,(void *) GUI_STOP );
}
static void fs_Cancel_released( GtkButton * button,gpointer user_data )
Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c Wed Jun 22 14:09:01 2011 (r33701)
+++ trunk/gui/ui/main.c Wed Jun 22 14:12:50 2011 (r33702)
@@ -227,7 +227,7 @@ NoPause:
break;
case evStop:
- guiInfo.Playing=guiSetStop;
+ guiInfo.Playing=GUI_STOP;
uiState();
guiInfo.NoWindow=False;
break;
Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c Wed Jun 22 14:09:01 2011 (r33701)
+++ trunk/gui/win32/dialogs.c Wed Jun 22 14:12:50 2011 (r33702)
@@ -708,7 +708,7 @@ static LRESULT CALLBACK SkinBrowserWndPr
int len = SendMessage(listbox, LB_GETTEXTLEN, index, 0);
if (len)
{
- if (guiInfo.Playing) guiGetEvent(guiSetState, (void *) guiSetStop);
+ if (guiInfo.Playing) guiGetEvent(guiSetState, (void *) GUI_STOP);
free(skinName);
skinName = malloc(len + 1);
SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName);
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Wed Jun 22 14:09:01 2011 (r33701)
+++ trunk/gui/win32/interface.c Wed Jun 22 14:12:50 2011 (r33702)
@@ -218,7 +218,7 @@ static void guiSetEvent(int event)
}
case evStop:
if(guiInfo.Playing)
- guiGetEvent(guiSetState, (void *) guiSetStop);
+ guiGetEvent(guiSetState, (void *) GUI_STOP);
break;
case evSetMoviePosition:
{
@@ -288,7 +288,7 @@ static void guiSetEvent(int event)
guiInfo.Chapter = guiInfo.DVD.current_chapter;
guiInfo.Angle = guiInfo.DVD.current_angle;
guiInfo.DiskChanged = 1;
- guiGetEvent(guiSetState, (void *) guiSetPlay);
+ guiGetEvent(guiSetState, (void *) GUI_PLAY);
break;
}
#endif
@@ -297,8 +297,8 @@ static void guiSetEvent(int event)
guiInfo.FilenameChanged = guiInfo.NewPlay = 1;
update_playlistwindow();
uiGotoTheNext = guiInfo.Playing? 0 : 1;
- guiGetEvent(guiSetState, (void *) guiSetStop);
- guiGetEvent(guiSetState, (void *) guiSetPlay);
+ guiGetEvent(guiSetState, (void *) GUI_STOP);
+ guiGetEvent(guiSetState, (void *) GUI_PLAY);
break;
}
}
@@ -324,7 +324,7 @@ void uiPlay( void )
return;
}
guiInfo.NewPlay = 1;
- guiGetEvent(guiSetState, (void *) guiSetPlay);
+ guiGetEvent(guiSetState, (void *) GUI_PLAY);
}
void uiPause( void )
@@ -428,12 +428,12 @@ void uiEnd( void )
style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX;
SetWindowLong(mygui->subwindow, GWL_STYLE, style);
}
- guiGetEvent(guiSetState, (void *) guiSetStop);
+ guiGetEvent(guiSetState, (void *) GUI_STOP);
}
void uiStop(void)
{
- guiGetEvent(guiSetState, (void *) guiSetStop);
+ guiGetEvent(guiSetState, (void *) GUI_STOP);
}
void uiSetFileName(char *dir, char *name, int type)
@@ -665,12 +665,12 @@ int guiGetEvent(int type, void *arg)
guiInfo.Playing = (int) arg;
switch (guiInfo.Playing)
{
- case guiSetPlay:
+ case GUI_PLAY:
{
guiInfo.Playing = 1;
break;
}
- case guiSetStop:
+ case GUI_STOP:
{
guiInfo.Playing = 0;
if(movie_aspect >= 0)
@@ -678,7 +678,7 @@ int guiGetEvent(int type, void *arg)
update_subwindow();
break;
}
- case guiSetPause:
+ case GUI_PAUSE:
guiInfo.Playing = 2;
break;
}
Modified: trunk/gui/win32/preferences.c
==============================================================================
--- trunk/gui/win32/preferences.c Wed Jun 22 14:09:01 2011 (r33701)
+++ trunk/gui/win32/preferences.c Wed Jun 22 14:12:50 2011 (r33702)
@@ -558,7 +558,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
case ID_APPLY:
{
int strl;
- if(guiInfo.Playing) guiGetEvent(guiSetState, (void *)guiSetStop);
+ if(guiInfo.Playing) guiGetEvent(guiSetState, (void *)GUI_STOP);
/* Set the video driver */
free(video_driver_list[0]);
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c Wed Jun 22 14:09:01 2011 (r33701)
+++ trunk/mplayer.c Wed Jun 22 14:12:50 2011 (r33702)
@@ -2537,7 +2537,7 @@ static void pause_loop(void)
}
#ifdef CONFIG_GUI
if (use_gui)
- guiGetEvent(guiSetState, (char *)guiSetPause);
+ guiGetEvent(guiSetState, (void *)GUI_PAUSE);
#endif
if (mpctx->video_out && mpctx->sh_video && vo_config_count)
mpctx->video_out->control(VOCTRL_PAUSE, NULL);
@@ -2601,10 +2601,10 @@ static void pause_loop(void)
(void)GetRelativeTime(); // ignore time that passed during pause
#ifdef CONFIG_GUI
if (use_gui) {
- if (guiInfo.Playing == guiSetStop)
+ if (guiInfo.Playing == GUI_STOP)
mpctx->eof = 1;
else
- guiGetEvent(guiSetState, (char *)guiSetPlay);
+ guiGetEvent(guiSetState, (void *)GUI_PLAY);
}
#endif
}
More information about the MPlayer-cvslog
mailing list