From 601eb6fe70aa10e4bf62f7a68915dc1ad7b37553 Mon Sep 17 00:00:00 2001 From: "dzzxzz@gmail.com" Date: Fri, 14 Dec 2012 03:34:24 +0000 Subject: sync RTGUI with github(https://github.com/RT-Thread/RTGUI) c4b8c0ac2a3de482357b88d584931831aed7c8ae As always, full log is in GitHub. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2481 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/rtgui/include/rtgui/widgets/button.h | 11 +++++++++++ components/rtgui/include/rtgui/widgets/textbox.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'components/rtgui/include') diff --git a/components/rtgui/include/rtgui/widgets/button.h b/components/rtgui/include/rtgui/widgets/button.h index c414b17961..b81c88281e 100644 --- a/components/rtgui/include/rtgui/widgets/button.h +++ b/components/rtgui/include/rtgui/widgets/button.h @@ -68,6 +68,17 @@ extern "C" { void rtgui_button_set_pressed_image(rtgui_button_t *btn, rtgui_image_t *image); void rtgui_button_set_unpressed_image(rtgui_button_t *btn, rtgui_image_t *image); + /** Set the callback function on button btn + * + * If the btn is a push button, the callback will be invoked every + * time the btn got "pushed", i.e., both pressed down @em and pressed + * up. If the button is a normal button, the callback will be invoked when + * the btn got "clicked", i.e., when pressed up @em after pressed + * down. + * + * @param btn the btn that the callback will be setted on. + * @param func the callback function. + */ void rtgui_button_set_onbutton(rtgui_button_t *btn, rtgui_onbutton_func_t func); rt_bool_t rtgui_button_event_handler(struct rtgui_object *object, struct rtgui_event *event); diff --git a/components/rtgui/include/rtgui/widgets/textbox.h b/components/rtgui/include/rtgui/widgets/textbox.h index 918e98d162..e6c1d008ab 100644 --- a/components/rtgui/include/rtgui/widgets/textbox.h +++ b/components/rtgui/include/rtgui/widgets/textbox.h @@ -76,7 +76,7 @@ rt_bool_t rtgui_textbox_event_handler(struct rtgui_object *object, struct rtgui_ void rtgui_textbox_set_value(struct rtgui_textbox *box, const char *text); const char *rtgui_textbox_get_value(struct rtgui_textbox *box); void rtgui_textbox_set_mask_char(rtgui_textbox_t *box, const char ch); -const char rtgui_textbox_get_mask_char(rtgui_textbox_t *box); +char rtgui_textbox_get_mask_char(rtgui_textbox_t *box); void rtgui_textbox_set_line_length(struct rtgui_textbox *box, rt_size_t length); void rtgui_textbox_get_edit_rect(struct rtgui_textbox *box, rtgui_rect_t *rect); -- cgit v1.3.1