Skip to content

Commit 55d344b

Browse files
committed
Release 1.0.19
* Optimized work with atoms. * Many code updates that could cause potential problems related to using another decimal point for floating-point number formatting. * FileDialog now synchronizes the state of selected_filter property. * Implemented widget overrides by priority on the graph widget. * Updated build scripts. * Updated module versions in dependencies.
2 parents d3cac77 + c1b0546 commit 55d344b

27 files changed

+430
-113
lines changed

.cproject

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,18 @@
107107
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.521516412" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
108108
</tool>
109109
</fileInfo>
110+
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.2059524684.934111113" name="avx512.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/avx512.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.307674979.810874635">
111+
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.307674979.810874635" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.307674979">
112+
<option id="gnu.cpp.compiler.option.other.other.1775110598" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -mavx512f -mavx512vl" valueType="string"/>
113+
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.169469823" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
114+
</tool>
115+
<tool customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.1741284177" name="Resource Custom Build Step">
116+
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.305176297" name="Resource Custom Build Step Input Type">
117+
<additionalInput kind="additionalinputdependency" paths=""/>
118+
</inputType>
119+
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.1189719958" name="Resource Custom Build Step Output Type"/>
120+
</tool>
121+
</fileInfo>
110122
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.2059524684.1151076568" name="sse4.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/sse4.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.307674979.1304730651">
111123
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.307674979.1304730651" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.307674979">
112124
<option id="gnu.cpp.compiler.option.other.other.1678811679" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -msse -msse2 -msse3 -mssse3 -msse4 -msse4a -msse4.1 -msse4.2" valueType="string"/>
@@ -197,6 +209,12 @@
197209
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.69433180" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
198210
</tool>
199211
</fileInfo>
212+
<fileInfo id="cdt.managedbuild.config.gnu.exe.release.1708893648.429127479" name="avx512.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/avx512.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.672828855.1274897122">
213+
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.672828855.1274897122" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.672828855">
214+
<option id="gnu.cpp.compiler.option.other.other.485632399" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -mavx51f -mavx512vl" valueType="string"/>
215+
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.110216386" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
216+
</tool>
217+
</fileInfo>
200218
<fileInfo id="cdt.managedbuild.config.gnu.exe.release.1708893648.492802881" name="sse4.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/sse4.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.672828855.579979061">
201219
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.672828855.579979061" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.672828855">
202220
<option id="gnu.cpp.compiler.option.other.other.750404706" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -msse -msse2 -msse3 -mssse3 -msse4 -msse4a -msse4.1 -msse4.2" valueType="string"/>
@@ -329,6 +347,12 @@
329347
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1997856031" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
330348
</tool>
331349
</fileInfo>
350+
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.2059524684.1392737267.378117321" name="avx512.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/avx512.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.744229200.941686559">
351+
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.744229200.941686559" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.744229200">
352+
<option id="gnu.cpp.compiler.option.other.other.1712876960" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 -mavx51f -mavx512vl" valueType="string"/>
353+
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.739367373" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
354+
</tool>
355+
</fileInfo>
332356
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.2059524684.1392737267.392418750" name="sse4.cpp" rcbsApplicability="disable" resourcePath="modules/lsp-dsp-lib/src/main/x86/sse4.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.744229200.410548597">
333357
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.744229200.410548597" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.744229200">
334358
<option id="gnu.cpp.compiler.option.other.other.373089643" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -msse -msse2 -msse3 -mssse3 -msse4 -msse4a -msse4.1 -msse4.2" valueType="string"/>

CHANGELOG

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

5+
=== 1.0.19 ===
6+
* Optimized work with atoms.
7+
* Many code updates that could cause potential problems related to using another
8+
decimal point for floating-point number formatting.
9+
* FileDialog now synchronizes the state of selected_filter property.
10+
* Implemented widget overrides by priority on the graph widget.
11+
* Updated build scripts.
12+
* Updated module versions in dependencies.
13+
514
=== 1.0.18 ===
615
* Updated module versions in dependencies.
716

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

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-tk-lib
66
* Created on: 13 мая 2020 г.
@@ -26,7 +26,7 @@
2626
#error "use <lsp-plug.in/tk/tk.h>"
2727
#endif
2828

29-
#include <lsp-plug.in/lltl/parray.h>
29+
#include <lsp-plug.in/lltl/darray.h>
3030

