vdr  1.7.27
hdffcmd_osd.h
Go to the documentation of this file.
00001 /**********************************************************************
00002  *
00003  * HDFF firmware command interface library
00004  *
00005  * Copyright (C) 2011  Andreas Regel
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011 
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016 
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the
00019  * Free Software Foundation, Inc.,
00020  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00021  *
00022  *********************************************************************/
00023 
00024 #ifndef HDFFCMD_OSD_H
00025 #define HDFFCMD_OSD_H
00026 
00027 
00028 #define HDFF_INVALID_HANDLE             0xFFFFFFFF
00029 #define HDFF_SCREEN_DISPLAY_HANDLE      0xFFFFFFFE
00030 
00031 #define HDFF_POSITION_SCREEN_CENTERED   0xFFFF
00032 
00033 #define HDFF_SIZE_FULL_SCREEN           0xFFFF
00034 #define HDFF_SIZE_SAME_AS_SOURCE        0xFFFE
00035 
00036 #define HDFF_FONT_FACE_TIRESIAS         0x00000000
00037 
00038 
00039 typedef struct HdffOsdConfig_t
00040 {
00041     int FontAntialiasing;
00042     int FontKerning;
00043 } HdffOsdConfig_t;
00044 
00045 typedef enum HdffColorType_t
00046 {
00047     HDFF_COLOR_TYPE_CLUT1,
00048     HDFF_COLOR_TYPE_CLUT2,
00049     HDFF_COLOR_TYPE_CLUT4,
00050     HDFF_COLOR_TYPE_CLUT8,
00051     HDFF_COLOR_TYPE_ARGB8888,
00052     HDFF_COLOR_TYPE_ARGB8565,
00053     HDFF_COLOR_TYPE_ARGB4444,
00054     HDFF_COLOR_TYPE_ARGB1555,
00055     HDFF_COLOR_TYPE_RGB888,
00056     HDFF_COLOR_TYPE_RGB565
00057 } HdffColorType_t;
00058 
00059 typedef enum HdffColorFormat_t
00060 {
00061     HDFF_COLOR_FORMAT_ARGB,
00062     HDFF_COLOR_FORMAT_ACBYCR
00063 } HdffColorFormat_t;
00064 
00065 typedef enum HdffDrawingFlags_t
00066 {
00067     HDFF_DRAW_FULL,
00068     HDFF_DRAW_HALF_TOP,
00069     HDFF_DRAW_HALF_LEFT,
00070     HDFF_DRAW_HALF_BOTTOM,
00071     HDFF_DRAW_HALF_RIGHT,
00072     HDFF_DRAW_QUARTER_TOP_LEFT,
00073     HDFF_DRAW_QUARTER_TOP_RIGHT,
00074     HDFF_DRAW_QUARTER_BOTTOM_LEFT,
00075     HDFF_DRAW_QUARTER_BOTTOM_RIGHT,
00076     HDFF_DRAW_QUARTER_TOP_LEFT_INVERTED,
00077     HDFF_DRAW_QUARTER_TOP_RIGHT_INVERTED,
00078     HDFF_DRAW_QUARTER_BOTTOM_LEFT_INVERTED,
00079     HDFF_DRAW_QUARTER_BOTTOM_RIGHT_INVERTED
00080 } HdffDrawingFlags_t;
00081 
00082 
00083 int HdffCmdOsdConfigure(int OsdDevice, const HdffOsdConfig_t * Config);
00084 
00085 int HdffCmdOsdReset(int OsdDevice);
00086 
00087 
00088 int HdffCmdOsdCreateDisplay(int OsdDevice, uint16_t Width, uint16_t Height,
00089                             HdffColorType_t ColorType, uint32_t * NewDisplay);
00090 
00091 int HdffCmdOsdDeleteDisplay(int OsdDevice, uint32_t Display);
00092 
00093 int HdffCmdOsdEnableDisplay(int OsdDevice, uint32_t Display, int Enable);
00094 
00095 int HdffCmdOsdSetDisplayOutputRectangle(int OsdDevice, uint32_t Display,
00096                                         uint16_t X, uint16_t Y,
00097                                         uint16_t Width, uint16_t Height);
00098 
00099 int HdffCmdOsdSetDisplayClippingArea(int OsdDevice, uint32_t Display,
00100                                      int Enable, uint16_t X, uint16_t Y,
00101                                      uint16_t Width, uint16_t Height);
00102 
00103 int HdffCmdOsdRenderDisplay(int OsdDevice, uint32_t Display);
00104 
00105 int HdffCmdOsdSaveRegion(int OsdDevice, uint32_t Display,
00106                          uint16_t X, uint16_t Y,
00107                          uint16_t Width, uint16_t Height);
00108 
00109 int HdffCmdOsdRestoreRegion(int OsdDevice, uint32_t Display);
00110 
00111 
00112 int HdffCmdOsdCreatePalette(int OsdDevice, HdffColorType_t ColorType,
00113                             HdffColorFormat_t ColorFormat,
00114                             uint32_t NumColors, const uint32_t * Colors,
00115                             uint32_t * NewPalette);
00116 
00117 int HdffCmdOsdDeletePalette(int OsdDevice, uint32_t Palette);
00118 
00119 int HdffCmdOsdSetDisplayPalette(int OsdDevice, uint32_t Display,
00120                                 uint32_t Palette);
00121 
00122 int HdffCmdOsdSetPaletteColors(int OsdDevice, uint32_t Palette,
00123                                HdffColorFormat_t ColorFormat,
00124                                uint8_t StartColor, uint32_t NumColors,
00125                                const uint32_t * Colors);
00126 
00127 
00128 int HdffCmdOsdCreateFontFace(int OsdDevice, const uint8_t * FontData,
00129                              uint32_t DataSize, uint32_t * NewFontFace);
00130 
00131 int HdffCmdOsdDeleteFontFace(int OsdDevice, uint32_t FontFace);
00132 
00133 int HdffCmdOsdCreateFont(int OsdDevice, uint32_t FontFace, uint32_t Size,
00134                          uint32_t * NewFont);
00135 
00136 int HdffCmdOsdDeleteFont(int OsdDevice, uint32_t Font);
00137 
00138 
00139 int HdffCmdOsdDrawRectangle(int OsdDevice, uint32_t Display, uint16_t X,
00140                             uint16_t Y, uint16_t Width, uint16_t Height,
00141                             uint32_t Color);
00142 
00143 int HdffCmdOsdDrawEllipse(int OsdDevice, uint32_t Display, uint16_t CX,
00144                           uint16_t CY, uint16_t RadiusX, uint16_t RadiusY,
00145                           uint32_t Color, uint32_t Flags);
00146 
00147 int HdffCmdOsdDrawText(int OsdDevice, uint32_t Display, uint32_t Font,
00148                        uint16_t X, uint16_t Y, const char * Text,
00149                        uint32_t Color);
00150 
00151 int HdffCmdOsdDrawWideText(int OsdDevice, uint32_t Display, uint32_t Font,
00152                            uint16_t X, uint16_t Y, const uint16_t * Text,
00153                            uint32_t Color);
00154 
00155 int HdffCmdOsdDrawBitmap(int OsdDevice, uint32_t Display, uint16_t X,
00156                          uint16_t Y, const uint8_t * Bitmap, uint16_t BmpWidth,
00157                          uint16_t BmpHeight, uint32_t BmpSize,
00158                          HdffColorType_t ColorType, uint32_t Palette);
00159 
00160 
00161 #endif /* HDFFCMD_OSD_H */