aboutsummaryrefslogtreecommitdiff
path: root/include/background-image.h
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-04-02 21:57:13 -0400
committerFurkan Sahin <furkan-dev@proton.me>2018-04-02 21:57:13 -0400
commit029a7070f83b8fc3dae76dd8e26c3c6dbd0289c3 (patch)
treee85d2479ce1b77e23b3c3e34c1d9e0bf87ed30f0 /include/background-image.h
parentc90aece43f7292613192c5969fa2de2031908b11 (diff)
Move swaybg background rendering into common/
swaylock will use it too
Diffstat (limited to 'include/background-image.h')
-rw-r--r--include/background-image.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/background-image.h b/include/background-image.h
new file mode 100644
index 00000000..e160e63d
--- /dev/null
+++ b/include/background-image.h
@@ -0,0 +1,19 @@
+#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,
+};
+
+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,
+ int buffer_scale);
+
+#endif