diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-12-08 00:45:26 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-12-08 00:45:26 +0000 |
commit | 2edcb897ed3a2de001e50c87a07c956547e19ad5 (patch) | |
tree | 8df74b82a3d827c946b8260ed76f4d563815e7fd /include | |
parent | c411a4ea9f23a55037b2f338b4e8baa9d156a620 (diff) | |
download | xine-lib-2edcb897ed3a2de001e50c87a07c956547e19ad5.tar.gz xine-lib-2edcb897ed3a2de001e50c87a07c956547e19ad5.tar.bz2 |
osd renderer interface is public now
CVS patchset: 1175
CVS date: 2001/12/08 00:45:26
Diffstat (limited to 'include')
-rw-r--r-- | include/xine.h.tmpl.in | 98 |
1 files changed, 97 insertions, 1 deletions
diff --git a/include/xine.h.tmpl.in b/include/xine.h.tmpl.in index d558cb562..52761cd8a 100644 --- a/include/xine.h.tmpl.in +++ b/include/xine.h.tmpl.in @@ -28,7 +28,7 @@ \endverbatim */ /* - * $Id: xine.h.tmpl.in,v 1.59 2001/12/01 22:38:31 guenter Exp $ + * $Id: xine.h.tmpl.in,v 1.60 2001/12/08 00:45:26 guenter Exp $ * */ @@ -1579,6 +1579,102 @@ int xine_get_current_frame (xine_t *self, int *width, int *height, */ #define XINE_ASPECT_RATIO_DONT_TOUCH 42 +/* osd stuff */ + +typedef struct osd_object_s osd_object_t; + +typedef struct osd_renderer_s osd_renderer_t; +typedef struct osd_font_s osd_font_t; + +struct osd_renderer_s { + + /* + * open a new osd object. this will allocated an empty (all zero) drawing + * area where graphic primitives may be used. + * It is ok to specify big width and height values. The render will keep + * track of the smallest changed area to not generate too big overlays. + * A default palette is initialized (i sugest keeping color 0 as transparent + * for the sake of simplicity) + */ + osd_object_t* (*new_object) (osd_renderer_t *self, int width, int height); + + /* + * free osd object + */ + void (*free_object) (osd_object_t *osd_to_close); + + + /* + * send the osd to be displayed at given pts (0=now) + * the object is not changed. there may be subsequent drawing on it. + */ + int (*show) (osd_object_t *osd, uint32_t vpts ); + + /* + * send event to hide osd at given pts (0=now) + * the object is not changed. there may be subsequent drawing on it. + */ + int (*hide) (osd_object_t *osd, uint32_t vpts ); + + /* + * Bresenham line implementation on osd object + */ + void (*line) (osd_object_t *osd, + int x1, int y1, int x2, int y2, int color ); + + /* + * filled retangle + */ + void (*filled_rect) (osd_object_t *osd, + int x1, int y1, int x2, int y2, int color ); + + /* + * set palette (color and transparency) + */ + void (*set_palette) (osd_object_t *osd, uint32_t *color, uint8_t *trans ); + + /* + * get palette (color and transparency) + */ + void (*get_palette) (osd_object_t *osd, uint32_t *color, + uint8_t *trans); + + /* + * set position were overlay will be blended + */ + void (*set_position) (osd_object_t *osd, int x, int y); + + /* + * set the font of osd object + */ + + int (*set_font) (osd_object_t *osd, char *fontname, int size); + + + /* + * render text on x,y position (8 bits version) + * no \n yet + */ + int (*render_text) (osd_object_t *osd, int x1, int y1, + char *text); + + /* + * get width and height of how text will be renderized + */ + int (*get_text_size) (osd_object_t *osd, char *text, + int *width, int *height); + + /* + * close osd rendering engine + * loaded fonts are unloaded + * osd objects are closed + */ + void (*close) (osd_renderer_t *this); + +}; + +osd_renderer_t *xine_get_osd_renderer (xine_t *self); + /** @} end of xine_api */ #ifdef __cplusplus |