diff mplayer.c @ 33724:c919fb3d2531

Rename guiGetEvent() gui(). This function is the interface between MPlayer and the GUI. It doesn't have much to do with events and doesn't merely get things.
author ib
date Tue, 05 Jul 2011 09:33:09 +0000
parents 60093217cb01
children f3361b27a151
line wrap: on
line diff
--- a/mplayer.c	Mon Jul 04 22:24:52 2011 +0000
+++ b/mplayer.c	Tue Jul 05 09:33:09 2011 +0000
@@ -584,7 +584,7 @@
             uninit_audio(mpctx->sh_audio);
 #ifdef CONFIG_GUI
         if (use_gui)
-            guiGetEvent(guiSetAfilter, NULL);
+            gui(guiSetAfilter, NULL);
 #endif
         mpctx->sh_audio      = NULL;
         mpctx->mixer.afilter = NULL;
@@ -1334,7 +1334,7 @@
     if (!sh_audio) {
 #ifdef CONFIG_GUI
         if (use_gui)
-            guiGetEvent(guiSetAfilter, NULL);
+            gui(guiSetAfilter, NULL);
 #endif
         mpctx->mixer.afilter = NULL;
         return 0;
@@ -1359,7 +1359,7 @@
     mpctx->mixer.afilter = sh_audio->afilter;
 #ifdef CONFIG_GUI
     if (use_gui)
-        guiGetEvent(guiSetAfilter, sh_audio->afilter);
+        gui(guiSetAfilter, sh_audio->afilter);
 #endif
     return result;
 }
@@ -2537,7 +2537,7 @@
     }
 #ifdef CONFIG_GUI
     if (use_gui)
-        guiGetEvent(guiSetState, (void *)GUI_PAUSE);
+        gui(guiSetState, (void *)GUI_PAUSE);
 #endif
     if (mpctx->video_out && mpctx->sh_video && vo_config_count)
         mpctx->video_out->control(VOCTRL_PAUSE, NULL);
@@ -2557,7 +2557,7 @@
 #ifdef CONFIG_GUI
         if (use_gui) {
             guiEventHandling();
-            guiGetEvent(guiReDraw, NULL);
+            gui(guiReDraw, NULL);
             if (guiInfo.Playing != GUI_PAUSE || (rel_seek_secs || abs_seek_pos))
                 break;
         }
@@ -2604,7 +2604,7 @@
         if (guiInfo.Playing == GUI_STOP)
             mpctx->eof = 1;
         else
-            guiGetEvent(guiSetState, (void *)GUI_PLAY);
+            gui(guiSetState, (void *)GUI_PLAY);
     }
 #endif
 }
@@ -3051,8 +3051,8 @@
 #ifdef CONFIG_GUI
     if (use_gui) {
         guiInit();
-        guiGetEvent(guiSetContext, mpctx);
-        guiGetEvent(guiSetState, (void *)(gui_no_filename ? GUI_STOP : GUI_PLAY));
+        gui(guiSetContext, mpctx);
+        gui(guiSetState, (void *)(gui_no_filename ? GUI_STOP : GUI_PLAY));
     }
 #endif
 
@@ -3090,18 +3090,18 @@
 #ifdef CONFIG_GUI
     if (use_gui) {
         mpctx->file_format = DEMUXER_TYPE_UNKNOWN;
-        guiGetEvent(guiNewFile, 0);
+        gui(guiNewFile, 0);
         while (guiInfo.Playing != GUI_PLAY) {
             mp_cmd_t *cmd;
             usec_sleep(20000);
             guiEventHandling();
-            guiGetEvent(guiReDraw, NULL);
+            gui(guiReDraw, NULL);
             if ((cmd = mp_input_get_cmd(0, 0, 0)) != NULL) {
-                guiGetEvent(guiRunCommand, (void *)cmd->id);
+                gui(guiRunCommand, (void *)cmd->id);
                 mp_cmd_free(cmd);
             }
         }
-        guiGetEvent(guiPreparation, NULL);
+        gui(guiPreparation, NULL);
         if (guiInfo.StreamType == STREAMTYPE_STREAM) {
             play_tree_t *entry = play_tree_new();
             play_tree_add_file(entry, guiInfo.Filename);
@@ -3244,7 +3244,7 @@
 
 #ifdef CONFIG_GUI
     if (use_gui)
-        guiGetEvent(guiSetStream, mpctx->stream);
+        gui(guiSetStream, mpctx->stream);
 #endif
 
     if (mpctx->file_format == DEMUXER_TYPE_PLAYLIST) {
@@ -3677,9 +3677,9 @@
 
 #ifdef CONFIG_GUI
         if (use_gui) {
-            if (!guiGetEvent(guiSetVideo, mpctx->sh_video))
+            if (!gui(guiSetVideo, mpctx->sh_video))
                 goto goto_next_file;
-            guiGetEvent(guiSetAudio, mpctx->sh_audio);
+            gui(guiSetAudio, mpctx->sh_audio);
         }
 #endif
 
@@ -3995,8 +3995,8 @@
                 else if (mpctx->sh_audio)
                     guiInfo.TimeSec = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out);
                 guiInfo.LengthInSec = demuxer_get_time_length(mpctx->demuxer);
-                guiGetEvent(guiSetMixer, NULL);
-                guiGetEvent(guiReDraw, NULL);
+                gui(guiSetMixer, NULL);
+                gui(guiReDraw, NULL);
                 if (guiInfo.Playing == GUI_STOP)
                     break;                  // STOP
                 if (guiInfo.Playing == GUI_PAUSE)
@@ -4103,7 +4103,7 @@
 #ifdef CONFIG_DVDREAD
         if (!guiInfo.DiskChanged)
 #endif
-        guiGetEvent(guiEndFile, NULL);
+        gui(guiEndFile, NULL);
     }
 #endif