Commit graph

62 commits

Author SHA1 Message Date
3844a10293
e 2025-11-09 16:26:20 +00:00
4d24b12a01
tests: move to gtest 2025-11-09 15:39:45 +00:00
Vaxry
9a9745d7aa
string: add VarList2 (#84)
reworks how varList works, mixes best of both ConstVarList and regular VarList. Deprecates both.
2025-11-09 15:10:58 +00:00
Vaxry
968f881222
i18n: add i18n engine (#83)
Adds a translation engine
2025-11-09 14:18:33 +00:00
9637961a55
string/constVarList: fix UAF 2025-11-05 15:04:02 +00:00
Freevatar
164a30b3d8
animation/bezier: Fix OOB in getYForPoint for non-monotonic 4-point curves (#81) 2025-11-03 22:25:56 +00:00
9ab64319e9
math/region: reinit region for scale()
Apparently on some setups directly modifying the rectangles is a no-go, see #78.

Pixman is another piece of undocumented shit. I hope whomever wrote this stubs their toe.

Note to self: drop pixman, rewrite region. Fucking idiots.
2025-10-04 21:22:03 +01:00
1f80045da1
bezier: fix with first point being non-0 2025-09-30 15:05:40 +01:00
a20932e200
bezier: add setup4 2025-09-30 13:56:37 +01:00
Tom Englund
64446e1a4c vector2d: make vector trivial
while profiling vector showed up as a marginal waster because it wasnt a
trivial class, a few if(m_someVector != Vector()) was causing a lot of
churn because of not being trivial and doing a lot of allocaitons and
destructions. make it trivial by defaulting constructor, and destructor,
and while we are at it make it constexpr friendly on constructors and
operators.
2025-09-28 00:01:31 +02:00
61e295340d
region: avoid tons of allocations for scale()
pixman_region32_rectangles returns the actual rects, so we shouldnt waste cycles when scaling em
2025-09-26 23:17:45 +01:00
Ikalco
bc193efa4b
os/process: add setStdinFD (#74) 2025-08-25 12:04:44 +02:00
Kamikadze
df6b8820c4
memory: Add C++ cast aliases; replace existing casts and remove redundant casts (#71)
* Add and use c++ cast aliases

* wrap cast aliases in namespace

* remove redundant pragma once
2025-08-06 14:00:50 +02:00
Tom Englund
8dd20c73e0
mat3x3: check for finite in toString (#70)
if values are NaN or inf it will crash std::format, safeguard it.
2025-07-23 12:14:37 +02:00
Tom Englund
bcabcbada9 signal: reserve vector size to avoid reallocations
reserve the vector size to avoid reallocations.
2025-07-11 18:45:10 +02:00
Tom Englund
86905e2590 mat3x3: use float versions of sin/cos reduce dereferencing
use the sinf, cosf versions instead of casting the double one to float.
reduce the derefencing in multiply by pointing to the data directly.
2025-07-11 18:45:10 +02:00
Tom Englund
e21b18ff8f
region: introduce foreach and cleanup clangd warnings (#65)
* CRegion: introduce forEachRect

makes us able to directly call a function on each rect instead of using
getRects() allocating a vector every single time, especially when its
used in hot paths like the renderer.

* CRegion: cleanup CRegion of clangd warnings

overload pixman() with const, remove const_cast, mark move as noexcept.
ensure self assignment doesnt occur.
2025-07-10 11:12:26 +02:00
FrancisTheCat
e89269578a
math/vector: Added transform method to Vector2D class (#64) 2025-07-05 23:18:58 +02:00
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
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
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
7f00411949
string: add ConstVarList 2025-05-07 17:26:37 +01:00
5f51dcea4a
os/process: add exitCode() 2025-04-30 02:16:30 +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
77d7ea3498 os/process: populate pid when ran sync 2025-02-18 14:14:20 +00: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
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
59414c4cee
math/region: fix scale using x scale as y scale (#39) 2025-01-22 09:35:48 +01:00
5dd4f4a9f7 animation: don't fire update events if the avar is not being animated 2025-01-10 16:44:32 +01: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
Maximilian Seidler
8af7e4b9de
animation: add BezierCurve, AnimationManager and AnimatedVariable (#27) 2024-12-29 19:26:01 +00: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
c3331116eb os/process: add pid() 2024-12-21 15:47:53 +00:00
Tom Englund
2e21319c8e
os: implent a new FileDescriptor class (#21)
makes you able to RAII the filedescriptor making it somewhat easier to
not leak.
2024-11-21 15:26:34 +00:00
e74177e025 os: add setEnv to process 2024-11-15 20:28:59 +00:00
315fba5d21 process: avoid zombies
fixes #20
2024-11-13 17:19:47 +00:00
4c5f18d06b process: better reading for spawnSync 2024-11-11 22:34:56 +00:00
8d21d1dfa9 os: fixup process possible deadlock
Sloppy, but should work... Process shouldn't be used in performance-critical paths anyways.

ref https://github.com/hyprwm/Hyprland/issues/8425
2024-11-11 22:12:44 +00:00
Jan Beich
d504d45114
os: add missing header for BSDs after fd4be8b9ca (#16)
src/os/Process.cpp:105:9: error: use of undeclared identifier 'sigemptyset'
  105 |         sigemptyset(&set);
      |         ^
src/os/Process.cpp:106:21: error: use of undeclared identifier 'SIG_SETMASK'
  106 |         sigprocmask(SIG_SETMASK, &set, NULL);
      |                     ^
2024-11-09 20:30:25 +00:00
fd4be8b9ca os: Add process 2024-10-14 22:27:36 +01:00
Vaxry
a9f85a4bca
Math: add Mat3x3 (#14) 2024-09-24 18:18:25 +01:00
aadf9a27dd string: fixup isNumber not accepting -1.0
fixes #12
2024-08-28 18:53:00 +02:00
0252fd13e7 utils: add ScopeGuard 2024-08-05 16:45:41 +02:00
a950624669
math: add Edges (#10) 2024-07-27 17:38:55 +01:00
6174a2a25f
path: add findConfig and dir utils (#8) 2024-07-09 19:11:16 +02:00
c342d5ca44 memory: do not release pointers after emitting a signal
A signal called is allowed to free ourselves, in which case we're not allowed to use this anymore. Only perform the housekeeping of removing stale events before emit, and in registerListener.
2024-07-08 23:06:28 +02:00