X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_plugin.h;h=2788e4a2b3645f028f1fe7ed53966fdae6a62466;hb=c60652e38ac6afd74bd8225e9dae5406f13aaa4f;hp=4b02f2bf4fb8cb4da268b48dee870675372cf3f6;hpb=ce67728ae1a0d91643e416b86efeab34a0891e35;p=vlc diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h index 4b02f2bf4f..2788e4a2b3 100644 --- a/include/vlc_plugin.h +++ b/include/vlc_plugin.h @@ -120,8 +120,8 @@ enum vlc_module_properties /** * Current plugin ABI version */ -# define MODULE_SYMBOL 1_1_0f -# define MODULE_SUFFIX "__1_1_0f" +# define MODULE_SYMBOL 1_2_0d +# define MODULE_SUFFIX "__1_2_0d" /***************************************************************************** * Add a few defines. You do not want to read this section. Really. @@ -195,10 +195,13 @@ enum vlc_module_properties if (vlc_plugin_set (p_module, NULL, VLC_SUBMODULE_CREATE, &p_submodule)) \ goto error; -#define add_shortcut( shortcut ) \ +#define add_shortcut( ... ) \ +{ \ + const char *shortcuts[] = { __VA_ARGS__ }; \ if (vlc_module_set (p_submodule, VLC_MODULE_SHORTCUT, \ - (const char *)(shortcut))) \ - goto error; + sizeof(shortcuts)/sizeof(shortcuts[0]), shortcuts)) \ + goto error; \ +} #define set_shortname( shortname ) \ if (vlc_module_set (p_submodule, VLC_MODULE_SHORTNAME, \ @@ -226,7 +229,7 @@ enum vlc_module_properties || vlc_module_set (p_submodule, VLC_MODULE_CB_CLOSE, deactivate)) \ goto error; -#define linked_with_a_crap_library_which_uses_atexit( ) \ +#define cannot_unload_broken_library( ) \ if (vlc_module_set (p_submodule, VLC_MODULE_NO_UNLOAD)) \ goto error; @@ -270,16 +273,16 @@ enum vlc_module_properties #define add_int_inner( type, name, text, longtext, advc, cb, v ) \ add_typename_inner( type, name, text, longtext, advc, cb ) \ - vlc_config_set (p_config, VLC_CONFIG_VALUE, (int)(v)); + vlc_config_set (p_config, VLC_CONFIG_VALUE, (int64_t)(v)); #define set_category( i_id ) \ add_type_inner( CONFIG_CATEGORY ) \ - vlc_config_set (p_config, VLC_CONFIG_VALUE, (int)(i_id)); + vlc_config_set (p_config, VLC_CONFIG_VALUE, (int64_t)(i_id)); #define set_subcategory( i_id ) \ add_type_inner( CONFIG_SUBCATEGORY ) \ - vlc_config_set (p_config, VLC_CONFIG_VALUE, (int)(i_id)); + vlc_config_set (p_config, VLC_CONFIG_VALUE, (int64_t)(i_id)); #define set_section( text, longtext ) \ add_typedesc_inner( CONFIG_SECTION, text, longtext ) @@ -363,7 +366,7 @@ enum vlc_module_properties #define add_bool( name, v, p_callback, text, longtext, advc ) \ add_typename_inner( CONFIG_ITEM_BOOL, name, text, longtext, advc, \ p_callback ) \ - if (v) vlc_config_set (p_config, VLC_CONFIG_VALUE, (int)true); + if (v) vlc_config_set (p_config, VLC_CONFIG_VALUE, (int64_t)true); /* For removed option */ #define add_obsolete_inner( name, type ) \ @@ -407,7 +410,8 @@ enum vlc_module_properties (vlc_callback_t)(list_update_func)); #define change_integer_range( minv, maxv ) \ - vlc_config_set (p_config, VLC_CONFIG_RANGE, (int)(minv), (int)(maxv)); + vlc_config_set (p_config, VLC_CONFIG_RANGE, \ + (int64_t)(minv), (int64_t)(maxv)); #define change_float_range( minv, maxv ) \ vlc_config_set (p_config, VLC_CONFIG_RANGE, \ @@ -417,16 +421,19 @@ enum vlc_module_properties vlc_config_set (p_config, VLC_CONFIG_ADD_ACTION, \ (vlc_callback_t)(pf_action), (const char *)(text)); -#define change_internal() \ - vlc_config_set (p_config, VLC_CONFIG_PRIVATE); - #define change_need_restart() \ vlc_config_set (p_config, VLC_CONFIG_RESTART); #define change_autosave() \ vlc_config_set (p_config, VLC_CONFIG_PERSISTENT); -#define change_unsaveable() \ +/* For options that are saved but hidden from the preferences panel */ +#define change_private() \ + vlc_config_set (p_config, VLC_CONFIG_PRIVATE); + +/* For options that cannot be saved in the configuration */ +#define change_volatile() \ + change_private() \ vlc_config_set (p_config, VLC_CONFIG_VOLATILE); #define change_safe() \