diff --git a/AtomUI.sln b/AtomUI.sln index c28bf965b..a9d46de4e 100644 --- a/AtomUI.sln +++ b/AtomUI.sln @@ -19,13 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{279BC2C9 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Generators", "Generators", "{B4C46C3E-0CCC-4861-95B6-CA08D501A46F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI", "packages\AtomUI\AtomUI.csproj", "{89A98C0D-B6F7-48CD-91C4-79FC0FED3615}" - ProjectSection(ProjectDependencies) = postProject - {87085491-3C99-4C8F-8FA6-F179B9569CE8} = {87085491-3C99-4C8F-8FA6-F179B9569CE8} - {8FFEB15F-7E48-4AF4-B708-8E96A68CF2D9} = {8FFEB15F-7E48-4AF4-B708-8E96A68CF2D9} - {A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D} = {A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D} - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Platform.Win32", "src\AtomUI.Platform.Win32\AtomUI.Platform.Win32.csproj", "{9BF7EF51-4100-4EAE-8A95-FC5F1BD4A1E4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.IconPkg", "src\AtomUI.IconPkg\AtomUI.IconPkg.csproj", "{70AC4A1D-2D88-4703-9AB2-89E753E1A04B}" @@ -46,12 +39,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{5EB2524C build\Output.Local.props = build\Output.Local.props build\Output.props = build\Output.props build\Version.props = build\Version.props + build\AtomUINativePackageInfo.props = build\AtomUINativePackageInfo.props EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Platform.MacOS", "src\AtomUI.Platform.MacOS\AtomUI.Platform.MacOS.csproj", "{2049CD2E-5E01-4DB2-83F9-542778DD9CC2}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Native", "src\AtomUI.Native\AtomUI.Native.csproj", "{90F1E4BC-4513-450E-B2B8-C64A779C8A0D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI", "packages\AtomUI\AtomUI.csproj", "{EF9E3D8A-7D43-42A4-839E-5B20553B1B72}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -80,9 +74,6 @@ Global {A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D}.Debug|Any CPU.Build.0 = Debug|Any CPU {A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D}.Release|Any CPU.ActiveCfg = Release|Any CPU {A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D}.Release|Any CPU.Build.0 = Release|Any CPU - {89A98C0D-B6F7-48CD-91C4-79FC0FED3615}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {89A98C0D-B6F7-48CD-91C4-79FC0FED3615}.Debug|Any CPU.Build.0 = Debug|Any CPU - {89A98C0D-B6F7-48CD-91C4-79FC0FED3615}.Release|Any CPU.ActiveCfg = Release|Any CPU {9BF7EF51-4100-4EAE-8A95-FC5F1BD4A1E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9BF7EF51-4100-4EAE-8A95-FC5F1BD4A1E4}.Debug|Any CPU.Build.0 = Debug|Any CPU {9BF7EF51-4100-4EAE-8A95-FC5F1BD4A1E4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -99,14 +90,14 @@ Global {C8BFCDBE-0DC2-411F-B2E4-439A0A8E1752}.Debug|Any CPU.Build.0 = Debug|Any CPU {C8BFCDBE-0DC2-411F-B2E4-439A0A8E1752}.Release|Any CPU.ActiveCfg = Release|Any CPU {C8BFCDBE-0DC2-411F-B2E4-439A0A8E1752}.Release|Any CPU.Build.0 = Release|Any CPU - {2049CD2E-5E01-4DB2-83F9-542778DD9CC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2049CD2E-5E01-4DB2-83F9-542778DD9CC2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2049CD2E-5E01-4DB2-83F9-542778DD9CC2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2049CD2E-5E01-4DB2-83F9-542778DD9CC2}.Release|Any CPU.Build.0 = Release|Any CPU {90F1E4BC-4513-450E-B2B8-C64A779C8A0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {90F1E4BC-4513-450E-B2B8-C64A779C8A0D}.Debug|Any CPU.Build.0 = Debug|Any CPU {90F1E4BC-4513-450E-B2B8-C64A779C8A0D}.Release|Any CPU.ActiveCfg = Release|Any CPU {90F1E4BC-4513-450E-B2B8-C64A779C8A0D}.Release|Any CPU.Build.0 = Release|Any CPU + {EF9E3D8A-7D43-42A4-839E-5B20553B1B72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF9E3D8A-7D43-42A4-839E-5B20553B1B72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF9E3D8A-7D43-42A4-839E-5B20553B1B72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF9E3D8A-7D43-42A4-839E-5B20553B1B72}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/README.nuget.md b/README.nuget.md new file mode 100644 index 000000000..9ca2d9865 --- /dev/null +++ b/README.nuget.md @@ -0,0 +1,25 @@ +

AtomUI

+ +#### Introduce + +AtomUI is an implementation of Ant Design based on .NET technology, dedicated to bringing the excellent and efficient design language and experience of Ant Design to the Avalonia/.NET cross-platform desktop software development field. + +Welcome to communicate and give suggestions to AtomUI, thank you for giving the project a Star. + +#### Features + +- Enterprise-class UI designed from Ant Design system for cross platform desktop applications. +- A set of high-quality Avalonia Controls out of the box. +- Use .NET development to achieve one-stop writing, seamless compilation on mainstream operating system platforms and render a consistent UI experience. +- Based on Avalonia's powerful style system, Ant Design's theme customization capabilities are fully implemented. + +#### License Description +Projects using AtomUI need to comply with the LGPL v3 agreement. Commercial applications (including but not limited to internal company projects, commercial projects developed by individuals using AtomUI, and outsourced projects) are free when using binary links. If you want to customize AtomUI based on source code, you need to modify the open source code or purchase a commercial license. If you need a commercial license, please contact: Beijing Qinware Software Technology Co., Ltd. + +### 🤝 Contributing + +Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub [Issues][github-issues-link] to get stuck in to show us what you’re made of. + +#### About Qinware + +Qinware Technologies Ltd. is a technology company dedicated to the development of productivity tool software. Since its inception, it has been determined to deepen its roots in the field of tool software, practice the spirit of continuous improvement in research and development, and strive to launch high-quality productivity tool software to serve developers at home and abroad, improve developers' work efficiency, and create commercial value and social value. \ No newline at end of file diff --git a/build/AtomUINativePackageInfo.props b/build/AtomUINativePackageInfo.props new file mode 100644 index 000000000..8e43f1151 --- /dev/null +++ b/build/AtomUINativePackageInfo.props @@ -0,0 +1,11 @@ + + + libAtomUI.so + libAtomUI.dylib + AtomUI.dll + linux + osx + win + runtimes/$(AtomUINativeRuntimeType)/native + + \ No newline at end of file diff --git a/build/PackageMetaInfo.props b/build/PackageMetaInfo.props index 3ac834958..743ee585c 100644 --- a/build/PackageMetaInfo.props +++ b/build/PackageMetaInfo.props @@ -2,18 +2,17 @@ True $(MSBuildProjectName) - AtomUI Qinware Technologies Ltd. $(Author) - AtomUI is an implementation of Ant Design based on .NET technology, and is committed to bringing Ant Design's excellent and efficient design language and experience to the Avalonia/.NET cross-platform desktop software development field. - avalonia;antdesign;ui;control + AtomUI is an implementation of AntDesigin based on .NET technology, and is committed to bringing AntDesign's excellent and efficient design language and experience to the Avalonia/.NET cross-platform desktop software development field. + avalonia;AntDesigin;UI;Control Library https://qinware.com https://github.com/chinware/AtomUI Qinware Technologies Ltd. Copyright ©2018-2025, Qinware Technologies Ltd., All Rights Reserved. logo.png - README.md + README.nuget.md LICENSE $(NugetPackageVersion) @@ -21,7 +20,7 @@ - + \ No newline at end of file diff --git a/nativelibs/include/atomui/Compiler.h b/nativelibs/include/atomui/Compiler.h index 6d2e3962b..67a07c107 100644 --- a/nativelibs/include/atomui/Compiler.h +++ b/nativelibs/include/atomui/Compiler.h @@ -113,12 +113,12 @@ # if defined(__clang__) /* Clang also masquerades as GCC */ # if defined(__apple_build_version__) - // The Clang version reported by Apple Clang in __clang_major__ - // and __clang_minor__ does _not_ reflect the actual upstream - // version of the compiler. To allow consumers to use a single - // define to verify the Clang version we hard-code the versions - // based on the best available info we have about the actual - // version: http://en.wikipedia.org/wiki/Xcode#Toolchain_Versions +// The Clang version reported by Apple Clang in __clang_major__ +// and __clang_minor__ does _not_ reflect the actual upstream +// version of the compiler. To allow consumers to use a single +// define to verify the Clang version we hard-code the versions +// based on the best available info we have about the actual +// version: http://en.wikipedia.org/wiki/Xcode#Toolchain_Versions # if __apple_build_version__ >= 14030022 // Xcode 14.3 # define ATOMUI_CC_CLANG 1500 # elif __apple_build_version__ >= 14000029 // Xcode 14.0 @@ -544,7 +544,7 @@ /* C++11 features, see http://clang.llvm.org/cxx_status.html */ # if (defined(__cplusplus) && __cplusplus >= 201103L) \ || defined(__GXX_EXPERIMENTAL_CXX0X__) - /* Detect C++ features using __has_feature(), see http://clang.llvm.org/docs/LanguageExtensions.html#cxx11 */ +/* Detect C++ features using __has_feature(), see http://clang.llvm.org/docs/LanguageExtensions.html#cxx11 */ # if __has_feature(cxx_alignas) # define ATOMUI_COMPILER_ALIGNAS # define ATOMUI_COMPILER_ALIGNOF @@ -637,7 +637,7 @@ # if __has_feature(cxx_variadic_templates) # define ATOMUI_COMPILER_VARIADIC_TEMPLATES # endif - /* Features that have no __has_feature() check */ +/* Features that have no __has_feature() check */ # if ATOMUI_CC_CLANG >= 209 /* since clang 2.9 */ # define ATOMUI_COMPILER_EXTERN_TEMPLATES # endif @@ -780,7 +780,7 @@ # define ATOMUI_COMPILER_STATIC_ASSERT # endif # if ATOMUI_CC_GNU >= 409 && defined(__has_include) - /* C11 features supported in GCC 4.9: */ +/* C11 features supported in GCC 4.9: */ # if __has_include() # define ATOMUI_COMPILER_THREAD_LOCAL # endif diff --git a/nativelibs/include/atomui/Global.h b/nativelibs/include/atomui/Global.h index f09ae645b..67d750e45 100644 --- a/nativelibs/include/atomui/Global.h +++ b/nativelibs/include/atomui/Global.h @@ -18,7 +18,8 @@ inline void atomui_noop() #ifdef __cplusplus noexcept #endif -{} +{ +} #if defined(ATOMUI_LIBRARY) # define ATOMUI_EXPORT ATOMUI_DECL_EXPORT @@ -28,11 +29,12 @@ inline void atomui_noop() # define ATOMUI_EXPORT ATOMUI_DECL_IMPORT #endif -namespace atomui { -ATOMUI_EXPORT std::string version_string(); +namespace atomui +{ + ATOMUI_EXPORT std::string version_string(); } -typedef void * ATOMUI_HANDLE; +typedef void* ATOMUI_HANDLE; #if defined(ATOMUI_OS_WIN) #ifndef STD_CALL_TYPE diff --git a/nativelibs/include/atomui/SystemDetection.h b/nativelibs/include/atomui/SystemDetection.h index 68c4e4854..eca5f93cc 100644 --- a/nativelibs/include/atomui/SystemDetection.h +++ b/nativelibs/include/atomui/SystemDetection.h @@ -219,4 +219,4 @@ #if !defined(ATOMUI_OS_VXWORKS) && !defined(_MSC_VER) # define ATOMUI_COMPILER_SUPPORTS_INT128 __SIZEOF_INT128__ #endif -#endif // defined(__SIZEOF_INT128__) \ No newline at end of file +#endif // defined(__SIZEOF_INT128__) diff --git a/nativelibs/include/atomui/WindowUtils.h b/nativelibs/include/atomui/WindowUtils.h index 56049f971..6383d2419 100644 --- a/nativelibs/include/atomui/WindowUtils.h +++ b/nativelibs/include/atomui/WindowUtils.h @@ -10,10 +10,12 @@ #pragma once #include "atomui/Global.h" -namespace atomui { -class WindowUtils { -public: - WindowUtils() = delete; - static void setIgnoresMouseEvents(ATOMUI_HANDLE windowHandle, bool flag); -}; +namespace atomui +{ + class WindowUtils + { + public: + WindowUtils() = delete; + static void setIgnoresMouseEvents(ATOMUI_HANDLE windowHandle, bool flag); + }; } diff --git a/nativelibs/include/atomui/bridge/WindowUtils.h b/nativelibs/include/atomui/bridge/WindowUtils.h index b1f7bf916..ac01a0621 100644 --- a/nativelibs/include/atomui/bridge/WindowUtils.h +++ b/nativelibs/include/atomui/bridge/WindowUtils.h @@ -11,4 +11,4 @@ #include "atomui/Global.h" -extern "C" ATOMUI_EXPORT void AtomUISetWindowIgnoresMouseEvents(ATOMUI_HANDLE windowHandle, bool flag); \ No newline at end of file +extern "C" ATOMUI_EXPORT void AtomUISetWindowIgnoresMouseEvents(ATOMUI_HANDLE windowHandle, bool flag); diff --git a/nativelibs/src/Global.cpp b/nativelibs/src/Global.cpp index 9c120a155..5c885754f 100644 --- a/nativelibs/src/Global.cpp +++ b/nativelibs/src/Global.cpp @@ -10,9 +10,10 @@ #include "atomui/Global.h" #include -namespace atomui { -std::string version_string() { - return std::string{ATOMUI_VERSION_LONG}; -} - +namespace atomui +{ + std::string version_string() + { + return std::string{ATOMUI_VERSION_LONG}; + } } diff --git a/nativelibs/src/WindowUtils.cpp b/nativelibs/src/WindowUtils.cpp index 62ec4abd6..07a3c324b 100644 --- a/nativelibs/src/WindowUtils.cpp +++ b/nativelibs/src/WindowUtils.cpp @@ -8,4 +8,3 @@ // Created by chinboy on 2025/01/10. #include "atomui/WindowUtils.h" - diff --git a/nativelibs/src/bridge/WindowUtils.cpp b/nativelibs/src/bridge/WindowUtils.cpp index 41c9b9ffa..59d9af6fb 100644 --- a/nativelibs/src/bridge/WindowUtils.cpp +++ b/nativelibs/src/bridge/WindowUtils.cpp @@ -12,6 +12,7 @@ using namespace atomui; -void AtomUISetWindowIgnoresMouseEvents(ATOMUI_HANDLE windowHandle, bool flag) { +void AtomUISetWindowIgnoresMouseEvents(ATOMUI_HANDLE windowHandle, bool flag) +{ WindowUtils::setIgnoresMouseEvents(windowHandle, flag); } diff --git a/packages/AtomUI/AtomUI.csproj b/packages/AtomUI/AtomUI.csproj index 4c07e0cfa..388ca6970 100644 --- a/packages/AtomUI/AtomUI.csproj +++ b/packages/AtomUI/AtomUI.csproj @@ -1,51 +1,87 @@  - - - - - $(AtomUICurrentTargetFramework) - - - - - - + + + - - - - - - - + + $(AtomUICurrentTargetFramework) + enable + enable + AtomUI + true + - - - + + + + + - - - - - - - - + + all + + + none + + + + $(IncludeAssets) + + + $(IncludeAssets) + + + $(IncludeAssets) + + + $(IncludeAssets) + + + $(IncludeAssets) + + - - - - - - - - - - - - - - + + $(MSBuildThisFileDirectory)../../output/Bin/$(Configuration) + + + + + + + + + + + + + + + + + + + + + + + + + + $(AtomUINativeArtifactName) + $(AtomUINativeDeployPath) + true + PreserveNewest + Always + + + + + + PreserveNewest + $(AtomUINativeDeployPath)/$(AtomUINativeArtifactName) + + diff --git a/src/AtomUI.Base/AtomUI.Base.csproj b/src/AtomUI.Base/AtomUI.Base.csproj index ed761e791..eda553cfc 100644 --- a/src/AtomUI.Base/AtomUI.Base.csproj +++ b/src/AtomUI.Base/AtomUI.Base.csproj @@ -19,12 +19,12 @@ + + + + - - - - diff --git a/src/AtomUI.Controls/Popup/PopupShadowLayer.cs b/src/AtomUI.Controls/Popup/PopupShadowLayer.cs index 1d8854b2b..1aea4b793 100644 --- a/src/AtomUI.Controls/Popup/PopupShadowLayer.cs +++ b/src/AtomUI.Controls/Popup/PopupShadowLayer.cs @@ -2,6 +2,7 @@ using System.Reflection; using AtomUI.Controls.Primitives; using AtomUI.Media; +using AtomUI.Native; #if PLATFORM_WINDOWS using AtomUI.Platform.Windows; @@ -62,6 +63,7 @@ internal class PopupShadowLayer : LiteWindow, IShadowDecorator #elif PLATFORM_MACOS #endif + WindowUtils.SetWindowIgnoreMouseEvents(this, true); if (PlatformImpl?.PopupPositioner is ManagedPopupPositioner managedPopupPositioner) { diff --git a/src/AtomUI.Native/AtomUI.Native.csproj b/src/AtomUI.Native/AtomUI.Native.csproj index cf0d4840e..41bbf6c10 100644 --- a/src/AtomUI.Native/AtomUI.Native.csproj +++ b/src/AtomUI.Native/AtomUI.Native.csproj @@ -1,9 +1,10 @@  - - + + + - $(AtomUICurrentTargetFramework) + net8.0 enable enable true @@ -11,21 +12,26 @@ + + + + + + + + + - $(OutputPath) $([System.IO.Path]::Combine($(MSBuildProjectDirectory), $(IntermediateOutputPath), 'AtomUINative')) $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)/../../nativelibs')) - libAtomUI.so - libAtomUI.dylib - AtomUI.dll - + - + - + @@ -39,31 +45,42 @@ - - + Outputs="@(AtomUINativeArtifact)"> + $([System.Environment]::ProcessorCount) - - + + + + + + $(AtomUINativeArtifactName) + $(AtomUINativeDeployPath) + true + PreserveNewest + + + - + + \ No newline at end of file diff --git a/src/AtomUI.Native/Interop/WindowUtilsImpl.cs b/src/AtomUI.Native/Interop/WindowUtilsImpl.cs new file mode 100644 index 000000000..75f7b1454 --- /dev/null +++ b/src/AtomUI.Native/Interop/WindowUtilsImpl.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace AtomUI.Native.Interop; + +internal static partial class WindowUtilsImpl +{ + private const string NativeLibName = "AtomUI"; + + [LibraryImport(NativeLibName)] + internal static partial void AtomUISetWindowIgnoresMouseEvents(IntPtr handle, + [MarshalAs(UnmanagedType.Bool)] bool flag); +} \ No newline at end of file diff --git a/src/AtomUI.Native/WindowUtils.cs b/src/AtomUI.Native/WindowUtils.cs new file mode 100644 index 000000000..88e0d3c4b --- /dev/null +++ b/src/AtomUI.Native/WindowUtils.cs @@ -0,0 +1,17 @@ +using AtomUI.Native.Interop; +using Avalonia.Controls; + +namespace AtomUI.Native; + +internal static class WindowUtils +{ + public static void SetWindowIgnoreMouseEvents(WindowBase window, bool flag) + { + var windowHandle = window.PlatformImpl?.Handle?.Handle; + if (windowHandle is not null) + + { + WindowUtilsImpl.AtomUISetWindowIgnoresMouseEvents(windowHandle.Value, flag); + } + } +} \ No newline at end of file diff --git a/src/AtomUI.Platform.MacOS/AtomUI.Platform.MacOS.csproj b/src/AtomUI.Platform.MacOS/AtomUI.Platform.MacOS.csproj deleted file mode 100644 index ec5a24aa6..000000000 --- a/src/AtomUI.Platform.MacOS/AtomUI.Platform.MacOS.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - $(AtomUICurrentTargetFramework) - enable - enable - true - - -