Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 2da8691

Browse files
committed
update
1 parent 3e77770 commit 2da8691

389 files changed

Lines changed: 90278 additions & 63 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pypi.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ jobs:
1515
strategy:
1616
matrix:
1717
python-version: ['3.10', '3.11', '3.12']
18-
os: [windows-latest]
18+
os: [windows-latest, macos-latest]
1919
qt-version: ["6.8.*"]
2020
include:
2121
# - os: ubuntu-24.04
2222
# qt-arch: 'linux_gcc_64'
2323
- os: windows-latest
2424
qt-arch: 'win64_msvc2022_64'
25-
# - os: macos-latest
26-
# qt-arch: 'clang_64'
25+
- os: macos-latest
26+
qt-arch: 'clang_64'
2727

2828
runs-on: ${{ matrix.os }}
2929
steps:

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "pybind11"]
2-
path = pybind11
2+
path = bindings/pybind11
33
url = git@github.com:pybind/pybind11.git
44
[submodule "QHotkey"]
5-
path = QHotkey
5+
path = src/QHotkey
66
url = git@github.com:Uniquenium/QHotkey.git

CMakeLists.txt

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
cmake_minimum_required(VERSION 3.25)
1+
cmake_minimum_required(VERSION 3.18)
22

33
add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x050F00)
44

5+
add_compile_options(/Zc:__cplusplus /permissive- /W4)
6+
57
set(CMAKE_AUTOMOC ON)
68
set(CMAKE_AUTORCC ON)
79
set(CMAKE_AUTOUIC ON)
@@ -24,10 +26,6 @@ option(BUILD_PYTHON "Build Python bindings" OFF)
2426
set(CMAKE_INCLUDE_CURRENT_DIR ON)
2527
set(CMAKE_CXX_STANDARD 17)
2628
set(CMAKE_CXX_STANDARD_REQUIRED ON)
27-
# if(MSVC)
28-
# add_compile_options(/Zc:__cplusplus)
29-
# add_compile_options(/permissive-)
30-
# endif()
3129

3230

3331
set(QT_DEFAULT_MAJOR_VERSION 6)
@@ -38,8 +36,7 @@ find_package(ECM REQUIRED NO_MODULE)
3836
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
3937
message(STATUS "ECM version: ${ECM_VERSION}")
4038

41-
set(QT Core Widgets Quick QuickControls2 DBus Core5Compat)
42-
find_package(Qt6 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS ${QT})
39+
4340

4441
if (UNIX)
4542
if (NOT APPLE)
@@ -57,15 +54,7 @@ if(QT_KNOWN_POLICY_QTP0004)
5754
qt_policy(SET QTP0004 NEW)
5855
endif()
5956

60-
# QHotkey
61-
option(QHOTKEY_INSTALL OFF)
62-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/QHotkey)
63-
set(QHOTKEY_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/QHotkey/QHotkey)
6457

65-
include(GenerateExportHeader)
66-
include(GNUInstallDirs)
67-
include(CMakePackageConfigHelpers)
68-
include(ECMGenerateHeaders)
6958

7059
# Get the installation directory from qmake
7160
if(ECM_VERSION VERSION_LESS 5.93.0)
@@ -101,16 +90,14 @@ message(STATUS "CMake Config install directory:" "${CMAKECONFIG_INSTALL_DIR}")
10190

10291

10392

93+
add_subdirectory(src)
94+
95+
add_subdirectory(bindings)
10496

10597

106-
add_subdirectory(pybind11)
107-
pybind11_add_module(UDFrameless src/UDFrameless.cpp)
108-
# target_link_libraries(UDFrameless PRIVATE Qt6::Core)
10998

11099

111-
add_subdirectory(src)
112100
# EXAMPLE_VERSION_INFO is defined by setup.py and passed into the C++ code as a
113101
# define (VERSION_INFO) here.
114-
target_compile_definitions(UDFrameless
115-
PRIVATE VERSION_INFO=${EXAMPLE_VERSION_INFO})
102+
116103

QHotkey

Lines changed: 0 additions & 1 deletion
This file was deleted.

bindings/BUDFrameless.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "../src/UDFrameless.h"
2+
#include<pybind11/pybind11.h>
3+
namespace py=pybind11;
4+
5+
PYBIND11_MODULE(UDFrameless,m){
6+
m.doc()="11111";
7+
// m.def("setWindowEffect",&setWindowEffect,py::arg("hwnd"),py::arg("key"),py::arg("enable"));
8+
}

bindings/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cmake_minimum_required(VERSION 3.18)
2+
3+
project(${PROJECT_NAME} VERSION ${MODULE_VERSION})
4+
5+
set (CMAKE_CXX_STANDARD 17)
6+
7+
# pybind11 importieren
8+
add_subdirectory(pybind11)
9+
10+
# create bindings
11+
pybind11_add_module(UDFrameless BUDFrameless.cpp)
12+
target_link_libraries(UDFrameless PRIVATE ${TARGET})

