Skip to content

Commit 92fa328

Browse files
committed
Release 1.0.23
* Added header support by tk::LedMeterChannel. * Added header support by tk::LedMeter. * Implemented SLOT_MOUSE_POINTER slot for overriding mouse pointer. * Updated build scripts. * Updated module versions in dependencies.
2 parents 811a7b7 + 2d89c67 commit 92fa328

File tree

29 files changed

+663
-288
lines changed

29 files changed

+663
-288
lines changed

.cproject

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
<tool commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}" id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.48815145" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
8282
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.libs.1715989975" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
8383
<listOptionValue builtIn="false" value="pthread"/>
84+
<listOptionValue builtIn="false" value="rt"/>
8485
<listOptionValue builtIn="false" value="GL"/>
8586
<listOptionValue builtIn="false" value="dl"/>
8687
</option>

CHANGELOG

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

5+
=== 1.0.23 ===
6+
* Added header support by tk::LedMeterChannel.
7+
* Added header support by tk::LedMeter.
8+
* Implemented SLOT_MOUSE_POINTER slot for overriding mouse pointer.
9+
* Updated build scripts.
10+
* Updated module versions in dependencies.
11+
512
=== 1.0.22 ===
613
* Updated module versions in dependencies.
714

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ namespace lsp
5050
SLOT_MOUSE_TRI_CLICK, //!< SLOT_MOUSE_TRI_CLICK Triggered on mouse triple click
5151
SLOT_MOUSE_IN, //!< SLOT_MOUSE_IN Triggered when mouse first entered widget's area
5252
SLOT_MOUSE_OUT, //!< SLOT_MOUSE_OUT Triggered when mouse left widget's area
53+
SLOT_MOUSE_POINTER, //!< SLOT_MOUSE_POINTER called to resolve the current mouse pointer for the widget
5354
SLOT_SHOW, //!< SLOT_SHOW Triggered when widget becomes visible
5455
SLOT_HIDE, //!< SLOT_HIDE Triggered when widget becomes invisible
5556
SLOT_BEGIN_EDIT, //!< SLOG_BEGIN_EDIT Triggered when the possible durable editing has started (for example, mouse click + drag)

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#error "use <lsp-plug.in/tk/tk.h>"
2727
#endif
2828

29+
// Basic dependencies
30+
#include <lsp-plug.in/ws/ws.h>
31+
2932
// The default dictionary location
3033
#define LSP_TK_ENV_DICT_PATH "dictionary"
3134
#define LSP_TK_ENV_DICT_PATH_DFL "i18n"
@@ -193,6 +196,13 @@ namespace lsp
193196
float fVAlign; // Vertical alignment over the tether line
194197
} tether_t;
195198

199+
typedef struct pointer_event_t
200+
{
201+
ssize_t nLeft; // Mouse horizontal pointer position in window coordinates
202+
ssize_t nTop; // Mouse vertical pointer position in window coordinates
203+
ws::mouse_pointer_t enPointer; // Mouse pointer value
204+
} pointer_event_t;
205+
196206
/**
197207
* File dialog mode
198208
*/

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 22
27+
#define LSP_TK_LIB_MICRO 23
2828

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

include/lsp-plug.in/tk/widgets/base/Widget.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ namespace lsp
137137
static status_t slot_focus_out(Widget *sender, void *ptr, void *data);
138138
static status_t slot_drag_request(Widget *sender, void *ptr, void *data);
139139
static status_t slot_realized(Widget *sender, void *ptr, void *data);
140+
static status_t slot_mouse_pointer(Widget *sender, void *ptr, void *data);
140141

141142
//---------------------------------------------------------------------------------
142143
// Interface for nested classes
@@ -323,9 +324,11 @@ namespace lsp
323324

324325
/**
325326
* Get current mouse pointer
327+
* @param x current horizontal pointer in window coordinates
328+
* @param y current vertical pointer in window coordinates
326329
* @return current mouse pointer
327330
*/
328-
virtual ws::mouse_pointer_t current_pointer();
331+
virtual ws::mouse_pointer_t current_pointer(ssize_t x, ssize_t y);
329332

330333
/** Check if there is redraw request pending
331334
*
@@ -671,6 +674,13 @@ namespace lsp
671674
*/
672675
virtual status_t on_mouse_tri_click(const ws::event_t *e);
673676

