]> git.sesse.net Git - vlc/blobdiff - include/vlc_osd.h
playlist/services_discovery.c: Send service discover started and ended events, to...
[vlc] / include / vlc_osd.h
index d403b67fba3d4127ef8e32c01b03a5801a23f9f9..f9452c3fa02d675aee3769cc26d1097296fcf6cb 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * vlc_osd.h - OSD menu and subpictures definitions and function prototypes
  *****************************************************************************
- * Copyright (Cà 1999-2006 the VideoLAN team
+ * Copyright (C) 1999-2006 the VideoLAN team
  * Copyright (C) 2004-2005 M2X
  * $Id$
  *
@@ -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;
@@ -270,8 +271,6 @@ struct text_style_t
 static const text_style_t default_text_style = { NULL, 22, 0xffffff, 0xff, STYLE_OUTLINE,
                 0x000000, 0xff, 0x000000, 0xff, 0xffffff, 0x80, 0xffffff, 0xff, 1, 0, -1 };
 
-
-
 /**
  * OSD menu button states
  *
@@ -301,6 +300,11 @@ struct osd_state_t
 
     char        *psz_state; /*< state name */
     int          i_state;   /*< state index */
+
+    int     i_x;            /*< x-position of button state image */
+    int     i_y;            /*< y-position of button state image */
+    int     i_width;        /*< width of button state image */
+    int     i_height;       /*< height of button state image */
 };
 
 /**
@@ -329,6 +333,8 @@ struct osd_button_t
 
     int     i_x;            /*< x-position of button visible state image */
     int     i_y;            /*< y-position of button visible state image */
+    int     i_width;        /*< width of button visible state image */
+    int     i_height;       /*< height of button visible state image */
 
     /* range style button */
     vlc_bool_t   b_range;    /*< button should be interpreted as range */
@@ -388,6 +394,7 @@ struct osd_menu_t
     int     i_width;    /*< width of OSD Menu on the video screen */
     int     i_height;   /*< height of OSD Menu on the video screen */
     int     i_style;    /*< style of spu region generation */
+    int     i_position; /*< display position */
 
     char             *psz_path;  /*< directory where OSD menu images are stored */
     osd_button_t     *p_button;  /*< doubly linked list of buttons */
@@ -420,20 +427,23 @@ VLC_EXPORT( osd_menu_t *, __osd_MenuCreate, ( vlc_object_t *, const char * ) );
  */
 VLC_EXPORT( void, __osd_MenuDelete, ( vlc_object_t *, osd_menu_t * ) );
 
+#define osd_MenuCreate(object,file) __osd_MenuCreate( VLC_OBJECT(object), file )
+#define osd_MenuDelete(object,osd)  __osd_MenuDelete( VLC_OBJECT(object), osd )
+
 /**
- * Change state on an osd_button_t.
- *
- * This function selects the specified state and returns a pointer to it. The
- * following states are currently supported:
- * \see OSD_BUTTON_UNSELECT
- * \see OSD_BUTTON_SELECT
- * \see OSD_BUTTON_PRESSED
+ * Find OSD Menu button at position x,y
  */
-VLC_EXPORT( osd_state_t *, __osd_StateChange, ( osd_state_t *, const int ) );
+VLC_EXPORT( osd_button_t *, __osd_ButtonFind, ( vlc_object_t *p_this,
+     int, int, int, int, int, int ) );
 
-#define osd_MenuCreate(object,file) __osd_MenuCreate( VLC_OBJECT(object), file )
-#define osd_MenuDelete(object,osd)  __osd_MenuDelete( VLC_OBJECT(object), osd )
-#define osd_StateChange(object,value) __osd_StateChange( object, value )
+#define osd_ButtonFind(object,x,y,h,w,sh,sw)  __osd_ButtonFind(object,x,y,h,w,sh,sw)
+
+/**
+ * Select the button provided as the new active button
+ */
+VLC_EXPORT( void, __osd_ButtonSelect, ( vlc_object_t *, osd_button_t *) );
+
+#define osd_ButtonSelect(object,button) __osd_ButtonSelect(object,button)
 
 /**
  * Show the OSD menu.