eufon

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

desktop.h (1376B)


      1 /* Copyright (c), Niclas Meyer <niclas@countingsort.com>
      2  *
      3  * This Source Code Form is subject to the terms of the Mozilla Public
      4  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      5  * You can obtain one at https://mozilla.org/MPL/2.0/.
      6  */
      7 
      8 #ifndef KIWMI_DESKTOP_DESKTOP_H
      9 #define KIWMI_DESKTOP_DESKTOP_H
     10 
     11 #include <wayland-server.h>
     12 
     13 struct kiwmi_desktop {
     14     struct wlr_compositor *compositor;
     15     struct wlr_xdg_shell *xdg_shell;
     16     struct wlr_xdg_decoration_manager_v1 *xdg_decoration_manager;
     17     struct wlr_layer_shell_v1 *layer_shell;
     18     struct wlr_data_device_manager *data_device_manager;
     19     struct wlr_output_layout *output_layout;
     20     struct wl_list outputs; // struct kiwmi_output::link
     21     struct wl_list views;   // struct kiwmi_view::link
     22 
     23     float bg_color[4];
     24 
     25     struct wl_listener xdg_shell_new_surface;
     26     struct wl_listener xdg_toplevel_new_decoration;
     27     struct wl_listener layer_shell_new_surface;
     28     struct wl_listener new_output;
     29 
     30     struct {
     31         struct wl_signal new_output;
     32         struct wl_signal view_map;
     33         struct wl_signal request_active_output;
     34     } events;
     35 };
     36 
     37 bool desktop_init(struct kiwmi_desktop *desktop);
     38 void desktop_fini(struct kiwmi_desktop *desktop);
     39 
     40 struct kiwmi_server;
     41 struct kiwmi_output *desktop_active_output(struct kiwmi_server *server);
     42 
     43 #endif /* KIWMI_DESKTOP_DESKTOP_H */