diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-04-04 22:36:09 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-04-04 22:36:09 -0400 |
commit | 65f254f3fbc83d006d4ec29170ec8a8695345d6c (patch) | |
tree | 3044fb62120ca23499d31275076af50db09a9850 /include/background-image.h | |
parent | deda37469ad4e21ad86b7c83c7c8a966301b9d5e (diff) | |
parent | 21aedf15052df4e7f8ee72922fa0e214d690facc (diff) |
Merge branch 'wlroots' into fix-focus-inactive
Diffstat (limited to 'include/background-image.h')
-rw-r--r-- | include/background-image.h | 20 |
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 |