kiwmi/include/server.h

39 lines
988 B
C
Raw Normal View History

2019-02-17 13:19:28 +01:00
/* Copyright (c), Niclas Meyer <niclas@countingsort.com>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#ifndef KIWMI_SERVER_H
#define KIWMI_SERVER_H
2019-03-26 21:45:00 +01:00
#include <stdbool.h>
2019-10-16 18:59:29 +02:00
#include "desktop/desktop.h"
#include "input/input.h"
2019-03-07 19:25:38 +01:00
2019-02-17 13:19:28 +01:00
struct kiwmi_server {
struct wl_display *wl_display;
2019-04-08 18:10:37 +02:00
struct wl_event_loop *wl_event_loop;
2019-02-17 13:19:28 +01:00
struct wlr_backend *backend;
struct wlr_renderer *renderer;
struct wlr_allocator *allocator;
2019-02-17 13:19:28 +01:00
const char *socket;
2019-10-18 22:42:30 +02:00
char *config_path;
struct kiwmi_lua *lua;
2019-03-17 20:04:52 +01:00
struct kiwmi_desktop desktop;
2019-03-17 20:17:41 +01:00
struct kiwmi_input input;
struct {
struct wl_signal destroy;
} events;
2019-02-17 13:19:28 +01:00
};
2019-10-18 22:42:30 +02:00
bool server_init(struct kiwmi_server *server, char *config_path);
2019-02-18 12:37:23 +01:00
bool server_run(struct kiwmi_server *server);
2019-02-17 13:19:28 +01:00
void server_fini(struct kiwmi_server *server);
#endif /* KIWMI_SERVER_H */