Reorganize wlr-common

This commit is contained in:
Drew DeVault 2017-06-21 12:10:07 -04:00
parent fd91244e83
commit f4453d104d
46 changed files with 71 additions and 91 deletions

View file

@ -28,7 +28,7 @@ add_library(wlr-backend
)
target_link_libraries(wlr-backend
wlr-common
wlr-util
wlr-types
${WAYLAND_LIBRARIES}
${DRM_LIBRARIES}

View file

@ -10,9 +10,9 @@
#include <wlr/backend/libinput.h>
#include <wlr/backend/wayland.h>
#include <wlr/backend/multi.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
#include "backend/udev.h"
#include "common/log.h"
struct wlr_backend *wlr_backend_create(const struct wlr_backend_impl *impl,
struct wlr_backend_state *state) {

View file

@ -8,12 +8,12 @@
#include <xf86drm.h>
#include <sys/stat.h>
#include <wlr/session.h>
#include <wlr/common/list.h>
#include <wlr/backend/interface.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/util/list.h>
#include <wlr/util/log.h>
#include "backend/udev.h"
#include "backend/drm.h"
#include "common/log.h"
static bool wlr_drm_backend_init(struct wlr_backend_state *state) {
wlr_drm_scan_connectors(state);

View file

@ -14,8 +14,8 @@
#include <wayland-server.h>
#include <wlr/backend/interface.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/util/log.h>
#include "backend/drm.h"
#include "common/log.h"
static const char *conn_name[] = {
[DRM_MODE_CONNECTOR_Unknown] = "Unknown",

View file

@ -2,9 +2,8 @@
#include <EGL/eglext.h>
#include <GLES3/gl3.h>
#include <gbm.h> // GBM_FORMAT_XRGB8888
#include <wlr/util/log.h>
#include "backend/egl.h"
#include "common/log.h"
const char *egl_error(void) {
switch (eglGetError()) {

View file

@ -3,9 +3,9 @@
#include <libinput.h>
#include <wlr/session.h>
#include <wlr/backend/interface.h>
#include <wlr/util/log.h>
#include "backend/udev.h"
#include "backend/libinput.h"
#include "common/log.h"
static int wlr_libinput_open_restricted(const char *path,
int flags, void *_state) {

View file

@ -2,10 +2,10 @@
#include <assert.h>
#include <libinput.h>
#include <wlr/session.h>
#include <wlr/common/list.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/util/list.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
#include "common/log.h"
struct wlr_input_device *get_appropriate_device(
enum wlr_input_device_type desired_type,

View file

@ -4,9 +4,8 @@
#include <wlr/session.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_keyboard.h>
#include <wlr/common/list.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
#include "common/log.h"
struct wlr_keyboard_state {
struct libinput_device *device;

View file

@ -4,9 +4,8 @@
#include <wlr/session.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_pointer.h>
#include <wlr/common/list.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
#include "common/log.h"
struct wlr_pointer *wlr_libinput_pointer_create(
struct libinput_device *device) {

View file

@ -4,9 +4,8 @@
#include <wlr/session.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_tablet_pad.h>
#include <wlr/common/list.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
#include "common/log.h"
struct wlr_tablet_pad *wlr_libinput_tablet_pad_create(
struct libinput_device *device) {

View file

@ -4,9 +4,8 @@
#include <wlr/session.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_tablet_tool.h>
#include <wlr/common/list.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
#include "common/log.h"
struct wlr_tablet_tool *wlr_libinput_tablet_tool_create(
struct libinput_device *device) {

View file

@ -4,9 +4,8 @@
#include <wlr/session.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/interfaces/wlr_touch.h>
#include <wlr/common/list.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
#include "common/log.h"
struct wlr_touch *wlr_libinput_touch_create(
struct libinput_device *device) {

View file

@ -1,9 +1,8 @@
#include <stdbool.h>
#include <stdlib.h>
#include <wlr/backend/interface.h>
#include <wlr/common/log.h>
#include <wlr/util/log.h>
#include "backend/multi.h"
#include "common/log.h"
struct subbackend_state {
struct wlr_backend *backend;

View file

@ -9,8 +9,8 @@
#include <xf86drmMode.h>
#include <wayland-server.h>
#include <wlr/session.h>
#include <wlr/util/log.h>
#include "backend/udev.h"
#include "common/log.h"
/* Tests if 'path' is KMS compatible by trying to open it.
* It leaves the open device in *fd_out it it succeeds.

View file

@ -1,14 +1,14 @@
#include <stdlib.h>
#include <stdint.h>
#include <wayland-server.h>
#include <assert.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <wayland-server.h>
#include <wlr/backend/interface.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/util/log.h>
#include "backend/wayland.h"
#include "common/log.h"
#include <EGL/egl.h>
#include <EGL/eglext.h>
static int dispatch_events(int fd, uint32_t mask, void *data) {
struct wlr_backend_state *state = data;

View file

@ -6,8 +6,8 @@
#include <wayland-client.h>
#include <GLES3/gl3.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/util/log.h>
#include "backend/wayland.h"
#include "common/log.h"
static struct wl_callback_listener frame_listener;

View file

@ -2,8 +2,8 @@
#include <stdlib.h>
#include <string.h>
#include <wayland-client.h>
#include <wlr/util/log.h>
#include "backend/wayland.h"
#include "common/log.h"
static void registry_global(void *data, struct wl_registry *registry,
uint32_t name, const char *interface, uint32_t version) {

View file

@ -8,8 +8,8 @@
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/interfaces/wlr_pointer.h>
#include <wlr/interfaces/wlr_keyboard.h>
#include <wlr/util/log.h>
#include "backend/wayland.h"
#include "common/log.h"
static void wlr_wl_device_destroy(struct wlr_input_device_state *state) {
free(state);