| 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 | |
|---|
| 15 | void DCCUtil_DbgPrint(char *pname, char *fmt, ...); |
|---|
| 16 | void DCCUtil_ShowDbgItem(void); |
|---|
| 17 | void DCCUtil_SetDbgOn(char *pname, BOOL is_on); |
|---|
| 18 | void DCCUtil_ToggleDbgOn(char *pname); |
|---|
| 19 | void DCCUtil_SetDbgOnByIdx(int idx, BOOL is_on); |
|---|
| 20 | void 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 | |
|---|
| 39 | void DCCMain_Init(void); |
|---|
| 40 | void DCCMain_SendCmd(UINT8 cmd, UINT32 opt, UINT32 param1, UINT32 param2); |
|---|
| 41 | void DCCMain_ResetQueue(void); |
|---|
| 42 | void DCCMain_UserMsgOnOff(BOOL bon); |
|---|
| 43 | //CCDDI |
|---|
| 44 | |
|---|
| 45 | #if 1//BRCM |
|---|
| 46 | typedef DHL_OS_MSGQ_ID tDCCDDI_MSGQ; |
|---|
| 47 | #else |
|---|
| 48 | typedef UINT32 tDCCDDI_MSGQ; |
|---|
| 49 | #endif |
|---|
| 50 | typedef UINT32 tDCCDDI_SEM; |
|---|
| 51 | |
|---|
| 52 | void *DCCDDI_Malloc(int size); |
|---|
| 53 | |
|---|
| 54 | void DCCDDI_Printf(const char *fmt, ...); |
|---|
| 55 | |
|---|
| 56 | void DCCDDI_SpawnTask(void *func); |
|---|
| 57 | tDCCDDI_MSGQ DCCDDI_CreateMessageQueue(char *pname, UINT32 num_msgq, UINT32 size_msgq); |
|---|
| 58 | tDCCDDI_SEM DCCDDI_CreateMutexSemaphore(char *pname); |
|---|
| 59 | tDCCDDI_SEM DCCDDI_CreateBinarySemaphore(char *pname); |
|---|
| 60 | void DCCDDI_SendMessage(tDCCDDI_MSGQ id, void *buf, UINT32 len); |
|---|
| 61 | int DCCDDI_ReceiveMessage(tDCCDDI_MSGQ id, void *buf, UINT32 max_len, int *rcv_len); |
|---|
| 62 | int DCCDDI_ReceiveMessage_Wait(tDCCDDI_MSGQ id, void *buf, UINT32 max_len, int *rcv_len, UINT32 msec); |
|---|
| 63 | int DCCDDI_ReceiveMessage_NoWait(tDCCDDI_MSGQ id, void *buf, UINT32 max_len, int *rcv_len); |
|---|
| 64 | void DCCDDI_TakeSemaphore(tDCCDDI_SEM id); |
|---|
| 65 | void DCCDDI_GiveSemaphore(tDCCDDI_SEM id); |
|---|
| 66 | void DCCDDI_Delay(UINT32 msec); |
|---|
| 67 | UINT32 DCCDDI_GetCurMs(void); |
|---|
| 68 | |
|---|
| 69 | typedef void (*tDCC_UserCallback)(tDCC_PicUDRaw *praw_pud); |
|---|
| 70 | |
|---|
| 71 | void DCCDDI_Init(void); |
|---|
| 72 | void DCCDDI_SetUserCallback(tDCC_UserCallback func); |
|---|
| 73 | |
|---|
| 74 | int DCCDDI_Feeding608(BOOL is_even, UINT8 data1, UINT8 data2, BOOL is_end); |
|---|
| 75 | |
|---|
| 76 | void DCCDDI_GraphicStart(UINT8 resolution); |
|---|
| 77 | void DCCDDI_GraphicStop(void); |
|---|
| 78 | void DCCDDI_DrawBox(int x, int y, int w, int h, int color); |
|---|
| 79 | void DCCDDI_BLT(int x, int y, int w, int h, int height); |
|---|
| 80 | void DCCDDI_DrawHLine(int x, int y, int w, int color); |
|---|
| 81 | void DCCDDI_Refresh(void); |
|---|
| 82 | |
|---|
| 83 | int DCCDDI_PrintCh(int x, int y, UINT16 ch, int c_font, int c_edge); |
|---|
| 84 | int DCCDDI_GetChWidth(UINT16 ch); |
|---|
| 85 | int DCCDDI_GetChHeight(UINT16 ch); |
|---|
| 86 | void DCCDDI_SetFontAttr(int size, BOOL is_italic, BOOL is_underline, UINT8 font_style, |
|---|
| 87 | UINT8 edge_type, BOOL is_p16); |
|---|
| 88 | |
|---|
| 89 | void DCCDDI_SetKoreanMode(BOOL is_unicode); |
|---|
| 90 | |
|---|
| 91 | //CCFRONT |
|---|
| 92 | void DCCFront_Init(void); |
|---|
| 93 | int DCCFront_ParsePicUD(tDCC_PicUDRaw *pic_ud_raw, tDCC_PicUD *pic_ud); |
|---|
| 94 | BOOL DCCFront_IsServiceOn(UINT8 service); |
|---|
| 95 | void DCCFront_SetService(UINT8 service); |
|---|
| 96 | void DCCFront_SetFeeding608(BOOL bon); |
|---|
| 97 | void 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 | |
|---|
| 107 | void DCCExec_Process608(UINT8 d1, UINT8 d2); |
|---|
| 108 | void DCCExec_Reset608Attr(void); |
|---|
| 109 | |
|---|
| 110 | //CCEXEC708 |
|---|
| 111 | void DCCExec_ProcessMsg(tDCC_CmdSet cmd, UINT32 opt, UINT32 param1, UINT32 param2); |
|---|
| 112 | void DCCExec_Init(void); |
|---|
| 113 | char* DCCExec_CmdGetStr(tDCC_CmdSet cmd); |
|---|
| 114 | void DCCExec_SetCallback(tDCC_InfoCallback func); |
|---|
| 115 | BOOL DCCExec_IsCurDLY(); |
|---|
| 116 | void DCCExec_ForceDLYRelease(); |
|---|
| 117 | |
|---|
| 118 | //WIN |
|---|
| 119 | tDCC_DefWin *DCCWin_GetWin(int wid); |
|---|
| 120 | void DCCWin_DrawWin(int wid, BOOL draw_bg, BOOL draw_fg); |
|---|
| 121 | void DCCWin_EraseWin(int wid); |
|---|
| 122 | void DCCWin_DrawAllWins(void); |
|---|
| 123 | void DCCWin_DrawFlashWins(void); |
|---|
| 124 | void DCCWin_ResetWin(int wid); |
|---|
| 125 | void DCCWin_ResetTextPos(int wid); |
|---|
| 126 | void DCCWin_ResetTextOnly(int wid); |
|---|
| 127 | void DCCWin_ResetAllWins(BOOL berase_screen); |
|---|
| 128 | void DCCWin_UpdateWinRect(int wid); |
|---|
| 129 | BOOL DCCWin_CheckWinRect(int wid); |
|---|
| 130 | void DCCWin_UpdateWinAttr(void); |
|---|
| 131 | void DCCWin_EraseCurLine(int wid, BOOL is_der); |
|---|
| 132 | void DCCWin_FillTrpToLine(int wid); |
|---|
| 133 | void DCCWin_InsertCh(int wid, UINT16 ch, UINT32 opt); |
|---|
| 134 | void DCCWin_EraseCh(int wid); |
|---|
| 135 | void DCCWin_UpdateLine(int wid, int row); |
|---|
| 136 | void DCCWin_ToggleFlashFlag(void); |
|---|
| 137 | void DCCWin_SetUserPos(int x, int y); |
|---|
| 138 | |
|---|
| 139 | void DCCWin_UpdateWinOrderList(int nWinID);//iskang 090608 |
|---|
| 140 | void DCCWin_DrawByWindowOrder(BOOL bClear);//iskang 090608 |
|---|
| 141 | BOOL DCCWin_NeedToRedrawWindowOrNot(void);//iskang 090608 |
|---|
| 142 | |
|---|
| 143 | //CCUTIL |
|---|
| 144 | int DCCUtil_UStrLen(UINT16 *str); |
|---|
| 145 | UINT16 DCCUtil_Ksx1001toUnicode(UINT16 code); |
|---|
| 146 | |
|---|
| 147 | void DCCUtil_InitBitBuf(UINT8 *pdata, int size); |
|---|
| 148 | UINT32 DCCUtil_NextBits(UINT8 size); |
|---|
| 149 | UINT32 DCCUtil_GetBits(UINT8 size); |
|---|
| 150 | void DCCUtil_UngetBits(UINT32 size, UINT32 data); |
|---|
| 151 | int DCCUtil_CheckBits(UINT8 size); |
|---|
| 152 | |
|---|
| 153 | |
|---|
| 154 | //CCGRP |
|---|
| 155 | |
|---|
| 156 | enum { |
|---|
| 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 | |
|---|
| 163 | void DCCGrp_Init(BOOL is_cc_wide, BOOL is_src_wide, BOOL is_korean, |
|---|
| 164 | int resolution, tDCC_ColorMap *color_map); |
|---|
| 165 | void DCCGrp_SetService(UINT8 service); |
|---|
| 166 | void DCCGrp_SetKorean(BOOL is_korean); |
|---|
| 167 | void DCCGrp_Start(void); |
|---|
| 168 | void DCCGrp_Stop(void); |
|---|
| 169 | void DCCGrp_DrawBox(int x, int y, int w, int h, int color); |
|---|
| 170 | void DCCGrp_EraseBox(int x, int y, int w, int h); |
|---|
| 171 | void DCCGrp_ClearScreen(void); |
|---|
| 172 | |
|---|
| 173 | void DCCGrp_ScrollUp(int x, int y, int w, int h, int height, int bg_color); |
|---|
| 174 | void DCCGrp_ScrollDown(int x, int y, int w, int h, int height, int bg_color); |
|---|
| 175 | void DCCGrp_SetScrollSpeed(int delay, int slice); |
|---|
| 176 | |
|---|
| 177 | int DCCGrp_PrintCh(int x, int y, UINT16 ch, int draw_mode); |
|---|
| 178 | int DCCGrp_GetChWidth(UINT16 ch); |
|---|
| 179 | int DCCGrp_GetStrWidth(UINT16 *str); |
|---|
| 180 | int DCCGrp_GetStrNWidth(UINT16 *str, int n); |
|---|
| 181 | void DCCGrp_SetFontAttr(tDCC_PenAttr *pattr); |
|---|
| 182 | tDCC_PenAttr *DCCGrp_GetFontAttr(void); |
|---|
| 183 | int DCCGrp_GetMaxFontWidth(UINT8 size, BOOL bhalf); |
|---|
| 184 | int DCCGrp_GetMaxFontHeight(UINT8 size); |
|---|
| 185 | int DCCGrp_GetScrPosX(int cc_pos_x); |
|---|
| 186 | int DCCGrp_GetScrPosY(int cc_pos_y); |
|---|
| 187 | void 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 | |
|---|
| 203 | void DCC_SetAFDOn(BOOL); |
|---|
| 204 | BOOL DCC_GetIsAFDOn(); |
|---|
| 205 | void DCC_SetAFDFormat(UINT8 format); |
|---|
| 206 | UINT8 DCC_GetAFDFormat(); |
|---|
| 207 | BOOL DCC_SetAFDCallback(void *cb); |
|---|
| 208 | UINT32 DCC_GetAFDRefreshCount(); |
|---|
| 209 | |
|---|
| 210 | #endif |
|---|
| 211 | |
|---|
| 212 | /* end of file */ |
|---|