Skip to content

Commit 33a42e0

Browse files
committed
Release 1.0.34
* Added size aggregation for TabGroup and ComboGroup widgets. * Added size aggregation for Group and Align widgets. * Updated build system: ASAN, CROSS_COMPILE, DEBUG, DEVEL, PROFILE, STRICT, TEST, TRACE makefile flags replaced with '\''asan'\'', '\''crosscompile'\'', '\''debug'\'', '\''devel'\'', '\''profile'\'', '\''strict'\'', '\''test'\'' and '\''trace'\'' FEATURE flags. * Added process_pending_events() method for IDisplay for properly handling of multiple IDisplay::main() method calls. * Added process_pending_events() in the tk::Display class for handling pending events at the main loop start and at the main loop end. * Changed behaviour of the AudioSample widget related to displaying load status. * ComboBox and ComboGroup now properly react on the '\''ESC'\'' key pressure and hides the dropdown list. * Updated build scripts. * Updated module versions in dependencies.
2 parents 55bdaf2 + 7b1b893 commit 33a42e0

37 files changed

Lines changed: 662 additions & 338 deletions

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind libglvnd libsndfile libx11 libxrandr freetype2 cairo
2727
- uses: actions/checkout@v3
2828
- name: Configure project
29-
run: make config TEST=1 STRICT=1
29+
run: make config FEATURES="test strict"
3030
- name: Fetch project dependencies
3131
run: make fetch
3232
- name: Build project
@@ -52,7 +52,7 @@ jobs:
5252
run: pacman --noconfirm -Syu base-devel glibc-debug git libglvnd libsndfile libx11 libxrandr freetype2 cairo
5353
- uses: actions/checkout@v3
5454
- name: Configure project
55-
run: make config TEST=1 STRICT=1 DEBUG=1 ASAN=1
55+
run: make config FEATURES="test debug strict asan"
5656
- name: Fetch project dependencies
5757
run: make fetch
5858
- name: Build project
@@ -65,7 +65,7 @@ jobs:
6565
echo "***** MEMCHECK $test *****"; \
6666
.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
6767
done
68-
arch_linux_valgrind:
68+
arch_linux_debug:
6969
runs-on: ubuntu-latest
7070
container:
7171
image: archlinux:latest
@@ -78,7 +78,7 @@ jobs:
7878
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind libglvnd libsndfile libx11 libxrandr freetype2 cairo
7979
- uses: actions/checkout@v3
8080
- name: Configure project
81-
run: make config TEST=1 STRICT=1 DEBUG=1
81+
run: make config FEATURES="test debug strict"
8282
- name: Fetch project dependencies
8383
run: make fetch
8484
- name: Build project
@@ -100,7 +100,7 @@ jobs:
100100
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ glibc-locale libX11-devel libXrandr-devel libglvnd-devel Mesa-libGL-devel libsndfile-devel freetype2-devel cairo-devel
101101
- uses: actions/checkout@v3
102102
- name: Configure project
103-
run: make config TEST=1 STRICT=1
103+
run: make config FEATURES="test strict"
104104
- name: Fetch project dependencies
105105
run: make fetch
106106
- name: Build project
@@ -122,7 +122,7 @@ jobs:
122122
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ glibc-locale glibc-gconv-modules-extra libstdc++-devel clang libX11-devel libXrandr-devel libglvnd-devel Mesa-libGL-devel libsndfile-devel freetype2-devel cairo-devel
123123
- uses: actions/checkout@v3
124124
- name: Configure project
125-
run: make config TEST=1 STRICT=1 CC=clang CXX=clang++
125+
run: make config FEATURES="test strict" CC=clang CXX=clang++
126126
- name: Fetch project dependencies
127127
run: make fetch
128128
- name: Build project
@@ -146,7 +146,7 @@ jobs:
146146
run: apt-get -y install git make pkg-config valgrind gcc g++ libgl-dev libsndfile1-dev libx11-dev libxrandr-dev libfreetype6-dev libcairo2-dev
147147
- uses: actions/checkout@v3
148148
- name: Configure project
149-
run: make config TEST=1 STRICT=1
149+
run: make config FEATURES="test strict"
150150
- name: Fetch project dependencies
151151
run: make fetch
152152
- name: Build project
@@ -178,7 +178,7 @@ jobs:
178178
- uses: actions/checkout@v3
179179
- name: Configure project
180180
shell: msys2 {0}
181-
run: make config TEST=1 STRICT=1
181+
run: make config FEATURES="test strict"
182182
- name: Fetch project dependencies
183183
shell: msys2 {0}
184184
run: make fetch

