YggdrasilWM  0.1.1
A tiny window manager coded in C++
ConfigDataBindings.hpp
Go to the documentation of this file.
1 
28 #ifndef YGGDRASILWM_CONFIGDATABINDINGS_HPP
29 #define YGGDRASILWM_CONFIGDATABINDINGS_HPP
30 #include <string>
31 #include <vector>
32 extern "C" {
33 #include <X11/Xlib.h>
34 }
35 #include "json/json.h"
36 #include "ConfigDataBase.hpp"
37 #include "Config/Binding.hpp"
46 public:
48  ~ConfigDataBindings() override;
55  void configInit(const Json::Value& root_) override;
64  void initKeycodes(Display *display,BaseX11Wrapper *x11Wrapper);
65  [[nodiscard]] Json::Value configSave() override;
75  void grabKeys(Display *display, Window window);
83  void handleKeypressEvent(const XKeyEvent *event);
84  [[nodiscard]] const std::vector<Binding *> &getBindings() const;
85 private:
86  std::vector<Binding *> bindings_;
87 };
88 #endif //YGGDRASILWM_CONFIGDATABINDINGS_HPP
Binding class header.
ConfigDataBase class header. This class is an interface for the ConfigData classes.
Definition: baseX11Wrapper.hpp:37
ConfigDataBase class This class is an interface for the ConfigData classes This is a pure virtual cla...
Definition: ConfigDataBase.hpp:38
ConfigDataBindings class. This class is used to handle the bindings configuration it instanciates the...
Definition: ConfigDataBindings.hpp:45
Json::Value configSave() override
Build a Json::Value object with the configuration.
Definition: ConfigDataBindings.cpp:47
std::vector< Binding * > bindings_
Definition: ConfigDataBindings.hpp:86
~ConfigDataBindings() override
Definition: ConfigDataBindings.cpp:50
void configInit(const Json::Value &root_) override
Parse the Json::Value object to initialize the bindings Instanciate the bindings in a vector.
Definition: ConfigDataBindings.cpp:32
void handleKeypressEvent(const XKeyEvent *event)
Handle the keypress event This method is called by the EventManager to avoid handling bindings and th...
Definition: ConfigDataBindings.cpp:63
void initKeycodes(Display *display, BaseX11Wrapper *x11Wrapper)
Initialize the keycodes This method is called by the WindowManager to initialize the keycodes after t...
Definition: ConfigDataBindings.cpp:87
ConfigDataBindings()
Definition: ConfigDataBindings.cpp:31
void grabKeys(Display *display, Window window)
Grab the keys from the bindings GrabKeys is called on the root window on initialisation of the Window...
Definition: ConfigDataBindings.cpp:56
const std::vector< Binding * > & getBindings() const
Definition: ConfigDataBindings.cpp:93