Skip to content

Commit ca4f11e

Browse files
committed
add the prototypes of the examples
1 parent fe20d47 commit ca4f11e

18 files changed

+168
-26
lines changed

examples/examples.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples -name \*.c)

examples/layouts/flex/lv_example_flex.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*
44
*/
55

6-
#ifndef LV_EX_FLEX_H
7-
#define LV_EX_FLEX_H
6+
#ifndef LV_EXAMPLE_FLEX_H
7+
#define LV_EXAMPLE_FLEX_H
88

99
#ifdef __cplusplus
1010
extern "C" {
@@ -25,6 +25,12 @@ extern "C" {
2525
/**********************
2626
* GLOBAL PROTOTYPES
2727
**********************/
28+
void lv_example_flex_1(void);
29+
void lv_example_flex_2(void);
30+
void lv_example_flex_3(void);
31+
void lv_example_flex_4(void);
32+
void lv_example_flex_5(void);
33+
void lv_example_flex_6(void);
2834

2935
/**********************
3036
* MACROS
@@ -34,4 +40,4 @@ extern "C" {
3440
} /* extern "C" */
3541
#endif
3642

37-
#endif /*LV_EX_FLEX_H*/
43+
#endif /*LV_EXAMPLE_FLEX_H*/

examples/layouts/grid/lv_example_grid.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*
44
*/
55

6-
#ifndef LV_EX_GRID_H
7-
#define LV_EX_GRID_H
6+
#ifndef LV_EXAMPLE_GRID_H
7+
#define LV_EXAMPLE_GRID_H
88

99
#ifdef __cplusplus
1010
extern "C" {
@@ -25,6 +25,12 @@ extern "C" {
2525
/**********************
2626
* GLOBAL PROTOTYPES
2727
**********************/
28+
void lv_example_grid_1(void);
29+
void lv_example_grid_2(void);
30+
void lv_example_grid_3(void);
31+
void lv_example_grid_4(void);
32+
void lv_example_grid_5(void);
33+
void lv_example_grid_6(void);
2834

2935
/**********************
3036
* MACROS
@@ -34,4 +40,4 @@ extern "C" {
3440
} /* extern "C" */
3541
#endif
3642

37-
#endif /*LV_EX_GRID_H*/
43+
#endif /*LV_EXAMPLE_GRID_H*/

examples/layouts/lv_example_layout.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* @file lv_example_layout.h
3+
*
4+
*/
5+
6+
#ifndef LV_EXAMPLE_LAYOUT_H
7+
#define LV_EXAMPLE_LAYOUT_H
8+
9+
#ifdef __cplusplus
10+
extern "C" {
11+
#endif
12+
13+
/*********************
14+
* INCLUDES
15+
*********************/
16+
#include "flex/lv_example_flex.h"
17+
#include "grid/lv_example_grid.h"
18+
19+
/*********************
20+
* DEFINES
21+
*********************/
22+
23+
/**********************
24+
* TYPEDEFS
25+
**********************/
26+
27+
/**********************
28+
* GLOBAL PROTOTYPES
29+
**********************/
30+
31+
/**********************
32+
* MACROS
33+
**********************/
34+
35+
#ifdef __cplusplus
36+
} /* extern "C" */
37+
#endif
38+
39+
#endif /*LV_EXAMPLE_LAYOUT_H*/

examples/lv_examples.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**
2+
* @file lv_examples.h
3+
*
4+
*/
5+
6+
#ifndef LV_EXAMPLES_H
7+
#define LV_EXAMPLES_H
8+
9+
#ifdef __cplusplus
10+
extern "C" {
11+
#endif
12+
13+
/*********************
14+
* INCLUDES
15+
*********************/
16+
#include "styles/lv_example_style.h"
17+
#include "get_started/lv_example_get_started.h"
18+
#include "widgets/lv_example_widgets.h"
19+
#include "layouts/lv_example_layout.h"
20+
21+
/*********************
22+
* DEFINES
23+
*********************/
24+
25+
/**********************
26+
* TYPEDEFS
27+
**********************/
28+
29+
/**********************
30+
* GLOBAL PROTOTYPES
31+
**********************/
32+
33+
/**********************
34+
* MACROS
35+
**********************/
36+
37+
#ifdef __cplusplus
38+
} /* extern "C" */
39+
#endif
40+
41+
#endif /*LV_EXAMPLES_H*/

examples/styles/lv_example_style_10.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
typedef int _keep_pedantic_happy;
12
//#include "../../lv_examples.h"
23
//
34
///**

examples/styles/lv_example_style_6.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
typedef int _keep_pedantic_happy;

examples/widgets/btnmatrix/lv_example_btnmatrix_2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#if LV_USE_BTNMATRIX && LV_BUILD_EXAMPLES
33

44

5-
void event_cb(lv_obj_t * obj, lv_event_t e)
5+
static void event_cb(lv_obj_t * obj, lv_event_t e)
66
{
77
if(e == LV_EVENT_DRAW_PART_BEGIN) {
88
lv_obj_draw_hook_dsc_t * dsc = lv_event_get_param();

0 commit comments

Comments
 (0)