changeset 34333:e8e4e6f9b7ac

Change prefix for internal events from ev to iv. This is in order to distinguish them from the external ones.
author ib
date Fri, 09 Dec 2011 13:34:38 +0000
parents 18b362493e28
children c8d437d65442
files gui/app.h gui/interface.c gui/ui/gtk/menu.c gui/ui/main.c gui/ui/playbar.c gui/ui/sub.c gui/ui/widgets.c gui/win32/skinload.h
diffstat 8 files changed, 55 insertions(+), 59 deletions(-) [+]
line wrap: on
line diff
--- a/gui/app.h	Fri Dec 09 13:14:23 2011 +0000
+++ b/gui/app.h	Fri Dec 09 13:34:38 2011 +0000
@@ -73,21 +73,19 @@
 
 // Internal events
 
-#define evSetAudio          45
-#define evSetVideo          46
-#define evSetSubtitle       47
-
-// General events
+#define ivSetAudio          45
+#define ivSetVideo          46
+#define ivSetSubtitle       47
 
-#define evShowPopUpMenu   5005
-#define evHidePopUpMenu   5006
-#define evSetDVDAudio     5007
-#define evSetDVDSubtitle  5008
-#define evSetDVDTitle     5009
-#define evSetDVDChapter   5010
-#define evSetVCDTrack     5012
+#define ivShowPopUpMenu   5005
+#define ivHidePopUpMenu   5006
+#define ivSetDVDAudio     5007
+#define ivSetDVDSubtitle  5008
+#define ivSetDVDTitle     5009
+#define ivSetDVDChapter   5010
+#define ivSetVCDTrack     5012
 
-#define evRedraw          7002
+#define ivRedraw          7002
 
 typedef struct {
     int message;
--- a/gui/interface.c	Fri Dec 09 13:14:23 2011 +0000
+++ b/gui/interface.c	Fri Dec 09 13:34:38 2011 +0000
@@ -723,7 +723,7 @@
         break;
 
     case GUI_REDRAW:
-        uiEventHandling(evRedraw, 0);
+        uiEventHandling(ivRedraw, 0);
         break;
 
     case GUI_SETUP_VIDEO_WINDOW:
@@ -756,7 +756,7 @@
 
     case GUI_END_FILE:
 
-        uiEventHandling(evRedraw, 1);
+        uiEventHandling(ivRedraw, 1);
 
         guiInfo.sh_video = NULL;
 
--- a/gui/ui/gtk/menu.c	Fri Dec 09 13:14:23 2011 +0000
+++ b/gui/ui/gtk/menu.c	Fri Dec 09 13:34:38 2011 +0000
@@ -461,8 +461,8 @@
       for ( i=1;i < guiInfo.Tracks;i++ )
        {
         snprintf( tmp,32,MSGTR_MENU_Title,i );
-    //AddMenuItem( VCDTitleMenu,tmp,( i << 16 ) + evSetVCDTrack );
-        AddMenuItem(window1, (const char*)empty_xpm, VCDTitleMenu,tmp,( ( i + 1 ) << 16 ) + evSetVCDTrack );
+    //AddMenuItem( VCDTitleMenu,tmp,( i << 16 ) + ivSetVCDTrack );
+        AddMenuItem(window1, (const char*)empty_xpm, VCDTitleMenu,tmp,( ( i + 1 ) << 16 ) + ivSetVCDTrack );
        }
      }
      else
@@ -485,7 +485,7 @@
          snprintf( tmp,32,MSGTR_MENU_Title,i);
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,tmp,
 			   guiInfo.Track == i,
-			   (i << 16) + evSetDVDTitle );
+			   (i << 16) + ivSetDVDTitle );
         }
       }
       else
@@ -501,7 +501,7 @@
         {
          snprintf( tmp,32,MSGTR_MENU_Chapter,i );
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiInfo.Chapter == i,
-			   ( i << 16 ) + evSetDVDChapter );
+			   ( i << 16 ) + ivSetDVDChapter );
         }
       }
       else
@@ -521,7 +521,7 @@
 //	 if ( id == -1 ) id=audio_id; //guiInfo.AudioStream[i].id;
          AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp,
 			   id == guiInfo.AudioStream[i].id,
-			   ( guiInfo.AudioStream[i].id << 16 ) + evSetDVDAudio );
+			   ( guiInfo.AudioStream[i].id << 16 ) + ivSetDVDAudio );
         }
       }
       else
