aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-02 21:57:13 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-04 18:47:48 -0400
commita28730edee1896242012f80fd0e63e7966652e02 (patch)
treee85d2479ce1b77e23b3c3e34c1d9e0bf87ed30f0 /include
parentMerge pull request #1731 from acrisci/ipc-window-events (diff)
downloadsway-a28730edee1896242012f80fd0e63e7966652e02.tar.gz
sway-a28730edee1896242012f80fd0e63e7966652e02.tar.zst
sway-a28730edee1896242012f80fd0e63e7966652e02.zip
Move swaybg background rendering into common/
swaylock will use it too
Diffstat (limited to 'include')
-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 @@
1#ifndef _SWAY_BACKGROUND_IMAGE_H
2#define _SWAY_BACKGROUND_IMAGE_H
3#include "cairo.h"
4
5enum background_mode {
6 BACKGROUND_MODE_STRETCH,
7 BACKGROUND_MODE_FILL,
8 BACKGROUND_MODE_FIT,
9 BACKGROUND_MODE_CENTER,
10 BACKGROUND_MODE_TILE,
11 BACKGROUND_MODE_SOLID_COLOR,
12};
13
14cairo_surface_t *load_background_image(const char *path);
15void render_background_image(cairo_t *cairo, cairo_surface_t *image,
16 enum background_mode mode, int buffer_width, int buffer_height,
17 int buffer_scale);
18
19#endif