vdr  2.4.1
hdffcmd_osd.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * HDFF firmware command interface library
4  *
5  * Copyright (C) 2011 Andreas Regel
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the
19  * Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  *********************************************************************/
23 
24 #ifndef HDFFCMD_OSD_H
25 #define HDFFCMD_OSD_H
26 
27 
28 #define HDFF_INVALID_HANDLE 0xFFFFFFFF
29 #define HDFF_SCREEN_DISPLAY_HANDLE 0xFFFFFFFE
30 
31 #define HDFF_POSITION_SCREEN_CENTERED 0xFFFF
32 
33 #define HDFF_SIZE_FULL_SCREEN 0xFFFF
34 #define HDFF_SIZE_SAME_AS_SOURCE 0xFFFE
35 
36 #define HDFF_FONT_FACE_TIRESIAS 0x00000000
37 
38 
39 typedef struct HdffOsdConfig_t
40 {
43  uint16_t FontDpi;
45 
46 typedef enum HdffColorType_t
47 {
59 
60 typedef enum HdffColorFormat_t
61 {
65 
66 typedef enum HdffDrawingFlags_t
67 {
82 
83 
84 int HdffCmdOsdConfigure(int OsdDevice, const HdffOsdConfig_t * Config);
85 
86 int HdffCmdOsdReset(int OsdDevice);
87 
88 
89 int HdffCmdOsdCreateDisplay(int OsdDevice, uint16_t Width, uint16_t Height,
90  HdffColorType_t ColorType, uint32_t * NewDisplay);
91 
92 int HdffCmdOsdDeleteDisplay(int OsdDevice, uint32_t Display);
93 
94 int HdffCmdOsdEnableDisplay(int OsdDevice, uint32_t Display, int Enable);
95 
96 int HdffCmdOsdSetDisplayOutputRectangle(int OsdDevice, uint32_t Display,
97  uint16_t X, uint16_t Y,
98  uint16_t Width, uint16_t Height);
99 
100 int HdffCmdOsdSetDisplayClippingArea(int OsdDevice, uint32_t Display,
101  int Enable, uint16_t X, uint16_t Y,
102  uint16_t Width, uint16_t Height);
103 
104 int HdffCmdOsdRenderDisplay(int OsdDevice, uint32_t Display);
105 
106 int HdffCmdOsdSaveRegion(int OsdDevice, uint32_t Display,
107  uint16_t X, uint16_t Y,
108  uint16_t Width, uint16_t Height);
109 
110 int HdffCmdOsdRestoreRegion(int OsdDevice, uint32_t Display);
111 
112 
113 int HdffCmdOsdCreatePalette(int OsdDevice, HdffColorType_t ColorType,
114  HdffColorFormat_t ColorFormat,
115  uint32_t NumColors, const uint32_t * Colors,
116  uint32_t * NewPalette);
117 
118 int HdffCmdOsdDeletePalette(int OsdDevice, uint32_t Palette);
119 
120 int HdffCmdOsdSetDisplayPalette(int OsdDevice, uint32_t Display,
121  uint32_t Palette);
122 
123 int HdffCmdOsdSetPaletteColors(int OsdDevice, uint32_t Palette,
124  HdffColorFormat_t ColorFormat,
125  uint8_t StartColor, uint32_t NumColors,
126  const uint32_t * Colors);
127 
128 
129 int HdffCmdOsdCreateFontFace(int OsdDevice, const uint8_t * FontData,
130  uint32_t DataSize, uint32_t * NewFontFace);
131 
132 int HdffCmdOsdDeleteFontFace(int OsdDevice, uint32_t FontFace);
133 
134 int HdffCmdOsdCreateFont(int OsdDevice, uint32_t FontFace, uint32_t Size,
135  uint32_t * NewFont);
136 
137 int HdffCmdOsdDeleteFont(int OsdDevice, uint32_t Font);
138 
139 
140 int HdffCmdOsdDrawRectangle(int OsdDevice, uint32_t Display, uint16_t X,
141  uint16_t Y, uint16_t Width, uint16_t Height,
142  uint32_t Color);
143 
144 int HdffCmdOsdDrawEllipse(int OsdDevice, uint32_t Display, uint16_t CX,
145  uint16_t CY, uint16_t RadiusX, uint16_t RadiusY,
146  uint32_t Color, uint32_t Flags);
147 
148 int HdffCmdOsdDrawSlope(int OsdDevice, uint32_t Display, uint16_t X,
149  uint16_t Y, uint16_t Width, uint16_t Height,
150  uint32_t Color, uint32_t Type);
151 
152 int HdffCmdOsdDrawText(int OsdDevice, uint32_t Display, uint32_t Font,
153  uint16_t X, uint16_t Y, const char * Text,
154  uint32_t Color);
155 
156 int HdffCmdOsdDrawUtf8Text(int OsdDevice, uint32_t Display, uint32_t Font,
157  uint16_t X, uint16_t Y, const char * Text,
158  uint32_t Color);
159 
160 int HdffCmdOsdDrawWideText(int OsdDevice, uint32_t Display, uint32_t Font,
161  uint16_t X, uint16_t Y, const uint16_t * Text,
162  uint32_t Color);
163 
164 int HdffCmdOsdDrawBitmap(int OsdDevice, uint32_t Display, uint16_t X,
165  uint16_t Y, const uint8_t * Bitmap, uint16_t BmpWidth,
166  uint16_t BmpHeight, uint32_t BmpSize,
167  HdffColorType_t ColorType, uint32_t Palette);
168 
169 
170 #endif /* HDFFCMD_OSD_H */
HdffCmdOsdDeleteFontFace
int HdffCmdOsdDeleteFontFace(int OsdDevice, uint32_t FontFace)
Definition: hdffcmd_osd.c:429
HDFF_COLOR_TYPE_ARGB1555
@ HDFF_COLOR_TYPE_ARGB1555
Definition: hdffcmd_osd.h:55
HdffCmdOsdRestoreRegion
int HdffCmdOsdRestoreRegion(int OsdDevice, uint32_t Display)
Definition: hdffcmd_osd.c:253
HdffOsdConfig_t
Definition: hdffcmd_osd.h:40
HdffOsdConfig_t
struct HdffOsdConfig_t HdffOsdConfig_t
HDFF_COLOR_TYPE_RGB565
@ HDFF_COLOR_TYPE_RGB565
Definition: hdffcmd_osd.h:57
HdffCmdOsdSetDisplayClippingArea
int HdffCmdOsdSetDisplayClippingArea(int OsdDevice, uint32_t Display, int Enable, uint16_t X, uint16_t Y, uint16_t Width, uint16_t Height)
Definition: hdffcmd_osd.c:184
HDFF_DRAW_HALF_TOP
@ HDFF_DRAW_HALF_TOP
Definition: hdffcmd_osd.h:69
HdffCmdOsdConfigure
int HdffCmdOsdConfigure(int OsdDevice, const HdffOsdConfig_t *Config)
Definition: hdffcmd_osd.c:33
HDFF_COLOR_TYPE_ARGB4444
@ HDFF_COLOR_TYPE_ARGB4444
Definition: hdffcmd_osd.h:54
HdffCmdOsdCreateFont
int HdffCmdOsdCreateFont(int OsdDevice, uint32_t FontFace, uint32_t Size, uint32_t *NewFont)
Definition: hdffcmd_osd.c:445
HdffCmdOsdSaveRegion
int HdffCmdOsdSaveRegion(int OsdDevice, uint32_t Display, uint16_t X, uint16_t Y, uint16_t Width, uint16_t Height)
Definition: hdffcmd_osd.c:231
HDFF_COLOR_TYPE_CLUT2
@ HDFF_COLOR_TYPE_CLUT2
Definition: hdffcmd_osd.h:49
HdffOsdConfig_t::FontKerning
int FontKerning
Definition: hdffcmd_osd.h:42
HDFF_COLOR_TYPE_ARGB8565
@ HDFF_COLOR_TYPE_ARGB8565
Definition: hdffcmd_osd.h:53
HdffCmdOsdRenderDisplay
int HdffCmdOsdRenderDisplay(int OsdDevice, uint32_t Display)
Definition: hdffcmd_osd.c:215
HDFF_DRAW_HALF_BOTTOM
@ HDFF_DRAW_HALF_BOTTOM
Definition: hdffcmd_osd.h:71
HDFF_COLOR_TYPE_CLUT4
@ HDFF_COLOR_TYPE_CLUT4
Definition: hdffcmd_osd.h:50
HDFF_COLOR_TYPE_CLUT1
@ HDFF_COLOR_TYPE_CLUT1
Definition: hdffcmd_osd.h:48
HdffCmdOsdSetPaletteColors
int HdffCmdOsdSetPaletteColors(int OsdDevice, uint32_t Palette, HdffColorFormat_t ColorFormat, uint8_t StartColor, uint32_t NumColors, const uint32_t *Colors)
Definition: hdffcmd_osd.c:353
HDFF_COLOR_FORMAT_ACBYCR
@ HDFF_COLOR_FORMAT_ACBYCR
Definition: hdffcmd_osd.h:63
HDFF_DRAW_QUARTER_TOP_LEFT
@ HDFF_DRAW_QUARTER_TOP_LEFT
Definition: hdffcmd_osd.h:73
HDFF_DRAW_QUARTER_BOTTOM_RIGHT_INVERTED
@ HDFF_DRAW_QUARTER_BOTTOM_RIGHT_INVERTED
Definition: hdffcmd_osd.h:80
HdffCmdOsdDrawUtf8Text
int HdffCmdOsdDrawUtf8Text(int OsdDevice, uint32_t Display, uint32_t Font, uint16_t X, uint16_t Y, const char *Text, uint32_t Color)
Definition: hdffcmd_osd.c:610
HdffCmdOsdDrawText
int HdffCmdOsdDrawText(int OsdDevice, uint32_t Display, uint32_t Font, uint16_t X, uint16_t Y, const char *Text, uint32_t Color)
Definition: hdffcmd_osd.c:573
HdffCmdOsdSetDisplayPalette
int HdffCmdOsdSetDisplayPalette(int OsdDevice, uint32_t Display, uint32_t Palette)
Definition: hdffcmd_osd.c:335
HDFF_DRAW_QUARTER_BOTTOM_LEFT_INVERTED
@ HDFF_DRAW_QUARTER_BOTTOM_LEFT_INVERTED
Definition: hdffcmd_osd.h:79
HdffColorFormat_t
HdffColorFormat_t
Definition: hdffcmd_osd.h:61
HdffCmdOsdCreatePalette
int HdffCmdOsdCreatePalette(int OsdDevice, HdffColorType_t ColorType, HdffColorFormat_t ColorFormat, uint32_t NumColors, const uint32_t *Colors, uint32_t *NewPalette)
Definition: hdffcmd_osd.c:270
HDFF_COLOR_TYPE_CLUT8
@ HDFF_COLOR_TYPE_CLUT8
Definition: hdffcmd_osd.h:51
HdffCmdOsdDeletePalette
int HdffCmdOsdDeletePalette(int OsdDevice, uint32_t Palette)
Definition: hdffcmd_osd.c:319
HdffCmdOsdCreateFontFace
int HdffCmdOsdCreateFontFace(int OsdDevice, const uint8_t *FontData, uint32_t DataSize, uint32_t *NewFontFace)
Definition: hdffcmd_osd.c:382
HdffCmdOsdDrawSlope
int HdffCmdOsdDrawSlope(int OsdDevice, uint32_t Display, uint16_t X, uint16_t Y, uint16_t Width, uint16_t Height, uint32_t Color, uint32_t Type)
Definition: hdffcmd_osd.c:549
HdffCmdOsdCreateDisplay
int HdffCmdOsdCreateDisplay(int OsdDevice, uint16_t Width, uint16_t Height, HdffColorType_t ColorType, uint32_t *NewDisplay)
Definition: hdffcmd_osd.c:82
HDFF_DRAW_QUARTER_BOTTOM_RIGHT
@ HDFF_DRAW_QUARTER_BOTTOM_RIGHT
Definition: hdffcmd_osd.h:76
HDFF_DRAW_FULL
@ HDFF_DRAW_FULL
Definition: hdffcmd_osd.h:68
HdffCmdOsdEnableDisplay
int HdffCmdOsdEnableDisplay(int OsdDevice, uint32_t Display, int Enable)
Definition: hdffcmd_osd.c:138
HdffOsdConfig_t::FontAntialiasing
int FontAntialiasing
Definition: hdffcmd_osd.h:41
HdffColorType_t
HdffColorType_t
Definition: hdffcmd_osd.h:47
HdffOsdConfig_t::FontDpi
uint16_t FontDpi
Definition: hdffcmd_osd.h:43
HDFF_DRAW_HALF_RIGHT
@ HDFF_DRAW_HALF_RIGHT
Definition: hdffcmd_osd.h:72
HDFF_DRAW_QUARTER_TOP_RIGHT
@ HDFF_DRAW_QUARTER_TOP_RIGHT
Definition: hdffcmd_osd.h:74
HDFF_COLOR_FORMAT_ARGB
@ HDFF_COLOR_FORMAT_ARGB
Definition: hdffcmd_osd.h:62
HdffCmdOsdDrawBitmap
int HdffCmdOsdDrawBitmap(int OsdDevice, uint32_t Display, uint16_t X, uint16_t Y, const uint8_t *Bitmap, uint16_t BmpWidth, uint16_t BmpHeight, uint32_t BmpSize, HdffColorType_t ColorType, uint32_t Palette)
Definition: hdffcmd_osd.c:684
HdffCmdOsdReset
int HdffCmdOsdReset(int OsdDevice)
Definition: hdffcmd_osd.c:66
HDFF_COLOR_TYPE_RGB888
@ HDFF_COLOR_TYPE_RGB888
Definition: hdffcmd_osd.h:56
HdffCmdOsdDrawEllipse
int HdffCmdOsdDrawEllipse(int OsdDevice, uint32_t Display, uint16_t CX, uint16_t CY, uint16_t RadiusX, uint16_t RadiusY, uint32_t Color, uint32_t Flags)
Definition: hdffcmd_osd.c:525
HdffCmdOsdDrawRectangle
int HdffCmdOsdDrawRectangle(int OsdDevice, uint32_t Display, uint16_t X, uint16_t Y, uint16_t Width, uint16_t Height, uint32_t Color)
Definition: hdffcmd_osd.c:502
HDFF_DRAW_QUARTER_BOTTOM_LEFT
@ HDFF_DRAW_QUARTER_BOTTOM_LEFT
Definition: hdffcmd_osd.h:75
HDFF_DRAW_QUARTER_TOP_RIGHT_INVERTED
@ HDFF_DRAW_QUARTER_TOP_RIGHT_INVERTED
Definition: hdffcmd_osd.h:78
HDFF_COLOR_TYPE_ARGB8888
@ HDFF_COLOR_TYPE_ARGB8888
Definition: hdffcmd_osd.h:52
HdffCmdOsdDeleteFont
int HdffCmdOsdDeleteFont(int OsdDevice, uint32_t Font)
Definition: hdffcmd_osd.c:485
HdffCmdOsdDeleteDisplay
int HdffCmdOsdDeleteDisplay(int OsdDevice, uint32_t Display)
Definition: hdffcmd_osd.c:122
HdffCmdOsdDrawWideText
int HdffCmdOsdDrawWideText(int OsdDevice, uint32_t Display, uint32_t Font, uint16_t X, uint16_t Y, const uint16_t *Text, uint32_t Color)
Definition: hdffcmd_osd.c:647
HdffCmdOsdSetDisplayOutputRectangle
int HdffCmdOsdSetDisplayOutputRectangle(int OsdDevice, uint32_t Display, uint16_t X, uint16_t Y, uint16_t Width, uint16_t Height)
Definition: hdffcmd_osd.c:162
HdffDrawingFlags_t
HdffDrawingFlags_t
Definition: hdffcmd_osd.h:67
HDFF_DRAW_HALF_LEFT
@ HDFF_DRAW_HALF_LEFT
Definition: hdffcmd_osd.h:70
Font
static const cCursesFont Font
Definition: skincurses.c:32
HDFF_DRAW_QUARTER_TOP_LEFT_INVERTED
@ HDFF_DRAW_QUARTER_TOP_LEFT_INVERTED
Definition: hdffcmd_osd.h:77