summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristian Vogler <cvogler@users.sourceforge.net>2002-01-08 16:47:56 +0000
committerChristian Vogler <cvogler@users.sourceforge.net>2002-01-08 16:47:56 +0000
commit9d0cd30a2d05db1e72dbbefa305024afcd34a0fc (patch)
tree4433bf6e6f8f1d36c041e3a6d8a9e81f44c9c430 /include
parent5672c3abb1afcbcacd2a1f618ab850f5838add2a (diff)
downloadxine-lib-9d0cd30a2d05db1e72dbbefa305024afcd34a0fc.tar.gz
xine-lib-9d0cd30a2d05db1e72dbbefa305024afcd34a0fc.tar.bz2
increase palette size of overlays to 256 colors
allow multiple text colors in osd text rendering CVS patchset: 1376 CVS date: 2002/01/08 16:47:56
Diffstat (limited to 'include')
-rw-r--r--include/xine.h.tmpl.in92
1 files changed, 89 insertions, 3 deletions
diff --git a/include/xine.h.tmpl.in b/include/xine.h.tmpl.in
index 3b83ef708..3e9f59dd9 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.72 2002/01/05 21:54:16 miguelfreitas Exp $
+ * $Id: xine.h.tmpl.in,v 1.73 2002/01/08 16:47:56 cvogler Exp $
*
*/
@@ -388,6 +388,12 @@ int xine_check_version(int major, int minor, int sub);
/** @} end of video_ratio */
/**
+ * \def OVL_PALETTE_SIZE
+ * The number of colors in the overlay palette.
+ */
+#define OVL_PALETTE_SIZE 256
+
+/**
* \struct vo_frame_t
* Opaque data type.
* \sa vo_driver_t
@@ -1612,6 +1618,74 @@ int xine_get_current_frame (xine_t *self, int *width, int *height,
* @{
*/
+ /**
+ * \defgroup osd_textgroup OSD text attributes
+ * @{
+ */
+
+/**
+ * \def TEXT_PALETTE_SIZE
+ * The size of an OSD text palette
+ */
+#define TEXT_PALETTE_SIZE 11
+
+/** Preassigned color index for text palettes and rendering text */
+#define OSD_TEXT1 (0 * TEXT_PALETTE_SIZE)
+
+/** Preassigned color index for text palettes and rendering text */
+#define OSD_TEXT2 (1 * TEXT_PALETTE_SIZE)
+
+/** Preassigned color index for text palettes and rendering text */
+#define OSD_TEXT3 (2 * TEXT_PALETTE_SIZE)
+
+/** Preassigned color index for text palettes and rendering text */
+#define OSD_TEXT4 (3 * TEXT_PALETTE_SIZE)
+
+/** Preassigned color index for text palettes and rendering text */
+#define OSD_TEXT5 (4 * TEXT_PALETTE_SIZE)
+
+/** Preassigned color index for text palettes and rendering text */
+#define OSD_TEXT6 (5 * TEXT_PALETTE_SIZE)
+
+/** Preassigned color index for text palettes and rendering text */
+#define OSD_TEXT7 (6 * TEXT_PALETTE_SIZE)
+
+/** Preassigned color index for text palettes and rendering text */
+#define OSD_TEXT8 (7 * TEXT_PALETTE_SIZE)
+
+/** Preassigned color index for text palettes and rendering text */
+#define OSD_TEXT9 (8 * TEXT_PALETTE_SIZE)
+
+/** Preassigned color index for text palettes and rendering text */
+#define OSD_TEXT10 (9 * TEXT_PALETTE_SIZE)
+
+/**
+ * \def TEXTPALETTE_WHITE_BLACK_TRANSPARENT
+ * White text, black border, transparent background
+ */
+#define TEXTPALETTE_WHITE_BLACK_TRANSPARENT 0
+
+/**
+ * \def TEXTPALETTE_WHITE_NONE_TRANSPARENT
+ * White text, noborder, transparent background
+ */
+#define TEXTPALETTE_WHITE_NONE_TRANSPARENT 1
+
+/**
+ * \def TEXTPALETTE_WHITE_NONE_TRANSLUCID
+ * White text, no border, translucid background
+ */
+#define TEXTPALETTE_WHITE_NONE_TRANSLUCID 2
+
+/**
+ * \def TEXTPALETTE_YELLOW_BLACK_TRANSPARENT
+ * Yellow text, black border, transparent background
+ */
+#define TEXTPALETTE_YELLOW_BLACK_TRANSPARENT 3
+
+ /** @} end of osd_textgroup */
+
+
typedef struct osd_object_s osd_object_t;
typedef struct osd_renderer_s osd_renderer_t;
typedef struct osd_font_s osd_font_t;
@@ -1666,8 +1740,15 @@ struct osd_renderer_s {
/*
* set on existing text palette
* (-1 to set used specified palette)
+ *
+ * color_base specifies the first color index to use for this text
+ * palette. The OSD palette is then modified starting at this
+ * color index, up to the size of the text palette.
+ *
+ * Use OSD_TEXT1, OSD_TEXT2, ... for some preasssigned color indices.
*/
- void (*set_text_palette) (osd_object_t *osd, int palette_number );
+ void (*set_text_palette) (osd_object_t *osd, int palette_number,
+ int color_base );
/*
* get palette (color and transparency)
@@ -1690,9 +1771,14 @@ struct osd_renderer_s {
/*
* render text on x,y position (8 bits version)
* no \n yet
+ *
+ * The text is assigned the colors starting at the index specified by
+ * color_base up to the size of the text palette.
+ *
+ * Use OSD_TEXT1, OSD_TEXT2, ... for some preasssigned color indices
*/
int (*render_text) (osd_object_t *osd, int x1, int y1,
- char *text);
+ char *text, int color_base);
/*
* get width and height of how text will be renderized