Skip to content

Commit ddb40ad

Browse files
committed
Release 1.0.3
* Added Window::has_parent() method to check that window is embedded into another window. * Added Display::enum_monitors() method to query current state of connected monitors. * Added xrandr library dependency for the X.11-compatible systems. * Updated window appearance algorithm. * Added ipadding() property to the tk::Label widget. * Updated build scripts.
2 parents 73f1512 + 9f5aeee commit ddb40ad

File tree

15 files changed

+289
-211
lines changed

15 files changed

+289
-211
lines changed

CHANGELOG

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

5+
=== 1.0.3 ===
6+
* Added Window::has_parent() method to check that window is embedded into another window.
7+
* Added Display::enum_monitors() method to query current state of connected monitors.
8+
* Added xrandr library dependency for the X.11-compatible systems.
9+
* Updated window appearance algorithm.
10+
* Added ipadding() property to the tk::Label widget.
11+
* Updated build scripts.
12+
513
=== 1.0.2 ===
614
* Added template get() method for the tk::Registry that allows to obtain widget of specific type.
715
* Updated key event handling algorithm in the tk::Window class.
@@ -78,3 +86,4 @@
7886

7987
=== 0.5.0 ===
8088
* Initial release.
89+

dependencies.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ ifeq ($(PLATFORM),Linux)
3636
DEPENDENCIES += \
3737
LIBSNDFILE \
3838
LIBX11 \
39+
LIBXRANDR \
3940
LIBCAIRO \
4041
LIBFREETYPE
4142

@@ -50,6 +51,7 @@ ifeq ($(PLATFORM),BSD)
5051
LIBSNDFILE \
5152
LIBICONV \
5253
LIBX11 \
54+
LIBXRANDR \
5355
LIBCAIRO \
5456
LIBICONV \
5557
LIBFREETYPE
@@ -75,6 +77,7 @@ ALL_DEPENDENCIES = \
7577
LIBFREETYPE \
7678
LIBICONV \
7779
LIBX11 \
80+
LIBXRANDR \
7881
LIBGL \
7982
LIBSHLWAPI \
8083
LIBWINMM \

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,14 @@ namespace lsp
336336
* @return status of operation
337337
*/
338338
status_t queue_destroy(Widget *widget);
339+
340+
/** Enumerate all monitors in the system for the display,
341+
* the resultint pointer is valid until the next enum_monitors() call.
342+
*
343+
* @param count pointer to store number of enumerated monitors
344+
* @return pointer to the array of enumerated monitors
345+
*/
346+
const ws::MonitorInfo *enum_monitors(size_t *count);
339347
};
340348
}
341349

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_MAJOR 1
2626
#define LSP_TK_MINOR 0
27-
#define LSP_TK_MICRO 2
27+
#define LSP_TK_MICRO 3
2828

2929
#ifdef LSP_TK_LIB_BUILTIN
3030
#define LSP_TK_LIB_EXPORT

include/lsp-plug.in/tk/widgets/containers/Window.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ namespace lsp
186186
* @return status of operation
187187
*/
188188
status_t resize_window(const ws::rectangle_t *size);
189+
status_t resize_window(ssize_t width, ssize_t height);
189190

190191
inline bool override_pointer() const { return bOverridePointer; }
191192

@@ -234,6 +235,8 @@ namespace lsp
234235

235236
virtual bool kill_focus();
236237

238+
virtual bool has_parent() const;
239+
237240
public:
238241
status_t grab_events(ws::grab_t grab);
239242
status_t ungrab_events();

include/lsp-plug.in/tk/widgets/simple/Label.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ namespace lsp
4242
prop::Boolean sHover; // Hover enable
4343
prop::String sText; // Text to display
4444
prop::SizeConstraints sConstraints; // Size constraints
45+
prop::Padding sIPadding; // Internal padding
4546
LSP_TK_STYLE_DEF_END
4647
}
4748

@@ -76,6 +77,7 @@ namespace lsp
7677
prop::Boolean sHover; // Hover enable
7778
prop::String sText; // Text to display
7879
prop::SizeConstraints sConstraints; // Size constraints
80+
prop::Padding sIPadding; // Internal padding
7981
prop::WidgetPtr<Menu> sPopup; // Popup menu
8082