@@ -533,13 +533,13 @@
      if ( guiInfo.Subtitles )
       {
        char tmp[64]; int i;
-       AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + evSetDVDSubtitle );
+       AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + ivSetDVDSubtitle );
        for ( i=0;i < guiInfo.Subtitles;i++ )
         {
          av_strlcpy( tmp,GetLanguage( guiInfo.Subtitle[i].language ),sizeof(tmp) );
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp,
 			   dvdsub_id == guiInfo.Subtitle[i].id,
-			   ( guiInfo.Subtitle[i].id << 16 ) + evSetDVDSubtitle );
+			   ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle );
         }
       }
       else
@@ -574,7 +574,7 @@
          int aid = ((sh_audio_t *)demuxer->a_streams[i])->aid;
          char tmp[32];
          snprintf( tmp,32,MSGTR_MENU_Track,aid );
-         AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( aid << 16 ) + evSetAudio );
+         AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( aid << 16 ) + ivSetAudio );
         }
      }
 
@@ -590,7 +590,7 @@
          int vid = ((sh_video_t *)demuxer->v_streams[i])->vid;
          char tmp[32];
          snprintf( tmp,32,MSGTR_MENU_Track,vid );
-         AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( vid << 16 ) + evSetVideo );
+         AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( vid << 16 ) + ivSetVideo );
         }
      }
    }
@@ -600,12 +600,12 @@
    {
     int i;
     SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu, MSGTR_MENU_Subtitles );
-    AddMenuItem( window1, (const char*)empty_xpm, SubMenu, MSGTR_MENU_None, (-1 << 16) + evSetSubtitle );
+    AddMenuItem( window1, (const char*)empty_xpm, SubMenu, MSGTR_MENU_None, (-1 << 16) + ivSetSubtitle );
     for ( i=0;i < global_sub_size;i++ )
      {
       char tmp[32];
       snprintf( tmp, 32, MSGTR_MENU_Track, i );
-      AddMenuItem( window1,(const char*)empty_xpm,SubMenu,tmp,( i << 16 ) + evSetSubtitle );
+      AddMenuItem( window1,(const char*)empty_xpm,SubMenu,tmp,( i << 16 ) + ivSetSubtitle );
      }
    }
 
--- a/gui/ui/main.c	Fri Dec 09 13:14:23 2011 +0000
+++ b/gui/ui/main.c	Fri Dec 09 13:34:38 2011 +0000
@@ -148,22 +148,22 @@
         gtkShow( evLoadURL,NULL );
 	break;
 
-   case evSetAudio:
+   case ivSetAudio:
         if ( !mpctx_get_demuxer(guiInfo.mpcontext) || audio_id == iparam ) break;
 	audio_id=iparam;
 	goto play;
 
-   case evSetVideo:
+   case ivSetVideo:
         if ( !mpctx_get_demuxer(guiInfo.mpcontext) || video_id == iparam ) break;
 	video_id=iparam;
 	goto play;
 
-   case evSetSubtitle:
+   case ivSetSubtitle:
         mp_property_do("sub",M_PROPERTY_SET,&iparam,guiInfo.mpcontext);
 	break;
 
 #ifdef CONFIG_VCD
-   case evSetVCDTrack:
+   case ivSetVCDTrack:
         guiInfo.Track=iparam;
    case evPlayVCD:
  	guiInfoMediumClear ( CLEAR_ALL );
@@ -230,19 +230,19 @@
         uiPlay();
         break;
 #ifdef CONFIG_DVDREAD
-   case evSetDVDSubtitle:
+   case ivSetDVDSubtitle:
         dvdsub_id=iparam;
         goto play_dvd_2;
         break;
-   case evSetDVDAudio:
+   case ivSetDVDAudio:
         audio_id=iparam;
         goto play_dvd_2;
         break;
-   case evSetDVDChapter:
+   case ivSetDVDChapter:
         guiInfo.Chapter=iparam;
         goto play_dvd_2;
         break;
-   case evSetDVDTitle:
+   case ivSetDVDTitle:
         guiInfo.Track=iparam;
 	guiInfo.Chapter=1;
 	guiInfo.Angle=1;
@@ -394,7 +394,7 @@
 	break;
 
 // --- timer events
