aboutsummaryrefslogtreecommitdiff
path: root/include/background-image.h
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-04-12 20:19:54 -0400
committerFurkan Sahin <furkan-dev@proton.me>2018-04-12 20:19:54 -0400
commite62f2f43e2b428a4066fc43e5d2739940f7aa5e9 (patch)
treec653c6d525b471914c01a9d7ae543f521b6138ed /include/background-image.h
parent816bb9d54d2e9e3cbf5e14d7237dc8c8737d6b82 (diff)
parent0cb0c52663a8e27f632988da0f91e4cfb6afddf8 (diff)
Merge branch 'wlroots'
Diffstat (limited to 'include/background-image.h')
-rw-r--r--include/background-image.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/background-image.h b/include/background-image.h
new file mode 100644
index 00000000..15935ffd
--- /dev/null
+++ b/include/background-image.h
@@ -0,0 +1,20 @@
+#ifndef _SWAY_BACKGROUND_IMAGE_H
+#define _SWAY_BACKGROUND_IMAGE_H
+#include "cairo.h"
+
+enum background_mode {
+ BACKGROUND_MODE_STRETCH,
+ BACKGROUND_MODE_FILL,
+ BACKGROUND_MODE_FIT,
+ BACKGROUND_MODE_CENTER,
+ BACKGROUND_MODE_TILE,
+ BACKGROUND_MODE_SOLID_COLOR,
+ BACKGROUND_MODE_INVALID,
+};
+
+enum background_mode parse_background_mode(const char *mode);
+cairo_surface_t *load_background_image(const char *path);
+void render_background_image(cairo_t *cairo, cairo_surface_t *image,
+ enum background_mode mode, int buffer_width, int buffer_height);
+
+#endif