8183
protected:
@@ -102,6 +104,7 @@ namespace lsp
102104
LSP_TK_PROPERTY(Boolean, hover, &sHover)
103105
LSP_TK_PROPERTY(String, text, &sText)
104106
LSP_TK_PROPERTY(SizeConstraints, constraints, &sConstraints)
107+
LSP_TK_PROPERTY(Padding, ipadding, &sIPadding)
105108
LSP_TK_PROPERTY(WidgetPtr<Menu>, popup, &sPopup)
106109

107110
public:

make/configure.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ else
4646
X_URL_SUFFIX = _RO
4747
endif
4848

49+
include $(BASEDIR)/modules.mk
50+
include $(BASEDIR)/project.mk
4951
include $(BASEDIR)/make/functions.mk
5052
include $(BASEDIR)/make/system.mk
5153
include $(BASEDIR)/make/tools.mk
52-
include $(BASEDIR)/modules.mk
53-
include $(BASEDIR)/project.mk
5454
include $(BASEDIR)/dependencies.mk
5555

5656
# Compute the full list of dependencies
@@ -266,7 +266,7 @@ $(CONFIG_VARS): prepare
266266
echo "$(@)=$($(@))" >> "$(CONFIG)"
267267

268268
config: $(CONFIG_VARS)
269-
echo "Architecture: $(ARCHITECTURE) ($(ARCHITECTURE_CFLAGS))"
269+
echo "Architecture: $(ARCHITECTURE_FAMILY)/$(ARCHITECTURE) ($(ARCHITECTURE_CFLAGS))"
270270
echo "Features: $(FEATURES)"
271271
echo "Configured OK"
272272

make/system.mk

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
# Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
33
# (C) 2020 Vladimir Sadovnikov <[email protected]>
44
#
5-
# This file is part of lsp-tk-lib
5+
# This file is part of lsp-plugins
66
#
7-
# lsp-tk-lib is free software: you can redistribute it and/or modify
7+
# lsp-plugins is free software: you can redistribute it and/or modify
88
# it under the terms of the GNU Lesser General Public License as published by
99
# the Free Software Foundation, either version 3 of the License, or
1010
# any later version.
1111
#
12-
# lsp-tk-lib is distributed in the hope that it will be useful,
12+
# lsp-plugins is distributed in the hope that it will be useful,
1313
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
# GNU Lesser General Public License for more details.
1616
#
1717
# You should have received a copy of the GNU Lesser General Public License
18-
# along with lsp-tk-lib. If not, see <https://www.gnu.org/licenses/>.
18+
# along with lsp-plugins. If not, see <https://www.gnu.org/licenses/>.
1919
#
2020

