From 2626f89ea6fe0df585df28052bf1fcca2c50fe8e Mon Sep 17 00:00:00 2001 From: davc0n Date: Sun, 4 May 2025 19:21:36 +0200 Subject: protocols: refactor class member vars (n-t) (#10273) --- src/protocols/Tablet.hpp | 83 +++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 43 deletions(-) (limited to 'src/protocols/Tablet.hpp') diff --git a/src/protocols/Tablet.hpp b/src/protocols/Tablet.hpp index 264c7633..25e85e18 100644 --- a/src/protocols/Tablet.hpp +++ b/src/protocols/Tablet.hpp @@ -20,10 +20,10 @@ class CTabletPadStripV2Resource { bool good(); - uint32_t id = 0; + uint32_t m_id = 0; private: - SP resource; + SP m_resource; friend class CTabletSeat; friend class CTabletPadGroupV2Resource; @@ -36,10 +36,10 @@ class CTabletPadRingV2Resource { bool good(); - uint32_t id = 0; + uint32_t m_id = 0; private: - SP resource; + SP m_resource; friend class CTabletSeat; friend class CTabletPadGroupV2Resource; @@ -50,16 +50,13 @@ class CTabletPadGroupV2Resource { public: CTabletPadGroupV2Resource(SP resource_, size_t idx); - bool good(); - void sendData(SP pad, SP group); - - std::vector> rings; - std::vector> strips; + bool good(); + void sendData(SP pad, SP group); - size_t idx = 0; + size_t m_idx = 0; private: - SP resource; + SP m_resource; friend class CTabletSeat; friend class CTabletPadV2Resource; @@ -73,15 +70,15 @@ class CTabletPadV2Resource { bool good(); void sendData(); - std::vector> groups; + std::vector> m_groups; - WP pad; - WP seat; + WP m_pad; + WP m_seat; - bool inert = false; // removed was sent + bool m_inert = false; // removed was sent private: - SP resource; + SP m_resource; void createGroup(SP group, size_t idx); @@ -96,13 +93,13 @@ class CTabletV2Resource { bool good(); void sendData(); - WP tablet; - WP seat; + WP m_tablet; + WP m_seat; - bool inert = false; // removed was sent + bool m_inert = false; // removed was sent private: - SP resource; + SP m_resource; friend class CTabletSeat; friend class CTabletV2Protocol; @@ -118,17 +115,17 @@ class CTabletToolV2Resource { void queueFrame(); void sendFrame(bool removeSource = true); - bool current = false; - WP lastSurf; + bool m_current = false; + WP m_lastSurf; - WP tool; - WP seat; - wl_event_source* frameSource = nullptr; + WP m_tool; + WP m_seat; + wl_event_source* m_frameSource = nullptr; - bool inert = false; // removed was sent + bool m_inert = false; // removed was sent private: - SP resource; + SP m_resource; friend class CTabletSeat; friend class CTabletV2Protocol; @@ -141,17 +138,17 @@ class CTabletSeat { bool good(); void sendData(); - std::vector> tools; - std::vector> pads; - std::vector> tablets; + std::vector> m_tools; + std::vector> m_pads; + std::vector> m_tablets; void sendTool(SP tool); void sendPad(SP pad); void sendTablet(SP tablet); private: - SP resource; - WP self; + SP m_resource; + WP m_self; friend class CTabletV2Protocol; }; @@ -204,19 +201,19 @@ class CTabletV2Protocol : public IWaylandProtocol { void onGetSeat(CZwpTabletManagerV2* pMgr, uint32_t id, wl_resource* seat); // - std::vector> m_vManagers; - std::vector> m_vSeats; - std::vector> m_vTools; - std::vector> m_vTablets; - std::vector> m_vPads; - std::vector> m_vGroups; - std::vector> m_vRings; - std::vector> m_vStrips; + std::vector> m_managers; + std::vector> m_seats; + std::vector> m_tools; + std::vector> m_tablets; + std::vector> m_pads; + std::vector> m_groups; + std::vector> m_rings; + std::vector> m_strips; // registered - std::vector> tablets; - std::vector> tools; - std::vector> pads; + std::vector> m_tabletDevices; + std::vector> m_toolDevices; + std::vector> m_padDevices; // FIXME: rings and strips are broken, I don't understand how this shit works. // It's 2am. -- cgit v1.2.3