code stringlengths 1 1.05M | repo_name stringlengths 6 83 | path stringlengths 3 242 | language stringclasses 222
values | license stringclasses 20
values | size int64 1 1.05M |
|---|---|---|---|---|---|
/*
LodePNG Examples
Copyright (c) 2005-2012 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including co... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/examples/example_gzip.cpp | C++ | apache-2.0 | 2,598 |
/*
LodePNG Examples
Copyright (c) 2005-2012 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including co... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/examples/example_opengl.cpp | C++ | apache-2.0 | 5,091 |
/*
LodePNG Examples
Copyright (c) 2005-2012 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including co... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/examples/example_optimize_png.cpp | C++ | apache-2.0 | 4,826 |
/*
LodePNG Examples
Copyright (c) 2005-2012 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including co... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/examples/example_png2bmp.cpp | C++ | apache-2.0 | 4,804 |
/*
LodePNG Examples
Copyright (c) 2005-2012 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including co... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/examples/example_png_info.cpp | C++ | apache-2.0 | 10,295 |
/*
LodePNG Examples
Copyright (c) 2005-2010 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including co... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/examples/example_reencode.cpp | C++ | apache-2.0 | 2,218 |
/*
LodePNG Examples
Copyright (c) 2005-2012 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including co... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/examples/example_sdl.c | C | apache-2.0 | 3,959 |
/*
LodePNG Examples
Copyright (c) 2005-2012 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including co... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/examples/example_sdl.cpp | C++ | apache-2.0 | 4,144 |
/*
LodePNG version 20201017
Copyright (c) 2005-2020 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
incl... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/lodepng.cpp | C++ | apache-2.0 | 263,390 |
/*
LodePNG version 20201017
Copyright (c) 2005-2020 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
incl... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/lodepng.h | C++ | apache-2.0 | 95,564 |
/*
LodePNG Benchmark
Copyright (c) 2005-2019 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including c... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/lodepng_benchmark.cpp | C++ | apache-2.0 | 13,837 |
/*
LodePNG Fuzzer
Copyright (c) 2005-2019 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including comm... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/lodepng_fuzzer.cpp | C++ | apache-2.0 | 3,333 |
/*
LodePNG Unit Test
Copyright (c) 2005-2020 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including c... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/lodepng_unittest.cpp | C++ | apache-2.0 | 311,026 |
/*
LodePNG Utils
Copyright (c) 2005-2020 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including comme... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/lodepng_util.cpp | C++ | apache-2.0 | 72,907 |
/*
LodePNG Utils
Copyright (c) 2005-2020 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including comme... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/lodepng_util.h | C++ | apache-2.0 | 13,737 |
/*
LodePNG pngdetail
Copyright (c) 2005-2020 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including c... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/lodepng/pngdetail.cpp | C++ | apache-2.0 | 57,130 |
#include "py/obj.h"
/**
* Implementation of memory allocation functions for lodepng, which delegate gc allocation
* This allows lodepng use the ram reserved for Micropython gc
*/
#ifndef NO_QSTR
#ifndef LODEPNG_NO_COMPILE_ALLOCATORS
#error LodePNG must be compiled with LODEPNG_NO_COMPILE_ALLOCATORS, which shou... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/png/mp_lodepng.c | C | apache-2.0 | 593 |
/**
******************************************************************************
* @file ft5336.c
* @author MCD Application Team
* @brief This file provides a set of functions needed to manage the FT5336
* touch screen devices.
*********************************************************... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/stm32/STM32F7DISC/ft5336.c | C | apache-2.0 | 19,502 |
/**
******************************************************************************
* @file ft5336.h
* @author MCD Application Team
* @brief This file contains all the functions prototypes for the
* ft5336.c Touch screen driver.
***********************************************************... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/stm32/STM32F7DISC/ft5336.h | C | apache-2.0 | 20,575 |
#include "py/runtime.h"
#include "py/mphal.h"
#include "softtimer.h"
#include <stdint.h>
#include <stdbool.h>
#include "../../../lvgl/lvgl.h"
#include "../../../lv_conf.h"
#include "../../include/common.h"
#include "stm32746g_discovery_ts.h"
#include "rk043fn48h.h"
#include "ports/stm32/i2c.h"
#define LCD_DISP_PIN ... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/stm32/STM32F7DISC/modrk043fn48h.c | C | apache-2.0 | 13,377 |
/**
******************************************************************************
* @file rk043fn48h.h
* @author MCD Application Team
* @brief This file contains all the constants parameters for the RK043FN48H-CT672B
* LCD component.
****************************************************... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/stm32/STM32F7DISC/rk043fn48h.h | C | apache-2.0 | 3,910 |
/**
******************************************************************************
* @file stm32746g_discovery.h
* @author MCD Application Team
* @brief This file contains definitions for STM32746G_DISCOVERY's LEDs,
* push-buttons and COM ports hardware resources.
**********************... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/stm32/STM32F7DISC/stm32746g_discovery.h | C | apache-2.0 | 12,811 |
/**
******************************************************************************
* @file stm32746g_discovery_ts.c
* @author MCD Application Team
* @brief This file provides a set of functions needed to manage the Touch
* Screen on STM32746G-Discovery board.
@verbatim
1. How To us... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/stm32/STM32F7DISC/stm32746g_discovery_ts.c | C | apache-2.0 | 13,993 |
/**
******************************************************************************
* @file stm32746g_discovery_ts.h
* @author MCD Application Team
* @brief This file contains the common defines and functions prototypes for
* the stm32746g_discovery_ts.c driver.
*************************... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/stm32/STM32F7DISC/stm32746g_discovery_ts.h | C | apache-2.0 | 7,268 |
/**
******************************************************************************
* @file ts.h
* @author MCD Application Team
* @version V4.0.1
* @date 21-July-2015
* @brief This file contains all the functions prototypes for the Touch Screen driver.
**************************************... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/stm32/STM32F7DISC/ts.h | C | apache-2.0 | 3,297 |
#include <stdint.h>
#include <string.h>
char *strncpy(char * dest, const char * src, size_t n){
if (n != 0) {
char *d = dest;
const char *s = src;
do {
if ((*d++ = *s++) == '\0') {
while (--n != 0)
*d++ = '\0';
break;
}
} while (--n != 0);
}
return (dest);
}
| YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/stm32/string1.c | C | apache-2.0 | 291 |
/*
* Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
*
* SPDX-License-Identifier: Apache-2.0
*
* changes:
* Zephyr's logging -> printf
* CONFIG_LVGL_HOR_RES_MAX -> LV_HOR_RES_MAX
* CONFIG_LVGL_VER_RES_MAX -> LV_VER_RES_MAX
* added debug log
* removed SYS_INIT for lvgl_init
* lvgl_ini... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/zephyr/lvgl.c | C | apache-2.0 | 8,289 |
#define CONFIG_LVGL_BITS_PER_PIXEL 32
#define CONFIG_LVGL_VDB_SIZE 16
#define CONFIG_LVGL_DISPLAY_DEV_NAME "ELCDIF_1" // choose from Zephyr display drivers
#define CONFIG_LVGL_BUFFER_ALLOC_STATIC 1 // LVGL buffer settings, see other options in Zephyr's Kconfig
#define CONFIG_LVGL_POINTER_KSCAN 1 // enabling/disabling k... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/zephyr/lvgl_driver.h | C | apache-2.0 | 526 |
#include "py/runtime.h"
#include "lvgl_driver.h"
STATIC mp_obj_t init() {
lvgl_init(NULL);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(init_obj, init);
STATIC const mp_rom_map_elem_t ZDD_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ZDD) },
{ MP_ROM_QSTR(MP_QST... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/driver/zephyr/modlvzephyr.c | C | apache-2.0 | 619 |
# TODO
# - Array conversion improvements:
# - return custom iterable object instead of Blob when converting to array
# - check array dim on conversion
# - On print extensions, print the reflected internal representation of the object (worth the extra ROM?)
# - Verify that when mp_obj is given it is indeed the righ... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/gen/gen_mpy.py | Python | apache-2.0 | 113,762 |
#ifndef __LV_MP_MEM_CUSTOM_INCLUDE_H
#define __LV_MP_MEM_CUSTOM_INCLUDE_H
#include <py/mpconfig.h>
#include <py/misc.h>
#include <py/gc.h>
#endif //__LV_MP_MEM_CUSTOM_INCLUDE_H
| YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/include/lv_mp_mem_custom_include.h | C | apache-2.0 | 179 |
from display_driver_utils import driver
drv = driver()
| YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lib/display_driver.py | Python | apache-2.0 | 55 |
import usys as sys
sys.path.append('') # See: https://github.com/micropython/micropython/issues/6419
import lvgl as lv
import lv_utils
ORIENT_LANDSCAPE = False
ORIENT_PORTRAIT = True
class driver:
def __init__(self,width=420,height=320,orientation=ORIENT_PORTRAIT):
if not lv.is_initialized():
... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lib/display_driver_utils.py | Python | apache-2.0 | 4,839 |
'''
Original author: mhepp(https://forum.lvgl.io/u/mhepp/summary)
'''
import lvgl as lv
import ustruct as struct
def fs_open_cb(drv, path, mode):
if mode == lv.FS_MODE.WR:
p_mode = 'wb'
elif mode == lv.FS_MODE.RD:
p_mode = 'rb'
elif mode == lv.FS_MODE.WR | lv.FS_MODE.RD:
p_mode = ... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lib/fs_driver.py | Python | apache-2.0 | 2,447 |
#
# Library of function for image manipulation.
# Can be used with lodepng to decode PNG images:
#
# from imagetools import get_png_info, open_png
# decoder = lv.img.decoder_create()
# decoder.info_cb = get_png_info
# decoder.open_cb = open_png
#
# Support transparency (alpha)
#
# TODO:
# - Support more... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lib/imagetools.py | Python | apache-2.0 | 4,135 |
import lvgl as lv
def LV_COLOR_MAKE(r,g,b):
# return lv.color_hex(r<<16| g<<8 |b)
return lv.color_make(r,g,b)
class lv_colors:
WHITE=LV_COLOR_MAKE(0xFF, 0xFF, 0xFF)
SILVER=LV_COLOR_MAKE(0xC0, 0xC0, 0xC0)
GRAY=LV_COLOR_MAKE(0x80, 0x80, 0x80)
BLACK=LV_COLOR_MAKE(0x00, 0x00, 0x00)
RED=LV_COLOR_... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lib/lv_colors.py | Python | apache-2.0 | 862 |
##############################################################################
# Event Loop module: advancing tick count and scheduling lvgl task handler.
# Import after lvgl module.
# This should be imported and used by display driver.
# Display driver should first check if an event loop is already running.
#
# Usage ... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lib/lv_utils.py | Python | apache-2.0 | 4,264 |
import sys
sys.path.append('') # See: https://github.com/micropython/micropython/issues/6419
import lvgl as lv
lv.init()
# lv.log_register_print_cb(lambda msg: print(msg))
# Initialize ILI9341 display
import espidf as esp
from ili9XXX import ili9341,COLOR_MODE_BGR,LANDSCAPE,PORTRAIT
disp = ili9341(dc=32, cs=33,... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lib/tpcal.py | Python | apache-2.0 | 7,215 |
import lvgl as lv
import ustruct
import uctypes
# Calculate pointer size on current machine, and corresponding fmt
ptr_size = uctypes.sizeof({'p': (uctypes.PTR, uctypes.VOID)})
fmt_options = {2:'H', 4:'L', 8:'Q'}
buf_fmt = fmt_options[ptr_size] if ptr_size in fmt_options else None
def aligned_buf(buf, alignment):
... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lib/utils.py | Python | apache-2.0 | 1,137 |
if(ESP_PLATFORM)
file(GLOB_RECURSE SOURCES src/*.c)
idf_build_get_property(LV_MICROPYTHON LV_MICROPYTHON)
if (LV_MICROPYTHON)
idf_component_register(SRCS ${SOURCES}
INCLUDE_DIRS . src ../
REQUIRES main)
else()
idf_component... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/CMakeLists.txt | CMake | apache-2.0 | 3,421 |
# RT-Thread building script for bridge
import os
from building import *
objs = []
cwd = GetCurrentDir()
objs = objs + SConscript(cwd + '/rt-thread/SConscript')
Return('objs')
| YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/SConscript | Python | apache-2.0 | 180 |
# ESP-IDF component file for make based commands
COMPONENT_SRCDIRS := . \
src \
src/core \
src/draw \
src/extra \
src/font \
src/gpu \
src/hal \
src/misc \
s... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/component.mk | Makefile | apache-2.0 | 1,217 |
import os
from docutils import nodes
from docutils.parsers.rst import Directive, directives
from docutils.parsers.rst.directives.images import Image
from sphinx.directives.code import LiteralInclude
def excluded_list(argument):
return argument.split(',')
class LvExample(Directive):
required_arguments = 1... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/docs/_ext/lv_example.py | Python | apache-2.0 | 4,214 |
#!/usr/bin/env python3
import sys
import os
import subprocess
import re
import example_list as ex
langs = ['en']
# Change to script directory for consistency
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
def cmd(s):
print("")
print(s)
print("-----------------------------... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/docs/build.py | Python | apache-2.0 | 1,939 |
#!/usr/bin/env python3
import os
def process_index_rst(path):
# print(path)
with open(path) as fp:
last_line=""
line=""
title_tmp=""
line = fp.readline()
d = {}
while line:
if line[0:3] == '"""':
title_tmp = last_line
elif line[0:15] ==".. lv_example::":
name = l... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/docs/example_list.py | Python | apache-2.0 | 2,637 |
/**
* @file lv_example_anim.h
*
*/
#ifndef LV_EXAMPLE_ANIM_H
#define LV_EXAMPLE_ANIM_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
*****************... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/anim/lv_example_anim.h | C | apache-2.0 | 666 |
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_SWITCH
static void anim_x_cb(void * var, int32_t v)
{
lv_obj_set_x(var, v);
}
static void sw_event_cb(lv_event_t * e)
{
lv_obj_t * sw = lv_event_get_target(e);
lv_obj_t * label = lv_event_get_user_data(e);
if(lv_obj_has_state(sw, LV_STATE_CH... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/anim/lv_example_anim_1.c | C | apache-2.0 | 1,395 |
def anim_x_cb(label, v):
label.set_x(v)
def sw_event_cb(e,label):
sw = e.get_target()
if sw.has_state(lv.STATE.CHECKED):
a = lv.anim_t()
a.init()
a.set_var(label)
a.set_values(label.get_x(), 100)
a.set_time(500)
a.set_path_cb(lv.anim_t.path_overshoot)
... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/anim/lv_example_anim_1.py | Python | apache-2.0 | 982 |
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_SWITCH
static void anim_x_cb(void * var, int32_t v)
{
lv_obj_set_x(var, v);
}
static void anim_size_cb(void * var, int32_t v)
{
lv_obj_set_size(var, v, v);
}
/**
* Create a playback animation
*/
void lv_example_anim_2(void)
{
lv_obj_t * obj ... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/anim/lv_example_anim_2.c | C | apache-2.0 | 1,077 |
def anim_x_cb(obj, v):
obj.set_x(v)
def anim_size_cb(obj, v):
obj.set_size(v, v)
#
# Create a playback animation
#
obj = lv.obj(lv.scr_act())
obj.set_style_bg_color(lv.palette_main(lv.PALETTE.RED), 0)
obj.set_style_radius(lv.RADIUS.CIRCLE, 0)
obj.align(lv.ALIGN.LEFT_MID, 10, 0)
a1 = lv.anim_t()
a1.init()
a... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/anim/lv_example_anim_2.py | Python | apache-2.0 | 949 |
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_SLIDER && LV_USE_CHART && LV_USE_BTN
/**
* the example show the use of cubic-bezier3 in animation.
* the control point P1,P2 of cubic-bezier3 can be adjusted by slider.
* and the chart shows the cubic-bezier3 in real time. you can click
* run button see a... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/anim/lv_example_anim_3.c | C | apache-2.0 | 6,041 |
from micropython import const
# the example show the use of cubic-bezier3 in animation.
# the control point P1,P2 of cubic-bezier3 can be adjusted by slider.
# and the chart shows the cubic-bezier3 in real time. you can click
# run button see animation in current point of cubic-bezier3.
#
CHART_POINTS_NUM = const(256... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/anim/lv_example_anim_3.py | Python | apache-2.0 | 5,042 |
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES
static lv_anim_timeline_t * anim_timeline = NULL;
static lv_obj_t * obj1 = NULL;
static lv_obj_t * obj2 = NULL;
static lv_obj_t * obj3 = NULL;
static const lv_coord_t obj_width = 90;
static const lv_coord_t obj_height = 70;
static void set_width(void * var, int32_t ... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/anim/lv_example_anim_timeline_1.c | C | apache-2.0 | 5,859 |
class LV_ExampleAnimTimeline_1(object):
def __init__(self):
self.obj_width = 120
self.obj_height = 150
#
# Create an animation timeline
#
self.par = lv.scr_act()
self.par.set_flex_flow(lv.FLEX_FLOW.ROW)
self.par.set_flex_align(lv.FLEX_ALIGN.SPACE_ARO... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/anim/lv_example_anim_timeline_1.py | Python | apache-2.0 | 5,185 |
#include <lvgl.h>
#include <TFT_eSPI.h>
/*If you want to use the LVGL examples,
make sure to install the lv_examples Arduino library
and uncomment the following line.
#include <lv_examples.h>
*/
#include <lv_demo.h>
/*Change to your screen resolution*/
static const uint16_t screenWidth = 480;
static const uint16... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino | C++ | apache-2.0 | 3,990 |
#include "../../lvgl.h"
#if LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_IMG_CARET_DOWN
#define LV_ATTRIBUTE_IMG_IMG_CARET_DOWN
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_CARET_DOWN uint8_t img_caret_down_map[]... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/assets/img_caret_down.c | C | apache-2.0 | 8,660 |
#include "../../lvgl.h"
#if LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ALPHA16
#define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ALPHA16
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ALPHA16 uint8_t img_cogwheel_alpha16_map[] ... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/assets/img_cogwheel_alpha16.c | C | apache-2.0 | 30,766 |
#include "../../lvgl.h"
#if LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_CHROMA_KEYED
#define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_CHROMA_KEYED
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_CHROMA_KEYED uint8_t img_cogwheel... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/assets/img_cogwheel_chroma_keyed.c | C | apache-2.0 | 541,907 |
#include "../../lvgl.h"
#if LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16
#define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 uint8_t img_cogwheel_indexed1... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/assets/img_cogwheel_indexed16.c | C | apache-2.0 | 31,571 |
#include "../../lvgl.h"
#if LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB
#define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB uint8_t img_cogwheel_rgb_map[] = {
#if LV_COLOR... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/assets/img_cogwheel_rgb.c | C | apache-2.0 | 541,840 |
#include "../../lvgl.h"
#if LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_IMG_SKEW_STRIP
#define LV_ATTRIBUTE_IMG_IMG_SKEW_STRIP
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_SKEW_STRIP uint8_t img_skew_strip_map[]... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/assets/img_skew_strip.c | C | apache-2.0 | 116,470 |
#include "../../lvgl.h"
#if LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_IMG_STAR
#define LV_ATTRIBUTE_IMG_IMG_STAR
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_STAR uint8_t img_star_map[] = {
#if LV_COLOR_DEPTH ... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/assets/img_star.c | C | apache-2.0 | 63,945 |
#include "../../lvgl.h"
#if LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_IMGBTN_LEFT
#define LV_ATTRIBUTE_IMG_IMGBTN_LEFT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_LEFT uint8_t imgbtn_left_map[] = {
#if LV_... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/assets/imgbtn_left.c | C | apache-2.0 | 30,313 |
#include "../../lvgl.h"
#if LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_IMGBTN_MID
#define LV_ATTRIBUTE_IMG_IMGBTN_MID
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_MID uint8_t imgbtn_mid_map[] = {
#if LV_COLO... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/assets/imgbtn_mid.c | C | apache-2.0 | 19,116 |
#include "../../lvgl.h"
#if LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_IMGBTN_RIGHT
#define LV_ATTRIBUTE_IMG_IMGBTN_RIGHT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_RIGHT uint8_t imgbtn_right_map[] = {
#if... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/assets/imgbtn_right.c | C | apache-2.0 | 30,296 |
/**
* @file lv_example_event.h
*
*/
#ifndef LV_EXAMPLE_EVENT_H
#define LV_EXAMPLE_EVENT_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**************... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/event/lv_example_event.h | C | apache-2.0 | 634 |
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_SWITCH
static void event_cb(lv_event_t * e)
{
LV_LOG_USER("Clicked");
static unsigned int cnt = 1;
lv_obj_t * btn = lv_event_get_target(e);
lv_obj_t * label = lv_obj_get_child(btn, 0);
lv_label_set_text_fmt(label, "%u", cnt);
cnt++;
}... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/event/lv_example_event_1.c | C | apache-2.0 | 691 |
class Event_1():
def __init__(self):
self.cnt = 1
#
# Add click event to a button
#
btn = lv.btn(lv.scr_act())
btn.set_size(100, 50)
btn.center()
btn.add_event_cb(self.event_cb, lv.EVENT.CLICKED, None)
label = lv.label(btn)
la... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/event/lv_example_event_1.py | Python | apache-2.0 | 576 |
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_SWITCH
static void event_cb(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t * label = lv_event_get_user_data(e);
switch(code) {
case LV_EVENT_PRESSED:
lv_label_set_text(label, "The last button event:\nLV_EVENT_... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/event/lv_example_event_2.c | C | apache-2.0 | 1,283 |
def event_cb(e,label):
code = e.get_code()
if code == lv.EVENT.PRESSED:
label.set_text("The last button event:\nLV_EVENT_PRESSED")
elif code == lv.EVENT.CLICKED:
label.set_text("The last button event:\nLV_EVENT_CLICKED")
elif code == lv.EVENT.LONG_PRESSED:
label.set_text("The la... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/event/lv_example_event_2.py | Python | apache-2.0 | 798 |
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_FLEX
static void event_cb(lv_event_t * e)
{
/*The original target of the event. Can be the buttons or the container*/
lv_obj_t * target = lv_event_get_target(e);
/*The current target is always the container as the event is added to it*/
lv_ob... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/event/lv_example_event_3.c | C | apache-2.0 | 1,196 |
def event_cb(e):
# The original target of the event. Can be the buttons or the container
target = e.get_target()
# print(type(target))
# If container was clicked do nothing
if type(target) != type(lv.btn()):
return
# Make the clicked buttons red
target.set_style_bg_color(lv.palett... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/event/lv_example_event_3.py | Python | apache-2.0 | 731 |
CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples -name \*.c)
| YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/examples.mk | Makefile | apache-2.0 | 75 |
/**
* @file lv_example_get_started.h
*
*/
#ifndef LV_EX_GET_STARTED_H
#define LV_EX_GET_STARTED_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
******... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/get_started/lv_example_get_started.h | C | apache-2.0 | 661 |
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_BTN
static void btn_event_cb(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t * btn = lv_event_get_target(e);
if(code == LV_EVENT_CLICKED) {
static uint8_t cnt = 0;
cnt++;
/*Get the first child of th... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/get_started/lv_example_get_started_1.c | C | apache-2.0 | 1,157 |
class CounterBtn():
def __init__(self):
self.cnt = 0
#
# Create a button with a label and react on click event.
#
btn = lv.btn(lv.scr_act()) # Add a button the current screen
btn.set_pos(10, 10) # Set... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/get_started/lv_example_get_started_1.py | Python | apache-2.0 | 1,109 |
#include "../lv_examples.h"
#if LV_USE_BTN && LV_BUILD_EXAMPLES
static lv_style_t style_btn;
static lv_style_t style_btn_pressed;
static lv_style_t style_btn_red;
static lv_color_t darken(const lv_color_filter_dsc_t * dsc, lv_color_t color, lv_opa_t opa)
{
LV_UNUSED(dsc);
return lv_color_darken(color, opa);
}... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/get_started/lv_example_get_started_2.c | C | apache-2.0 | 3,010 |
#
# Create styles from scratch for buttons.
#
style_btn = lv.style_t()
style_btn_red = lv.style_t()
style_btn_pressed = lv.style_t()
# Create a simple button style
style_btn.init()
style_btn.set_radius(10)
style_btn.set_bg_opa(lv.OPA.COVER)
style_btn.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 3))
style_btn.set_... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/get_started/lv_example_get_started_2.py | Python | apache-2.0 | 2,370 |
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_SLIDER
static lv_obj_t * label;
static void slider_event_cb(lv_event_t * e)
{
lv_obj_t * slider = lv_event_get_target(e);
/*Refresh the text*/
lv_label_set_text_fmt(label, "%d", (int)lv_slider_get_value(slider));
lv_obj_align_to(label, slide... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/get_started/lv_example_get_started_3.c | C | apache-2.0 | 1,119 |
def slider_event_cb(evt):
slider = evt.get_target()
# Refresh the text
label.set_text(str(slider.get_value()))
#
# Create a slider and write its value on a label.
#
# Create a slider in the center of the display
slider = lv.slider(lv.scr_act())
slider.set_width(200) ... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/get_started/lv_example_get_started_3.py | Python | apache-2.0 | 742 |
#!/opt/bin/lv_micropython -i
import lvgl as lv
import display_driver
| YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/header.py | Python | apache-2.0 | 71 |
/**
* @file lv_example_flex.h
*
*/
#ifndef LV_EXAMPLE_FLEX_H
#define LV_EXAMPLE_FLEX_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
*****************... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex.h | C | apache-2.0 | 717 |
#include "../../lv_examples.h"
#if LV_USE_FLEX && LV_BUILD_EXAMPLES
/**
* A simple row and a column layout with flexbox
*/
void lv_example_flex_1(void)
{
/*Create a container with ROW flex direction*/
lv_obj_t * cont_row = lv_obj_create(lv_scr_act());
lv_obj_set_size(cont_row, 300, 75);
lv_obj_align(... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_1.c | C | apache-2.0 | 1,306 |
#
# A simple row and a column layout with flexbox
#
# Create a container with ROW flex direction
cont_row = lv.obj(lv.scr_act())
cont_row.set_size(300, 75)
cont_row.align(lv.ALIGN.TOP_MID, 0, 5)
cont_row.set_flex_flow(lv.FLEX_FLOW.ROW)
# Create a container with COLUMN flex direction
cont_col = lv.obj(lv.scr_act())
co... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_1.py | Python | apache-2.0 | 843 |
#include "../../lv_examples.h"
#if LV_USE_FLEX && LV_BUILD_EXAMPLES
/**
* Arrange items in rows with wrap and place the items to get even space around them.
*/
void lv_example_flex_2(void)
{
static lv_style_t style;
lv_style_init(&style);
lv_style_set_flex_flow(&style, LV_FLEX_FLOW_ROW_WRAP);
lv_styl... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_2.c | C | apache-2.0 | 871 |
#
# Arrange items in rows with wrap and place the items to get even space around them.
#
style = lv.style_t()
style.init()
style.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP)
style.set_flex_main_place(lv.FLEX_ALIGN.SPACE_EVENLY)
style.set_layout(lv.LAYOUT_FLEX.value)
cont = lv.obj(lv.scr_act())
cont.set_size(300, 220)
cont.cen... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_2.py | Python | apache-2.0 | 516 |
#include "../../lv_examples.h"
#if LV_USE_FLEX && LV_BUILD_EXAMPLES
/**
* Demonstrate flex grow.
*/
void lv_example_flex_3(void)
{
lv_obj_t * cont = lv_obj_create(lv_scr_act());
lv_obj_set_size(cont, 300, 220);
lv_obj_center(cont);
lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_ROW);
lv_obj_t * obj;
... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_3.c | C | apache-2.0 | 837 |
#
# Demonstrate flex grow.
#
cont = lv.obj(lv.scr_act())
cont.set_size(300, 220)
cont.center()
cont.set_flex_flow(lv.FLEX_FLOW.ROW)
obj = lv.obj(cont)
obj.set_size(40, 40) # Fix size
obj = lv.obj(cont)
obj.set_height(40)
obj.set_flex_grow(1) # 1 portion from the free space
obj = lv.obj(cont)
obj... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_3.py | Python | apache-2.0 | 510 |
#include "../../lv_examples.h"
#if LV_USE_FLEX && LV_BUILD_EXAMPLES
/**
* Reverse the order of flex items
*/
void lv_example_flex_4(void)
{
lv_obj_t * cont = lv_obj_create(lv_scr_act());
lv_obj_set_size(cont, 300, 220);
lv_obj_center(cont);
lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_COLUMN_REVERSE);
... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_4.c | C | apache-2.0 | 602 |
#
# Reverse the order of flex items
#
cont = lv.obj(lv.scr_act())
cont.set_size(300, 220)
cont.center()
cont.set_flex_flow(lv.FLEX_FLOW.COLUMN_REVERSE)
for i in range(6):
obj = lv.obj(cont)
obj.set_size(100, 50)
label = lv.label(obj)
label.set_text("Item: " + str(i))
label.center()
| YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_4.py | Python | apache-2.0 | 307 |
#include "../../lv_examples.h"
#if LV_USE_FLEX && LV_BUILD_EXAMPLES
static void row_gap_anim(void * obj, int32_t v)
{
lv_obj_set_style_pad_row(obj, v, 0);
}
static void column_gap_anim(void * obj, int32_t v)
{
lv_obj_set_style_pad_column(obj, v, 0);
}
/**
* Demonstrate the effect of column and row gap style... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_5.c | C | apache-2.0 | 1,271 |
def row_gap_anim(obj, v):
obj.set_style_pad_row(v, 0)
def column_gap_anim(obj, v):
obj.set_style_pad_column(v, 0)
#
# Demonstrate the effect of column and row gap style properties
#
cont = lv.obj(lv.scr_act())
cont.set_size(300, 220)
cont.center()
cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP)
for i in range(9)... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_5.py | Python | apache-2.0 | 987 |
#include "../../lv_examples.h"
#if LV_USE_FLEX && LV_BUILD_EXAMPLES
/**
* RTL base direction changes order of the items.
* Also demonstrate how horizontal scrolling works with RTL.
*/
void lv_example_flex_6(void)
{
lv_obj_t * cont = lv_obj_create(lv_scr_act());
lv_obj_set_style_base_dir(cont, LV_BASE_DIR_RT... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_6.c | C | apache-2.0 | 734 |
#
# RTL base direction changes order of the items.
# Also demonstrate how horizontal scrolling works with RTL.
#
cont = lv.obj(lv.scr_act())
cont.set_style_base_dir(lv.BASE_DIR.RTL,0)
cont.set_size(300, 220)
cont.center()
cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP)
for i in range(20):
obj = lv.obj(cont)
obj.set... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/flex/lv_example_flex_6.py | Python | apache-2.0 | 425 |
/**
* @file lv_example_grid.h
*
*/
#ifndef LV_EXAMPLE_GRID_H
#define LV_EXAMPLE_GRID_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
*****************... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/grid/lv_example_grid.h | C | apache-2.0 | 717 |
#include "../../lv_examples.h"
#if LV_USE_GRID && LV_BUILD_EXAMPLES
/**
* A simple grid
*/
void lv_example_grid_1(void)
{
static lv_coord_t col_dsc[] = {70, 70, 70, LV_GRID_TEMPLATE_LAST};
static lv_coord_t row_dsc[] = {50, 50, 50, LV_GRID_TEMPLATE_LAST};
/*Create a container with grid*/
lv_obj_t * ... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/grid/lv_example_grid_1.c | C | apache-2.0 | 1,164 |
#
# A simple grid
#
col_dsc = [70, 70, 70, lv.GRID_TEMPLATE.LAST]
row_dsc = [50, 50, 50, lv.GRID_TEMPLATE.LAST]
# Create a container with grid
cont = lv.obj(lv.scr_act())
cont.set_style_grid_column_dsc_array(col_dsc, 0)
cont.set_style_grid_row_dsc_array(row_dsc, 0)
cont.set_size(300, 220)
cont.center()
cont.set_layou... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/grid/lv_example_grid_1.py | Python | apache-2.0 | 736 |
#include "../../lv_examples.h"
#if LV_USE_GRID && LV_BUILD_EXAMPLES
/**
* Demonstrate cell placement and span
*/
void lv_example_grid_2(void)
{
static lv_coord_t col_dsc[] = {70, 70, 70, LV_GRID_TEMPLATE_LAST};
static lv_coord_t row_dsc[] = {50, 50, 50, LV_GRID_TEMPLATE_LAST};
/*Create a container with... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/grid/lv_example_grid_2.c | C | apache-2.0 | 2,410 |
#
# Demonstrate cell placement and span
#
col_dsc = [70, 70, 70, lv.GRID_TEMPLATE.LAST]
row_dsc = [50, 50, 50, lv.GRID_TEMPLATE.LAST]
# Create a container with grid
cont = lv.obj(lv.scr_act())
cont.set_grid_dsc_array(col_dsc, row_dsc)
cont.set_size(300, 220)
cont.center()
# Cell to 0;0 and align to to the start (lef... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/grid/lv_example_grid_2.py | Python | apache-2.0 | 1,724 |
#include "../../lv_examples.h"
#if LV_USE_GRID && LV_BUILD_EXAMPLES
/**
* Demonstrate grid's "free unit"
*/
void lv_example_grid_3(void)
{
/*Column 1: fix width 60 px
*Column 2: 1 unit from the remaining free space
*Column 3: 2 unit from the remaining free space*/
static lv_coord_t col_dsc[] = {60,... | YifuLiu/AliOS-Things | components/py_engine/engine/lib/lv_bindings/lvgl/examples/layouts/grid/lv_example_grid_3.c | C | apache-2.0 | 1,349 |