changeset 35503:ac6c531dc9d1

Replace symbolic GUI message (event) constants by enums. Additionally, rearrange and add doxygen comments.
author ib
date Wed, 05 Dec 2012 01:42:50 +0000
parents 381cd31289f2
children cfcf52c6176f
files gui/app.h gui/win32/skinload.h
diffstat 2 files changed, 122 insertions(+), 129 deletions(-) [+]
line wrap: on
line diff
--- a/gui/app.h	Tue Dec 04 20:10:10 2012 +0000
+++ b/gui/app.h	Wed Dec 05 01:42:50 2012 +0000
@@ -22,74 +22,68 @@
 #include "util/bitmap.h"
 #include "wm/ws.h"
 
-/* User events */
-
-#define evNone              0
-
-#define evPlay              1
-#define evStop              2
-#define evPause             3
-#define evPrev              6
-#define evNext              7
-#define evLoad              8
-#define evLoadPlay          13
-#define evLoadAudioFile     42
-#define evLoadSubtitle      38
-#define evDropSubtitle      43
-#define evPlaylist          10
-#define evPlayCD            48
-#define evPlayVCD           40
-#define evPlayDVD           39
-#define evLoadURL         5013
-#define evPlaySwitchToPause 16
-#define evPauseSwitchToPlay 17
-
-#define evBackward10sec     18
-#define evForward10sec      19
-#define evBackward1min      20
-#define evForward1min       21
-#define evBackward10min     22
-#define evForward10min      23
-#define evSetMoviePosition  27
+/// GUI messages (user events)
+enum {
+    evNone,
+    evPlay,
+    evStop,
+    evPause,
+    evPrev,
+    evNext,
+    evLoad,
+    evLoadPlay,
+    evLoadAudioFile,
+    evLoadSubtitle,
+    evDropSubtitle,
+    evPlaylist,
+    evPlayCD,
+    evPlayVCD,
+    evPlayDVD,
+    evLoadURL,
+    evPlaySwitchToPause,
+    evPauseSwitchToPlay,
+    evBackward10sec,
+    evForward10sec,
+    evBackward1min,
+    evForward1min,
+    evBackward10min,
+    evForward10min,
+    evSetMoviePosition,
+    evHalfSize,
+    evDoubleSize,
+    evFullScreen,
+    evNormalSize,
+    evSetAspect,
+    evIncVolume,
+    evDecVolume,
+    evSetVolume,
+    evMute,
+    evSetBalance,
+    evEqualizer,
+    evAbout,
+    evPreferences,
+    evSkinBrowser,
+    evMenu,
+    evIconify,
+    evExit = 100
+};
 