bindings/pybind11/.appveyor.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: 1.0.{build}
2+
image:
3+
- Visual Studio 2017
4+
test: off
5+
skip_branch_with_pr: true
6+
build:
7+
parallel: true
8+
platform:
9+
- x86
10+
environment:
11+
matrix:
12+
- PYTHON: 38
13+
CONFIG: Debug
14+
install:
15+
- ps: |
16+
$env:CMAKE_GENERATOR = "Visual Studio 15 2017"
17+
if ($env:PLATFORM -eq "x64") { $env:PYTHON = "$env:PYTHON-x64" }
18+
$env:PATH = "C:\Python$env:PYTHON\;C:\Python$env:PYTHON\Scripts\;$env:PATH"
19+
python -W ignore -m pip install --upgrade pip wheel
20+
python -W ignore -m pip install pytest numpy --no-warn-script-location pytest-timeout
21+
- ps: |
22+
Start-FileDownload 'https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.zip'
23+
7z x eigen-3.3.7.zip -y > $null
24+
$env:CMAKE_INCLUDE_PATH = "eigen-3.3.7;$env:CMAKE_INCLUDE_PATH"
25+
build_script:
26+
- cmake -G "%CMAKE_GENERATOR%" -A "%CMAKE_ARCH%"
27+
-DCMAKE_CXX_STANDARD=14
28+
-DPYBIND11_WERROR=ON
29+
-DDOWNLOAD_CATCH=ON
30+
-DCMAKE_SUPPRESS_REGENERATION=1
31+
.
32+
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
33+
- cmake --build . --config %CONFIG% --target pytest -- /m /v:m /logger:%MSBuildLogger%
34+
- cmake --build . --config %CONFIG% --target cpptest -- /m /v:m /logger:%MSBuildLogger%
35+
on_failure: if exist "tests\test_cmake_build" type tests\test_cmake_build\*.log*

bindings/pybind11/.clang-format

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
# See all possible options and defaults with:
3+
# clang-format --style=llvm --dump-config
4+
BasedOnStyle: LLVM
5+
AccessModifierOffset: -4
6+
AllowShortLambdasOnASingleLine: true
7+
AlwaysBreakTemplateDeclarations: Yes
8+
BinPackArguments: false
9+
BinPackParameters: false
10+
BreakBeforeBinaryOperators: All
11+
BreakConstructorInitializers: BeforeColon
12+
ColumnLimit: 99
13+
CommentPragmas: 'NOLINT:.*|^ IWYU pragma:'
14+
IncludeBlocks: Regroup
15+
IndentCaseLabels: true
16+
IndentPPDirectives: AfterHash
17+
IndentWidth: 4
18+
Language: Cpp
19+
SpaceAfterCStyleCast: true
20+
Standard: Cpp11
21+
StatementMacros: ['PyObject_HEAD']
22+
TabWidth: 4
23+
IncludeCategories:
24+
- Regex: '<pybind11/.*'
25+
Priority: -1
26+
- Regex: 'pybind11.h"$'
27+
Priority: 1
28+
- Regex: '^".*/?detail/'
29+
Priority: 1
30+
SortPriority: 2
31+
- Regex: '^"'
32+
Priority: 1
33+
SortPriority: 3
34+
- Regex: '<[[:alnum:]._]+>'
35+
Priority: 4
36+
- Regex: '.*'
37+
Priority: 5
38+
...

