Commit Graph
1222 Commits
Author SHA1 Message Date
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 44e0688a69 feat: update yutil 2023-04-01 22:35:26 +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
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 e8f23c0aa5 fix(platform): x11 driver not compiled 2023-04-01 22:34:30 +08:00
Liu 27e92fa80d build: use __attribute__((visibility("default"))) 2023-04-01 22:34:29 +08:00
Liu 4802c23910 build: split gui library 2023-04-01 22:32:21 +08:00
Liu 69c4225890 build: delete Makefile.am 2023-04-01 22:32:20 +08:00
Liu 3bece11c31 build: change some libraries to shared libraries 2023-04-01 22:32:20 +08:00
Liu 95397efccf refactor: reduce the dependencies of CSS module 2023-04-01 22:32:20 +08:00
Liu 67a1787dd2 build: update build script for Windows 2023-04-01 22:32:20 +08:00
Liu ed414c4ba5 build: use xmake instead of autotools 2023-04-01 22:32:20 +08:00
Liu 85958e4405 chore(release): 2.2.0 2021-05-31 23:28:36 +08:00
Liu 35bfa3f0e7 fix(gui): the size of the absolutely positioned widget is incorrect 2021-05-24 22:39:29 +08:00
Liu 31dee2494d fix(gui): the horizontal scroll bar does not work (#219) 2021-05-15 22:50:49 +08:00
Liu c9c990167d fix(util): ‘NULL’ is undeclared when the function of dict is inlined 2021-05-09 23:07:44 +08:00
Liu cf31e66b2f refactor: move config.h file to the include directory 2021-05-06 23:06:57 +08:00
Liu cb9055bbc6 refactor(types): change the type of color_type to LCUI_ColorType 2021-05-05 22:09:43 +08:00
Liu c0ccdf81e5 feat(font): add operation functions for TextStyle 2021-05-05 22:09:41 +08:00
Liu 932734d5bf refactor(font): simplify the assignment statement of autowrap variable 2021-05-05 22:09:39 +08:00
Liu 3bd6b71572 fix: remove the incorrect CSSParser_GetRuleParser() macro 2021-03-21 21:32:27 +08:00
Liu f0382d435a fix: variable naming conflict in LCUI_PostSimpleTask() 2020-10-07 21:53:36 +08:00
Liu 345031d74c chore(release): v2.1.0 2020-07-05 22:35:56 +08:00
James DuongandJames Duong 1b8c6e6863 feat: add settings api (#191) (#211) (#212)
- Add API for retrieving and modifying global settings
- Utilize this API in the codebase
- Add event for when global settings are changed
- Add event handler for updating the frame rate cap
- Add event handler to notify paint flashing changes
- Add unit tests

Fixes #192

Co-authored-by: James Duong <jduong@dremio.com>

feat: add settings api (#191) (#211) (#212)

Restore and re-implement LCUIDisplay_EnablePaintFlashing.

Fixes #191
2020-07-02 15:22:28 +08:00
Liu 57fce7414a chore: update version to 2.0.0 2020-04-11 16:37:20 +08:00
Liu 468ab5d408 build: update freetype2 check 2020-04-11 16:33:41 +08:00
Liu 0991d14efd feat(util): use inline functions instead of global variables
BREAKING CHANGE: `DictType_StringKey` and `DictType_StringCopyKey` have been replaced by inline functions
2020-03-01 22:33:30 +08:00
Liu 103544c93c style: clear compile warnings 2020-03-01 20:16:52 +08:00
Liu 298ffa4fd1 feat(display): add LCUIDisplay_EnablePaintFlashing()
BREAKING CHANGE: LCUIDisplay_ShowRectBorder() LCUIDisplay_HideRectBorder() have been removed.
2020-03-01 20:16:38 +08:00
Liu 08ed51cb98 refactor(gui): add widget_shadow.h
BREAKING CHANGE: The widget shadow operation interface has been changed to private
2020-03-01 20:16:36 +08:00
Liu d69fbb0b7f refactor(gui): add widget_background.h
BREAKING CHANGE: The widget background operation interface has been changed to private
2020-03-01 20:16:35 +08:00
Liu 843232efd0 refactor(gui): add widget_border.h
BREAKING CHANGE: The widget border operation interface has been changed to private
2020-03-01 20:16:34 +08:00
Liu 3587dacac5 refactor(gui): add widget_hash.c 2020-03-01 20:16:30 +08:00
Liu 406954c533 refactor(gui): use clearer layout rules 2020-03-01 20:16:24 +08:00
Liu 37c6749197 refactor(gui): LCUI_WidgetTaskBoxRec -> LCUI_WidgetTaskRec 2020-02-16 17:44:03 +08:00
Liu 746ec7811b refactor(gui): remove LCUI_WidgetLayoutContext 2020-02-16 17:44:02 +08:00
Liu f0589161d9 feat(gui): change the call timing and parameter list for the runtask()
BREAKING CHANGE: The runtask() method takes two arguments and is called before each task is processed.
2020-02-16 17:44:00 +08:00
Liu 3cbb246556 feat(gui): add flexible box layout 2020-02-16 17:43:52 +08:00
Liu 07d2911372 feat(css): add flexbox property parser 2020-02-16 17:43:51 +08:00
Liu 24e89aa513 feat(gui): rewrite widget layout system 2020-02-16 17:43:41 +08:00
Liu 80d4149aab feat(gui): add CSSFontStyle_IsEquals() 2020-02-16 17:43:37 +08:00
Liu 1a50aeca37 refactor(gui): improve widget update processing
BREAKING CHANGE: Some widget operation functions have been renamed or removed.
2020-02-16 17:43:35 +08:00
Liu f9c924faac build: update config.win.h.in 2020-01-19 17:48:24 +08:00
Liu c81da291af perf: improve dirty rectangle collection 2020-01-19 17:48:22 +08:00
d4yvectorandLiu d8583337fb perf: add OpenMP support for widget rendering (#118) (#189)
* perf: Add OpenMP support for widget rendering (#118)

- Modified src/Makefile.am and added compiler option.
- Modified src/display.c and added preprocessor directives for OpenMP.
- To check whether multithreading is possible, the string is output to standard output. However, I will remove it before merging.

* test: add rendering performance test

* build: add OpenMP configure option

* refactor: change include path of `config.h` and remove printf()

* perf: split the dirty rectangles into four parts for rendering

* fix(linux): missing surface size access method

* refactor(display): update dirty rectangle collection method

* test: update test_render.c

* build: add vs project file for test render

* fix(display): Convert `rects` list to array and follow a "Canonical Loop Form" defined in OpenMP

* refactor: Change where variable i is initialized

* fix: Widget_GenerateHash() not work

* test: improved widget update performance

Co-authored-by: Liu <lc-soft@live.cn>
2020-01-19 17:48:21 +08:00