mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-12-01 16:56:34 +01:00
Create lib/ui-router/ as a thin UI binding layer between libui and librouter, exposing the router-link and router-view widgets under <ui_router/...>.
* Move src/widgets/router_{link,view}.c and the matching public headers into lib/ui-router/src and lib/ui-router/include.
* Drop include/LCUI/widgets/router_{link,view}.h and the corresponding entries in include/LCUI/widgets.h; src/lcui_widgets.c now pulls registrations from <ui_router.h>.
* Wire libui-router into the root xmake.lua add_includedirs and lcui add_deps chain; libui-router depends on yutil + libui + librouter only.
* tests/integration/test_router.c stays at the integration layer (router widgets exercise text inheritance and other libui internals); only its #include set is updated to use <ui_router.h>.
* Bump CHANGELOG and add bilingual lib/ui-router/README.
34 lines
884 B
C
34 lines
884 B
C
/*
|
|
* lib/ui-router/include/ui_router/common.h
|
|
*
|
|
* Copyright (c) 2023-2026, Liu Chao <i@lc-soft.io> 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 "config.h"
|
|
#ifdef __cplusplus
|
|
#define LIBUI_ROUTER_BEGIN_DECLS extern "C" {
|
|
#define LIBUI_ROUTER_END_DECLS }
|
|
#else
|
|
#define LIBUI_ROUTER_BEGIN_DECLS
|
|
#define LIBUI_ROUTER_END_DECLS
|
|
#endif
|
|
|
|
#ifndef LIBUI_ROUTER_PUBLIC
|
|
#if defined(_MSC_VER) && !defined(LIBUI_ROUTER_STATIC_BUILD)
|
|
#ifdef LIBUI_ROUTER_DLL_EXPORT
|
|
#define LIBUI_ROUTER_PUBLIC __declspec(dllexport)
|
|
#else
|
|
#define LIBUI_ROUTER_PUBLIC __declspec(dllimport)
|
|
#endif
|
|
#elif __GNUC__ >= 4
|
|
#define LIBUI_ROUTER_PUBLIC extern __attribute__((visibility("default")))
|
|
#else
|
|
#define LIBUI_ROUTER_PUBLIC extern
|
|
#endif
|
|
#endif
|