| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- /*****************************************************************************
- ** File: cc_font.h
- **
- ** Description: Contains prototypes for CC font related APIs.
- **
- ** Copyright(c) 2008 Sunmedia Technologies - All Rights Reserved
- **
- ** Author : jun.luo
- **
- ** $Id: cc_font.h,v 1.4 2009/03/13 09:13:43 junluo Exp $
- *****************************************************************************/
- #ifndef _CC_FONT_H_
- #define _CC_FONT_H_
- #include "gui_eng/stddefs.h"
- #include "gui_eng/gui_engine.h"
- typedef struct {
- FONTStyle_t cc_font_style;
- FONTSize_t cc_font_size;
- BOOLEAN cc_italic_flag; //junluo 08/12/22
- BOOLEAN cc_underline_flag; //junluo 08/12/22
- Color_t font_fg_color;
- Color_t font_bg_color;
- Color_t fill_color;
- } cc_font_settings_t;
- /* Used to control italic slope for italic style */
- //#define SLOPE_RATE (5) //junluo 08/12/22
- /* CC pallete Color #defines */
- #define COLOR_TRANSPARENT (0)
- #define COLOR_BLACK (129)
- #define COLOR_WHITE (66)
- #define COLOR_RED (126)
- #define COLOR_BLUE (81)
- #define COLOR_GREEN (117)
- #define COLOR_YELLOW (114)
- #define COLOR_MAGENTA (78)
- #define COLOR_CYAN (69)
- #define COLOR_GREY (65)
- #define COLOR_DESERT (130)
- typedef enum
- {
- COLOR_INDEX_INVALID = -1,
- COLOR_INDEX_FOUND = 0,
- //COLOR_INDEX_ADDED
- } pal_ret_t;
- /* Global variables */
- extern const PALENTRY cc_palette[];
- /* cc_font.c */
- INT32 set_cc_font_style(FONTSize_t font_size, FONTStyle_t font_style,
- BOOLEAN italic_flag, BOOLEAN underline_flag);
- INT32 set_cc_font_fg_bg_color(UINT32 cc_fgColor, UINT32 cc_bgColor);
- INT32 GDI_fill_rect_with_true_color(HDC hdc, RECT *rect, UINT32 color, INT32 *pBlockId);
- INT32 GDI_draw_rect_with_true_color(HDC hdc, UINT32 rect_x, UINT32 rect_y,
- UINT32 rect_width, UINT32 rect_height, INT32 border_width, UINT32 color, INT32 *pBlockId);
- INT32 FONT_get_cc_char_size(HDC hdc, UINT16 uch, GENG_TextInfo_t *pstTextInfo, UINT16 *data_width, UINT16 *data_height);
- INT32 FONT_get_cc_string_size(HDC hdc, UINT8 *str, GENG_TextInfo_t *pstTextInfo, UINT16 *str_width, UINT16 *str_height);
- INT32 FONT_char_ccdisplay(HDC hdc, UINT16 uch, GENG_TextInfo_t *pstTextInfo, UINT8 bBgColor, UINT32 x_pos, UINT32 y_pos, INT32 *pBlockId);
- INT32 FONT_string_ccdisplay(HDC hdc, UINT8 *string, GENG_TextInfo_t *pstTextInfo, UINT8 bBgColor, UINT32 x_pos, UINT32 y_pos, INT32 *pBlockId);
- pal_ret_t get_color_index(PALENTRY *palette, UINT32 color, UINT16 *index);
- #endif /* _CC_FONT_H_ */
- /*****************************************************************************
- ** $Log: cc_font.h,v $
- ** Revision 1.4 2009/03/13 09:13:43 junluo
- ** porting in phase 4 gui engine
- **
- ** Revision 1.2 2009/02/26 06:58:40 junluo
- ** adjust widgets and font engine's data structure to new demand
- **
- ** Revision 1.1.1.1 2009/02/10 06:06:49 junluo
- ** Used to implement the fourth development of Gui Engine
- **
- ** Revision 1.3 2008/12/22 12:11:55 junluo
- ** Added cc italic and underline display support
- **
- ** Revision 1.2 2008/10/24 08:03:57 anlzhao
- ** Modify FONT_get_cc_char_size prototype
- **
- ** Revision 1.1 2008/10/22 12:25:13 anlzhao
- ** Add cc_font.h to support cc font
- **
- **
- *****************************************************************************/
|