mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
WidgetPrivData_New函数更名为Widget_NewPrivData
This commit is contained in:
@@ -797,7 +797,7 @@ static void ActiveBox_ExecInit(LCUI_Widget *widget)
|
||||
{
|
||||
LCUI_ActiveBox *actbox;
|
||||
|
||||
actbox = (LCUI_ActiveBox*)WidgetPrivData_New(
|
||||
actbox = (LCUI_ActiveBox*)Widget_NewPrivData(
|
||||
widget, sizeof(LCUI_ActiveBox));
|
||||
|
||||
actbox->current = NULL;
|
||||
|
||||
@@ -167,7 +167,7 @@ Button_Init( LCUI_Widget *widget )
|
||||
int valid_state;
|
||||
LCUI_Button *button;
|
||||
|
||||
button = WidgetPrivData_New(widget, sizeof(LCUI_Button));
|
||||
button = Widget_NewPrivData(widget, sizeof(LCUI_Button));
|
||||
/* 初始化图像数据 */
|
||||
Graph_Init(&button->btn_disable);
|
||||
Graph_Init(&button->btn_normal);
|
||||
|
||||
@@ -129,7 +129,7 @@ CheckBox_Init(LCUI_Widget *widget)
|
||||
LCUI_Widget *container[2];
|
||||
LCUI_CheckBox *check_box;
|
||||
|
||||
check_box = WidgetPrivData_New(widget, sizeof(LCUI_CheckBox));
|
||||
check_box = Widget_NewPrivData(widget, sizeof(LCUI_CheckBox));
|
||||
|
||||
check_box->on = FALSE;
|
||||
/* 初始化图像数据 */
|
||||
|
||||
@@ -102,7 +102,7 @@ Label_ExecInit( LCUI_Widget *widget )
|
||||
/* label部件不需要焦点 */
|
||||
widget->focus = FALSE;
|
||||
|
||||
label = (LCUI_Label*)WidgetPrivData_New( widget, sizeof(LCUI_Label) );
|
||||
label = (LCUI_Label*)Widget_NewPrivData( widget, sizeof(LCUI_Label) );
|
||||
label->auto_size = TRUE;
|
||||
/* 初始化文本图层 */
|
||||
TextLayer_Init( &label->layer );
|
||||
|
||||
@@ -63,7 +63,7 @@ PictureBox_Init(LCUI_Widget *widget)
|
||||
{
|
||||
LCUI_PictureBox *pic_box;
|
||||
|
||||
pic_box = WidgetPrivData_New(widget, sizeof(LCUI_PictureBox));;
|
||||
pic_box = Widget_NewPrivData(widget, sizeof(LCUI_PictureBox));;
|
||||
|
||||
Rect_Init(&pic_box->read_box);
|
||||
pic_box->image = NULL;
|
||||
|
||||
@@ -62,7 +62,7 @@ ProgressBar_ExecInit( LCUI_Widget *widget )
|
||||
LCUIProgBar *pb;
|
||||
LCUI_Widget *fore_wdg, *glisten_wdg;
|
||||
|
||||
pb = (LCUIProgBar*)WidgetPrivData_New(widget, sizeof(LCUIProgBar));
|
||||
pb = (LCUIProgBar*)Widget_NewPrivData(widget, sizeof(LCUIProgBar));
|
||||
pb->move_speed = 200;
|
||||
pb->sleep_time = 100;
|
||||
pb->max_value = 1;
|
||||
|
||||
@@ -201,7 +201,7 @@ RadioButton_Init( LCUI_Widget *widget )
|
||||
LCUI_Widget *container[2];
|
||||
LCUI_RadioButton *radio_button;
|
||||
|
||||
radio_button = WidgetPrivData_New(widget, sizeof(LCUI_RadioButton));
|
||||
radio_button = Widget_NewPrivData(widget, sizeof(LCUI_RadioButton));
|
||||
radio_button->on = FALSE;
|
||||
/* 初始化图片数据 */
|
||||
Graph_Init(&radio_button->img_off_disable);
|
||||
|
||||
@@ -129,7 +129,7 @@ ScrollBar_Init( LCUI_Widget *widget )
|
||||
{
|
||||
LCUI_ScrollBar *scrollbar;
|
||||
|
||||
scrollbar = WidgetPrivData_New(widget, sizeof(LCUI_ScrollBar));
|
||||
scrollbar = Widget_NewPrivData(widget, sizeof(LCUI_ScrollBar));
|
||||
scrollbar->data.max_num = 100;
|
||||
scrollbar->data.current_num = 100;
|
||||
scrollbar->data.max_size = 100;
|
||||
|
||||
@@ -338,7 +338,7 @@ TextBox_Init( LCUI_Widget *widget )
|
||||
|
||||
widget->valid_state = WIDGET_STATE_ACTIVE | WIDGET_STATE_OVERLAY;
|
||||
widget->valid_state |= (WIDGET_STATE_NORMAL | WIDGET_STATE_DISABLE);
|
||||
textbox = WidgetPrivData_New(widget, sizeof(LCUI_TextBox));
|
||||
textbox = Widget_NewPrivData(widget, sizeof(LCUI_TextBox));
|
||||
textbox->text = Widget_New( "label" );
|
||||
textbox->cursor = Widget_New( NULL );
|
||||
textbox->scrollbar[0] = Widget_New( "scrollbar" );
|
||||
|
||||
@@ -173,7 +173,7 @@ Window_TitleBar_Init(LCUI_Widget *titlebar)
|
||||
LCUI_TitleBar *t;
|
||||
|
||||
Graph_Init(&img);
|
||||
t = WidgetPrivData_New(titlebar, sizeof(LCUI_TitleBar));
|
||||
t = Widget_NewPrivData(titlebar, sizeof(LCUI_TitleBar));
|
||||
t->icon_box = Widget_New("picture_box");
|
||||
t->label = Widget_New("label");
|
||||
/* 窗口图标和标题文字不可获得焦点,并忽略鼠标点击 */
|
||||
@@ -306,7 +306,7 @@ Window_Init( LCUI_Widget *win_p )
|
||||
LCUI_Window *win;
|
||||
static LCUI_Graph btn_bg;
|
||||
|
||||
win = (LCUI_Window*)WidgetPrivData_New(win_p, sizeof(LCUI_Window));
|
||||
win = (LCUI_Window*)Widget_NewPrivData(win_p, sizeof(LCUI_Window));
|
||||
|
||||
titlebar = Widget_New("titlebar");
|
||||
client_area = Widget_New(NULL);
|
||||
|
||||
@@ -1099,7 +1099,7 @@ Empty_Widget(void)
|
||||
|
||||
/* 功能:为部件私有结构体指针分配内存 */
|
||||
LCUI_API void*
|
||||
WidgetPrivData_New( LCUI_Widget *widget, size_t size )
|
||||
Widget_NewPrivData( LCUI_Widget *widget, size_t size )
|
||||
{
|
||||
widget->private_data = malloc(size);
|
||||
return widget->private_data;
|
||||
|
||||
Reference in New Issue
Block a user