[vlc-devel] commit: Replace big define by enum in vlc_keys.h (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Mar 28 23:25:08 CET 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at ambre.(none)> | Fri Mar 28 15:23:04 2008 -0700| [497610a42882c50d87a076af66013dcea591af11]

Replace big define by enum in vlc_keys.h

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=497610a42882c50d87a076af66013dcea591af11
---

 include/vlc_keys.h |  205 ++++++++++++++++++++++++++--------------------------
 1 files changed, 103 insertions(+), 102 deletions(-)

diff --git a/include/vlc_keys.h b/include/vlc_keys.h
index bbc3c1a..2d0f516 100644
--- a/include/vlc_keys.h
+++ b/include/vlc_keys.h
@@ -233,107 +233,108 @@ static inline int StringToKey( char *psz_key )
     return 0;
 }
 
-
-#define ACTIONID_QUIT                  1
-#define ACTIONID_PLAY_PAUSE            2
-#define ACTIONID_PLAY                  3
-#define ACTIONID_PAUSE                 4
-#define ACTIONID_STOP                  5
-#define ACTIONID_PREV                  6
-#define ACTIONID_NEXT                  7
-#define ACTIONID_SLOWER                8
-#define ACTIONID_FASTER                9
-#define ACTIONID_TOGGLE_FULLSCREEN     10
-#define ACTIONID_VOL_UP                11
-#define ACTIONID_VOL_DOWN              12
-#define ACTIONID_NAV_ACTIVATE          13
-#define ACTIONID_NAV_UP                14
-#define ACTIONID_NAV_DOWN              15
-#define ACTIONID_NAV_LEFT              16
-#define ACTIONID_NAV_RIGHT             17
-#define ACTIONID_JUMP_BACKWARD_EXTRASHORT 18
-#define ACTIONID_JUMP_FORWARD_EXTRASHORT  19
-#define ACTIONID_JUMP_BACKWARD_SHORT   20
-#define ACTIONID_JUMP_FORWARD_SHORT    21
-#define ACTIONID_JUMP_BACKWARD_MEDIUM  22
-#define ACTIONID_JUMP_FORWARD_MEDIUM   23
-#define ACTIONID_JUMP_BACKWARD_LONG    24
-#define ACTIONID_JUMP_FORWARD_LONG     25
-#define ACTIONID_POSITION              26
-#define ACTIONID_VOL_MUTE              27
+enum {
+    ACTIONID_QUIT = 1,
+    ACTIONID_PLAY_PAUSE,
+    ACTIONID_PLAY,
+    ACTIONID_PAUSE,
+    ACTIONID_STOP,
+    ACTIONID_PREV,
+    ACTIONID_NEXT,
+    ACTIONID_SLOWER,
+    ACTIONID_FASTER,
+    ACTIONID_TOGGLE_FULLSCREEN,
+    ACTIONID_VOL_UP,
+    ACTIONID_VOL_DOWN,
+    ACTIONID_NAV_ACTIVATE,
+    ACTIONID_NAV_UP,
+    ACTIONID_NAV_DOWN,
+    ACTIONID_NAV_LEFT,
+    ACTIONID_NAV_RIGHT,
+    ACTIONID_JUMP_BACKWARD_EXTRASHORT,
+    ACTIONID_JUMP_FORWARD_EXTRASHORT,
+    ACTIONID_JUMP_BACKWARD_SHORT,
+    ACTIONID_JUMP_FORWARD_SHORT,
+    ACTIONID_JUMP_BACKWARD_MEDIUM,
+    ACTIONID_JUMP_FORWARD_MEDIUM,
+    ACTIONID_JUMP_BACKWARD_LONG,
+    ACTIONID_JUMP_FORWARD_LONG,
+    ACTIONID_POSITION,
+    ACTIONID_VOL_MUTE,
 /* let ACTIONID_SET_BOOMARK* and ACTIONID_PLAY_BOOKMARK* be contiguous */
-#define ACTIONID_SET_BOOKMARK1         28
-#define ACTIONID_SET_BOOKMARK2         29
-#define ACTIONID_SET_BOOKMARK3         39
-#define ACTIONID_SET_BOOKMARK4         31
-#define ACTIONID_SET_BOOKMARK5         32
-#define ACTIONID_SET_BOOKMARK6         33
-#define ACTIONID_SET_BOOKMARK7         34
-#define ACTIONID_SET_BOOKMARK8         35
-#define ACTIONID_SET_BOOKMARK9         36
-#define ACTIONID_SET_BOOKMARK10        37
-#define ACTIONID_PLAY_BOOKMARK1        38
-#define ACTIONID_PLAY_BOOKMARK2        39
-#define ACTIONID_PLAY_BOOKMARK3        40
-#define ACTIONID_PLAY_BOOKMARK4        41
-#define ACTIONID_PLAY_BOOKMARK5        42
-#define ACTIONID_PLAY_BOOKMARK6        43
-#define ACTIONID_PLAY_BOOKMARK7        44
-#define ACTIONID_PLAY_BOOKMARK8        45
-#define ACTIONID_PLAY_BOOKMARK9        46
-#define ACTIONID_PLAY_BOOKMARK10       47
-/* end of contiguous zone */
-#define ACTIONID_SUBDELAY_UP           48
-#define ACTIONID_SUBDELAY_DOWN         49
-#define ACTIONID_HISTORY_BACK          50
-#define ACTIONID_HISTORY_FORWARD       51
-#define ACTIONID_AUDIO_TRACK           52
-#define ACTIONID_SUBTITLE_TRACK        53
-#define ACTIONID_CUBESPEED_UP          54
-#define ACTIONID_CUBESPEED_DOWN        55
-#define ACTIONID_INTF_SHOW             56
-#define ACTIONID_INTF_HIDE             57
-/* chapter and title navigation */
-#define ACTIONID_TITLE_PREV            58
-#define ACTIONID_TITLE_NEXT            59
-#define ACTIONID_CHAPTER_PREV          60
-#define ACTIONID_CHAPTER_NEXT          61
-/* end of chapter and title navigation */
-#define ACTIONID_AUDIODELAY_UP         62
-#define ACTIONID_AUDIODELAY_DOWN       63
-#define ACTIONID_SNAPSHOT              64
-#define ACTIONID_RECORD                65
-#define ACTIONID_DISC_MENU             66
-#define ACTIONID_ASPECT_RATIO          67
-#define ACTIONID_CROP                  68
-#define ACTIONID_DEINTERLACE           69
-#define ACTIONID_ZOOM                  70
-#define ACTIONID_UNZOOM                71
-#define ACTIONID_CROP_TOP              72
-#define ACTIONID_UNCROP_TOP            73
-#define ACTIONID_CROP_LEFT             74
-#define ACTIONID_UNCROP_LEFT           75
-#define ACTIONID_CROP_BOTTOM           76
-#define ACTIONID_UNCROP_BOTTOM         77
-#define ACTIONID_CROP_RIGHT            78
-#define ACTIONID_UNCROP_RIGHT          79
-#define ACTIONID_DUMP                  80
-#define ACTIONID_RANDOM                81
-#define ACTIONID_LOOP                  82
-#define ACTIONID_WALLPAPER             83
-#define ACTIONID_LEAVE_FULLSCREEN      84
-#define ACTIONID_MENU_ON               85
-#define ACTIONID_MENU_OFF              86
-#define ACTIONID_MENU_RIGHT            87
-#define ACTIONID_MENU_LEFT             88
-#define ACTIONID_MENU_UP               89
-#define ACTIONID_MENU_DOWN             90
-#define ACTIONID_MENU_SELECT           91
-/* Zoom */
-#define ACTIONID_ZOOM_QUARTER          92
-#define ACTIONID_ZOOM_HALF             93
-#define ACTIONID_ZOOM_ORIGINAL         94
-#define ACTIONID_ZOOM_DOUBLE           95
-/* Cycle Through Audio Devices */
-#define ACTIONID_AUDIODEVICE_CYCLE     96
+    ACTIONID_SET_BOOKMARK1,
+    ACTIONID_SET_BOOKMARK2,
+    ACTIONID_SET_BOOKMARK3,
+    ACTIONID_SET_BOOKMARK4,
+    ACTIONID_SET_BOOKMARK5,
+    ACTIONID_SET_BOOKMARK6,
+    ACTIONID_SET_BOOKMARK7,
+    ACTIONID_SET_BOOKMARK8,
+    ACTIONID_SET_BOOKMARK9,
+    ACTIONID_SET_BOOKMARK10,
+    ACTIONID_PLAY_BOOKMARK1,
+    ACTIONID_PLAY_BOOKMARK2,
+    ACTIONID_PLAY_BOOKMARK3,
+    ACTIONID_PLAY_BOOKMARK4,
+    ACTIONID_PLAY_BOOKMARK5,
+    ACTIONID_PLAY_BOOKMARK6,
+    ACTIONID_PLAY_BOOKMARK7,
+    ACTIONID_PLAY_BOOKMARK8,
+    ACTIONID_PLAY_BOOKMARK9,
+    ACTIONID_PLAY_BOOKMARK10,
+    /* end of contiguous zone */
+    ACTIONID_SUBDELAY_UP,
+    ACTIONID_SUBDELAY_DOWN,
+    ACTIONID_HISTORY_BACK,
+    ACTIONID_HISTORY_FORWARD,
+    ACTIONID_AUDIO_TRACK,
+    ACTIONID_SUBTITLE_TRACK,
+    ACTIONID_CUBESPEED_UP,
+    ACTIONID_CUBESPEED_DOWN,
+    ACTIONID_INTF_SHOW,
+    ACTIONID_INTF_HIDE,
+    /* chapter and title navigation */
+    ACTIONID_TITLE_PREV,
+    ACTIONID_TITLE_NEXT,
+    ACTIONID_CHAPTER_PREV,
+    ACTIONID_CHAPTER_NEXT,
+    /* end of chapter and title navigation */
+    ACTIONID_AUDIODELAY_UP,
+    ACTIONID_AUDIODELAY_DOWN,
+    ACTIONID_SNAPSHOT,
+    ACTIONID_RECORD,
+    ACTIONID_DISC_MENU,
+    ACTIONID_ASPECT_RATIO,
+    ACTIONID_CROP,
+    ACTIONID_DEINTERLACE,
+    ACTIONID_ZOOM,
+    ACTIONID_UNZOOM,
+    ACTIONID_CROP_TOP,
+    ACTIONID_UNCROP_TOP,
+    ACTIONID_CROP_LEFT,
+    ACTIONID_UNCROP_LEFT,
+    ACTIONID_CROP_BOTTOM,
+    ACTIONID_UNCROP_BOTTOM,
+    ACTIONID_CROP_RIGHT,
+    ACTIONID_UNCROP_RIGHT,
+    ACTIONID_DUMP,
+    ACTIONID_RANDOM,
+    ACTIONID_LOOP,
+    ACTIONID_WALLPAPER,
+    ACTIONID_LEAVE_FULLSCREEN,
+    ACTIONID_MENU_ON,
+    ACTIONID_MENU_OFF,
+    ACTIONID_MENU_RIGHT,
+    ACTIONID_MENU_LEFT,
+    ACTIONID_MENU_UP,
+    ACTIONID_MENU_DOWN,
+    ACTIONID_MENU_SELECT,
+    /* Zoom */
+    ACTIONID_ZOOM_QUARTER,
+    ACTIONID_ZOOM_HALF,
+    ACTIONID_ZOOM_ORIGINAL,
+    ACTIONID_ZOOM_DOUBLE,
+    /* Cycle Through Audio Devices */
+    ACTIONID_AUDIODEVICE_CYCLE
+};
 #endif




More information about the vlc-devel mailing list