Commit graph

162 commits

Author SHA1 Message Date
boundlessvoid0
4737241eaf
animation/beziercurve: add getter for control points (hyprwm/Hyprland#10413) (#63)
Signed-off-by: boundlessvoid <boundlessvoid0@gmail.com>
2025-06-28 00:04:42 +02:00
Brahmajit Das
1eb6759ae7
internal: fix missing cstdint include for GCC 16 (#62)
Without cstdint, building with GCC 16 fails with error

In file included from /tmp/hyprutils/tests/memory.cpp:1:
/tmp/hyprutils/./include/hyprutils/memory/UniquePtr.hpp: In member function ‘bool Hyprutils::Memory::CUniquePointer<T>::operator()(const Hyprutils:
:Memory::CUniquePointer<T>&, const Hyprutils::Memory::CUniquePointer<T>&) const’:
/tmp/hyprutils/./include/hyprutils/memory/UniquePtr.hpp:77:41: error: ‘uintptr_t’ does not name a type [-Wtemplate-body]
   77 |                 return reinterpret_cast<uintptr_t>(lhs.impl_) < reinterpret_cast<uintptr_t>(rhs.impl_);
      |                                         ^~~~~~~~~
/tmp/hyprutils/./include/hyprutils/memory/UniquePtr.hpp:4:1: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding
 ‘#include <cstdint>’
    3 | #include "ImplBase.hpp"
  +++ |+#include <cstdint>
    4 |
/tmp/hyprutils/./include/hyprutils/memory/UniquePtr.hpp:77:82: error: ‘uintptr_t’ does not name a type [-Wtemplate-body]
   77 |                 return reinterpret_cast<uintptr_t>(lhs.impl_) < reinterpret_cast<uintptr_t>(rhs.impl_);
      |                                                                                  ^~~~~~~~~
/tmp/hyprutils/./include/hyprutils/memory/UniquePtr.hpp:77:82: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; this is probably fixable by addi
ng ‘#include <cstdint>’

Downstream-bug: https://bugs.gentoo.org/957409

Signed-off-by: Brahmajit Das <listout@listout.xyz>
2025-06-26 21:29:11 +02:00
d844a08d83
signal: don't mark signal as C++ deprecated 2025-06-26 19:49:52 +02:00
2cd5e4fcd5
version: bump to 0.8.0 2025-06-26 18:23:47 +02:00
376d0209c8
signal: don't spam logs 2025-06-26 18:23:27 +02:00
93246269d4
signal: Typed signals (part 2) (#60)
* signals: make CSignalT API compatible with CSignal

Also fixes emitting reference types

* signals: add a lot of tests

* animation: use CSignalT

* signals: automatically const-ref non arithmetic value types

* signals: allow listeners to ignore args

* signals: add forward()
2025-06-26 12:27:31 +02:00
6ee59e4eb8
core: add editorconfig (#61) 2025-06-26 11:44:09 +02:00
Maximilian Seidler
925f26633f
memory: add CAtomicSharedPointer and CAtomicWeakPointer (#57) 2025-06-25 19:41:24 +02:00
1b8090e5d8
signals: add typed signals with CSignalT<> (#58)
Also more tests
2025-06-23 22:51:38 +02:00
d46bd32da5
os/process: add env to async calls too 2025-06-23 20:25:26 +02:00
38f3a21165
CI/Nix: add cache-nix-action
Use nixbuild/nix-quick-install-action which pairs well with
nix-community/cache-nix-action.

Should help with build times by reducing the number of packages needing
to be re-downloaded on each run.

Parameters are taken from https://github.com/nix-community/cache-nix-action
and may be tweaked later.
2025-06-20 01:11:36 +03:00
15df5e39af
Nix: move overlays to nix/ and add debug package 2025-06-20 01:11:34 +03:00
c9cd5f153c
os/process: disallow copying / moving 2025-06-16 19:42:14 +02:00
57ab2a867d
tests: fix matrix test on 32b archs
fixes #55
2025-06-13 15:05:19 +02:00
Friday
e36db00dfb
nix: use gcc15 (#54)
updated nixpkgs in flake.lock for gcc15 to be available
2025-06-05 15:55:56 +01:00
Sergei Trofimovich
f1d0879444
sharedPtr: include missing <cstdint> (#52)
Without the change the build on upcoming gcc-16 fails as:

    [ 12%] Building CXX object CMakeFiles/hyprutils.dir/src/signal/Listener.cpp.o
    In file included from /build/source/./include/hyprutils/signal/Listener.hpp:5,
                     from /build/source/src/signal/Listener.cpp:1:
    /build/source/./include/hyprutils/memory/SharedPtr.hpp: In member function 'bool Hyprutils::Memory::CSharedPointer<T>::operator()(const Hyprutils::Memory::CSharedPointer<T>&, const Hyprutils::Memory::CSharedPointer<T>&) const':
    /build/source/./include/hyprutils/memory/SharedPtr.hpp:116:41: error: 'uintptr_t' does not name a type [-Wtemplate-body]
      116 |                 return reinterpret_cast<uintptr_t>(lhs.impl_) < reinterpret_cast<uintptr_t>(rhs.impl_);
          |                                         ^~~~~~~~~
2025-05-31 14:07:05 +01:00
674ea57373
version: bump to 0.7.1 2025-05-07 17:27:05 +01:00
7f00411949
string: add ConstVarList 2025-05-07 17:26:37 +01:00
05878d9470
version: bump to 0.7.0 2025-04-30 02:16:55 +01:00
5f51dcea4a
os/process: add exitCode() 2025-04-30 02:16:30 +01:00
f2dc70e448 version: bump to 0.6.0 2025-04-06 15:38:07 +01:00
966d0c0b6a os/process: add fd control for async 2025-04-06 15:34:33 +01:00
Sergey Fedorov
7248194a2c
animations: minor follow-up fix for std::string (#49) 2025-03-26 11:17:49 +01:00
fbd02eb032 animation: avoid using constexpr std::string
fixes #48
2025-03-26 01:13:40 +00:00
dd1f720cbc version: bump to 0.5.2 2025-03-09 15:38:08 +00:00
Lee Bousfield
6b0154b183
memory: Add shared pointer reinterpretPointerCast function (#47)
* memory: Add force reinterpret constructor to shared pointer

* memory: Change constructor to reinterpretPointerCast function

* memory: Add reinterpretPointerCast test
2025-03-04 22:26:24 +01:00
61a5382f4b version: bump to 0.5.1 2025-02-18 15:12:08 +00:00
77d7ea3498 os/process: populate pid when ran sync 2025-02-18 14:14:20 +00:00
e4e018a2ca
CI: remove deprecated magic-nix-cache-action 2025-02-08 23:08:53 +02:00
Honkazel
3d9ae75886
core: reenable wreorder (#46)
* cmake: re-enable wreorder

* implbase: fix wreorder

This fixes all reorder warnings... uh...
2025-02-03 20:44:09 +01:00
Honkazel
9aad80acd4
core: clang, clang-tidy fixes and comp options (#45)
* clang-tidy/clang fixes and comp options

* clang-format

* cmake: silence reorder for now

27 of them... Damn
2025-02-02 20:36:28 +01:00
Maximilian Seidler
dd790b90d7
animation: fix end callbacks readding the animation var (#43)
* animation: fix end callbacks readding the animation var

* include fix
2025-02-02 18:33:44 +01:00
6a8bc9d2a4 version: bump to 0.5.0 2025-01-27 11:45:43 +00:00
Maximilian Seidler
de58286a21
animation: fix crashes and cleanup of active vars (#42)
Minor stuff

---------

Co-authored-by: Vaxry <vaxry@vaxry.net>
2025-01-27 12:45:01 +01:00
nyx
fb0c2d1de3
memory/weak: add missing nullptr comparison operators (#41) 2025-01-24 14:31:48 +01:00
3411e5b42d memory: add WP == UP comparison fn 2025-01-24 01:31:47 +00:00
006620eb29 version: bump to 0.4.0 2025-01-23 11:39:23 +00:00
Maximilian Seidler
ca1253c626
animation: add virtual dtor to AnimationManager (#31) 2025-01-23 11:38:09 +00:00
423c69d697 memory: implement a unique pointer
this unique pointer differs from the STL, because it allows weak pointers to it, which cannot be lock()ed.

under the hood, it's just a SP that cannot be referenced.
2025-01-23 11:34:35 +00:00
59414c4cee
math/region: fix scale using x scale as y scale (#39) 2025-01-22 09:35:48 +01:00
Maximilian Seidler
72dfbf5296
animations: fix adding/removing vars during ::tick (#35) 2025-01-11 16:37:12 +00:00
5dd4f4a9f7 animation: don't fire update events if the avar is not being animated 2025-01-10 16:44:32 +01:00
3c895da64b version: bump to 0.3.3 2025-01-06 12:55:19 +01:00
Jan Beich
fb9a816cb9
animation: add missing header for libc++ after 6a26d08bac (#30)
In file included from src/animation/AnimatedVariable.cpp:1:
In file included from ./include/hyprutils/animation/AnimatedVariable.hpp:3:
./include/hyprutils/animation/AnimationConfig.hpp:17:60: error: implicit instantiation of undefined template 'std::basic_string<char>'
   17 |             std::string                                    internalBezier  = "";
      |                                                            ^
/usr/include/c++/v1/__fwd/string.h:43:28: note: template is declared here
   43 | class _LIBCPP_TEMPLATE_VIS basic_string;
      |                            ^
In file included from src/animation/AnimatedVariable.cpp:1:
In file included from ./include/hyprutils/animation/AnimatedVariable.hpp:3:
./include/hyprutils/animation/AnimationConfig.hpp:18:60: error: implicit instantiation of undefined template 'std::basic_string<char>'
   18 |             std::string                                    internalStyle   = "";
      |                                                            ^
/usr/include/c++/v1/__fwd/string.h:43:28: note: template is declared here
   43 | class _LIBCPP_TEMPLATE_VIS basic_string;
      |                            ^
2025-01-03 22:47:04 +00:00
Maximilian Seidler
6a26d08bac
animation: add CAnimationConfigTree (#29)
Co-authored-by: Maximilian Seidler <paideia_dilemma@losfuzzys.net>
2025-01-02 14:02:21 +00:00
c42ce87eb3 version: bump to 0.3.1 2025-01-01 14:16:26 +01:00
Maximilian Seidler
8af7e4b9de
animation: add BezierCurve, AnimationManager and AnimatedVariable (#27) 2024-12-29 19:26:01 +00:00
8f15d45b12 region: Revert "fix header path"
This reverts commit 104117aed6.

Fixes #28
2024-12-27 17:23:03 +01:00
nyx
9be03a8562
misc: fix some compile warnings (#25)
- Cleans up compile warnings
- Formats code
- Cleans up unused vars
- etc
2024-12-25 19:10:14 +00:00
5e45b1a1b9 version: bump to 0.3.0 2024-12-22 23:05:34 +00:00