swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

internal.h (2138B)


      1 /* swc: swc/internal.h
      2  *
      3  * Copyright (c) 2013-2019 Michael Forney
      4  *
      5  * Permission is hereby granted, free of charge, to any person obtaining a copy
      6  * of this software and associated documentation files (the "Software"), to deal
      7  * in the Software without restriction, including without limitation the rights
      8  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
      9  * copies of the Software, and to permit persons to whom the Software is
     10  * furnished to do so, subject to the following conditions:
     11  *
     12  * The above copyright notice and this permission notice shall be included in
     13  * all copies or substantial portions of the Software.
     14  *
     15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     18  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     20  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     21  * SOFTWARE.
     22  */
     23 
     24 #ifndef SWC_INTERNAL_H
     25 #define SWC_INTERNAL_H
     26 
     27 #include <wayland-server.h>
     28 #include <stdbool.h>
     29 
     30 enum {
     31 	SWC_EVENT_ACTIVATED,
     32 	SWC_EVENT_DEACTIVATED,
     33 };
     34 
     35 struct swc {
     36 	struct wl_display *display;
     37 	struct wl_event_loop *event_loop;
     38 	const struct swc_manager *manager;
     39 	struct wl_signal event_signal;
     40 	bool active;
     41 
     42 	struct swc_seat *seat;
     43 	const struct swc_bindings *const bindings;
     44 	struct wl_list screens;
     45 	struct swc_compositor *const compositor;
     46 	struct swc_shm *shm;
     47 	struct swc_drm *const drm;
     48 	struct wl_global *data_device_manager;
     49 	struct wl_global *input_method_manager;
     50 	struct wl_global *kde_decoration_manager;
     51 	struct wl_global *panel_manager;
     52 	struct wl_global *shell;
     53 	struct wl_global *subcompositor;
     54 	struct wl_global *text_input_manager;
     55 	struct wl_global *xdg_decoration_manager;
     56 	struct wl_global *xdg_shell;
     57 
     58 #ifdef ENABLE_XWAYLAND
     59 	const struct swc_xserver *const xserver;
     60 #endif
     61 };
     62 
     63 extern struct swc swc;
     64 
     65 void swc_activate(void);
     66 void swc_deactivate(void);
     67 
     68 #endif