/
label.c
42 lines (34 loc) · 997 Bytes
/
label.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* File: label.c
* Author: AWTK Develop Team
* Brief: label demo
*
* Copyright (c) 2018 - 2021 Guangzhou ZHIYUAN Electronics Co.,Ltd.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* License file for more details.
*
*/
/**
* History:
* ================================================================
* 2018-08-15 Li XianJing <xianjimli@hotmail.com> created
*
*/
#include "awtk.h"
ret_t application_init() {
widget_t* win = window_create(NULL, 0, 0, 0, 0);
widget_t* label = label_create(win, 0, 0, 0, 0);
widget_use_style(label, "big_green");
widget_set_text(label, L"hello awtk!");
widget_set_self_layout_params(label, "center", "middle", "50%", "30");
widget_layout(win);
return RET_OK;
}
ret_t application_exit() {
log_debug("application_exit\n");
return RET_OK;
}
#include "awtk_main.inc"