diff --git a/components/rtgui/include/rtgui/widgets/button.h b/components/rtgui/include/rtgui/widgets/button.h index f5a0c9796..989f75364 100644 --- a/components/rtgui/include/rtgui/widgets/button.h +++ b/components/rtgui/include/rtgui/widgets/button.h @@ -61,8 +61,8 @@ typedef struct rtgui_button rtgui_button_t; rtgui_type_t *rtgui_button_type_get(void); -rtgui_button_t* rtgui_button_create(char* text); -rtgui_button_t* rtgui_pushbutton_create(char* text); +rtgui_button_t* rtgui_button_create(const char* text); +rtgui_button_t* rtgui_pushbutton_create(const char* text); void rtgui_button_destroy(rtgui_button_t* btn); void rtgui_button_set_pressed_image(rtgui_button_t* btn, rtgui_image_t* image); diff --git a/components/rtgui/widgets/button.c b/components/rtgui/widgets/button.c index 8d24d191f..e4f3bc102 100644 --- a/components/rtgui/widgets/button.c +++ b/components/rtgui/widgets/button.c @@ -194,7 +194,7 @@ rt_bool_t rtgui_button_event_handler(struct rtgui_widget* widget, struct rtgui_e return RT_FALSE; } -rtgui_button_t* rtgui_button_create(char* text) +rtgui_button_t* rtgui_button_create(const char* text) { struct rtgui_button* btn; @@ -214,7 +214,7 @@ rtgui_button_t* rtgui_button_create(char* text) return btn; } -rtgui_button_t* rtgui_pushbutton_create(char* text) +rtgui_button_t* rtgui_pushbutton_create(const char* text) { rtgui_button_t* btn;