2121
# Detect operating system
@@ -56,51 +56,71 @@ endif
5656
# The current architecture can be obtained by: gcc -Q --help=target
5757
ifeq ($(patsubst armv6%,armv6,$(BUILD_ARCH)),armv6)
5858
override ARCHITECTURE = arm32
59+
ARCHITECTURE_FAMILY = arm32
5960
ARCHITECTURE_CFLAGS := -march=armv6 -marm
6061
else ifeq ($(patsubst armv7ve%,armv7ve,$(BUILD_ARCH)),armv7ve)
6162
override ARCHITECTURE = arm32
63+
ARCHITECTURE_FAMILY = arm32
6264
ARCHITECTURE_CFLAGS := -march=armv7ve -marm
6365
else ifeq ($(patsubst armv7%,armv7,$(BUILD_ARCH)),armv7)
6466
override ARCHITECTURE = arm32
67+
ARCHITECTURE_FAMILY = arm32
6568
ARCHITECTURE_CFLAGS := -march=armv7-a -marm
6669
else ifeq ($(patsubst armv8%,armv8,$(BUILD_ARCH)),armv8)
6770
override ARCHITECTURE = aarch64
71+
ARCHITECTURE_FAMILY = aarch64
6872
ARCHITECTURE_CFLAGS := -march=armv8-a
6973
else ifeq ($(patsubst aarch64%,aarch64,$(BUILD_ARCH)),aarch64)
7074
override ARCHITECTURE = aarch64
75+
ARCHITECTURE_FAMILY = aarch64
7176
ARCHITECTURE_CFLAGS := -march=armv8-a
7277
else ifeq ($(BUILD_ARCH),arm32)
7378
override ARCHITECTURE = arm32
79+
ARCHITECTURE_FAMILY = arm32
7480
ARCHITECTURE_CFLAGS := -march=armv6 -marm
7581
else ifeq ($(BUILD_ARCH),arm)
7682
override ARCHITECTURE = arm32
83+
ARCHITECTURE_FAMILY = arm32
7784
ARCHITECTURE_CFLAGS := -march=armv6 -marm
7885
else ifeq ($(patsubst %x86_64%,x86_64,$(BUILD_ARCH)),x86_64)
7986
override ARCHITECTURE = x86_64
87+
ARCHITECTURE_FAMILY = x86_64
8088
ARCHITECTURE_CFLAGS := -march=x86-64 -m64
8189
else ifeq ($(patsubst %amd64%,amd64,$(BUILD_ARCH)),amd64)
8290
override ARCHITECTURE = x86_64
91+
ARCHITECTURE_FAMILY = x86_64
8392
ARCHITECTURE_CFLAGS := -march=x86-64 -m64
8493
else ifeq ($(patsubst %AMD64%,AMD64,$(BUILD_ARCH)),AMD64)
8594
override ARCHITECTURE = x86_64
95+
ARCHITECTURE_FAMILY = x86_64
8696
ARCHITECTURE_CFLAGS := -march=x86-64 -m64
8797
else ifeq ($(BUILD_ARCH),i86pc)
8898
override ARCHITECTURE = x86_64
99+
ARCHITECTURE_FAMILY = x86_64
89100
ARCHITECTURE_CFLAGS := -march=x86-64 -m64
101+
else ifeq ($(patsubst %i686%,i686,$(BUILD_ARCH)),i686)
102+
override ARCHITECTURE = i686
103+
ARCHITECTURE_FAMILY = ia32
104+
ARCHITECTURE_CFLAGS := -march=i686 -m32
90105
else ifeq ($(patsubst i%86,i586,$(BUILD_ARCH)),i586)
91106
override ARCHITECTURE = i586
107+
ARCHITECTURE_FAMILY = ia32
92108
ARCHITECTURE_CFLAGS := -march=i586 -m32
93109
else ifeq ($(BUILD_ARCH),x86)
94110
override ARCHITECTURE = i586
111+
ARCHITECTURE_FAMILY = ia32
95112
ARCHITECTURE_CFLAGS := -march=i586 -m32
96113
else ifeq ($(BUILD_ARCH),riscv32)
97114
override ARCHITECTURE = riscv32
115+
ARCHITECTURE_FAMILY = riscv32
98116
ARCHITECTURE_CFLAGS := -march=rv32imafdc -mabi=lp32d
99117
else ifeq ($(BUILD_ARCH),riscv64)
100118
override ARCHITECTURE = riscv64
119+
ARCHITECTURE_FAMILY = riscv64
101120
ARCHITECTURE_CFLAGS := -march=rv64imafdc -mabi=lp64d
102121
else
103-
override ARCHITECTURE =
122+
override ARCHITECTURE = $(BUILD_ARCH)
123+
ARCHITECTURE_FAMILY = generic
104124
ARCHITECTURE_CFLAGS :=
105125
endif
106126

@@ -182,6 +202,7 @@ COMMON_VARS = \
182202
ROOT_ARTIFACT_ID \
183203
PLATFORM \
184204
ARCHITECTURE \
205+
ARCHITECTURE_FAMILY \
185206
ARCHITECTURE_CFLAGS \
186207
BUILDDIR \
187208
FEATURES \
@@ -209,6 +230,7 @@ sysvars:
209230
echo " ADD_FEATURES list of features enabled in the build as an addition to default"
210231
echo " ARCHITECTURE target architecture to perform build"
211232
echo " ARCHITECTURE_CFLAGS compiler flags to specify architecture"
233+
echo " ARCHITECTURE_FAMILY compiler flags to specify architecture family"
212234
echo " ARCHITECTURE_LDFLAGS linker flags to specify architecture"
213235
echo " BINDIR location of the binaries"
214236
echo " BUILDDIR location of the build directory"

make/tools.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ else
110110
endif
111111

112112
# Define flags for (cross) build
113-
CFLAGS := \
113+
CFLAGS ?= \
114114
$(CFLAGS_EXT) \
115115
-fdata-sections \
116116
-ffunction-sections \
@@ -120,7 +120,7 @@ CFLAGS := \
120120

121121
CDEFS += -DLSP_INSTALL_PREFIX=\\\"$(PREFIX)\\\"
122122

123-
CXXFLAGS := \
123+
CXXFLAGS ?= \
124124
$(CXXFLAGS_EXT) \
125125
-std=c++98 \
126126
-fno-exceptions \

modules.mk

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,55 @@
1919
#
2020

