[vlc-commits] Add integer config item type for RGB values

Rémi Denis-Courmont git at videolan.org
Wed Jun 29 22:36:20 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jun 29 23:35:58 2011 +0300| [64a2ab66af0139cf1d488bac0e80eb0ca9790bf9] | committer: Rémi Denis-Courmont

Add integer config item type for RGB values

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

 include/vlc_configuration.h |    1 +
 include/vlc_plugin.h        |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 2284f1c..7a40485 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -53,6 +53,7 @@ extern "C" {
 /* Configuration item types */
 #define CONFIG_ITEM_FLOAT                   0x20  /* Float option */
 #define CONFIG_ITEM_INTEGER                 0x40  /* Integer option */
+#define CONFIG_ITEM_RGB                     0x41  /* RGB color option */
 #define CONFIG_ITEM_BOOL                    0x60  /* Bool option */
 #define CONFIG_ITEM_STRING                  0x80  /* String option */
 #define CONFIG_ITEM_PASSWORD                0x81  /* Password option (*) */
diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
index 1f03e62..a99d2e1 100644
--- a/include/vlc_plugin.h
+++ b/include/vlc_plugin.h
@@ -345,6 +345,10 @@ enum vlc_module_properties
 #define add_integer( name, value, text, longtext, advc ) \
     add_int_inner( CONFIG_ITEM_INTEGER, name, text, longtext, advc, value )
 
+#define add_rgb( name, value, text, longtext, advc ) \
+    add_int_inner( CONFIG_ITEM_RGB, name, text, longtext, advc, value ) \
+    change_integer_range( 0, 0xFFFFFF )
+
 #define add_key( name, value, text, longtext, advc ) \
     add_string_inner( CONFIG_ITEM_KEY, "global-" name, text, longtext, advc, \
                    KEY_UNSET ) \



More information about the vlc-commits mailing list