Reformat all #include directives

This commit is contained in:
emersion 2018-02-12 21:29:23 +01:00
parent 36ead80cd1
commit c2e1474010
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
138 changed files with 449 additions and 456 deletions

View file

@ -1,19 +1,17 @@
#ifndef BACKEND_DRM_DRM_H
#define BACKEND_DRM_DRM_H
#include <EGL/egl.h>
#include <gbm.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <wayland-server.h>
#include <xf86drmMode.h>
#include <EGL/egl.h>
#include <gbm.h>
#include <wayland-util.h>
#include <wlr/backend/session.h>
#include <wlr/backend/drm.h>
#include <wlr/backend/session.h>
#include <wlr/render/egl.h>
#include <xf86drmMode.h>
#include "iface.h"
#include "properties.h"
#include "renderer.h"

View file

@ -1,10 +1,9 @@
#ifndef BACKEND_DRM_IFACE_H
#define BACKEND_DRM_IFACE_H
#include <gbm.h>
#include <stdbool.h>
#include <stdint.h>
#include <gbm.h>
#include <xf86drm.h>
#include <xf86drmMode.h>

View file

@ -1,12 +1,10 @@
#ifndef BACKEND_DRM_RENDERER_H
#define BACKEND_DRM_RENDERER_H
#include <stdbool.h>
#include <stdint.h>
#include <EGL/egl.h>
#include <gbm.h>
#include <stdbool.h>
#include <stdint.h>
#include <wlr/render.h>
struct wlr_drm_backend;

View file

@ -2,9 +2,9 @@
#define BACKEND_DRM_UTIL_H
#include <stdint.h>
#include <wlr/types/wlr_output.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <wlr/types/wlr_output.h>
// Calculates a more accurate refresh rate (mHz) than what mode itself provides
int32_t calculate_refresh_rate(drmModeModeInfo *mode);

View file