2121
# Variables that describe dependencies
22-
LSP_COMMON_LIB_VERSION := 1.0.16
22+
LSP_COMMON_LIB_VERSION := 1.0.17
2323
LSP_COMMON_LIB_NAME := lsp-common-lib
2424
LSP_COMMON_LIB_TYPE := src
2525
LSP_COMMON_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_COMMON_LIB_NAME).git
2626
LSP_COMMON_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_COMMON_LIB_NAME).git
2727

28-
LSP_TEST_FW_VERSION := 1.0.10
28+
LSP_TEST_FW_VERSION := 1.0.11
2929
LSP_TEST_FW_NAME := lsp-test-fw
3030
LSP_TEST_FW_TYPE := src
3131
LSP_TEST_FW_URL_RO := https://github.com/lsp-plugins/$(LSP_TEST_FW_NAME).git
3232
LSP_TEST_FW_URL_RW := [email protected]:lsp-plugins/$(LSP_TEST_FW_NAME).git
3333

34-
LSP_LLTL_LIB_VERSION := 1.0.1
34+
LSP_LLTL_LIB_VERSION := 1.0.2
3535
LSP_LLTL_LIB_NAME := lsp-lltl-lib
3636
LSP_LLTL_LIB_TYPE := src
3737
LSP_LLTL_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_LLTL_LIB_NAME).git
3838
LSP_LLTL_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_LLTL_LIB_NAME).git
3939

40-
LSP_RUNTIME_LIB_VERSION := 1.0.3
40+
LSP_RUNTIME_LIB_VERSION := 1.0.4
4141
LSP_RUNTIME_LIB_NAME := lsp-runtime-lib
4242
LSP_RUNTIME_LIB_TYPE := src
4343
LSP_RUNTIME_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_RUNTIME_LIB_NAME).git
4444
LSP_RUNTIME_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_RUNTIME_LIB_NAME).git
4545

46-
LSP_R3D_IFACE_VERSION := 1.0.1
46+
LSP_R3D_IFACE_VERSION := 1.0.2
4747
LSP_R3D_IFACE_NAME := lsp-r3d-iface
4848
LSP_R3D_IFACE_TYPE := src
4949
LSP_R3D_IFACE_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_IFACE_NAME).git
5050
LSP_R3D_IFACE_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_IFACE_NAME).git
5151

52-
LSP_R3D_BASE_LIB_VERSION := 1.0.1
52+
LSP_R3D_BASE_LIB_VERSION := 1.0.2
5353
LSP_R3D_BASE_LIB_NAME := lsp-r3d-base-lib
5454
LSP_R3D_BASE_LIB_TYPE := src
5555
LSP_R3D_BASE_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_BASE_LIB_NAME).git
5656
LSP_R3D_BASE_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_BASE_LIB_NAME).git
5757

58-
LSP_R3D_GLX_LIB_VERSION := 1.0.1
58+
LSP_R3D_GLX_LIB_VERSION := 1.0.2
5959
LSP_R3D_GLX_LIB_NAME := lsp-r3d-glx-lib
6060
LSP_R3D_GLX_LIB_TYPE := src
6161
LSP_R3D_GLX_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_GLX_LIB_NAME).git
6262
LSP_R3D_GLX_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_GLX_LIB_NAME).git
6363

64-
LSP_WS_LIB_VERSION := 1.0.2
64+
LSP_WS_LIB_VERSION := 1.0.3
6565
LSP_WS_LIB_NAME := lsp-ws-lib
6666
LSP_WS_LIB_TYPE := src
6767
LSP_WS_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_WS_LIB_NAME).git
6868
LSP_WS_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_WS_LIB_NAME).git
6969

70-
LSP_DSP_LIB_VERSION := 1.0.1
70+
LSP_DSP_LIB_VERSION := 1.0.2
7171
LSP_DSP_LIB_NAME := lsp-dsp-lib
7272
LSP_DSP_LIB_TYPE := src
7373
LSP_DSP_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_DSP_LIB_NAME).git
@@ -111,6 +111,10 @@ LIBX11_VERSION := system
111111
LIBX11_NAME := x11
112112
LIBX11_TYPE := pkg
113113

114+
LIBXRANDR_VERSION := system
115+
LIBXRANDR_NAME := xrandr
116+
LIBXRANDR_TYPE := pkg
117+
114118
LIBGL_VERSION := system
115119
LIBGL_NAME := gl
116120
LIBGL_TYPE := pkg

0 commit comments

Comments
 (0)