1 #ifndef WM_H
2 #define WM_H
3 
4 #include "wayfire/plugin.hpp"
5 #include "wayfire/bindings.hpp"
6 #include "wayfire/view.hpp"
7 #include "wayfire/touch/touch.hpp"
8 #include "wayfire/option-wrapper.hpp"
9 
10 struct wm_focus_request : public wf::signal_data_t
11 {
12     wf::surface_interface_t *surface;
13 };
14 
15 class wayfire_close : public wf::plugin_interface_t
16 {
17     wf::activator_callback callback;
18 
19   public:
20     void init() override;
21     void fini() override;
22 };
23 
24 class wayfire_focus : public wf::plugin_interface_t
25 {
26     wf::signal_connection_t on_button;
27     wf::signal_callback_t on_wm_focus_request;
28 
29     std::unique_ptr<wf::touch::gesture_t> tap_gesture;
30 
31     // @return True if the focus has changed
32     bool check_focus_surface(wf::surface_interface_t *surface);
33 
34     wf::option_wrapper_t<bool> focus_modifiers{"core/focus_button_with_modifiers"};
35     wf::option_wrapper_t<bool> pass_btns{"core/focus_buttons_passthrough"};
36     wf::option_wrapper_t<wf::activatorbinding_t> focus_btns{"core/focus_buttons"};
37 
38   public:
39     void init() override;
40     void fini() override;
41 };
42 
43 class wayfire_exit : public wf::plugin_interface_t
44 {
45     wf::key_callback key;
46     wf::signal_connection_t on_output_removed;
47 
48   public:
49     void init() override;
50     void fini() override;
51 };
52 #endif
53