source: svn/newcon3bcm2_21bu/dst/dmw/src/cc/cc_private.h @ 69

Last change on this file since 69 was 69, checked in by phkim, 10 years ago

1.phkim

  1. 광주방송
  2. 변경내용
    • VBI 캡션 disabled
  • Property svn:executable set to *
File size: 6.2 KB
Line 
1
2
3#ifndef __CC_PRIVATE_H__
4#define __CC_PRIVATE_H__
5
6//debug
7//level: 4(0~3)
8
9#if CC_DBG_ON
10#define CCPRINT DCCUtil_DbgPrint
11#else
12#define CCPRINT(...)
13#endif
14
15void DCCUtil_DbgPrint(char *pname, char *fmt, ...);
16void DCCUtil_ShowDbgItem(void);
17void DCCUtil_SetDbgOn(char *pname, BOOL is_on);
18void DCCUtil_ToggleDbgOn(char *pname);
19void DCCUtil_SetDbgOnByIdx(int idx, BOOL is_on);
20void DCCUtil_ToggleDbgOnByIdx(int idx);
21
22
23//time
24
25#define TIMER_NOUSE ((UINT32)-1)
26
27
28#define MAX_NUM_TIMER 8
29#define TIMER_ID_RST (MAX_NUM_TIMER-1)
30#define TIMER_ID_CLEAR_SCREEN (MAX_NUM_TIMER-2)
31
32#define TIMER_ID_FLASH (MAX_NUM_TIMER-3)
33
34#define CC_MS_PASS(s) (DCCDDI_GetCurMs()-(s))
35
36
37//MAIN
38
39void DCCMain_Init(void);
40void DCCMain_SendCmd(UINT8 cmd, UINT32 opt, UINT32 param1, UINT32 param2);
41void DCCMain_ResetQueue(void);
42void DCCMain_UserMsgOnOff(BOOL bon);
43//CCDDI
44
45#if 1//BRCM
46typedef DHL_OS_MSGQ_ID  tDCCDDI_MSGQ;
47#else
48typedef UINT32 tDCCDDI_MSGQ;
49#endif
50typedef UINT32 tDCCDDI_SEM;
51
52void *DCCDDI_Malloc(int size);
53
54void DCCDDI_Printf(const char *fmt, ...);
55
56void DCCDDI_SpawnTask(void *func);
57tDCCDDI_MSGQ DCCDDI_CreateMessageQueue(char *pname, UINT32 num_msgq, UINT32 size_msgq);
58tDCCDDI_SEM DCCDDI_CreateMutexSemaphore(char *pname);
59tDCCDDI_SEM DCCDDI_CreateBinarySemaphore(char *pname);
60void DCCDDI_SendMessage(tDCCDDI_MSGQ id, void *buf, UINT32 len);
61int DCCDDI_ReceiveMessage(tDCCDDI_MSGQ id, void *buf, UINT32 max_len, int *rcv_len);
62int DCCDDI_ReceiveMessage_Wait(tDCCDDI_MSGQ id, void *buf, UINT32 max_len, int *rcv_len, UINT32 msec);
63int DCCDDI_ReceiveMessage_NoWait(tDCCDDI_MSGQ id, void *buf, UINT32 max_len, int *rcv_len);
64void DCCDDI_TakeSemaphore(tDCCDDI_SEM id);
65void DCCDDI_GiveSemaphore(tDCCDDI_SEM id);
66void DCCDDI_Delay(UINT32 msec);
67UINT32 DCCDDI_GetCurMs(void);
68
69typedef void (*tDCC_UserCallback)(tDCC_PicUDRaw *praw_pud);
70
71void DCCDDI_Init(void);
72void DCCDDI_SetUserCallback(tDCC_UserCallback func);
73
74int DCCDDI_Feeding608(BOOL is_even, UINT8 data1, UINT8 data2, BOOL is_end);
75
76void DCCDDI_GraphicStart(UINT8 resolution);
77void DCCDDI_GraphicStop(void);
78void DCCDDI_DrawBox(int x, int y, int w, int h, int color);
79void DCCDDI_BLT(int x, int y, int w, int h, int height);
80void DCCDDI_DrawHLine(int x, int y, int w, int color);
81void DCCDDI_Refresh(void);
82
83int DCCDDI_PrintCh(int x, int y, UINT16 ch, int c_font, int c_edge);
84int DCCDDI_GetChWidth(UINT16 ch);
85int DCCDDI_GetChHeight(UINT16 ch);
86void DCCDDI_SetFontAttr(int size, BOOL is_italic, BOOL is_underline, UINT8 font_style, 
87        UINT8 edge_type, BOOL is_p16);
88
89void DCCDDI_SetKoreanMode(BOOL is_unicode);
90
91//CCFRONT
92void DCCFront_Init(void);
93int DCCFront_ParsePicUD(tDCC_PicUDRaw *pic_ud_raw, tDCC_PicUD *pic_ud);
94BOOL DCCFront_IsServiceOn(UINT8 service);
95void DCCFront_SetService(UINT8 service);
96void DCCFront_SetFeeding608(BOOL bon);
97void DCCFront_SetCallback(tDCC_InfoCallback func);
98
99//CCEXEC608
100
101#define DCC_608_WIN_WIDTH 32
102#define DCC_608_WIN_HEIGHT 15
103
104#define DCC_608_TEXT_START_ROW (8-1)
105
106
107void DCCExec_Process608(UINT8 d1, UINT8 d2);
108void DCCExec_Reset608Attr(void);
109
110//CCEXEC708
111void DCCExec_ProcessMsg(tDCC_CmdSet cmd, UINT32 opt, UINT32 param1, UINT32 param2);
112void DCCExec_Init(void);
113char* DCCExec_CmdGetStr(tDCC_CmdSet cmd);
114void DCCExec_SetCallback(tDCC_InfoCallback func);
115BOOL DCCExec_IsCurDLY();
116void DCCExec_ForceDLYRelease();
117
118//WIN
119tDCC_DefWin *DCCWin_GetWin(int wid);
120void DCCWin_DrawWin(int wid, BOOL draw_bg, BOOL draw_fg);
121void DCCWin_EraseWin(int wid);
122void DCCWin_DrawAllWins(void);
123void DCCWin_DrawFlashWins(void);
124void DCCWin_ResetWin(int wid);
125void DCCWin_ResetTextPos(int wid);
126void DCCWin_ResetTextOnly(int wid);
127void DCCWin_ResetAllWins(BOOL berase_screen);
128void DCCWin_UpdateWinRect(int wid);
129BOOL DCCWin_CheckWinRect(int wid);
130void DCCWin_UpdateWinAttr(void);
131void DCCWin_EraseCurLine(int wid, BOOL is_der);
132void DCCWin_FillTrpToLine(int wid);
133void DCCWin_InsertCh(int wid, UINT16 ch, UINT32 opt);
134void DCCWin_EraseCh(int wid);
135void DCCWin_UpdateLine(int wid, int row);
136void DCCWin_ToggleFlashFlag(void);
137void DCCWin_SetUserPos(int x, int y);
138
139void DCCWin_UpdateWinOrderList(int nWinID);//iskang 090608
140void DCCWin_DrawByWindowOrder(BOOL bClear);//iskang 090608
141BOOL DCCWin_NeedToRedrawWindowOrNot(void);//iskang 090608
142
143//CCUTIL
144int DCCUtil_UStrLen(UINT16 *str);
145UINT16 DCCUtil_Ksx1001toUnicode(UINT16 code);
146
147void DCCUtil_InitBitBuf(UINT8 *pdata, int size);
148UINT32 DCCUtil_NextBits(UINT8 size);
149UINT32 DCCUtil_GetBits(UINT8 size);
150void DCCUtil_UngetBits(UINT32 size, UINT32 data);
151int DCCUtil_CheckBits(UINT8 size);
152
153
154//CCGRP
155
156enum {
157        ePRIV_CH_DRAW_TYPE_ALL=0,
158        ePRIV_CH_DRAW_TYPE_LEFT,
159        ePRIV_CH_DRAW_TYPE_RIGHT,
160        ePRIV_CH_DRAW_TYPE_NONE
161};
162
163void DCCGrp_Init(BOOL is_cc_wide, BOOL is_src_wide, BOOL is_korean, 
164        int resolution, tDCC_ColorMap *color_map);
165void DCCGrp_SetService(UINT8 service);
166void DCCGrp_SetKorean(BOOL is_korean);
167void DCCGrp_Start(void);
168void DCCGrp_Stop(void);
169void DCCGrp_DrawBox(int x, int y, int w, int h, int color);
170void DCCGrp_EraseBox(int x, int y, int w, int h);
171void DCCGrp_ClearScreen(void);
172
173void DCCGrp_ScrollUp(int x, int y, int w, int h, int height, int bg_color);
174void DCCGrp_ScrollDown(int x, int y, int w, int h, int height, int bg_color);
175void DCCGrp_SetScrollSpeed(int delay, int slice);
176
177int DCCGrp_PrintCh(int x, int y, UINT16 ch, int draw_mode);
178int DCCGrp_GetChWidth(UINT16 ch);
179int DCCGrp_GetStrWidth(UINT16 *str);
180int DCCGrp_GetStrNWidth(UINT16 *str, int n);
181void DCCGrp_SetFontAttr(tDCC_PenAttr *pattr);
182tDCC_PenAttr *DCCGrp_GetFontAttr(void);
183int DCCGrp_GetMaxFontWidth(UINT8 size, BOOL bhalf);
184int DCCGrp_GetMaxFontHeight(UINT8 size);
185int DCCGrp_GetScrPosX(int cc_pos_x);
186int DCCGrp_GetScrPosY(int cc_pos_y);
187void DCCGrp_AdjustRect(tDCC_RECT *rect);
188
189#endif //__CC_PRIVATE_H__
190
191//neverdai. 080924 enable AFD
192#define ENABLE_AFD 1
193
194#define ENABLE_AFD_BARDATA 0
195
196#if !ENABLE_AFD && ENABLE_AFD_BARDATA
197        #error BAR Data needs AFD
198#endif
199
200
201#if ENABLE_AFD
202
203void DCC_SetAFDOn(BOOL);
204BOOL DCC_GetIsAFDOn();
205void DCC_SetAFDFormat(UINT8 format);
206UINT8 DCC_GetAFDFormat();
207BOOL DCC_SetAFDCallback(void *cb);
208UINT32 DCC_GetAFDRefreshCount();
209
210#endif
211
212/* end of file */
Note: See TracBrowser for help on using the repository browser.