Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
424 | giacomo | 1 | /* |
2 | * osd.h |
||
3 | * |
||
4 | * Copyright (C) 2001 Ralph Metzler <ralph@convergence.de> |
||
5 | * & Marcus Metzler <marcus@convergence.de> |
||
6 | for convergence integrated media GmbH |
||
7 | * |
||
8 | * This program is free software; you can redistribute it and/or |
||
9 | * modify it under the terms of the GNU General Lesser Public License |
||
10 | * as published by the Free Software Foundation; either version 2.1 |
||
11 | * of the License, or (at your option) any later version. |
||
12 | * |
||
13 | * This program is distributed in the hope that it will be useful, |
||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
16 | * GNU General Public License for more details. |
||
17 | * |
||
18 | * You should have received a copy of the GNU Lesser General Public License |
||
19 | * along with this program; if not, write to the Free Software |
||
20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
||
21 | * |
||
22 | */ |
||
23 | |||
24 | #ifndef _DVBOSD_H_ |
||
25 | #define _DVBOSD_H_ |
||
26 | |||
27 | typedef enum { |
||
28 | // All functions return -2 on "not open" |
||
29 | OSD_Close=1, // () |
||
30 | // Disables OSD and releases the buffers |
||
31 | // returns 0 on success |
||
32 | OSD_Open, // (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0)) |
||
33 | // Opens OSD with this size and bit depth |
||
34 | // returns 0 on success, -1 on DRAM allocation error, -2 on "already open" |
||
35 | OSD_Show, // () |
||
36 | // enables OSD mode |
||
37 | // returns 0 on success |
||
38 | OSD_Hide, // () |
||
39 | // disables OSD mode |
||
40 | // returns 0 on success |
||
41 | OSD_Clear, // () |
||
42 | // Sets all pixel to color 0 |
||
43 | // returns 0 on success |
||
44 | OSD_Fill, // (color) |
||
45 | // Sets all pixel to color <col> |
||
46 | // returns 0 on success |
||
47 | OSD_SetColor, // (color,R{x0},G{y0},B{x1},opacity{y1}) |
||
48 | // set palette entry <num> to <r,g,b>, <mix> and <trans> apply |
||
49 | // R,G,B: 0..255 |
||
50 | // R=Red, G=Green, B=Blue |
||
51 | // opacity=0: pixel opacity 0% (only video pixel shows) |
||
52 | // opacity=1..254: pixel opacity as specified in header |
||
53 | // opacity=255: pixel opacity 100% (only OSD pixel shows) |
||
54 | // returns 0 on success, -1 on error |
||
55 | OSD_SetPalette, // (firstcolor{color},lastcolor{x0},data) |
||
56 | // Set a number of entries in the palette |
||
57 | // sets the entries "firstcolor" through "lastcolor" from the array "data" |
||
58 | // data has 4 byte for each color: |
||
59 | // R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel |
||
60 | OSD_SetTrans, // (transparency{color}) |
||
61 | // Sets transparency of mixed pixel (0..15) |
||
62 | // returns 0 on success |
||
63 | OSD_SetPixel, // (x0,y0,color) |
||
64 | // sets pixel <x>,<y> to color number <col> |
||
65 | // returns 0 on success, -1 on error |
||
66 | OSD_GetPixel, // (x0,y0) |
||
67 | // returns color number of pixel <x>,<y>, or -1 |
||
68 | OSD_SetRow, // (x0,y0,x1,data) |
||
69 | // fills pixels x0,y through x1,y with the content of data[] |
||
70 | // returns 0 on success, -1 on clipping all pixel (no pixel drawn) |
||
71 | OSD_SetBlock, // (x0,y0,x1,y1,increment{color},data) |
||
72 | // fills pixels x0,y0 through x1,y1 with the content of data[] |
||
73 | // inc contains the width of one line in the data block, |
||
74 | // inc<=0 uses blockwidth as linewidth |
||
75 | // returns 0 on success, -1 on clipping all pixel |
||
76 | OSD_FillRow, // (x0,y0,x1,color) |
||
77 | // fills pixels x0,y through x1,y with the color <col> |
||
78 | // returns 0 on success, -1 on clipping all pixel |
||
79 | OSD_FillBlock, // (x0,y0,x1,y1,color) |
||
80 | // fills pixels x0,y0 through x1,y1 with the color <col> |
||
81 | // returns 0 on success, -1 on clipping all pixel |
||
82 | OSD_Line, // (x0,y0,x1,y1,color) |
||
83 | // draw a line from x0,y0 to x1,y1 with the color <col> |
||
84 | // returns 0 on success |
||
85 | OSD_Query, // (x0,y0,x1,y1,xasp{color}}), yasp=11 |
||
86 | // fills parameters with the picture dimensions and the pixel aspect ratio |
||
87 | // returns 0 on success |
||
88 | OSD_Test, // () |
||
89 | // draws a test picture. for debugging purposes only |
||
90 | // returns 0 on success |
||
91 | // TODO: remove "test" in final version |
||
92 | OSD_Text, // (x0,y0,size,color,text) |
||
93 | OSD_SetWindow, // (x0) set window with number 0<x0<8 as current |
||
94 | OSD_MoveWindow, // move current window to (x0, y0) |
||
95 | } OSD_Command; |
||
96 | |||
97 | typedef struct osd_cmd_s { |
||
98 | OSD_Command cmd; |
||
99 | int x0; |
||
100 | int y0; |
||
101 | int x1; |
||
102 | int y1; |
||
103 | int color; |
||
104 | void *data; |
||
105 | } osd_cmd_t; |
||
106 | |||
107 | |||
108 | #define OSD_SEND_CMD _IOW('o', 160, osd_cmd_t) |
||
109 | |||
110 | #endif |
||
111 |