27 #ifndef YGGDRASILWM_BINDING_H
28 #define YGGDRASILWM_BINDING_H
51 void init(std::string Mod, std::string Key, std::string Command, std::string Args);
64 void execute(
const XKeyEvent *);
65 [[nodiscard]]
const std::string &
getMod()
const;
66 [[nodiscard]]
const std::string &
getKey()
const;
68 [[nodiscard]]
const std::string &
getArgs()
const;
CommandBase class header.
Definition: baseX11Wrapper.hpp:37
Binding store a binding to a command object.
Definition: Binding.hpp:39
std::string key_
Definition: Binding.hpp:74
void init_keycode(Display *display, BaseX11Wrapper *x11Wrapper)
Initialize the keycode of the binding had to be initialized after the display is opened.
Definition: Binding.cpp:93
~Binding()
Definition: Binding.cpp:108
CommandBase * command_
Definition: Binding.hpp:78
void execute(const XKeyEvent *)
Execute the command linked to the binding The arguments passed to the command are the one stored in t...
Definition: Binding.cpp:65
void init(std::string Mod, std::string Key, std::string Command, std::string Args)
Initialize a binding all the parameters are read from the Json::Value from the configuration file Mod...
Definition: Binding.cpp:41
int getKeyCode() const
Definition: Binding.cpp:91
unsigned int getModMask() const
Definition: Binding.cpp:90
Binding()
Definition: Binding.cpp:78
const std::string & getMod() const
Definition: Binding.cpp:86
std::string args_
Definition: Binding.hpp:77
const std::string & getArgs() const
Definition: Binding.cpp:89
const std::string & getKey() const
Definition: Binding.cpp:87
const std::string & getCommandName() const
Definition: Binding.cpp:88
std::string commandName_
Definition: Binding.hpp:76
std::string mod_
Definition: Binding.hpp:72
unsigned int modMask_
Definition: Binding.hpp:73
int keyCode_
Definition: Binding.hpp:75
Definition: CommandBase.hpp:35