# HG changeset patch # User ib # Date 1309873735 0 # Node ID 90c992ac501121839cd4060364cc12b4bab54b2b # Parent 81f71d910333a6099eee24735de41a4f925a6f20 Make guiEventHandling() a gui() call. The new parameter to use is GUI_HANDLE_EVENTS. diff -r 81f71d910333 -r 90c992ac5011 gui/interface.c --- a/gui/interface.c Tue Jul 05 12:05:06 2011 +0000 +++ b/gui/interface.c Tue Jul 05 13:48:55 2011 +0000 @@ -598,6 +598,12 @@ break; + case GUI_HANDLE_EVENTS: + if (!guiInfo.Playing || !guiInfo.MovieWindow) + wsHandleEvents(); + gtkEventHandling(); + break; + case GUI_RUN_COMMAND: mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GUI_RUN_COMMAND: %d\n", (int)arg); @@ -1026,14 +1032,6 @@ return True; } -void guiEventHandling(void) -{ - if (!guiInfo.Playing || !guiInfo.MovieWindow) - wsHandleEvents(); - - gtkEventHandling(); -} - // --- #if defined(MP_DEBUG) && 0 void list(void) diff -r 81f71d910333 -r 90c992ac5011 gui/interface.h --- a/gui/interface.h Tue Jul 05 12:05:06 2011 +0000 +++ b/gui/interface.h Tue Jul 05 13:48:55 2011 +0000 @@ -49,6 +49,7 @@ #define GUI_SET_AFILTER 17 #define GUI_SET_CONTEXT 18 #define GUI_END_FILE 19 +#define GUI_HANDLE_EVENTS 20 #define GUI_STOP 0 #define GUI_PLAY 1 @@ -231,7 +232,6 @@ char *gstrdup(const char *str); void *gtkSet(int cmd, float fparam, void *vparam); void guiDone(void); -void guiEventHandling(void); void guiExit(enum exit_reason how); int gui(int what, void *arg); void guiInit(void); diff -r 81f71d910333 -r 90c992ac5011 gui/win32/interface.c --- a/gui/win32/interface.c Tue Jul 05 12:05:06 2011 +0000 +++ b/gui/win32/interface.c Tue Jul 05 13:48:55 2011 +0000 @@ -680,6 +680,8 @@ if(gtkAutoSyncOn) autosync = gtkAutoSync; break; } + case GUI_HANDLE_EVENTS: + break; case GUI_SET_MIXER: { if(audio_out) @@ -911,5 +913,3 @@ SendMessage(mygui->subwindow, WM_WINDOWPOSCHANGED, 0, (LPARAM)&wp); return 0; } - -void guiEventHandling(void) {} diff -r 81f71d910333 -r 90c992ac5011 mplayer.c --- a/mplayer.c Tue Jul 05 12:05:06 2011 +0000 +++ b/mplayer.c Tue Jul 05 13:48:55 2011 +0000 @@ -2556,7 +2556,7 @@ mpctx->video_out->check_events(); #ifdef CONFIG_GUI if (use_gui) { - guiEventHandling(); + gui(GUI_HANDLE_EVENTS, 0); gui(GUI_REDRAW, 0); if (guiInfo.Playing != GUI_PAUSE || (rel_seek_secs || abs_seek_pos)) break; @@ -3094,7 +3094,7 @@ while (guiInfo.Playing != GUI_PLAY) { mp_cmd_t *cmd; usec_sleep(20000); - guiEventHandling(); + gui(GUI_HANDLE_EVENTS, 0); gui(GUI_REDRAW, 0); if ((cmd = mp_input_get_cmd(0, 0, 0)) != NULL) { gui(GUI_RUN_COMMAND, (void *)cmd->id); @@ -3812,7 +3812,7 @@ #ifdef CONFIG_GUI if (use_gui) - guiEventHandling(); + gui(GUI_HANDLE_EVENTS, 0); #endif current_module = "vo_check_events"; @@ -3983,7 +3983,7 @@ #ifdef CONFIG_GUI if (use_gui) { - guiEventHandling(); + gui(GUI_HANDLE_EVENTS, 0); if (mpctx->demuxer->file_format == DEMUXER_TYPE_AVI && mpctx->sh_video && mpctx->sh_video->video.dwLength > 2) { // get pos from frame number / total frames guiInfo.Position = (float)mpctx->d_video->pack_no * 100.0f / mpctx->sh_video->video.dwLength;