diff options
author | emersion <contact@emersion.fr> | 2018-11-18 00:33:06 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-11-18 00:33:06 +0100 |
commit | cad851805bea6b4777685df1c6adf8cb9fa71835 (patch) | |
tree | 145fcb048cc3df3d04a8b6afb90de68dd2dd80a9 /include/cairo.h | |
parent | Merge pull request #3142 from RyanDwyer/move-view-properties (diff) | |
download | sway-cad851805bea6b4777685df1c6adf8cb9fa71835.tar.gz sway-cad851805bea6b4777685df1c6adf8cb9fa71835.tar.zst sway-cad851805bea6b4777685df1c6adf8cb9fa71835.zip |
Use #if instead of #ifdef
Diffstat (limited to 'include/cairo.h')
-rw-r--r-- | include/cairo.h | 12 |
1 files changed, 8 insertions, 4 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 | ||
7 | void cairo_set_source_u32(cairo_t *cairo, uint32_t color); | 12 | void cairo_set_source_u32(cairo_t *cairo, uint32_t color); |
8 | cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel); | 13 | cairo_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) | |||
10 | cairo_surface_t *cairo_image_surface_scale(cairo_surface_t *image, | 15 | cairo_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 | ||
17 | cairo_surface_t* gdk_cairo_image_surface_create_from_pixbuf( | 20 | cairo_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 |