3131
namespace lsp
3232
{
@@ -37,17 +37,29 @@ namespace lsp
3737
*/
3838
class Atoms
3939
{
40-
private:
41-
Atoms & operator = (const Atoms &);
42-
Atoms(const Atoms &);
40+
protected:
41+
typedef struct atom_id_t
42+
{
43+
atom_t id;
44+
char name[];
45+
} atom_id_t;
46+
47+
lltl::parray<atom_id_t> vAtoms;
48+
lltl::parray<atom_id_t> vAtomList;
4349

4450
protected:
45-
lltl::parray<char> vAtoms;
51+
ssize_t index_of(const char *name);
52+
atom_id_t *make_atom(const char *name);
4653

4754
public:
4855
explicit Atoms();
56+
Atoms(const Atoms &) = delete;
57+
Atoms(Atoms &&) = delete;
4958
virtual ~Atoms();
5059

60+
Atoms & operator = (const Atoms &) = delete;
61+
Atoms & operator = (Atoms &&) = delete;
62+
5163
public:
5264

5365
/**
@@ -69,7 +81,7 @@ namespace lsp
6981
* @param name atom name or NULL
7082
* @return atom identifier
7183
*/
72-
inline const char *atom_name(atom_t id) const { return (id >= 0) ? vAtoms.get(id) : NULL ; }
84+
const char *atom_name(atom_t id) const;
7385
};
7486

7587
} /* namespace tk */

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 18
27+
#define LSP_TK_LIB_MICRO 19
2828

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

include/lsp-plug.in/tk/widgets/dialogs/FileDialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ namespace lsp
187187
static status_t slot_on_bm_realized(Widget *sender, void *ptr, void *data);
188188

189189
static status_t slot_on_filter_key_down(Widget *sender, void *ptr, void *data);
190+
static status_t slot_on_filter_submit(Widget *sender, void *ptr, void *data);
190191

191192
static status_t slot_on_search_key_down(Widget *sender, void *ptr, void *data);
192193

include/lsp-plug.in/tk/widgets/graph/Graph.h

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-tk-lib
66
* Created on: 20 авг. 2020 г.
@@ -58,9 +58,14 @@ namespace lsp
5858
public:
5959
static const w_class_t metadata;
6060

61-
private:
62-
Graph & operator = (const Graph &);
63-
Graph(const Graph &);
61+
protected:
62+
typedef struct w_alloc_t
63+
{
64+
ws::rectangle_t sRect;
65+
ssize_t nGroup;
66+
ssize_t nPriority;
67+
GraphItem *pWidget;
68+
} w_alloc_t;
6469

6570
protected:
6671
prop::WidgetList<GraphItem> vItems; // Overall list of graph items
@@ -89,23 +94,31 @@ namespace lsp
8994
static void on_add_item(void *obj, Property *prop, void *w);
9095
static void on_remove_item(void *obj, Property *prop, void *w);
9196

97+
static ssize_t check_collision(const w_alloc_t *a, const w_alloc_t *b);
98+
static ssize_t compare_walloc(const w_alloc_t *a, const w_alloc_t *b);
99+
92100
protected:
93-
virtual Widget *find_widget(ssize_t x, ssize_t y);
94-
virtual void size_request(ws::size_limit_t *r);
95-
virtual void property_changed(Property *prop);
96-
virtual void realize(const ws::rectangle_t *r);
97-
virtual void hide_widget();
101+
virtual Widget *find_widget(ssize_t x, ssize_t y) override;
102+
virtual void size_request(ws::size_limit_t *r) override;
103+
virtual void property_changed(Property *prop) override;
104+
virtual void realize(const ws::rectangle_t *r) override;
105+
virtual void hide_widget() override;
98106

99107
void sync_lists();
100108
void drop_glass();
101109

102110
public:
103111
explicit Graph(Display *dpy);
112+
Graph(const Graph &) = delete;
113+
Graph(Graph &&) = delete;
104114
virtual ~Graph();
105115

116+
Graph & operator = (const Graph &) = delete;
117+
Graph & operator = (Graph &&) = delete;
118+
106119
public:
107-
virtual status_t init();
108-
virtual void destroy();
120+
virtual status_t init() override;
121+
virtual void destroy() override;
109122

110123
public:
111124
LSP_TK_PROPERTY(WidgetList<GraphItem>, items, &vItems);
@@ -181,19 +194,19 @@ namespace lsp
181194
status_t axis_to_xy(size_t index, ssize_t *x, ssize_t *y, float value);
182195

183196
public:
184-
virtual status_t add(Widget *child);
197+
virtual status_t add(Widget *child) override;
185198

186-
virtual status_t remove(Widget *child);
199+
virtual status_t remove(Widget *child) override;
187200

188-
virtual status_t remove_all();
201+
virtual status_t remove_all() override;
189202

190-
virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force);
203+
virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force) override;
191204

192-
virtual void draw(ws::ISurface *s);
205+
virtual void draw(ws::ISurface *s) override;
193206
};
194207

195-
}
196-
}
208+
} /* namespace tk */
209+
} /* namespace lsp */
197210

198211

199212
#endif /* LSP_PLUG_IN_TK_WIDGETS_GRAPH_GRAPH_H_ */

include/lsp-plug.in/tk/widgets/graph/GraphItem.h

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-tk-lib
66
* Created on: 20 авг. 2020 г.
@@ -37,6 +37,8 @@ namespace lsp
3737
{
3838
LSP_TK_STYLE_DEF_BEGIN(GraphItem, Widget)
3939
prop::Boolean sSmooth;
40+
prop::Integer sPriorityGroup; // Priority group
41+
prop::Integer sPriority; // Priority inside of a group
4042
LSP_TK_STYLE_DEF_END
4143
}
4244