@ -1,8 +1,8 @@
#ifndef BACKEND_HEADLESS_H
#define BACKEND_HEADLESS_H
#include <wlr/backend/interface.h>
#include <wlr/backend/headless.h>
#include <wlr/backend/interface.h>
struct wlr_headless_backend {
struct wlr_backend backend;

View file

@ -1,10 +1,11 @@
#ifndef BACKEND_LIBINPUT_H
#define BACKEND_LIBINPUT_H
#include <libinput.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/backend/interface.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_list.h>
struct wlr_libinput_backend {

View file

@ -1,10 +1,10 @@
#ifndef BACKEND_MULTI_H
#define BACKEND_MULTI_H
#include <wayland-util.h>
#include <wlr/backend/interface.h>
#include <wlr/backend/multi.h>
#include <wlr/backend/session.h>
#include <wayland-util.h>
struct wlr_multi_backend {
struct wlr_backend backend;

View file

@ -3,13 +3,13 @@
#include <stdbool.h>
#include <wayland-client.h>
#include <wayland-server.h>
#include <wayland-egl.h>
#include <wlr/render/egl.h>
#include <wlr/render.h>
#include <wlr/backend/wayland.h>
#include <wlr/types/wlr_box.h>
#include <wayland-server.h>
#include <wayland-util.h>
#include <wlr/backend/wayland.h>
#include <wlr/render.h>
#include <wlr/render/egl.h>
#include <wlr/types/wlr_box.h>
struct wlr_wl_backend {
struct wlr_backend backend;

View file

@ -1,11 +1,11 @@
#ifndef WLR_X11_H
#define WLR_X11_H
#ifndef BACKEND_X11_H
#define BACKEND_X11_H
#include <stdbool.h>
#include <xcb/xcb.h>
#include <X11/Xlib-xcb.h>
#include <wayland-server.h>
#include <wlr/render/egl.h>
#include <X11/Xlib-xcb.h>
#include <xcb/xcb.h>
struct wlr_x11_backend;

View file

@ -1,13 +1,13 @@
#ifndef RENDER_GLES2_H
#define RENDER_GLES2_H
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <wlr/backend.h>
#include <wlr/render.h>
#include <wlr/render/egl.h>

View file

@ -1,7 +1,8 @@
#ifndef _ROOTSTON_CONFIG_H
#define _ROOTSTON_CONFIG_H
#include <wlr/types/wlr_output_layout.h>
#ifndef ROOTSTON_CONFIG_H
#define ROOTSTON_CONFIG_H
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_output_layout.h>
#define ROOTS_CONFIG_DEFAULT_SEAT_NAME "seat0"

View file

@ -1,5 +1,5 @@
#ifndef _ROOTSTON_CURSOR_H
#define _ROOTSTON_CURSOR_H
#ifndef ROOTSTON_CURSOR_H
#define ROOTSTON_CURSOR_H
#include "rootston/seat.h"

View file

@ -1,22 +1,23 @@
#ifndef _ROOTSTON_DESKTOP_H
#define _ROOTSTON_DESKTOP_H
#ifndef ROOTSTON_DESKTOP_H
#define ROOTSTON_DESKTOP_H
#include <time.h>
#include <wayland-server.h>
#include <wlr/config.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_wl_shell.h>
#include <wlr/types/wlr_xdg_shell_v6.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_gamma_control.h>
#include <wlr/types/wlr_idle.h>
#include <wlr/types/wlr_list.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_primary_selection.h>
#include <wlr/types/wlr_screenshooter.h>
#include <wlr/types/wlr_list.h>
#include <wlr/types/wlr_idle.h>
#include "rootston/view.h"
#include <wlr/types/wlr_wl_shell.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_xdg_shell_v6.h>
#include "rootston/config.h"
#include "rootston/output.h"
#include "rootston/view.h"
struct roots_desktop {
struct wl_list views; // roots_view::link

View file

@ -1,13 +1,14 @@
#ifndef _ROOTSTON_INPUT_H
#define _ROOTSTON_INPUT_H
#ifndef ROOTSTON_INPUT_H
#define ROOTSTON_INPUT_H
#include <wayland-server.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_seat.h>
#include "rootston/cursor.h"
#include "rootston/config.h"
#include "rootston/view.h"
#include "rootston/cursor.h"
#include "rootston/server.h"
#include "rootston/view.h"
struct roots_input {
struct roots_config *config;

View file

@ -1,5 +1,5 @@
#ifndef _ROOTSTON_KEYBOARD_H
#define _ROOTSTON_KEYBOARD_H
#ifndef ROOTSTON_KEYBOARD_H
#define ROOTSTON_KEYBOARD_H
#include <xkbcommon/xkbcommon.h>
#include "rootston/input.h"

View file

@ -1,8 +1,8 @@
#ifndef _ROOTSTON_OUTPUT_H
#define _ROOTSTON_OUTPUT_H
#ifndef ROOTSTON_OUTPUT_H
#define ROOTSTON_OUTPUT_H
#include <time.h>
#include <pixman.h>
#include <time.h>
#include <wayland-server.h>
#include <wlr/types/wlr_output_damage.h>

View file

@ -1,5 +1,6 @@
#ifndef _ROOTSTON_SEAT_H
#define _ROOTSTON_SEAT_H
#ifndef ROOTSTON_SEAT_H
#define ROOTSTON_SEAT_H
#include <wayland-server.h>
#include "rootston/input.h"
#include "rootston/keyboard.h"

View file

@ -1,11 +1,12 @@
#ifndef _ROOTSTON_SERVER_H
#define _ROOTSTON_SERVER_H
#include <wayland-server.h>
#include <wlr/config.h>
#include <wlr/backend.h>
#include <wlr/backend/session.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/config.h>
#include <wlr/render.h>
#include <wlr/types/wlr_data_device.h>
#ifdef WLR_HAS_XWAYLAND
#include <wlr/xwayland.h>
#endif

View file

@ -1,5 +1,5 @@
#ifndef _ROOTSTON_VIEW_H
#define _ROOTSTON_VIEW_H
#ifndef ROOTSTON_VIEW_H
#define ROOTSTON_VIEW_H
#include <stdbool.h>
#include <wlr/config.h>

View file

@ -1,5 +1,5 @@
#ifndef _ROOTSTON_XCURSOR_H
#define _ROOTSTON_XCURSOR_H
#ifndef ROOTSTON_XCURSOR_H
#define ROOTSTON_XCURSOR_H
#include <stdint.h>

View file

@ -1,12 +1,9 @@
#ifndef _WLR_UTIL_OS_COMPATIBILITY_H
#define _WLR_UTIL_OS_COMPATIBILITY_H
#ifndef UTIL_OS_COMPATIBILITY_H
#define UTIL_OS_COMPATIBILITY_H
int os_fd_set_cloexec(int fd);
int set_cloexec_or_close(int fd);
int create_tmpfile_cloexec(char *tmpname);
int os_create_anonymous_file(off_t size);
#endif

View file

@ -1,5 +1,5 @@
#ifndef WLR_UTIL_SIGNAL_H
#define WLR_UTIL_SIGNAL_H
#ifndef UTIL_SIGNAL_H
#define UTIL_SIGNAL_H
#include <wayland-server.h>

View file

@ -2,8 +2,8 @@
#define WLR_BACKEND_DRM_H
#include <wayland-server.h>
#include <wlr/backend/session.h>
#include <wlr/backend.h>
#include <wlr/backend/session.h>
#include <wlr/types/wlr_output.h>
struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,

View file

@ -3,8 +3,8 @@
#include <libinput.h>
#include <wayland-server.h>
#include <wlr/backend/session.h>
#include <wlr/backend.h>
#include <wlr/backend/session.h>
#include <wlr/types/wlr_input_device.h>
struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display,

View file

@ -5,17 +5,12 @@
#include <wlr/backend/session.h>
struct wlr_backend *wlr_multi_backend_create(struct wl_display *display);
void wlr_multi_backend_add(struct wlr_backend *multi,
struct wlr_backend *backend);
void wlr_multi_backend_remove(struct wlr_backend *multi,
struct wlr_backend *backend);
bool wlr_backend_is_multi(struct wlr_backend *backend);
struct wlr_session *wlr_multi_get_session(struct wlr_backend *base);
bool wlr_multi_is_empty(struct wlr_backend *backend);
#endif

View file

@ -1,10 +1,10 @@
#ifndef WLR_BACKEND_SESSION_H
#define WLR_BACKEND_SESSION_H
#include <stdbool.h>
#include <wayland-server.h>
#include <libudev.h>
#include <stdbool.h>
#include <sys/types.h>
#include <wayland-server.h>
struct session_impl;

View file

@ -1,12 +1,12 @@
#ifndef WLR_BACKEND_WAYLAND_H
#define WLR_BACKEND_WAYLAND_H
#include <stdbool.h>
#include <wayland-client.h>
#include <wayland-server.h>
#include <wlr/backend.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_output.h>
#include <stdbool.h>
/**
* Creates a new wlr_wl_backend. This backend will be created with no outputs;

View file

@ -1,8 +1,8 @@
#ifndef WLR_INTERFACES_WLR_KEYBOARD_H
#define WLR_INTERFACES_WLR_KEYBOARD_H
#include <wlr/types/wlr_keyboard.h>
#include <stdint.h>
#include <wlr/types/wlr_keyboard.h>
struct wlr_keyboard_impl {
void (*destroy)(struct wlr_keyboard *keyboard);

View file

@ -2,9 +2,9 @@
#define WLR_INTERFACES_WLR_OUTPUT_H
#include <stdbool.h>
#include <wlr/backend.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
#include <wlr/backend.h>
struct wlr_output_impl {
void (*enable)(struct wlr_output *output, bool enable);

View file

@ -1,9 +1,9 @@
#ifndef WLR_RENDER_H
#define WLR_RENDER_H
#include <stdint.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <stdint.h>
#include <wayland-server-protocol.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>

View file

@ -1,10 +1,10 @@
#ifndef WLR_EGL_H
#define WLR_EGL_H
#ifndef WLR_RENDER_EGL_H
#define WLR_RENDER_EGL_H
#include <stdbool.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <pixman.h>
#include <stdbool.h>
#include <wayland-server.h>
struct wlr_egl {

View file

@ -1,8 +1,8 @@
#ifndef WLR_RENDER_GLES2_H
#define WLR_RENDER_GLES2_H
#include <wlr/render.h>
#include <wlr/backend.h>
#include <wlr/render.h>
struct wlr_egl;
struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_backend *backend);

View file

@ -1,10 +1,10 @@
#ifndef WLR_RENDER_INTERFACE_H
#define WLR_RENDER_INTERFACE_H
#include <wayland-server-protocol.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <stdbool.h>
#include <wayland-server-protocol.h>
#include <wlr/render.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>

View file

@ -2,10 +2,10 @@
#define WLR_TYPES_WLR_CURSOR_H
#include <wayland-server.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output.h>
struct wlr_cursor_state;

View file

@ -1,9 +1,9 @@
#ifndef WLR_TYPES_WLR_KEYBOARD_H
#define WLR_TYPES_WLR_KEYBOARD_H
#include <wayland-server.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include <wayland-server.h>
#include <wayland-server.h>
#include <xkbcommon/xkbcommon.h>

View file

@ -1,8 +1,8 @@
#ifndef WLR_UTIL_LIST_H
#define WLR_UTIL_LIST_H
#ifndef WLR_TYPES_WLR_LIST_H
#define WLR_TYPES_WLR_LIST_H
#include <stddef.h>
#include <stdbool.h>
#include <stddef.h>
struct wlr_list {
size_t capacity;

View file

@ -1,11 +1,11 @@
#ifndef WLR_TYPES_WLR_OUTPUT_H
#define WLR_TYPES_WLR_OUTPUT_H
#include <pixman.h>
#include <stdbool.h>
#include <time.h>
#include <pixman.h>
#include <wayland-util.h>
#include <wayland-server.h>
#include <wayland-util.h>
struct wlr_output_mode {
uint32_t flags; // enum wl_output_mode

View file

@ -1,8 +1,8 @@
#ifndef WLR_TYPES_WLR_OUTPUT_DAMAGE_H
#define WLR_TYPES_WLR_OUTPUT_DAMAGE_H
#include <time.h>
#include <pixman.h>
#include <time.h>
#include <wlr/types/wlr_output.h>
/**

View file

@ -1,10 +1,10 @@
#ifndef WLR_TYPES_WLR_OUTPUT_LAYOUT_H
#define WLR_TYPES_WLR_OUTPUT_LAYOUT_H
#include <stdbool.h>
#include <wayland-util.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
#include <wayland-util.h>
#include <stdbool.h>
struct wlr_output_layout_state;

View file

@ -1,9 +1,9 @@
#ifndef WLR_TYPES_WLR_POINTER_H
#define WLR_TYPES_WLR_POINTER_H
#include <wlr/types/wlr_input_device.h>
#include <wayland-server.h>
#include <stdint.h>
#include <wayland-server.h>
#include <wlr/types/wlr_input_device.h>
struct wlr_pointer_impl;

View file

@ -1,8 +1,8 @@
#ifndef WLR_TYPES_WLR_PRIMARY_SELECTION_H
#define WLR_TYPES_WLR_PRIMARY_SELECTION_H
#include <wlr/types/wlr_seat.h>
#include <wayland-server.h>
#include <wlr/types/wlr_seat.h>
struct wlr_primary_selection_device_manager {
struct wl_global *global;

View file

@ -1,5 +1,6 @@
#ifndef _WLR_SCREENSHOOTER_H
#define _WLR_SCREENSHOOTER_H
#ifndef WLR_TYPES_WLR_SCREENSHOOTER_H
#define WLR_TYPES_WLR_SCREENSHOOTER_H
#include <wayland-server.h>
struct wlr_screenshooter {

View file

@ -1,10 +1,11 @@
#ifndef WLR_TYPES_WLR_SEAT_H
#define WLR_TYPES_WLR_SEAT_H
#include <time.h>
#include <wlr/types/wlr_surface.h>
#include <wayland-server.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_keyboard.h>
#include <wayland-server.h>
#include <wlr/types/wlr_surface.h>
/**
* Contains state for a single client's bound wl_seat resource and can be used

View file

@ -1,9 +1,10 @@
#ifndef WLR_TYPES_WLR_SURFACE_H
#define WLR_TYPES_WLR_SURFACE_H
#include <stdint.h>
#include <stdbool.h>
#include <time.h>
#include <pixman.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <wayland-server.h>
#include <wlr/types/wlr_output.h>

View file

@ -1,9 +1,9 @@
#ifndef WLR_TYPES_WLR_TABLET_PAD_H
#define WLR_TYPES_WLR_TABLET_PAD_H
#include <wlr/types/wlr_input_device.h>
#include <wayland-server.h>
#include <stdint.h>
#include <wayland-server.h>
#include <wlr/types/wlr_input_device.h>
/*
* NOTE: the wlr tablet pad implementation does not currently support tablets

View file

@ -1,9 +1,9 @@
#ifndef WLR_TYPES_TABLET_TOOL_H
#define WLR_TYPES_TABLET_TOOL_H
#include <wlr/types/wlr_input_device.h>
#include <wayland-server.h>
#include <stdint.h>
#include <wayland-server.h>
#include <wlr/types/wlr_input_device.h>
struct wlr_tablet_tool_impl;

View file

@ -1,8 +1,8 @@
#ifndef WLR_TYPES_WLR_TOUCH_H
#define WLR_TYPES_WLR_TOUCH_H
#include <wayland-server.h>
#include <stdint.h>
#include <wayland-server.h>
struct wlr_touch_impl;

View file

@ -1,9 +1,9 @@
#ifndef WLR_TYPES_WLR_XDG_SHELL_V6_H
#define WLR_TYPES_WLR_XDG_SHELL_V6_H
#include <wayland-server.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_seat.h>
#include <wayland-server.h>
struct wlr_xdg_shell_v6 {
struct wl_global *wl_global;

View file

@ -1,8 +1,8 @@
#ifndef WLR_XWAYLAND_H
#define WLR_XWAYLAND_H
#include <time.h>
#include <stdbool.h>
#include <time.h>
#include <wlr/config.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_seat.h>

View file

@ -1,9 +1,9 @@
#ifndef XWAYLAND_INTERNALS_H
#define XWAYLAND_INTERNALS_H
#ifndef WLR_XWM_H
#define WLR_XWM_H
#include <xcb/render.h>
#include <wayland-server-core.h>
#include <wlr/xwayland.h>
#include <xcb/render.h>
enum atom_name {
WL_SURFACE_ID,