summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-19 19:46:12 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-19 19:46:12 +0100
commitb67f71f5b1d9a869d0adf5609baa9670a112bcf6 (patch)
treec39ae537708ef60affa2b0adb63a51c07f55ad74 /src
parent63ba5c5f0504600844f9a9e50b9d7da3b10953f0 (diff)
downloadxine-lib-b67f71f5b1d9a869d0adf5609baa9670a112bcf6.tar.gz
xine-lib-b67f71f5b1d9a869d0adf5609baa9670a112bcf6.tar.bz2
Move code out of osd.h that was present only with __OSD_C__ defined.
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/osd.c97
-rw-r--r--src/xine-engine/osd.h102
2 files changed, 95 insertions, 104 deletions
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c
index 1587b76e4..23c1cb35e 100644
--- a/src/xine-engine/osd.c
+++ b/src/xine-engine/osd.c
@@ -20,8 +20,6 @@
* OSD stuff (text and graphic primitives)
*/
-#define __OSD_C__
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -50,6 +48,7 @@
#define XINE_ENGINE_INTERNAL
+#include "alphablend.h"
#include "xine_internal.h"
#include "xine-engine/bswap.h"
#include "xineutils.h"
@@ -110,6 +109,100 @@
# define FT_LOAD_FLAGS (FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING)
#endif
+/* This text descriptions are used for config screen */
+static const char *const textpalettes_str[NUMBER_OF_TEXT_PALETTES+1] = {
+ "white-black-transparent",
+ "white-none-transparent",
+ "white-none-translucid",
+ "yellow-black-transparent",
+ NULL};
+
+/*
+ Palette entries as used by osd fonts:
+
+ 0: not used by font, always transparent
+ 1: font background, usually transparent, may be used to implement
+ translucid boxes where the font will be printed.
+ 2-5: transition between background and border (usually only alpha
+ value changes).
+ 6: font border. if the font is to be displayed without border this
+ will probably be adjusted to font background or near.
+ 7-9: transition between border and foreground
+ 10: font color (foreground)
+*/
+
+/*
+ The palettes below were made by hand, ie, i just throw
+ values that seemed to do the transitions i wanted.
+ This can surelly be improved a lot. [Miguel]
+*/
+
+static const clut_t textpalettes_color[NUMBER_OF_TEXT_PALETTES][TEXT_PALETTE_SIZE] = {
+/* white, black border, transparent */
+ {
+ CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*1*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*2*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*3*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*4*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*5*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*6*/
+ CLUT_Y_CR_CB_INIT(0x40, 0x80, 0x80), /*7*/
+ CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*8*/
+ CLUT_Y_CR_CB_INIT(0xc0, 0x80, 0x80), /*9*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*10*/
+ },
+ /* white, no border, transparent */
+ {
+ CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*1*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*2*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*3*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*4*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*5*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*6*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*7*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*8*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*9*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*10*/
+ },
+ /* white, no border, translucid */
+ {
+ CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
+ CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*1*/
+ CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*2*/
+ CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*3*/
+ CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*4*/
+ CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*5*/
+ CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*6*/
+ CLUT_Y_CR_CB_INIT(0xa0, 0x80, 0x80), /*7*/
+ CLUT_Y_CR_CB_INIT(0xc0, 0x80, 0x80), /*8*/
+ CLUT_Y_CR_CB_INIT(0xe0, 0x80, 0x80), /*9*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*10*/
+ },
+ /* yellow, black border, transparent */
+ {
+ CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*1*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*2*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*3*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*4*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*5*/
+ CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*6*/
+ CLUT_Y_CR_CB_INIT(0x40, 0x84, 0x60), /*7*/
+ CLUT_Y_CR_CB_INIT(0x70, 0x88, 0x40), /*8*/
+ CLUT_Y_CR_CB_INIT(0xb0, 0x8a, 0x20), /*9*/
+ CLUT_Y_CR_CB_INIT(0xff, 0x90, 0x00), /*10*/
+ },
+};
+
+static const uint8_t textpalettes_trans[NUMBER_OF_TEXT_PALETTES][TEXT_PALETTE_SIZE] = {
+ {0, 0, 3, 6, 8, 10, 12, 14, 15, 15, 15 },
+ {0, 0, 0, 0, 0, 0, 2, 6, 9, 12, 15 },
+ {0, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15 },
+ {0, 0, 3, 6, 8, 10, 12, 14, 15, 15, 15 },
+};
+
typedef struct osd_fontchar_s {
uint8_t *bmp;
uint16_t code;
diff --git a/src/xine-engine/osd.h b/src/xine-engine/osd.h
index ce7c13e5f..ed4e2434b 100644
--- a/src/xine-engine/osd.h
+++ b/src/xine-engine/osd.h
@@ -29,9 +29,6 @@
#ifdef XINE_COMPILE
# include "video_overlay.h"
-# ifdef __OSD_C__
-# include "alphablend.h"
-# endif
#else
# include <xine/video_overlay.h>
#endif
@@ -262,104 +259,5 @@ osd_renderer_t *_x_osd_renderer_init( xine_stream_t *stream );
#define TEXTPALETTE_WHITE_NONE_TRANSLUCID 2
#define TEXTPALETTE_YELLOW_BLACK_TRANSPARENT 3
-#ifdef __OSD_C__
-
-/* This text descriptions are used for config screen */
-static const char *const textpalettes_str[NUMBER_OF_TEXT_PALETTES+1] = {
- "white-black-transparent",
- "white-none-transparent",
- "white-none-translucid",
- "yellow-black-transparent",
- NULL};
-
-
-/*
- Palette entries as used by osd fonts:
-
- 0: not used by font, always transparent
- 1: font background, usually transparent, may be used to implement
- translucid boxes where the font will be printed.
- 2-5: transition between background and border (usually only alpha
- value changes).
- 6: font border. if the font is to be displayed without border this
- will probably be adjusted to font background or near.
- 7-9: transition between border and foreground
- 10: font color (foreground)
-*/
-
-/*
- The palettes below were made by hand, ie, i just throw
- values that seemed to do the transitions i wanted.
- This can surelly be improved a lot. [Miguel]
-*/
-
-static const clut_t textpalettes_color[NUMBER_OF_TEXT_PALETTES][TEXT_PALETTE_SIZE] = {
-/* white, black border, transparent */
- {
- CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*1*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*2*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*3*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*4*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*5*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*6*/
- CLUT_Y_CR_CB_INIT(0x40, 0x80, 0x80), /*7*/
- CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*8*/
- CLUT_Y_CR_CB_INIT(0xc0, 0x80, 0x80), /*9*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*10*/
- },
- /* white, no border, transparent */
- {
- CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*1*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*2*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*3*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*4*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*5*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*6*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*7*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*8*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*9*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*10*/
- },
- /* white, no border, translucid */
- {
- CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
- CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*1*/
- CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*2*/
- CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*3*/
- CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*4*/
- CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*5*/
- CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), /*6*/
- CLUT_Y_CR_CB_INIT(0xa0, 0x80, 0x80), /*7*/
- CLUT_Y_CR_CB_INIT(0xc0, 0x80, 0x80), /*8*/
- CLUT_Y_CR_CB_INIT(0xe0, 0x80, 0x80), /*9*/
- CLUT_Y_CR_CB_INIT(0xff, 0x80, 0x80), /*10*/
- },
- /* yellow, black border, transparent */
- {
- CLUT_Y_CR_CB_INIT(0x00, 0x00, 0x00), /*0*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*1*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*2*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*3*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*4*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*5*/
- CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), /*6*/
- CLUT_Y_CR_CB_INIT(0x40, 0x84, 0x60), /*7*/
- CLUT_Y_CR_CB_INIT(0x70, 0x88, 0x40), /*8*/
- CLUT_Y_CR_CB_INIT(0xb0, 0x8a, 0x20), /*9*/
- CLUT_Y_CR_CB_INIT(0xff, 0x90, 0x00), /*10*/
- },
-};
-
-static const uint8_t textpalettes_trans[NUMBER_OF_TEXT_PALETTES][TEXT_PALETTE_SIZE] = {
- {0, 0, 3, 6, 8, 10, 12, 14, 15, 15, 15 },
- {0, 0, 0, 0, 0, 0, 2, 6, 9, 12, 15 },
- {0, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15 },
- {0, 0, 3, 6, 8, 10, 12, 14, 15, 15, 15 },
-};
-
-#endif /* __OSD_C__ */
-
#endif