X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_osd.h;h=0c5f4d15abdfd9437c91a20c17713ee300640b54;hb=1f7592ff27f8b754e123d3135be15c9db54fc281;hp=a62d1cf46b46f6d6e1f065dcb22ac606f0c703b0;hpb=4b1fd54acfaffe0c6b6cdb88ccaecc2a345a35de;p=vlc diff --git a/include/vlc_osd.h b/include/vlc_osd.h index a62d1cf46b..0c5f4d15ab 100644 --- a/include/vlc_osd.h +++ b/include/vlc_osd.h @@ -88,6 +88,7 @@ static inline int spu_vaControl( spu_t *p_spu, int i_query, va_list args ) else return VLC_EGENERIC; } + static inline int spu_Control( spu_t *p_spu, int i_query, ... ) { va_list args; @@ -249,10 +250,13 @@ struct text_style_t int i_background_alpha;/**< The transparency of the background. 0x00 is fully opaque, 0xFF fully transparent */ + int i_karaoke_background_color;/**< Background color for karaoke 0xRRGGBB */ + int i_karaoke_background_alpha;/**< The transparency of the karaoke bg. + 0x00 is fully opaque, + 0xFF fully transparent */ int i_outline_width; /**< The width of the outline in pixels */ int i_shadow_width; /**< The width of the shadow in pixels */ int i_spacing; /**< The spaceing between glyphs in pixels */ - int i_text_align; /**< An alignment hint for the text */ }; /* Style flags for \ref text_style_t */ @@ -265,9 +269,7 @@ struct text_style_t #define STYLE_STRIKEOUT 64 static const text_style_t default_text_style = { NULL, 22, 0xffffff, 0xff, STYLE_OUTLINE, - 0x000000, 0xff, 0x000000, 0xff, 0xffffff, 0x80, 1, 0, -1, 0 }; - - + 0x000000, 0xff, 0x000000, 0xff, 0xffffff, 0x80, 0xffffff, 0xff, 1, 0, -1 }; /** * OSD menu button states @@ -283,6 +285,8 @@ static const text_style_t default_text_style = { NULL, 22, 0xffffff, 0xff, STYLE #define OSD_BUTTON_SELECT 1 #define OSD_BUTTON_PRESSED 2 +static const char *ppsz_button_states[] = { "unselect", "select", "pressed" }; + /** * OSD State object * @@ -392,6 +396,11 @@ struct osd_menu_t /* quick link in the linked list. */ osd_button_t *p_last_button; /*< pointer to last button in the list */ + + /* misc parser */ + module_t *p_parser; /*< pointer to parser module */ + char *psz_file; /*< Config file name */ + image_handler_t *p_image; /*< handler to image loading and conversion libraries */ }; /** @@ -577,7 +586,7 @@ static inline void osd_SetMenuUpdate( osd_menu_t *p_osd, vlc_bool_t b_value ) */ VLC_EXPORT( int, osd_ShowTextRelative, ( spu_t *, int, char *, text_style_t *, int, int, int, mtime_t ) ); VLC_EXPORT( int, osd_ShowTextAbsolute, ( spu_t *, int, char *, text_style_t *, int, int, int, mtime_t, mtime_t ) ); -VLC_EXPORT( void,osd_Message, ( spu_t *, int, char *, ... ) ); +VLC_EXPORT( void,osd_Message, ( spu_t *, int, char *, ... ) ATTRIBUTE_FORMAT( 3, 4 ) ); /** * Default feedback images @@ -590,15 +599,6 @@ VLC_EXPORT( void,osd_Message, ( spu_t *, int, char *, ... ) ); VLC_EXPORT( int, osd_Slider, ( vlc_object_t *, spu_t *, int, int, int, int, int, int, short ) ); VLC_EXPORT( int, osd_Icon, ( vlc_object_t *, spu_t *, int, int, int, int, int, short ) ); -/** - * Loading and parse the OSD Configuration file - * - * These functions load/unload the OSD menu configuration file and - * create/destroy the themable OSD menu structure on the OSD object. - */ -VLC_EXPORT( int, osd_ConfigLoader, ( vlc_object_t *, const char *, osd_menu_t ** ) ); -VLC_EXPORT( void, osd_ConfigUnload, ( vlc_object_t *, osd_menu_t ** ) ); - /** @} */ /********************************************************************** @@ -641,7 +641,7 @@ VLC_EXPORT( int, vout_ShowTextAbsolute, ( vout_thread_t *, int, const char *, te * \param i_channel Subpicture channel * \param psz_format printf style formatting **/ -VLC_EXPORT( void, __vout_OSDMessage, ( vlc_object_t *, int, const char *, ... ) ); +VLC_EXPORT( void, __vout_OSDMessage, ( vlc_object_t *, int, const char *, ... ) ATTRIBUTE_FORMAT( 3, 4 ) ); /** * Same as __vlc_OSDMessage() but with automatic casting