CHANGELOG

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
* RECENT CHANGES
33
*******************************************************************************
44

5+
=== 1.0.34 ===
6+
* Added size aggregation for TabGroup and ComboGroup widgets.
7+
* Added size aggregation for Group and Align widgets.
8+
* Updated build system: ASAN, CROSS_COMPILE, DEBUG, DEVEL, PROFILE, STRICT,
9+
TEST, TRACE makefile flags replaced with 'asan', 'crosscompile', 'debug',
10+
'devel', 'profile', 'strict', 'test' and 'trace' FEATURE flags.
11+
* Added process_pending_events() method for IDisplay for properly handling of multiple
12+
IDisplay::main() method calls.
13+
* Added process_pending_events() in the tk::Display class for handling pending
14+
events at the main loop start and at the main loop end.
15+
* Changed behaviour of the AudioSample widget related to displaying load status.
16+
* ComboBox and ComboGroup now properly react on the 'ESC' key pressure and hides the dropdown list.
17+
* Updated build scripts.
18+
* Updated module versions in dependencies.
19+
520
=== 1.0.33 ===
621
* Fixed widget redrawing atrifacts for some use cases.
722
* Updated behaviour of the Knob for better quantization support.

Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/make -f
22
#
3-
# Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
4-
# (C) 2024 Vladimir Sadovnikov <sadko4u@gmail.com>
3+
# Copyright (C) 2026 Linux Studio Plugins Project <https://lsp-plug.in/>
4+
# (C) 2026 Vladimir Sadovnikov <sadko4u@gmail.com>
55
#
66
# This file is part of lsp-tk-lib
77
#
@@ -80,9 +80,6 @@ prune: clean
8080
# Configuration-related targets
8181
.PHONY: config help chkconfig
8282

83-
testconfig:
84-
$(MAKE) -f "$(BASEDIR)/make/configure.mk" $(@) VERBOSE="$(VERBOSE)" CONFIG="$(CONFIG)" TEST="1" -$(MAKEFLAGS)
85-
8683
config:
8784
$(MAKE) -f "$(BASEDIR)/make/configure.mk" $(@) VERBOSE="$(VERBOSE)" CONFIG="$(CONFIG)" -$(MAKEFLAGS)
8885

