3859 Commits
Author SHA1 Message Date
Liu 9b7bf239f2 refactor: redesign the graphics library API (#281)
* refactor: redesign PandaGL library

* refactor: update rect and canvas API

* refactor(pandagl): renames the line drawing function

* refactor(pandagl): replace pd_painter_t with pd_context_t

* fixup! refactor: update rect and canvas API

* test(pandagl): add tests

* fixup! refactor: update rect and canvas API

* fixup! refactor: update rect and canvas API

* fixup! refactor: update rect and canvas API

* fixup! refactor: update rect and canvas API
2023-04-01 22:35:29 +08:00
Liu e74d4a3f0b refactor: redesign font library 2023-04-01 22:35:29 +08:00
Liu 6b3f7d2c38 refactor: redesign ui widgets library 2023-04-01 22:35:29 +08:00
Liu 6ab1386638 refactor(ui-builder): ui_load_xml() -> ui_load_xml_file() 2023-04-01 22:35:28 +08:00
Liu 998bdbdeeb refactor: redesign thread library 2023-04-01 22:35:27 +08:00
Liu 05db86af18 chore: delete libxml2-lite port files 2023-04-01 22:35:27 +08:00
Liu 409d5eb52a refactor: redesign ui-builder library 2023-04-01 22:35:27 +08:00
Liu 0d03d1466f refactor(ui): rename CSSFontStyle and remove the dependency on TextStyle 2023-04-01 22:35:27 +08:00
Liu 120852d879 test: add ERROR_MARK 2023-04-01 22:35:27 +08:00
Liu 62e8d4d1b8 refactor(css): css_unit_value_t::type -> css_unit_value_t::unit 2023-04-01 22:35:27 +08:00
Liu 1ee3729fd4 refactor(css): add some font style properties as preset properties 2023-04-01 22:35:27 +08:00
Liu b799ee02bb refactor: redesign libcss header files 2023-04-01 22:35:26 +08:00
Liu 1231a691b4 refactor: redesign CSS Parser API 2023-04-01 22:35:26 +08:00
Liu 7ea167efc5 refactor: redesign CSS Library API 2023-04-01 22:35:26 +08:00
Liu 03f726eba5 docs: add libcss design document 2023-04-01 22:35:26 +08:00
Liu bb29fd9f51 chore(vscode): update includePath 2023-04-01 22:35:26 +08:00
Liu 44e0688a69 feat: update yutil 2023-04-01 22:35:26 +08:00
Liu e669e2695b docs: update README.md 2023-04-01 22:35:20 +08:00
Liu f1ca4bccf8 test: update check mark 2023-04-01 22:34:36 +08:00
Liu 58d7f0364b ci(github): add CI_ENV 2023-04-01 22:34:36 +08:00
Liu 90f595ea20 refactor: redesign platform and ui libraries
feat: redesign the ui library

fixup! feat: redesign the app library

feat: add the ui-server library

fixup! feat: redesign the ui library

fixup! feat: redesign the app library

fixup! feat: redesign the ui library

fixup! feat: redesign the app library

fixup! feat: redesign the app library

feat(ui): add mutation observer

fixup! feat: add the ui-server library

fixup! feat(ui): add mutation observer

feat: migrate to new app and ui libraries

refactor: rename LCUI_Build.h and remove some macros related to malloc

build: copy lib/yutil/include/yutil/*.h into the include/LCUI/util

refactor: lib/app -> lib/platform

refactor: clear compilation errors in Linux

fix: conditional jump depends on uninitialised value

fix(platform): incorrect Linux app driver

feat(platform): add --use-linux-input-event option

fix(platform): correct app driver and data types

fix: test_settings failed

fix: test errors and memcheck errors

fix: undefined reference to 'WinMain'

fix(platform): the error message is not formatted correctly

fix(platform): the mouse position in the mouse event is incorrect

fix(platform): incorrect window size

fix(util): undefined reference to 'logger_log'

refactor: remove the dependency of fontlibrary.h on graph.h

fix: freetype.dll not found

fix(ui): the wheel event was not dispatched correctly

fix(ui-server): the window in the minmaxinfo event is not required

fix: the widget is not connected to the window

fix(ui): mutation observer connection node incorrect

refactor(css): update LCUI_StyleListNode structure

refactor(ui): LCUI_WSTATE_* -> UI_WIDGET_STATE_*

fix: the root widget must have a fixed size for the layout to be correct

fix(ui): root widget did not trigger the ready event

fix(ui): mutation observer not working

fix(ui-server): widget mutation handler is not working

fix: the UI is not redrawn when resizing the window

fix(platform): APP_EVENT_QUIT not working

fix(platform): Incorrect peekmessage usage

test: use the event functions provided by the libui

docs: add README.md for some libraries

feat(ui): add ui logger

fix(ui-server):  `wnd_mutation` is uninitialized

fix(platform): fb app engine not work

build: fix xmake file matching warning

test: update scroll bar test code

build: use system libxml2

build: delete unneeded openMP rules

refactor(platform): remove tick thread

refactor(ui): clear compilation warnings

fix: memory leak bug

test: fix compilation errors

build: add "headers" target

refactor: LCUI_USER -> APP_EVENT_USER

fix: ui image event was not processed

refactor: delete steptimer.h

test: update requires

fix(platform): incorrect window size

refactor: simplify window creation in ui display mode switching

fix(platform): window position not updated

feat(ui-server): set the initial position of the window to center

feat(platform): add APP_EVENT_VISIBILITY_CHANGE

fix(ui-server): the window content is not completely drawn

fix(platform): windows cannot be maximized and minimized

refactor(ui): change image loader API to public

fix: the window size is incorrect in fullscreen mode

refactor(ui): move some types into ui.h
2023-04-01 22:34:36 +08:00
Augustinas d99040a098 feat(platform): add clipboard support (#271)
* chore(git): Remove LCUI/include from gitignore, so new headers could be added

* feat(clipboard): initial layout setup

* fix(clipboard): remove static + cleanup initialisation

* fix(clipboard): remove static from UseClipboard

* fix(keyboard): do not trigger keyboard event twice

* fix(widget_event): ctrl, shift properties not passed down correctly

* fix(keyboard): undo keyboard changes and add note to look into it more

* feat(clipboard): headers for UseClipboard access

* feat(clipboard): further callback execution

* feat(clipboard): retrieve text at widget level

* feat(textedit): insert paste event text

* feat(textedit): do not insert keys if control char is held.

* chore: clang formatting

* feat(clipboard): add more notes and error messages for implementation

* feat(clipboard): function definitions required for copying

* fix(clipboard): remove switch statement, since we already bind for specific event

* feat(clipboard): further steps for implementing paste to clipboard

* feat(clipboard): further steps for implementing copy

* feat(clipboard): add copy support by copying full widget text

* chore: value name changes

* chore: cleanup implementation by reducing header files

* chore: implementation cleanup

* feat(clipboard): pass down length together with wchar

* chore: function name change

* fix(clipboard): do not use key, since text enum is occupied

* fix(keyboard): do not submit keypress if ctrl is held.
This prevents c and v from being sent when copying or pasting

* feat(clipboard): better struct wrapper
feat(clipboard): pass back w_char instead of char*

* feat(clipboard): make clipboard more generic

* feat(clipboard) include image in clipboard data

* feat(clipboard): use char instead of codes

* chore(clipboard): use a more generic name

* chore: format code

* fix(clipboard): fix internal clipboard text sizes

* fix(clipboard): add +1 len for setting clipboard text

* fix(clipboard): remove +1 from size allocation

* fix(clipboard):add back +1 to allocation

* test(clipboard): configure testing setup

* test(clipboard): copy paste test

* test(clipboard): cleanup tests and remove test seperations

* chore: cleanup imports

* fix: undo wrong file commit

* chore: cleanup comments

* feat(clipboard): add observer thread to handle timeout

* feat(textedit): do not paste null text

* feat(clipboard): add windows implementation

* chore(clipboard): make sure constants are used for clean seperation of responsability

* feat(clipboard): call empty action for when no implementation exists

* feat(clipboard): allow clipboard events to run even if they are empty

* feat(clipboard): implement dummy clipboard for no UI

* test(clipboard): update clipboard test

* fix(clipboard): missing semicolon

* fix: tmp disabling of clipboard for test check

* fix: make sure to free text when setting new cliipboard

* fix: correct in memory representation of clipboard

* feat(clipboard): make sure to free old clipboard before new

* fix(clipboard):make sure to free memory correctly in x11

* fix(clipboard): handle both: no libx11 and if LCUI_GetAppId() != LCUI_APP_LINUX_X11
2023-04-01 22:34:34 +08:00
Augustinas 874395ecb9 fix: use min max approach instead of specific keysym range (#269)
* Fix: use min max approach instead of specific keysym range
This fixes the issue of keys with symbols such as $ or £ not being displayed

* chore: cleanup formatting and variable layout
2023-04-01 22:34:34 +08:00
GregoryLiand李刚毅 073a033fb8 refactor(paint): LCUI_Background -> pd_background_t (#266)
Co-authored-by: 李刚毅 <gregoryli@foxmail.com>
2023-04-01 22:34:34 +08:00
GregoryLiand李刚毅 c44562b45b refactor(paint): migrate to new naming style (#265)
* ib/paint 目录内代码及相关调用代码的重命名

* Revert "ib/paint 目录内代码及相关调用代码的重命名"

This reverts commit 6369a3b7bc.

* lib/paint 目录内代码及相关调用代码的重命名

* 添加 PandaGL 优化文档

* 修改部分命名规范

* - 将paint 中的LCUI_BOOL 更改为 pd_bool 其他地方保持 LCUI_BOOL
- 将 .h 文件中 PandaGL 函数更改为以 pd_ 前缀
- 将 paint 中 graph 更改为 canvas

* 退回 LCUI_StyleValue 与 LCUI_StyleType 的修改

* - 根据使用范围修改 types.h 中 LCUI_BOOL 与 pd_bool
- 回退LCUI_Style、LCUI_StyleRec
- 回退LCUI_Background

* 将 pd_paint_context 修改为 pd_paint_context_t *

* 替换 PDASSIGN

* 修改logger_debug

* 更改logger_error

Co-authored-by: 李刚毅 <gregoryli@foxmail.com>
2023-04-01 22:34:33 +08:00
YDYKand李梓豪 b46306ddea refactor(util): add yutil library (#264)
* add yutil

* add yutil to util.h

* remove util file that same as yutil's

* replace the old header file like '#include <LCUI/util/*>' with yutil's head file

* Replace the old UTIL module associated data structures and function call code

* change timer

* Replace the old UTIL module associated data structures and function call code

* fix

* fix compilation problems(RGB to YUTIL_TEST_RGB)

* turn some useless changes back to origin

* change YUTIL_TEST_RGB back to RGB and add  lcui-util/xmake.lua include

* update github action

* update github action

* update github action

* change new yutil func name

* update xmake and change way to include yutil

* update include to <yutil.h>

* update list_for_each to for(list_each())

* fix

* add graph.h to test_*

* add #include <LCUI/graph.h>

* update yutil

* change timer func name and update submodule

* update submodules

* test strncpy

* turn useless code back origin

* fix lose RGB issue

* fix yutil charset

* update yutil

* update yutil

* add yutil_test instead of lcui-util test

* change timer func name style

Co-authored-by: 李梓豪 <yidianyiko@foxmail.com>
2023-04-01 22:34:33 +08:00
Liu 57c129b585 build: update the script for copying internal library header files 2023-04-01 22:34:33 +08:00
Liu c71c5b024c test: ignore the test results of ANSI string encoding/decoding 2023-04-01 22:34:32 +08:00
Liu 2bcbc3fdf8 test: ignore the test results of ANSI string encoding/decoding 2023-04-01 22:34:32 +08:00
Liu 99e100ebba ci(github): delete unnecessary command 2023-04-01 22:34:32 +08:00
Liu ca242336b3 fix(font): incorrect font weight detection 2023-04-01 22:34:32 +08:00
Liu fb8a6715bd build: update UNICODE define 2023-04-01 22:34:31 +08:00
Liu 173511b034 ci(github): update the script in the package step 2023-04-01 22:34:31 +08:00
Liu b6343e208d fix(util): bad assert() usage 2023-04-01 22:34:31 +08:00
Liu c5fc5c31df refactor: add LCUI_InitPresetWidgets() 2023-04-01 22:34:31 +08:00
Liu dae4d65d19 test: fix textedit not registered 2023-04-01 22:34:31 +08:00
Liu 8c86bd1224 build: update the run args of run tests 2023-04-01 22:34:31 +08:00
Liu Chao 566f014b70 build: rename test to ctest to resolve the cmake error 2023-04-01 22:34:31 +08:00
Liu 0cfc03bb4d ci(github): remove the build step for the test program 2023-04-01 22:34:30 +08:00
Liu bd2ee103a6 build: merge test/xmake.lua and copy header files 2023-04-01 22:34:30 +08:00
Liu e8f23c0aa5 fix(platform): x11 driver not compiled 2023-04-01 22:34:30 +08:00
Liu 1154314063 build: always use the libxml2 remote package 2023-04-01 22:34:29 +08:00
Liu d002abe398 ci(github): update build script 2023-04-01 22:34:29 +08:00
Liu 526260662e ci(github): update build job steps 2023-04-01 22:34:29 +08:00
Liu b56de8bb6d build: update test/xmake.lua 2023-04-01 22:34:29 +08:00
Liu 27e92fa80d build: use __attribute__((visibility("default"))) 2023-04-01 22:34:29 +08:00
Liu ec957c14c6 build: update helloworld build config 2023-04-01 22:34:28 +08:00
Liu 234ddcd567 refactor: remove libui's dependency on lib-ui-widgets 2023-04-01 22:34:28 +08:00
Liu d082a4de84 chore: remove unused scripts 2023-04-01 22:34:28 +08:00
Liu 5981711194 docs: add design documents 2023-04-01 22:34:28 +08:00