/
slide_view.c
55 lines (45 loc) · 1.54 KB
/
slide_view.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
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* File: slide_view.c
* Author: AWTK Develop Team
* Brief: gif image demo
*
* Copyright (c) 2019 - 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:
* ================================================================
* 2019-01-15 Li XianJing <xianjimli@hotmail.com> created
*
*/
#include "awtk.h"
ret_t application_init() {
widget_t* view = NULL;
widget_t* image = NULL;
widget_t* slide_view = NULL;
widget_t* win = window_create(NULL, 0, 0, 0, 0);
slide_view = slide_view_create(win, 0, 0, win->w, win->h);
view = image_create(slide_view, 0, 0, slide_view->w, slide_view->h);
image = image_create(view, 0, 0, slide_view->w, slide_view->h);
image_set_draw_type(image, IMAGE_DRAW_CENTER);
image_set_image(image, "1");
view = image_create(slide_view, 0, 0, slide_view->w, slide_view->h);
image = image_create(view, 0, 0, slide_view->w, slide_view->h);
image_set_draw_type(image, IMAGE_DRAW_CENTER);
image_set_image(image, "2");
view = image_create(slide_view, 0, 0, slide_view->w, slide_view->h);
image = image_create(view, 0, 0, slide_view->w, slide_view->h);
image_set_draw_type(image, IMAGE_DRAW_CENTER);
image_set_image(image, "3");
return RET_OK;
}
ret_t application_exit() {
log_debug("application_exit\n");
return RET_OK;
}
#include "awtk_main.inc"