677+
/**
678+
* Solve the actual value for the mouse pointer
679+
* @param ev pointer event for determining the mouse pointer
680+
* @return status of operation
681+
*/
682+
virtual status_t on_mouse_pointer(tk::pointer_event_t *ev);
683+
674684
/** Geometry has changed: size or position
675685
*
676686
* @param r the new size of the widget. Handler should not rely

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2023 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2024 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-tk-lib
66
* Created on: 16 июн. 2020 г.
@@ -61,7 +61,7 @@ namespace lsp
6161
protected:
6262
virtual void hide_widget() override;
6363
virtual void show_widget() override;
64-
virtual status_t sync_size() override;
64+
virtual status_t sync_size(bool force) override;
6565
virtual void size_request(ws::size_limit_t *r) override;
6666

6767
virtual status_t post_init();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2023 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2024 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-tk-lib
66
* Created on: 8 нояб. 2022 г.
@@ -182,7 +182,7 @@ namespace lsp
182182
virtual status_t on_mouse_scroll(const ws::event_t *e) override;
183183
virtual status_t on_mouse_out(const ws::event_t *e) override;
184184
virtual status_t on_key_down(const ws::event_t *e) override;
185-
virtual ws::mouse_pointer_t current_pointer() override;
185+
virtual status_t on_mouse_pointer(pointer_event_t *e) override;
186186

187187
public:
188188
virtual status_t on_change();

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2023 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2024 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-tk-lib
66
* Created on: 16 июн. 2017 г.
@@ -110,7 +110,7 @@ namespace lsp
110110

111111
status_t do_render();
112112
void do_destroy();
113-
virtual status_t sync_size();
113+
virtual status_t sync_size(bool force);
114114
status_t update_pointer();
115115

116116
// Mouse operations
@@ -245,6 +245,9 @@ namespace lsp
245245

246246
//---------------------------------------------------------------------------------
247247
// Event handling
248+
public:
249+
virtual status_t on_mouse_pointer(pointer_event_t *e) override;
250+
248251
public:
249252
/** Close event
250253
*

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

Lines changed: 18 additions & 23 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) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2024 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-tk-lib
66
* Created on: 19 нояб. 2017 г.
@@ -68,10 +68,6 @@ namespace lsp
6868
public:
6969
static const w_class_t metadata;
7070

71-
private:
72-
Fader & operator = (const Fader &);
73-
Fader(const Fader &);
74-
7571
protected:
7672
enum flags_t
7773
{
@@ -127,15 +123,19 @@ namespace lsp
127123
static status_t slot_end_edit(Widget *sender, void *ptr, void *data);
128124

129125
protected:
130-
virtual void size_request(ws::size_limit_t *r);
131-
virtual void property_changed(Property *prop);
132-
virtual void realize(const ws::rectangle_t *r);
126+
virtual void size_request(ws::size_limit_t *r) override;
127+
virtual void property_changed(Property *prop) override;
128+
virtual void realize(const ws::rectangle_t *r) override;
133129

134130
public:
135131
explicit Fader(Display *dpy);
136-
virtual ~Fader();
132+
Fader(const Fader &) = delete;
133+
Fader(Fader &&) = delete;
134+
virtual ~Fader() override;
135+
Fader & operator = (const Fader &) = delete;
136+
Fader & operator = (Fader &&) = delete;
137137

138-
virtual status_t init();
138+
virtual status_t init() override;
139139

140140
public:
141141
LSP_TK_PROPERTY(Color, button_color, &sBtnColor);
@@ -164,23 +164,18 @@ namespace lsp
164164

165165
public:
166166

167-
virtual ws::mouse_pointer_t current_pointer();
167+
virtual status_t on_mouse_down(const ws::event_t *e) override;
168+
virtual status_t on_mouse_up(const ws::event_t *e) override;
169+
virtual status_t on_mouse_move(const ws::event_t *e) override;
170+
virtual status_t on_mouse_scroll(const ws::event_t *e) override;
171+
virtual status_t on_mouse_pointer(pointer_event_t *e) override;
172+
virtual void draw(ws::ISurface *s) override;
168173

174+
public:
169175
virtual status_t on_begin_edit();
170-
171176
virtual status_t on_change();
172-
173177
virtual status_t on_end_edit();
174178

175-
virtual status_t on_mouse_down(const ws::event_t *e);
176-
177-
virtual status_t on_mouse_up(const ws::event_t *e);
178-
179-
virtual status_t on_mouse_move(const ws::event_t *e);
180-
181-
virtual status_t on_mouse_scroll(const ws::event_t *e);
182-
183-
virtual void draw(ws::ISurface *s);
184179
};
185180

186181
} /* namespace tk */

0 commit comments

Comments
 (0)