summaryrefslogtreecommitdiff
path: root/src/protocols/core/Seat.hpp
diff options
context:
space:
mode:
authordavc0n <dconti.dev@gmail.com>2025-05-03 16:02:49 +0200
committerGitHub <noreply@github.com>2025-05-03 16:02:49 +0200
commitd9cad5e1b63f2e1e86eb54551c72d17ee4dd070d (patch)
tree8238b613480214eaf91fc85343d25503bafa51c3 /src/protocols/core/Seat.hpp
parent0c736217a787928a87224b2bf7e984c446d4fc22 (diff)
protocols: refactor class member vars (core) (#10259)
Diffstat (limited to 'src/protocols/core/Seat.hpp')
-rw-r--r--src/protocols/core/Seat.hpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/protocols/core/Seat.hpp b/src/protocols/core/Seat.hpp
index a4889379..35839385 100644
--- a/src/protocols/core/Seat.hpp
+++ b/src/protocols/core/Seat.hpp
@@ -38,7 +38,7 @@ class CCursorSurfaceRole : public ISurfaceRole {
static std::vector<uint8_t>& cursorPixelData(SP<CWLSurfaceResource> surface);
private:
- std::vector<uint8_t> cursorShmPixelData;
+ std::vector<uint8_t> m_cursorShmPixelData;
};
class CWLTouchResource {
@@ -54,17 +54,17 @@ class CWLTouchResource {
void sendShape(int32_t id, const Vector2D& shape);
void sendOrientation(int32_t id, double angle);
- WP<CWLSeatResource> owner;
+ WP<CWLSeatResource> m_owner;
private:
- SP<CWlTouch> resource;
- WP<CWLSurfaceResource> currentSurface;
+ SP<CWlTouch> m_resource;
+ WP<CWLSurfaceResource> m_currentSurface;
- int fingers = 0;
+ int m_fingers = 0;
struct {
CHyprSignalListener destroySurface;
- } listeners;
+ } m_listeners;
};
class CWLPointerResource {
@@ -85,17 +85,17 @@ class CWLPointerResource {
void sendAxisValue120(wl_pointer_axis axis, int32_t value120);
void sendAxisRelativeDirection(wl_pointer_axis axis, wl_pointer_axis_relative_direction direction);
- WP<CWLSeatResource> owner;
+ WP<CWLSeatResource> m_owner;
private:
- SP<CWlPointer> resource;
- WP<CWLSurfaceResource> currentSurface;
+ SP<CWlPointer> m_resource;
+ WP<CWLSurfaceResource> m_currentSurface;
- std::vector<uint32_t> pressedButtons;
+ std::vector<uint32_t> m_pressedButtons;
struct {
CHyprSignalListener destroySurface;
- } listeners;
+ } m_listeners;
};
class CWLKeyboardResource {
@@ -110,19 +110,19 @@ class CWLKeyboardResource {
void sendMods(uint32_t depressed, uint32_t latched, uint32_t locked, uint32_t group);
void repeatInfo(uint32_t rate, uint32_t delayMs);
- WP<CWLSeatResource> owner;
+ WP<CWLSeatResource> m_owner;
private:
- SP<CWlKeyboard> resource;
- WP<CWLSurfaceResource> currentSurface;
+ SP<CWlKeyboard> m_resource;
+ WP<CWLSurfaceResource> m_currentSurface;
struct {
CHyprSignalListener destroySurface;
- } listeners;
+ } m_listeners;
- std::string lastKeymap = "<none>";
- uint32_t lastRate = 0;
- uint32_t lastDelayMs = 0;
+ std::string m_lastKeymap = "<none>";
+ uint32_t m_lastRate = 0;
+ uint32_t m_lastDelayMs = 0;
};
class CWLSeatResource {
@@ -135,19 +135,19 @@ class CWLSeatResource {
bool good();
wl_client* client();
- std::vector<WP<CWLPointerResource>> pointers;
- std::vector<WP<CWLKeyboardResource>> keyboards;
- std::vector<WP<CWLTouchResource>> touches;
+ std::vector<WP<CWLPointerResource>> m_pointers;
+ std::vector<WP<CWLKeyboardResource>> m_keyboards;
+ std::vector<WP<CWLTouchResource>> m_touches;
- WP<CWLSeatResource> self;
+ WP<CWLSeatResource> m_self;
struct {
CSignal destroy;
- } events;
+ } m_events;
private:
- SP<CWlSeat> resource;
- wl_client* pClient = nullptr;
+ SP<CWlSeat> m_resource;
+ wl_client* m_client = nullptr;
};
class CWLSeatProtocol : public IWaylandProtocol {
@@ -158,7 +158,7 @@ class CWLSeatProtocol : public IWaylandProtocol {
struct {
CSignal newSeatResource; // SP<CWLSeatResource>
- } events;
+ } m_events;
private:
void updateCapabilities(uint32_t caps); // in IHID caps
@@ -171,15 +171,15 @@ class CWLSeatProtocol : public IWaylandProtocol {
void destroyResource(CWLPointerResource* resource);
//
- std::vector<SP<CWLSeatResource>> m_vSeatResources;
- std::vector<SP<CWLKeyboardResource>> m_vKeyboards;
- std::vector<SP<CWLTouchResource>> m_vTouches;
- std::vector<SP<CWLPointerResource>> m_vPointers;
+ std::vector<SP<CWLSeatResource>> m_seatResources;
+ std::vector<SP<CWLKeyboardResource>> m_keyboards;
+ std::vector<SP<CWLTouchResource>> m_touches;
+ std::vector<SP<CWLPointerResource>> m_pointers;
SP<CWLSeatResource> seatResourceForClient(wl_client* client);
//
- uint32_t currentCaps = 0;
+ uint32_t m_currentCaps = 0;
friend class CWLSeatResource;
friend class CWLKeyboardResource;