lc-soft/LCUI

















The issue has been closed
LCUI 3.0 development plan #239
lc-soft posted onGitHub
LCUI has the following problems:
- There are multiple API design styles.
- The header file dependency is complicated.
- Some modules have a higher degree of coupling.
- Compilation is slow.
We plan to solve them in version 3.0. The main method is to split LCUI into multiple libraries so that LCUI has the following features:
- Unified API design style. Improve development experience and efficiency.
- Faster compilation speed. The header file becomes simpler, which improves the compilation speed.
- Better modularity. For users, they can modify and customize the library in LCUI according to their needs, or even replace it with a better open source library of the same kind. For us, we can give some libraries to other contributors to develop and maintain to achieve a win-win cooperation.
Library design
Directory structure
include/
example.h
src/
private.h
file1.c
file2.c
...
test/
test.c
test_???.c
test_???.c
...
LICENSE
README.md
xmake.lua
API design
We can refer to the API design of the following open source projects:
- libgit2: https://libgit2.org/libgit2/
- LevelDB: https://github.com/google/leveldb/blob/master/include/leveldb/c.h
LCUI project design
Directory Structure:
include/
LCUI/
util.h
thread.h
app.h
paint.h
image.h
css.h
font.h
layout.h
ui.h
...
LCUI.h
lib/
util/
thread/
app/
paint/
image/
css/
ui/
font/
layout/
...
src/
...
Coding style:
Follow the current coding style.
API design style:
It is the same as the API design style of the library. In order to reduce the changes during the upgrade of the LCUI application, we will provide header files that containing the CamelCase naming style API.
TODO
The following list shows the work content and progress of this plan:
- Coding style
- API design style
- Use xmake to build project
- Update README.md
- Write a sample program that shows how to draw using the Cario graphics library
- Add Libraries
- yutil
- pandagl
- css
- platform
- ui
- thread
- image
- font