-#define evHalfSize          301
-#define evDoubleSize        25
-#define evFullScreen        26
-#define evNormalSize        24
-#define evSetAspect         44
-
-#define evIncVolume         31
-#define evDecVolume         32
-#define evSetVolume         28
-#define evMute              30
-#define evSetBalance        29
-#define evEqualizer         9
-
-#define evAbout             12
-#define evPreferences       14
-#define evSkinBrowser       15
-#define evMenu              33
-
-#define evIconify           11
-#define evExit              1000
-
-/* Internal events */
-
-#define ivSetAudio          45
-#define ivSetVideo          46
-#define ivSetSubtitle       47
-
-#define ivShowPopUpMenu   5005
-#define ivHidePopUpMenu   5006
-#define ivSetDVDAudio     5007
-#define ivSetDVDSubtitle  5008
-#define ivSetDVDTitle     5009
-#define ivSetDVDChapter   5010
-#define ivSetVCDTrack     5012
-#define ivSetCDTrack      5014
-
-#define ivRedraw          7002
-#define ivPlayDVD         7003
+/// Internal messages (events)
+enum {
+    ivSetVideo = 1000,
+    ivSetAudio,
+    ivSetSubtitle,
+    ivSetCDTrack,
+    ivSetVCDTrack,
+    ivSetDVDTitle,
+    ivSetDVDChapter,
+    ivSetDVDAudio,
+    ivSetDVDSubtitle,
+    ivPlayDVD,
+    ivShowPopUpMenu,
+    ivHidePopUpMenu,
+    ivRedraw
+};
 
 typedef struct {
     int message;
--- a/gui/win32/skinload.h	Tue Dec 04 20:10:10 2012 +0000
+++ b/gui/win32/skinload.h	Wed Dec 05 01:42:50 2012 +0000
@@ -132,70 +132,69 @@
 
 /* --- User events --- */
 
-#define evNone              0
-#define evPlay              1
-#define evStop              2
-#define evPause             3
-#define evPrev              6
-#define evNext              7
-#define evLoad              8
-#define evLoadPlay          13
-#define evLoadAudioFile     42
-#define evLoadSubtitle      38
-#define evDropSubtitle      43
-#define evPlaylist          10
-#define evPlayCD            48
-#define evPlayVCD           40
-#define evPlayDVD           39
-#define evLoadURL         5013
-#define evPlaySwitchToPause 16
-#define evPauseSwitchToPlay 17
-
-#define evBackward10sec     18
-#define evForward10sec      19
-#define evBackward1min      20
-#define evForward1min       21
-#define evBackward10min     22
-#define evForward10min      23
-#define evSetMoviePosition  27
-
-#define evHalfSize          301
-#define evDoubleSize        25
-#define evFullScreen        26
-#define evNormalSize        24
-#define evSetAspect         44
-
-#define evIncVolume         31
-#define evDecVolume         32
-#define evSetVolume         28
-#define evMute              30
-#define evSetBalance        29
-#define evEqualizer         9
-
-#define evAbout             12
-#define evPreferences       14
-#define evSkinBrowser       15
-#define evMenu              33
-
-#define evIconify           11
-#define evExit              1000
+enum
+{
+  evNone,
+  evPlay,
+  evStop,
+  evPause,
+  evPrev,
+  evNext,
+  evLoad,
+  evLoadPlay,
+  evLoadAudioFile,
+  evLoadSubtitle,
+  evDropSubtitle,
+  evPlaylist,
+  evPlayCD,
+  evPlayVCD,
+  evPlayDVD,
+  evLoadURL,
+  evPlaySwitchToPause,
+  evPauseSwitchToPlay,
+  evBackward10sec,
+  evForward10sec,
+  evBackward1min,
+  evForward1min,
+  evBackward10min,
+  evForward10min,
+  evSetMoviePosition,
+  evHalfSize,
+  evDoubleSize,
+  evFullScreen,
+  evNormalSize,
+  evSetAspect,
+  evIncVolume,
+  evDecVolume,
+  evSetVolume,
+  evMute,
+  evSetBalance,
+  evEqualizer,
+  evAbout,
+  evPreferences,
+  evSkinBrowser,
+  evMenu,
+  evIconify,
+  evExit = 100
+};
 
 /* --- Internal events --- */
 
-#define ivSetAudio          45
-#define ivSetVideo          46
-#define ivSetSubtitle       47
-
-#define ivShowPopUpMenu   5005
-#define ivHidePopUpMenu   5006
-#define ivSetDVDAudio     5007
-#define ivSetDVDSubtitle  5008
-#define ivSetDVDTitle     5009
-#define ivSetDVDChapter   5010
-#define ivSetVCDTrack     5012
-#define ivSetCDTrack      5014
-
-#define ivRedraw          7002
-#define ivPlayDVD         7003
+enum
+{
+  ivSetVideo = 1000,
+  ivSetAudio,
+  ivSetSubtitle,
+  ivSetCDTrack,
+  ivSetVCDTrack,
+  ivSetDVDTitle,
+  ivSetDVDChapter,
+  ivSetDVDAudio,
+  ivSetDVDSubtitle,
+  ivPlayDVD,
+  ivShowPopUpMenu,
+  ivHidePopUpMenu,
+  ivRedraw
+};
 
 #endif /* MPLAYER_GUI_SKINLOAD_H */