@@ -91,7 +88,7 @@ config:
9188
distsrc:
9289
echo "Building source code archive"
9390
mkdir -p "$(DISTSRC)/modules"
94-
$(MAKE) -f "$(BASEDIR)/make/modules.mk" tree VERBOSE="$(VERBOSE)" BASEDIR="$(BASEDIR)" MODULES="$(DISTSRC)/modules" TREE="1"
91+
$(MAKE) -f "$(BASEDIR)/make/modules.mk" tree TREE="1" BUILD_FEATURES="$(FEATURES)" VERBOSE="$(VERBOSE)" BASEDIR="$(BASEDIR)" MODULES="$(DISTSRC)/modules"
9592
cp -R $(BASEDIR)/include $(BASEDIR)/make $(BASEDIR)/src "$(DISTSRC)/"
9693
cp $(BASEDIR)/CHANGELOG $(BASEDIR)/COPYING* $(BASEDIR)/Makefile $(BASEDIR)/*.mk "$(DISTSRC)/"
9794
find "$(DISTSRC)" -iname '.git' | xargs rm -rf {}
@@ -118,4 +115,5 @@ help:
118115
echo " uninstall Uninstall binaries"
119116
echo ""
120117
$(MAKE) -f "$(BASEDIR)/make/configure.mk" $(@) VERBOSE="$(VERBOSE)"
121-
echo ""
118+
119+

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,62 @@ The result of this example:
336336
337337
![Indicator widget](res/doc/example-msg.png)
338338
339+
## Supported platforms
340+
341+
The build and correct unit test execution has been confirmed for following platforms:
342+
* FreeBSD
343+
* GNU/Linux
344+
* MacOS (ARM-based)
345+
* Windows 32-bit
346+
* Windows 64-bit
347+
348+
## Requirements
349+
350+
The following packages need to be installed for building:
351+
352+
* gcc >= 4.9 (All OS)
353+
* make >= 4.0 (All OS)
354+
* cairo >= 1.14 (Linux, BSD)
355+
* libgl (Linux, BSD)
356+
* sndfile >= 1.0.25 (Linux, BSD)
357+
* freetype (Linux, BSD)
358+
* xlib (Linux, BSD)
359+
360+
## Building
361+
362+
To build the library, perform the following commands:
363+
364+
```bash
365+
make config # Configure the build
366+
make fetch # Fetch dependencies from Git repository
367+
make
368+
sudo make install
369+
```
370+
371+
To get more build options, run:
372+
373+
```bash
374+
make help
375+
```
376+
377+
To uninstall library, simply issue:
378+
379+
```bash
380+
make uninstall
381+
```
382+
383+
To clean all binary files, run:
384+
385+
```bash
386+
make clean
387+
```
388+
389+
To clean the whole project tree including configuration files, run:
390+
391+
```bash
392+
make prune
393+
```
394+
339395
## SAST Tools
340396

341397
* [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) - static analyzer for C, C++, C#, and Java code.

include/lsp-plug.in/tk/prop/multi/SizeConstraints.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ namespace lsp
144144
static void add(ws::size_limit_t *dst, ssize_t width, ssize_t height);
145145
static void scale(ws::size_limit_t *dst, float scale);
146146

147-
static bool match(const ws::rectangle_t *r, const ws::size_limit_t *sr);
147+
static bool match(const ws::size_limit_t *sr, ssize_t width, ssize_t height);
148+
inline static bool match(const ws::size_limit_t *sr, const ws::rectangle_t *r)
149+
{
150+
return match(sr, r->nWidth, r->nHeight);
151+
}
148152

149153
static void transpose(ws::size_limit_t *r);
150154
static void transpose(ws::size_limit_t *dst, const ws::size_limit_t *src);

include/lsp-plug.in/tk/sys/Display.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2025 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2026 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2026 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-tk-lib
66
* Created on: 19 июн. 2017 г.
@@ -126,6 +126,12 @@ namespace lsp
126126
*/
127127
status_t main();
128128

129+
/**
130+
* Process pending events if there are any
131+
* @return status of operation
132+
*/
133+
status_t process_pending_events();
134+
129135
/** Execute one main loop iteration
130136
*
131137
* @return status of operation

include/lsp-plug.in/tk/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#define LSP_TK_LIB_MAJOR 1
2626
#define LSP_TK_LIB_MINOR 0
27-
#define LSP_TK_LIB_MICRO 33
27+
#define LSP_TK_LIB_MICRO 34
2828

2929
#if defined(LSP_TK_LIB_PUBLISHER)
3030
#define LSP_TK_LIB_PUBLIC LSP_EXPORT_MODIFIER

include/lsp-plug.in/tk/widgets/compound/ComboBox.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ namespace lsp
171171
protected:
172172
static status_t slot_on_change(Widget *sender, void *ptr, void *data);
173173
static status_t slot_on_submit(Widget *sender, void *ptr, void *data);
174+
static status_t slot_on_cancel(Widget *sender, void *ptr, void *data);
175+
static status_t slot_on_listbox_cancel(Widget *sender, void *ptr, void *data);
174176

175177
protected:
176178
virtual void property_changed(Property *prop) override;
@@ -236,6 +238,7 @@ namespace lsp
236238
public:
237239
virtual status_t on_change();
238240
virtual status_t on_submit();
241+
virtual status_t on_cancel();
239242
};
240243
} /* namespace tk */
241244
} /* namespace lsp */

