Mercurial > mplayer.hg
comparison gui/interface.c @ 33694:45553d0f65c6
Don't let MPlayer directly call user interface functions.
Provide uiEnd() as the new guiGetEvent type guiEndFile. That way,
access is possible through the official interface function.
author | ib |
---|---|
date | Wed, 29 Jun 2011 14:24:39 +0000 |
parents | 006a2db8bd55 |
children | 60093217cb01 |
comparison
equal
deleted
inserted
replaced
33693:006a2db8bd55 | 33694:45553d0f65c6 |
---|---|
553 mixer_t *mixer = NULL; | 553 mixer_t *mixer = NULL; |
554 stream_t *stream; | 554 stream_t *stream; |
555 #ifdef CONFIG_DVDREAD | 555 #ifdef CONFIG_DVDREAD |
556 dvd_priv_t *dvd; | 556 dvd_priv_t *dvd; |
557 #endif | 557 #endif |
558 plItem *next; | |
558 | 559 |
559 if (guiInfo.mpcontext) | 560 if (guiInfo.mpcontext) |
560 mixer = mpctx_get_mixer(guiInfo.mpcontext); | 561 mixer = mpctx_get_mixer(guiInfo.mpcontext); |
561 | 562 |
562 switch (type) { | 563 switch (type) { |
967 | 968 |
968 case guiXEvent: | 969 case guiXEvent: |
969 guiInfo.event_struct = arg; | 970 guiInfo.event_struct = arg; |
970 wsEvents(wsDisplay, arg); | 971 wsEvents(wsDisplay, arg); |
971 gtkEventHandling(); | 972 gtkEventHandling(); |
973 break; | |
974 | |
975 case guiEndFile: | |
976 | |
977 if (!uiGotoTheNext && guiInfo.Playing) { | |
978 uiGotoTheNext = 1; | |
979 break; | |
980 } | |
981 | |
982 if (guiInfo.Playing && (next = gtkSet(gtkGetNextPlItem, 0, NULL)) && (plLastPlayed != next)) { | |
983 plLastPlayed = next; | |
984 guiSetDF(guiInfo.Filename, next->path, next->name); | |
985 guiInfo.StreamType = STREAMTYPE_FILE; | |
986 guiInfo.FilenameChanged = guiInfo.NewPlay = 1; | |
987 gfree((void **)&guiInfo.AudioFile); | |
988 gfree((void **)&guiInfo.Subtitlename); | |
989 } else { | |
990 if (guiInfo.FilenameChanged || guiInfo.NewPlay) | |
991 break; | |
992 | |
993 guiInfo.TimeSec = 0; | |
994 guiInfo.Position = 0; | |
995 guiInfo.AudioChannels = 0; | |
996 guiInfo.MovieWindow = True; | |
997 | |
998 #ifdef CONFIG_DVDREAD | |
999 guiInfo.DVD.current_title = 1; | |
1000 guiInfo.DVD.current_chapter = 1; | |
1001 guiInfo.DVD.current_angle = 1; | |
1002 #endif | |
1003 | |
1004 if (!guiApp.subWindow.isFullScreen && gtkShowVideoWindow) { | |
1005 wsResizeWindow(&guiApp.subWindow, guiApp.sub.width, guiApp.sub.height); | |
1006 wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y); | |
1007 } else | |
1008 wsVisibleWindow(&guiApp.subWindow, wsHideWindow); | |
1009 | |
1010 guiGetEvent(guiSetState, (void *)GUI_STOP); | |
1011 uiSubRender = 1; | |
1012 wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B); | |
1013 wsClearWindow(guiApp.subWindow); | |
1014 wsPostRedisplay(&guiApp.subWindow); | |
1015 } | |
1016 | |
972 break; | 1017 break; |
973 } | 1018 } |
974 | 1019 |
975 return True; | 1020 return True; |
976 } | 1021 } |