@@ -45,26 +47,31 @@ namespace lsp
4547
public:
4648
static const w_class_t metadata;
4749

48-
private:
49-
GraphItem & operator = (const GraphItem &);
50-
GraphItem(const GraphItem &);
51-
5250
protected:
5351
prop::Boolean sSmooth;
52+
prop::Integer sPriorityGroup; // Priority group
53+
prop::Integer sPriority; // Priority inside of a group
5454

5555
protected:
56-
virtual void property_changed(Property *prop);
56+
virtual void property_changed(Property *prop) override;
5757

5858
public:
5959
explicit GraphItem(Display *dpy);
60-
virtual ~GraphItem();
60+
GraphItem(const GraphItem &) = delete;
61+
GraphItem(GraphItem &&) = delete;
62+
virtual ~GraphItem() override;
63+
64+
GraphItem & operator = (const GraphItem &) = delete;
65+
GraphItem & operator = (GraphItem &&) = delete;
6166

6267
public:
63-
virtual status_t init();
64-
virtual void destroy();
68+
virtual status_t init() override;
69+
virtual void destroy() override;
6570

6671
public:
6772
LSP_TK_PROPERTY(Boolean, smooth, &sSmooth);
73+
LSP_TK_PROPERTY(Integer, priority_group, &sPriorityGroup);
74+
LSP_TK_PROPERTY(Integer, priority, &sPriority);
6875

6976
public:
7077
/**
@@ -73,18 +80,27 @@ namespace lsp
7380
*/
7481
Graph *graph();
7582

76-
virtual void query_draw(size_t flags = REDRAW_SURFACE);
83+
virtual void query_draw(size_t flags = REDRAW_SURFACE) override;
7784

7885
/**
7986
* Check whether mouse pointer is inside of the graph item
8087
* @param x horizontal position of mouse pointer
8188
* @param y vertical position of mouse pointer
8289
* @return true if item is inside of the graph
8390
*/
84-
virtual bool inside(ssize_t x, ssize_t y);
91+
virtual bool inside(ssize_t x, ssize_t y) override;
92+
93+
public:
94+
/**
95+
* Estimate the bounding box for prioritized drawing
96+
* @param s surface for drawing
97+
* @param r rectangle to store the bound box
98+
* @return false if widget does not provide bound box
99+
*/
100+
virtual bool bound_box(ws::ISurface *s, ws::rectangle_t *r);
85101
};
86102

87-
}
88-
}
103+
} /* namespace tk */
104+
} /* namespace lsp */
89105

90106
#endif /* LSP_PLUG_IN_TK_WIDGETS_GRAPH_GRAPHITEM_H_ */

include/lsp-plug.in/tk/widgets/graph/GraphText.h

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-tk-lib
66
* Created on: 20 авг. 2020 г.
@@ -53,10 +53,6 @@ namespace lsp
5353
public:
5454
static const w_class_t metadata;
5555

56-
private:
57-
GraphText & operator = (const GraphText &);
58-
GraphText(const GraphText &);
59-
6056
private:
6157
prop::String sText;
6258
prop::Font sFont;
@@ -71,13 +67,18 @@ namespace lsp
7167
prop::Integer sOrigin;
7268

7369
protected:
74-
virtual void property_changed(Property *prop);
70+
virtual void property_changed(Property *prop) override;
7571

7672
public:
7773
explicit GraphText(Display *dpy);
78-
virtual ~GraphText();
74+
GraphText(const GraphText &) = delete;
75+
GraphText(GraphText &&) = delete;
76+
virtual ~GraphText() override;
7977

80-
virtual status_t init();
78+
GraphText & operator = (const GraphText &) = delete;
79+
GraphText & operator = (GraphText &&) = delete;
80+
81+
virtual status_t init() override;
8182

8283
public:
8384
LSP_TK_PROPERTY(String, text, &sText)
@@ -93,10 +94,12 @@ namespace lsp
9394
LSP_TK_PROPERTY(Integer, origin, &sOrigin)
9495

9596
public:
96-
virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force);
97+
virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force) override;
98+
99+
virtual bool bound_box(ws::ISurface *s, ws::rectangle_t *r) override;
97100
};
98-
}
99-
}
101+
} /* namespace tk */
102+
} /* namespace lsp */
100103

101104

102105
#endif /* LSP_PLUG_IN_TK_WIDGETS_GRAPH_GRAPHTEXT_H_ */

make/tools.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ else ifeq ($(PLATFORM),BSD)
8585
endif
8686

8787
ifeq ($(DEBUG),1)
88-
CFLAGS_EXT += -Og -g3 -DLSP_DEBUG
89-
CXXFLAGS_EXT += -Og -g3 -DLSP_DEBUG
88+
CFLAGS_EXT += -Og -g3 -DLSP_DEBUG -falign-functions=16
89+
CXXFLAGS_EXT += -Og -g3 -DLSP_DEBUG -falign-functions=16
9090
else
9191
CFLAGS_EXT += -O2
9292
CXXFLAGS_EXT += -O2

0 commit comments

Comments
 (0)