diff options
| author | bernard.xiong <[email protected]> | 2011-01-20 09:59:45 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2011-01-20 09:59:45 +0000 |
| commit | 66037b4de6baded89f0bb072cd9f33c103f45dd1 (patch) | |
| tree | c902df0ec8cdeb03d7af281d882f44260f399644 /components/rtgui/include | |
| parent | 17b7ae81e247f3b7c82dc6fbcb294583eeee3cfd (diff) | |
add textstyle in gc; fix hz_cache memory leak issue; fix selection issue in radiobox.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1250 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/include')
| -rw-r--r-- | components/rtgui/include/rtgui/rtgui.h | 12 | ||||
| -rw-r--r-- | components/rtgui/include/rtgui/rtgui_system.h | 3 | ||||
| -rw-r--r-- | components/rtgui/include/rtgui/widgets/listbox.h | 2 | ||||
| -rw-r--r-- | components/rtgui/include/rtgui/widgets/listctrl.h | 8 |
4 files changed, 19 insertions, 6 deletions
diff --git a/components/rtgui/include/rtgui/rtgui.h b/components/rtgui/include/rtgui/rtgui.h index 780e55456e..f47c9ea451 100644 --- a/components/rtgui/include/rtgui/rtgui.h +++ b/components/rtgui/include/rtgui/rtgui.h @@ -56,8 +56,10 @@ struct rtgui_gc /* foreground and background color */ rtgui_color_t foreground, background; + /* text style */ + rt_uint16_t textstyle; /* text align */ - rt_base_t textalign; + rt_uint16_t textalign; /* font */ struct rtgui_font* font; @@ -107,6 +109,14 @@ enum RTGUI_ALIGN RTGUI_ALIGN_STRETCH = 0x20, }; +enum RTGUI_TEXTSTYLE +{ + RTGUI_TEXTSTYLE_NORMAL = 0x00, + RTGUI_TEXTSTYLE_DRAW_BACKGROUND = 0x01, + RTGUI_TEXTSTYLE_SHADOW = 0x02, + RTGUI_TEXTSTYLE_OUTLINE = 0x04, +}; + enum RTGUI_MODAL_CODE { RTGUI_MODAL_OK, diff --git a/components/rtgui/include/rtgui/rtgui_system.h b/components/rtgui/include/rtgui/rtgui_system.h index 0450aa6563..6577f38b67 100644 --- a/components/rtgui/include/rtgui/rtgui_system.h +++ b/components/rtgui/include/rtgui/rtgui_system.h @@ -93,5 +93,8 @@ void* rtgui_malloc(rt_size_t size); void rtgui_free(void* ptr);
void* rtgui_realloc(void* ptr, rt_size_t size);
+#define rtgui_enter_critical rt_enter_critical
+#define rtgui_exit_critical rt_exit_critical
+
#endif
diff --git a/components/rtgui/include/rtgui/widgets/listbox.h b/components/rtgui/include/rtgui/widgets/listbox.h index 1777920b00..dd1e6af154 100644 --- a/components/rtgui/include/rtgui/widgets/listbox.h +++ b/components/rtgui/include/rtgui/widgets/listbox.h @@ -49,7 +49,7 @@ struct rtgui_listbox /* the number of item in a page */
rt_uint16_t page_items;
/* current item */
- rt_uint16_t current_item;
+ rt_int16_t current_item;
};
typedef struct rtgui_listbox rtgui_listbox_t;
typedef void (*rtgui_onitem_func_t)(struct rtgui_widget* widget, rtgui_event_t *event);
diff --git a/components/rtgui/include/rtgui/widgets/listctrl.h b/components/rtgui/include/rtgui/widgets/listctrl.h index bd42dd12e7..c2ce9871d0 100644 --- a/components/rtgui/include/rtgui/widgets/listctrl.h +++ b/components/rtgui/include/rtgui/widgets/listctrl.h @@ -20,11 +20,11 @@ #include <rtgui/rtgui_system.h>
#include <rtgui/widgets/widget.h>
-/** Gets the type of a list ctrl */
+/** Gets the type of a listctrl */
#define RTGUI_LISTCTRL_TYPE (rtgui_listctrl_type_get())
-/** Casts the object to a filelist */
+/** Casts the object to a listctrl */
#define RTGUI_LISTCTRL(obj) (RTGUI_OBJECT_CAST((obj), RTGUI_LISTCTRL_TYPE, rtgui_listctrl_t))
-/** Checks if the object is a filelist ctrl */
+/** Checks if the object is a listctrl */
#define RTGUI_IS_LISTCTRL(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_LISTCTRL_TYPE))
struct rtgui_listctrl
@@ -40,7 +40,7 @@ struct rtgui_listctrl /* the number of item in a page */
rt_uint16_t page_items;
/* current item */
- rt_uint16_t current_item;
+ rt_int16_t current_item;
/* item event handler */
void (*on_item)(rtgui_widget_t *widget, struct rtgui_event* event);
|
