28 #ifndef YGGDRASILWM_CLIENT_HPP
29 #define YGGDRASILWM_CLIENT_HPP
63 std::shared_ptr<Group> group,
64 unsigned long inActiveColor,
66 std::shared_ptr<BaseX11Wrapper>
wrapper);
94 [[nodiscard]] std::shared_ptr<Group>
getGroup()
const;
101 void move(
int x,
int y);
108 void resize(
unsigned int width,
unsigned int height);
132 const std::string &
getTitle()
const;
138 const std::string &
getClass()
const;
150 void setGroup(std::shared_ptr<Group> g);
Definition: baseX11Wrapper.hpp:37
The Client class is responsible for managing the client windows. It creates a frame around the client...
Definition: Client.hpp:47
Window root_
Definition: Client.hpp:153
const std::string & getTitle() const
Client::getTitle() return the title of the client, the title is get during the construction of the cl...
Definition: Client.cpp:203
std::shared_ptr< BaseX11Wrapper > wrapper
Definition: Client.hpp:163
bool mapped
Definition: Client.hpp:159
Window getWindow() const
Client::getWindow return the window attribute of the client.
Definition: Client.cpp:175
bool framed
Definition: Client.hpp:158
Window frame_
Definition: Client.hpp:155
Client(Display *display, Window root, Window window, std::shared_ptr< Group > group, unsigned long inActiveColor, int borderSize, std::shared_ptr< BaseX11Wrapper > wrapper)
Client constructor.get window class and title.
Definition: Client.cpp:39
void frame()
Client::frame create a frame around the client window, Map the frame, Add the window to the save set ...
Definition: Client.cpp:96
std::string class_
Definition: Client.hpp:161
const std::string & getClass() const
Client::getClass() return the class of the client, the class is get during the construction of the cl...
Definition: Client.cpp:204
void move(int x, int y)
: Client::move move the client window to the given position
Definition: Client.cpp:178
Display * display_
Definition: Client.hpp:152
void setGroup(std::shared_ptr< Group > g)
Definition: Client.cpp:206
~Client()
Client destructor Destroy the Client object & the Frame Window it needed.
Definition: Client.cpp:86
unsigned int border_width
Definition: Client.hpp:156
void setMapped(bool mapped)
Client::setMapped() set the mapped status of the client.
Definition: Client.cpp:202
void restack()
Client::restack() restack the client window to avoid the frame to get in front of the client.
Definition: Client.cpp:154
Window getFrame() const
Client::getFrame() return the frame Window of the client.
Definition: Client.cpp:199
std::string title_
Definition: Client.hpp:160
bool isFramed() const
Client::isFramed() check if the client is framed.
Definition: Client.cpp:200
unsigned long border_color
Definition: Client.hpp:157
void unframe()
Client::unframe unframe the client window by removing the frame and reparenting the window to the roo...
Definition: Client.cpp:164
bool isMapped() const
Client::isMapped() check if the client is mapped.
Definition: Client.cpp:201
Window window_
Definition: Client.hpp:154
std::weak_ptr< Group > group_
Definition: Client.hpp:162
std::shared_ptr< Group > getGroup() const
return the group of the client
Definition: Client.cpp:205
void resize(unsigned int width, unsigned int height)
Client::resize resize the client window to the given size.
Definition: Client.cpp:189
Groups are defined in the config file. Each group use a specific layout manager and manage it's list ...
Definition: Group.hpp:60
LayoutManager class Interface for the layout managers.
Definition: LayoutManager.hpp:42