aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-11-18 00:33:06 +0100
committerLibravatar emersion <contact@emersion.fr>2018-11-18 00:33:06 +0100
commitcad851805bea6b4777685df1c6adf8cb9fa71835 (patch)
tree145fcb048cc3df3d04a8b6afb90de68dd2dd80a9 /include
parentMerge pull request #3142 from RyanDwyer/move-view-properties (diff)
downloadsway-cad851805bea6b4777685df1c6adf8cb9fa71835.tar.gz
sway-cad851805bea6b4777685df1c6adf8cb9fa71835.tar.zst
sway-cad851805bea6b4777685df1c6adf8cb9fa71835.zip
Use #if instead of #ifdef
Diffstat (limited to 'include')
-rw-r--r--include/cairo.h12
-rw-r--r--include/sway/criteria.h2
-rw-r--r--include/sway/output.h2
-rw-r--r--include/sway/server.h6
-rw-r--r--include/sway/tree/root.h2
-rw-r--r--include/sway/tree/view.h12
6 files changed, 20 insertions, 16 deletions
diff --git a/include/cairo.h b/include/cairo.h
index 86530b60..f28c072f 100644
--- a/include/cairo.h
+++ b/include/cairo.h
@@ -1,8 +1,13 @@
1#ifndef _SWAY_CAIRO_H 1#ifndef _SWAY_CAIRO_H
2#define _SWAY_CAIRO_H 2#define _SWAY_CAIRO_H
3
4#include "config.h"
3#include <stdint.h> 5#include <stdint.h>
4#include <cairo/cairo.h> 6#include <cairo/cairo.h>
5#include <wlr/types/wlr_output.h> 7#include <wlr/types/wlr_output.h>
8#if HAVE_GDK_PIXBUF
9#include <gdk-pixbuf/gdk-pixbuf.h>
10#endif
6 11
7void cairo_set_source_u32(cairo_t *cairo, uint32_t color); 12void cairo_set_source_u32(cairo_t *cairo, uint32_t color);
8cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel); 13cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel);
@@ -10,12 +15,11 @@ cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel)
10cairo_surface_t *cairo_image_surface_scale(cairo_surface_t *image, 15cairo_surface_t *cairo_image_surface_scale(cairo_surface_t *image,
11 int width, int height); 16 int width, int height);
12 17
13#include "config.h" 18#if HAVE_GDK_PIXBUF
14#ifdef HAVE_GDK_PIXBUF
15#include <gdk-pixbuf/gdk-pixbuf.h>
16 19
17cairo_surface_t* gdk_cairo_image_surface_create_from_pixbuf( 20cairo_surface_t* gdk_cairo_image_surface_create_from_pixbuf(
18 const GdkPixbuf *gdkbuf); 21 const GdkPixbuf *gdkbuf);
19#endif //WITH_GDK_PIXBUF 22
23#endif // HAVE_GDK_PIXBUF
20 24
21#endif 25#endif
diff --git a/include/sway/criteria.h b/include/sway/criteria.h
index 323ba01d..3eb583d5 100644
--- a/include/sway/criteria.h
+++ b/include/sway/criteria.h
@@ -25,7 +25,7 @@ struct criteria {
25 pcre *app_id; 25 pcre *app_id;
26 pcre *con_mark; 26 pcre *con_mark;
27 uint32_t con_id; // internal ID 27 uint32_t con_id; // internal ID
28#ifdef HAVE_XWAYLAND 28#if HAVE_XWAYLAND
29 pcre *class; 29 pcre *class;
30 uint32_t id; // X11 window ID 30 uint32_t id; // X11 window ID
31 pcre *instance; 31 pcre *instance;
diff --git a/include/sway/output.h b/include/sway/output.h
index 5efe1660..43c1ab96 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -119,7 +119,7 @@ void output_layer_for_each_surface(struct sway_output *output,
119 struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator, 119 struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator,
120 void *user_data); 120 void *user_data);
121 121
122#ifdef HAVE_XWAYLAND 122#if HAVE_XWAYLAND
123void output_unmanaged_for_each_surface(struct sway_output *output, 123void output_unmanaged_for_each_surface(struct sway_output *output,
124 struct wl_list *unmanaged, sway_surface_iterator_func_t iterator, 124 struct wl_list *unmanaged, sway_surface_iterator_func_t iterator,
125 void *user_data); 125 void *user_data);
diff --git a/include/sway/server.h b/include/sway/server.h
index 5fced224..a3233d66 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -14,7 +14,7 @@
14#include <wlr/types/wlr_xdg_shell.h> 14#include <wlr/types/wlr_xdg_shell.h>
15#include "config.h" 15#include "config.h"
16#include "list.h" 16#include "list.h"
17#ifdef HAVE_XWAYLAND 17#if HAVE_XWAYLAND
18#include "sway/xwayland.h" 18#include "sway/xwayland.h"
19#endif 19#endif
20 20
@@ -44,7 +44,7 @@ struct sway_server {
44 struct wlr_xdg_shell *xdg_shell; 44 struct wlr_xdg_shell *xdg_shell;
45 struct wl_listener xdg_shell_surface; 45 struct wl_listener xdg_shell_surface;
46 46
47#ifdef HAVE_XWAYLAND 47#if HAVE_XWAYLAND
48 struct sway_xwayland xwayland; 48 struct sway_xwayland xwayland;
49 struct wl_listener xwayland_surface; 49 struct wl_listener xwayland_surface;
50 struct wl_listener xwayland_ready; 50 struct wl_listener xwayland_ready;
@@ -80,7 +80,7 @@ void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data);
80void handle_layer_shell_surface(struct wl_listener *listener, void *data); 80void handle_layer_shell_surface(struct wl_listener *listener, void *data);
81void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); 81void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data);
82void handle_xdg_shell_surface(struct wl_listener *listener, void *data); 82void handle_xdg_shell_surface(struct wl_listener *listener, void *data);
83#ifdef HAVE_XWAYLAND 83#if HAVE_XWAYLAND
84void handle_xwayland_surface(struct wl_listener *listener, void *data); 84void handle_xwayland_surface(struct wl_listener *listener, void *data);
85#endif 85#endif
86void handle_server_decoration(struct wl_listener *listener, void *data); 86void handle_server_decoration(struct wl_listener *listener, void *data);
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h
index a2d464f9..ceccc920 100644
--- a/include/sway/tree/root.h
+++ b/include/sway/tree/root.h
@@ -16,7 +16,7 @@ struct sway_root {
16 struct wlr_output_layout *output_layout; 16 struct wlr_output_layout *output_layout;
17 17
18 struct wl_listener output_layout_change; 18 struct wl_listener output_layout_change;
19#ifdef HAVE_XWAYLAND 19#if HAVE_XWAYLAND
20 struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link 20 struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link
21#endif 21#endif
22 struct wl_list drag_icons; // sway_drag_icon::link 22 struct wl_list drag_icons; // sway_drag_icon::link
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 8f045c6a..4716c688 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -4,7 +4,7 @@
4#include <wlr/types/wlr_surface.h> 4#include <wlr/types/wlr_surface.h>
5#include <wlr/types/wlr_xdg_shell_v6.h> 5#include <wlr/types/wlr_xdg_shell_v6.h>
6#include "config.h" 6#include "config.h"
7#ifdef HAVE_XWAYLAND 7#if HAVE_XWAYLAND
8#include <wlr/xwayland.h> 8#include <wlr/xwayland.h>
9#endif 9#endif
10#include "sway/input/input-manager.h" 10#include "sway/input/input-manager.h"
@@ -16,7 +16,7 @@ struct sway_xdg_decoration;
16enum sway_view_type { 16enum sway_view_type {
17 SWAY_VIEW_XDG_SHELL_V6, 17 SWAY_VIEW_XDG_SHELL_V6,
18 SWAY_VIEW_XDG_SHELL, 18 SWAY_VIEW_XDG_SHELL,
19#ifdef HAVE_XWAYLAND 19#if HAVE_XWAYLAND
20 SWAY_VIEW_XWAYLAND, 20 SWAY_VIEW_XWAYLAND,
21#endif 21#endif
22}; 22};
@@ -28,7 +28,7 @@ enum sway_view_prop {
28 VIEW_PROP_INSTANCE, 28 VIEW_PROP_INSTANCE,
29 VIEW_PROP_WINDOW_TYPE, 29 VIEW_PROP_WINDOW_TYPE,
30 VIEW_PROP_WINDOW_ROLE, 30 VIEW_PROP_WINDOW_ROLE,
31#ifdef HAVE_XWAYLAND 31#if HAVE_XWAYLAND
32 VIEW_PROP_X11_WINDOW_ID, 32 VIEW_PROP_X11_WINDOW_ID,
33 VIEW_PROP_X11_PARENT_ID, 33 VIEW_PROP_X11_PARENT_ID,
34#endif 34#endif
@@ -100,7 +100,7 @@ struct sway_view {
100 union { 100 union {
101 struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; 101 struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6;
102 struct wlr_xdg_surface *wlr_xdg_surface; 102 struct wlr_xdg_surface *wlr_xdg_surface;
103#ifdef HAVE_XWAYLAND 103#if HAVE_XWAYLAND
104 struct wlr_xwayland_surface *wlr_xwayland_surface; 104 struct wlr_xwayland_surface *wlr_xwayland_surface;
105#endif 105#endif
106 struct wlr_wl_shell_surface *wlr_wl_shell_surface; 106 struct wlr_wl_shell_surface *wlr_wl_shell_surface;
@@ -144,7 +144,7 @@ struct sway_xdg_shell_view {
144 struct wl_listener unmap; 144 struct wl_listener unmap;
145 struct wl_listener destroy; 145 struct wl_listener destroy;
146}; 146};
147#ifdef HAVE_XWAYLAND 147#if HAVE_XWAYLAND
148struct sway_xwayland_view { 148struct sway_xwayland_view {
149 struct sway_view view; 149 struct sway_view view;
150 150
@@ -323,7 +323,7 @@ struct sway_view *view_from_wlr_xdg_surface(
323 struct wlr_xdg_surface *xdg_surface); 323 struct wlr_xdg_surface *xdg_surface);
324struct sway_view *view_from_wlr_xdg_surface_v6( 324struct sway_view *view_from_wlr_xdg_surface_v6(
325 struct wlr_xdg_surface_v6 *xdg_surface_v6); 325 struct wlr_xdg_surface_v6 *xdg_surface_v6);
326#ifdef HAVE_XWAYLAND 326#if HAVE_XWAYLAND
327struct sway_view *view_from_wlr_xwayland_surface( 327struct sway_view *view_from_wlr_xwayland_surface(
328 struct wlr_xwayland_surface *xsurface); 328 struct wlr_xwayland_surface *xsurface);
329#endif 329#endif