protocols: refactor class member vars (core) (#10259)
This commit is contained in:
parent
0c736217a7
commit
d9cad5e1b6
57 changed files with 1160 additions and 1158 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue