-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update LCUI's dependencies on ui-widgets and ui-router
- Loading branch information
Showing
113 changed files
with
1,798 additions
and
1,655 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* include/LCUI/base.h | ||
* | ||
* Copyright (c) 2024, Liu Chao <[email protected]> All rights reserved. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This file is part of LCUI, distributed under the MIT License found in the | ||
* LICENSE.TXT file in the root directory of this source tree. | ||
*/ | ||
|
||
#ifndef LCUI_INCLUDE_LCUI_BASE_H | ||
#define LCUI_INCLUDE_LCUI_BASE_H | ||
|
||
#include "common.h" | ||
|
||
LCUI_BEGIN_HEADER | ||
|
||
LCUI_API const char *lcui_get_version(void); | ||
|
||
LCUI_API void lcui_init(void); | ||
|
||
LCUI_API void lcui_destroy(void); | ||
|
||
LCUI_API int lcui_run(void); | ||
|
||
LCUI_API int lcui_main(void); | ||
|
||
LCUI_API void lcui_exit(int code); | ||
|
||
LCUI_API void lcui_quit(void); | ||
|
||
LCUI_END_HEADER | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* include/LCUI/settings.h | ||
* | ||
* Copyright (c) 2024, Liu Chao <[email protected]> All rights reserved. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This file is part of LCUI, distributed under the MIT License found in the | ||
* LICENSE.TXT file in the root directory of this source tree. | ||
*/ | ||
|
||
#ifndef LCUI_INCLUDE_LCUI_SETTINGS_H | ||
#define LCUI_INCLUDE_LCUI_SETTINGS_H | ||
|
||
#include "common.h" | ||
|
||
#define LCUI_MAX_FRAMES_PER_SEC 120 | ||
#define LCUI_MAX_FRAME_MSEC ((int)(1000.0 / LCUI_MAX_FRAMES_PER_SEC + 0.5)) | ||
|
||
LCUI_BEGIN_HEADER | ||
|
||
typedef struct lcui_settings { | ||
int frame_rate_cap; | ||
int parallel_rendering_threads; | ||
bool paint_flashing; | ||
} lcui_settings_t; | ||
|
||
/* Initialize settings with the current global settings. */ | ||
LCUI_API void lcui_get_settings(lcui_settings_t *settings); | ||
|
||
/* Update global settings with the given input. */ | ||
LCUI_API void lcui_apply_settings(lcui_settings_t *settings); | ||
|
||
/* Reset global settings to their defaults. */ | ||
LCUI_API void lcui_reset_settings(void); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* include/LCUI/ui.h | ||
* | ||
* Copyright (c) 2023-2024, Liu Chao <[email protected]> All rights reserved. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This file is part of LCUI, distributed under the MIT License found in the | ||
* LICENSE.TXT file in the root directory of this source tree. | ||
*/ | ||
|
||
#ifndef LCUI_INCLUDE_UI_H | ||
#define LCUI_INCLUDE_UI_H | ||
|
||
#include "common.h" | ||
|
||
LCUI_BEGIN_HEADER | ||
|
||
typedef enum { | ||
LCUI_DISPLAY_DEFAULT, | ||
LCUI_DISPLAY_WINDOWED, | ||
LCUI_DISPLAY_FULLSCREEN, | ||
LCUI_DISPLAY_SEAMLESS, | ||
} lcui_display_t; | ||
|
||
LCUI_API size_t lcui_ui_render(void); | ||
|
||
LCUI_API void lcui_ui_update(void); | ||
|
||
LCUI_API void lcui_ui_set_display(lcui_display_t mode); | ||
|
||
LCUI_API void lcui_ui_init(void); | ||
|
||
LCUI_API void lcui_ui_destroy(void); | ||
|
||
LCUI_END_HEADER | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* include/LCUI/widgets.h | ||
* | ||
* Copyright (c) 2023-2024, Liu Chao <[email protected]> All rights reserved. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This file is part of LCUI, distributed under the MIT License found in the | ||
* LICENSE.TXT file in the root directory of this source tree. | ||
*/ | ||
|
||
#include "widgets/text.h" | ||
#include "widgets/button.h" | ||
#include "widgets/anchor.h" | ||
#include "widgets/canvas.h" | ||
#include "widgets/scrollarea.h" | ||
#include "widgets/scrollbar.h" | ||
#include "widgets/textinput.h" | ||
#include "widgets/textcaret.h" | ||
#include "widgets/router_link.h" | ||
#include "widgets/router_view.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* include/LCUI/widgets/anchor.h: to <a> element in HTML. | ||
* | ||
* Copyright (c) 2018-2024, Liu chao <[email protected]> All rights reserved. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This file is part of LCUI, distributed under the MIT License found in the | ||
* LICENSE.TXT file in the root directory of this source tree. | ||
*/ | ||
|
||
#ifndef LCUI_INCLUDE_WIDGETS_ANCHOR_H | ||
#define LCUI_INCLUDE_WIDGETS_ANCHOR_H | ||
|
||
#include <LCUI/common.h> | ||
#include <ui.h> | ||
|
||
LCUI_BEGIN_HEADER | ||
|
||
LCUI_API void ui_anchor_open(ui_widget_t* w); | ||
|
||
LCUI_API void ui_register_anchor(void); | ||
|
||
LCUI_API void ui_unregister_anchor(void); | ||
|
||
LCUI_END_HEADER | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* include/LCUI/widgets/button.h: -- LCUI‘s Button widget | ||
* | ||
* Copyright (c) 2018-2024, Liu chao <[email protected]> All rights reserved. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This file is part of LCUI, distributed under the MIT License found in the | ||
* LICENSE.TXT file in the root directory of this source tree. | ||
*/ | ||
|
||
#ifndef LCUI_INCLUDE_WIDGETS_BUTTON_H | ||
#define LCUI_INCLUDE_WIDGETS_BUTTON_H | ||
|
||
#include <LCUI/common.h> | ||
#include <ui.h> | ||
|
||
LCUI_BEGIN_HEADER | ||
|
||
LCUI_API void ui_button_set_text_w(ui_widget_t* w, const wchar_t *wstr); | ||
|
||
LCUI_API void ui_button_set_text(ui_widget_t* w, const char *str); | ||
|
||
LCUI_API void ui_register_button(void); | ||
|
||
LCUI_END_HEADER | ||
|
||
#endif |
Oops, something went wrong.