-   case evRedraw:
+   case ivRedraw:
         {
           unsigned now = GetTimerMS();
           if ((now > last_redraw_time) &&
@@ -437,7 +437,7 @@
  switch ( Button )
   {
    case wsPMMouseButton:
-	  gtkShow( evHidePopUpMenu,NULL );
+	  gtkShow( ivHidePopUpMenu,NULL );
           uiShowMenu( RX,RY );
           itemtype=itPRMButton;
           break;
@@ -446,7 +446,7 @@
           break;
 
    case wsPLMouseButton:
-	  gtkShow( evHidePopUpMenu,NULL );
+	  gtkShow( ivHidePopUpMenu,NULL );
           sx=X; sy=Y; boxMoved=1; itemtype=itPLMButton;
           SelectedItem=currentselected;
           if ( SelectedItem == -1 ) break;
@@ -493,7 +493,7 @@
           break;
 
    case wsRRMouseButton:
-        gtkShow( evShowPopUpMenu,NULL );
+        gtkShow( ivShowPopUpMenu,NULL );
         break;
 
 // --- rolled mouse ... de szar :)))
--- a/gui/ui/playbar.c	Fri Dec 09 13:14:23 2011 +0000
+++ b/gui/ui/playbar.c	Fri Dec 09 13:34:38 2011 +0000
@@ -132,18 +132,18 @@
  switch ( Button )
   {
    case wsPMMouseButton:
-        gtkShow( evHidePopUpMenu,NULL );
+        gtkShow( ivHidePopUpMenu,NULL );
         uiShowMenu( RX,RY );
         break;
    case wsRMMouseButton:
         uiHideMenu( RX,RY,0 );
         break;
    case wsRRMouseButton:
-        gtkShow( evShowPopUpMenu,NULL );
+        gtkShow( ivShowPopUpMenu,NULL );
 	break;
 // ---
    case wsPLMouseButton:
-	gtkShow( evHidePopUpMenu,NULL );
+	gtkShow( ivHidePopUpMenu,NULL );
         SelectedItem=currentselected;
         if ( SelectedItem == -1 ) break; // yeees, i'm move the fucking window
         item=&guiApp.playbarItems[SelectedItem];
--- a/gui/ui/sub.c	Fri Dec 09 13:14:23 2011 +0000
+++ b/gui/ui/sub.c	Fri Dec 09 13:34:38 2011 +0000
@@ -62,10 +62,10 @@
  switch( Button )
   {
    case wsRRMouseButton:
-          gtkShow( evShowPopUpMenu,NULL );
+          gtkShow( ivShowPopUpMenu,NULL );
           break;
    case wsPMMouseButton:
-          gtkShow( evHidePopUpMenu,NULL );
+          gtkShow( ivHidePopUpMenu,NULL );
           uiShowMenu( RX,RY );
           msButton=wsPMMouseButton;
           break;
@@ -75,7 +75,7 @@
           break;
 // ---
    case wsPLMouseButton:
-          gtkShow( evHidePopUpMenu,NULL );
+          gtkShow( ivHidePopUpMenu,NULL );
           sx=X; sy=Y;
           msButton=wsPLMouseButton;
           mplSubMoved=0;
--- a/gui/ui/widgets.c	Fri Dec 09 13:14:23 2011 +0000
+++ b/gui/ui/widgets.c	Fri Dec 09 13:34:38 2011 +0000
@@ -280,7 +280,7 @@
         gtkSetLayer(About);
         break;
 
-    case evShowPopUpMenu:
+    case ivShowPopUpMenu:
         gtkPopupMenu      = evNone;
         gtkPopupMenuParam = 0;
 
@@ -293,7 +293,7 @@
         gtk_menu_popup(GTK_MENU(PopUpMenu), NULL, NULL, NULL, NULL, 0, 0);
         break;
 
-    case evHidePopUpMenu:
+    case ivHidePopUpMenu:
 
         if (PopUpMenu) {
             gtk_widget_hide(PopUpMenu);
--- a/gui/win32/skinload.h	Fri Dec 09 13:14:23 2011 +0000
+++ b/gui/win32/skinload.h	Fri Dec 09 13:34:38 2011 +0000
@@ -181,20 +181,18 @@
 
 // --- Internal events ---
 
-#define evSetAudio          45
-#define evSetVideo          46
-#define evSetSubtitle       47
-
-// --- General events ---
+#define ivSetAudio          45
+#define ivSetVideo          46
+#define ivSetSubtitle       47
 
-#define evShowPopUpMenu   5005
-#define evHidePopUpMenu   5006
-#define evSetDVDAudio     5007
-#define evSetDVDSubtitle  5008
-#define evSetDVDTitle     5009
-#define evSetDVDChapter   5010
-#define evSetVCDTrack     5012
+#define ivShowPopUpMenu   5005
+#define ivHidePopUpMenu   5006
+#define ivSetDVDAudio     5007
+#define ivSetDVDSubtitle  5008
+#define ivSetDVDTitle     5009
+#define ivSetDVDChapter   5010
+#define ivSetVCDTrack     5012
 
-#define evRedraw          7002
+#define ivRedraw          7002
 
 #endif /* MPLAYER_GUI_SKINLOAD_H */