bindings/pybind11/.clang-tidy

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
FormatStyle: file
2+
3+
Checks: |
4+
*bugprone*,
5+
*performance*,
6+
clang-analyzer-optin.cplusplus.VirtualCall,
7+
clang-analyzer-optin.performance.Padding,
8+
cppcoreguidelines-init-variables,
9+
cppcoreguidelines-prefer-member-initializer,
10+
cppcoreguidelines-pro-type-static-cast-downcast,
11+
cppcoreguidelines-slicing,
12+
google-explicit-constructor,
13+
llvm-namespace-comment,
14+
misc-definitions-in-headers,
15+
misc-misplaced-const,
16+
misc-non-copyable-objects,
17+
misc-static-assert,
18+
misc-throw-by-value-catch-by-reference,
19+
misc-uniqueptr-reset-release,
20+
misc-unused-parameters,
21+
modernize-avoid-bind,
22+
modernize-loop-convert,
23+
modernize-make-shared,
24+
modernize-redundant-void-arg,
25+
modernize-replace-auto-ptr,
26+
modernize-replace-disallow-copy-and-assign-macro,
27+
modernize-replace-random-shuffle,
28+
modernize-shrink-to-fit,
29+
modernize-use-auto,
30+
modernize-use-bool-literals,
31+
modernize-use-default-member-init,
32+
modernize-use-emplace,
33+
modernize-use-equals-default,
34+
modernize-use-equals-delete,
35+
modernize-use-noexcept,
36+
modernize-use-nullptr,
37+
modernize-use-override,
38+
modernize-use-using,
39+
readability-avoid-const-params-in-decls,
40+
readability-braces-around-statements,
41+
readability-const-return-type,
42+
readability-container-size-empty,
43+
readability-delete-null-pointer,
44+
readability-else-after-return,
45+
readability-implicit-bool-conversion,
46+
readability-inconsistent-declaration-parameter-name,
47+
readability-make-member-function-const,
48+
readability-misplaced-array-index,
49+
readability-non-const-parameter,
50+
readability-qualified-auto,
51+
readability-redundant-function-ptr-dereference,
52+
readability-redundant-smartptr-get,
53+
readability-redundant-string-cstr,
54+
readability-simplify-subscript-expr,
55+
readability-static-accessed-through-instance,
56+
readability-static-definition-in-anonymous-namespace,
57+
readability-string-compare,
58+
readability-suspicious-call-argument,
59+
readability-uniqueptr-delete-release,
60+
-bugprone-chained-comparison,
61+
-bugprone-easily-swappable-parameters,
62+
-bugprone-exception-escape,
63+
-bugprone-reserved-identifier,
64+
-bugprone-unused-raii,
65+
-performance-enum-size,
66+
-performance-inefficient-string-concatenation,
67+
68+
CheckOptions:
69+
- key: modernize-use-equals-default.IgnoreMacros
70+
value: false
71+
- key: performance-for-range-copy.WarnOnAllAutoCopies
72+
value: true
73+
- key: performance-inefficient-string-concatenation.StrictMode
74+
value: true
75+
- key: performance-unnecessary-value-param.AllowedTypes
76+
value: 'exception_ptr$;'
77+
- key: readability-implicit-bool-conversion.AllowPointerConditions
78+
value: true
79+
80+
HeaderFilterRegex: 'pybind11/.*h'
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
parse:
2+
additional_commands:
3+
pybind11_add_module:
4+
flags:
5+
- THIN_LTO
6+
- MODULE
7+
- SHARED
8+
- NO_EXTRAS
9+
- EXCLUDE_FROM_ALL
10+
- SYSTEM
11+
12+
format:
13+
line_width: 99
14+
tab_size: 2
15+
16+
# If an argument group contains more than this many sub-groups
17+
# (parg or kwarg groups) then force it to a vertical layout.
18+
max_subgroups_hwrap: 2
19+
20+
# If a positional argument group contains more than this many
21+
# arguments, then force it to a vertical layout.
22+
max_pargs_hwrap: 6
23+
24+
# If a cmdline positional group consumes more than this many
25+
# lines without nesting, then invalidate the layout (and nest)
26+
max_rows_cmdline: 2
27+
separate_ctrl_name_with_space: false
28+
separate_fn_name_with_space: false
29+
dangle_parens: false
30+
31+
# If the trailing parenthesis must be 'dangled' on its on
32+
# 'line, then align it to this reference: `prefix`: the start'
33+
# 'of the statement, `prefix-indent`: the start of the'
34+
# 'statement, plus one indentation level, `child`: align to'
35+
# the column of the arguments
36+
dangle_align: prefix
37+
# If the statement spelling length (including space and
38+
# parenthesis) is smaller than this amount, then force reject
39+
# nested layouts.
40+
min_prefix_chars: 4
41+
42+
# If the statement spelling length (including space and
43+
# parenthesis) is larger than the tab width by more than this
44+
# amount, then force reject un-nested layouts.
45+
max_prefix_chars: 10
46+
47+
# If a candidate layout is wrapped horizontally but it exceeds
48+
# this many lines, then reject the layout.
49+
max_lines_hwrap: 2
50+
51+
line_ending: unix
52+
53+
# Format command names consistently as 'lower' or 'upper' case
54+
command_case: canonical
55+
56+
# Format keywords consistently as 'lower' or 'upper' case
57+
# unchanged is valid too
58+
keyword_case: 'upper'
59+
60+
# A list of command names which should always be wrapped
61+
always_wrap: []
62+
63+
# If true, the argument lists which are known to be sortable
64+
# will be sorted lexicographically
65+
enable_sort: true
66+
67+
# If true, the parsers may infer whether or not an argument
68+
# list is sortable (without annotation).
69+
autosort: false
70+
71+
# Causes a few issues - can be solved later, possibly.
72+
markup:
73+
enable_markup: false

0 commit comments

Comments
 (0)