include/lsp-plug.in/tk/widgets/compound/ComboGroup.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ namespace lsp
5252
prop::SizeConstraints sSizeConstraints;
5353
prop::Alignment sHeading;
5454
prop::Boolean sInvertMouseVScroll;
55+
prop::Boolean sAggregateSize;
5556
LSP_TK_STYLE_DEF_END
5657
}
5758

@@ -138,6 +139,7 @@ namespace lsp
138139
prop::SizeConstraints sSizeConstraints;
139140
prop::Alignment sHeading;
140141
prop::Boolean sInvertMouseVScroll;
142+
prop::Boolean sAggregateSize;
141143

142144
prop::WidgetList<Widget> vWidgets;
143145
prop::WidgetPtr<ListBoxItem> sSelected;
@@ -150,10 +152,15 @@ namespace lsp
150152
ListBoxItem *current_item();
151153
bool scroll_item(ssize_t direction, size_t count);
152154

155+
protected:
153156
static void on_add_widget(void *obj, Property *prop, void *w);
154157
static void on_remove_widget(void *obj, Property *prop, void *w);
158+
159+
protected:
155160
static status_t slot_on_change(Widget *sender, void *ptr, void *data);
156161
static status_t slot_on_submit(Widget *sender, void *ptr, void *data);
162+
static status_t slot_on_cancel(Widget *sender, void *ptr, void *data);
163+
static status_t slot_on_listbox_cancel(Widget *sender, void *ptr, void *data);
157164

158165
protected:
159166
virtual Widget *find_widget(ssize_t x, ssize_t y) override;
@@ -191,7 +198,8 @@ namespace lsp
191198
LSP_TK_PROPERTY(Layout, layout, &sLayout)
192199
LSP_TK_PROPERTY(SizeConstraints, constraints, &sSizeConstraints)
193200
LSP_TK_PROPERTY(Alignment, heading, &sHeading)
194-
LSP_TK_PROPERTY(Boolean, invert_mouse_vscroll, &sInvertMouseVScroll);
201+
LSP_TK_PROPERTY(Boolean, invert_mouse_vscroll, &sInvertMouseVScroll)
202+
LSP_TK_PROPERTY(Boolean, aggregate_size, &sAggregateSize)
195203
LSP_TK_PROPERTY(WidgetPtr<ListBoxItem>, selected, &sSelected)
196204
LSP_TK_PROPERTY(WidgetPtr<Widget>, active_group, &sActiveGroup)
197205

@@ -218,6 +226,7 @@ namespace lsp
218226

219227
virtual status_t on_change();
220228
virtual status_t on_submit();
229+
virtual status_t on_cancel();
221230

222231
};
223232

include/lsp-plug.in/tk/widgets/compound/ListBox.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ namespace lsp
194194
static status_t slot_on_scroll_change(Widget *sender, void *ptr, void *data);
195195
static status_t slot_on_change(Widget *sender, void *ptr, void *data);
196196
static status_t slot_on_submit(Widget *sender, void *ptr, void *data);
197+
static status_t slot_on_cancel(Widget *sender, void *ptr, void *data);
197198
static status_t slot_on_scroll_key_event(Widget *sender, void *ptr, void *data);
198199

199200
static void on_add_item(void *obj, Property *prop, void *w);
@@ -267,6 +268,7 @@ namespace lsp
267268
public:
268269
virtual status_t on_change();
269270
virtual status_t on_submit();
271+
virtual status_t on_cancel();
270272

271273
virtual void scroll_to_current();
272274
virtual void scroll_to(size_t index);

0 commit comments

Comments
 (0)