summaryrefslogtreecommitdiff
path: root/components/rtgui/include
diff options
context:
space:
mode:
author[email protected] <[email protected]>2010-05-26 15:25:34 +0000
committer[email protected] <[email protected]>2010-05-26 15:25:34 +0000
commit94e758a2cd408c737d626d12baa629fca0c1f5c0 (patch)
tree3af9d8f93a548e26d3270cb37233a33f22a2240d /components/rtgui/include
parente7e1a2a6a5732a12bdde46913e3af7602e8f79a8 (diff)
add rtgui_image_hdcmm from memory HDC image.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@736 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/include')
-rw-r--r--components/rtgui/include/rtgui/image_hdc.h16
-rw-r--r--components/rtgui/include/rtgui/widgets/window.h22
2 files changed, 28 insertions, 10 deletions
diff --git a/components/rtgui/include/rtgui/image_hdc.h b/components/rtgui/include/rtgui/image_hdc.h
index 331c26c7c5..eab22da980 100644
--- a/components/rtgui/include/rtgui/image_hdc.h
+++ b/components/rtgui/include/rtgui/image_hdc.h
@@ -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
diff --git a/components/rtgui/include/rtgui/widgets/window.h b/components/rtgui/include/rtgui/widgets/window.h
index 43993dae67..e8c8b2f0e3 100644
--- a/components/rtgui/include/rtgui/widgets/window.h
+++ b/components/rtgui/include/rtgui/widgets/window.h
@@ -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;