[MPlayer-cvslog] r35597 - in trunk/gui: app.h win32/skinload.h
ib
subversion at mplayerhq.hu
Wed Dec 5 02:42:50 CET 2012
Author: ib
Date: Wed Dec 5 02:42:50 2012
New Revision: 35597
Log:
Replace symbolic GUI message (event) constants by enums.
Additionally, rearrange and add doxygen comments.
Modified:
trunk/gui/app.h
trunk/gui/win32/skinload.h
Modified: trunk/gui/app.h
==============================================================================
--- trunk/gui/app.h Tue Dec 4 21:10:10 2012 (r35596)
+++ trunk/gui/app.h Wed Dec 5 02:42:50 2012 (r35597)
@@ -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
-
-#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
+/// 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 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;
Modified: trunk/gui/win32/skinload.h
==============================================================================
--- trunk/gui/win32/skinload.h Tue Dec 4 21:10:10 2012 (r35596)
+++ trunk/gui/win32/skinload.h Wed Dec 5 02:42:50 2012 (r35597)
@@ -132,70 +132,69 @@ skin_t *loadskin(char *skindir, int desk
/* --- 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 */
More information about the MPlayer-cvslog
mailing list