add rtgui_image_hdcmm from memory HDC image.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@736 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com
2010-05-26 15:25:34 +00:00
parent e7e1a2a6a5
commit 94e758a2cd
4 changed files with 83 additions and 21 deletions
@@ -16,6 +16,22 @@
#include <rtgui/image.h>
struct rtgui_image_hdcmm
{
struct rtgui_image parent;
/* hdc image information */
rt_uint16_t byte_per_pixel;
rt_uint16_t pitch;
rt_uint8_t *pixels;
};
void rtgui_image_hdc_init(void);
extern struct rtgui_image_engine rtgui_image_hdcmm_engine;
#define HDC_HEADER_SIZE (5 * 4)
#define RTGUI_IMAGE_HDC_DEF(bpp, w, h, pixels) \
{{w, h, &rtgui_image_hdcmm_engine, RT_NULL}, bpp, (bpp * w), ((rt_uint8_t*)pixels + HDC_HEADER_SIZE)}
#endif
+12 -10
View File
@@ -28,15 +28,18 @@
/** Checks if the object is an rtgui_win */
#define RTGUI_IS_WIN(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_WIN_TYPE))
#define RTGUI_WIN_STYLE_MODAL 0x01 /* modal mode window */
#define RTGUI_WIN_STYLE_CLOSED 0x02 /* window is closed */
#define RTGUI_WIN_STYLE_ACTIVATE 0x04 /* window is activated */
#define RTGUI_WIN_STYLE_NO_FOCUS 0x08 /* non-focused window */
#define RTGUI_WIN_STYLE_MODAL 0x001 /* modal mode window */
#define RTGUI_WIN_STYLE_CLOSED 0x002 /* window is closed */
#define RTGUI_WIN_STYLE_ACTIVATE 0x004 /* window is activated */
#define RTGUI_WIN_STYLE_NO_FOCUS 0x008 /* non-focused window */
#define RTGUI_WIN_STYLE_NO_TITLE 0x10 /* no title window */
#define RTGUI_WIN_STYLE_NO_BORDER 0x20 /* no border window */
#define RTGUI_WIN_STYLE_CLOSEBOX 0x40 /* window has the close button */
#define RTGUI_WIN_STYLE_MINIBOX 0x80 /* window has the mini button */
#define RTGUI_WIN_STYLE_NO_TITLE 0x010 /* no title window */
#define RTGUI_WIN_STYLE_NO_BORDER 0x020 /* no border window */
#define RTGUI_WIN_STYLE_CLOSEBOX 0x040 /* window has the close button */
#define RTGUI_WIN_STYLE_MINIBOX 0x080 /* window has the mini button */
#define RTGUI_WIN_STYLE_UNDER_MODAL 0x100 /* window is under modal show (show
* sub-win as modal window) */
#define RTGUI_WIN_STYLE_DEFAULT (RTGUI_WIN_STYLE_CLOSEBOX | RTGUI_WIN_STYLE_MINIBOX)
@@ -52,9 +55,8 @@ struct rtgui_win
rtgui_toplevel_t* parent_toplevel;
/* top window style */
rt_uint8_t style;
rt_uint16_t style;
rt_uint8_t flag;
rtgui_modal_code_t modal_code;
rtgui_widget_t* modal_widget;