From e633fe0b4081f249e9708f95da972138c86838ca Mon Sep 17 00:00:00 2001 From: Manuel Stoeckl Date: Thu, 23 Nov 2023 08:40:41 -0500 Subject: [PATCH] common: move load_image to swaybar swaynag, swaymsg, and sway do not use this function and are unlikely to in the future. --- common/meson.build | 2 -- include/{background-image.h => swaybar/image.h} | 4 ++-- common/background-image.c => swaybar/image.c | 2 +- swaybar/meson.build | 1 + swaybar/tray/item.c | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) rename include/{background-image.h => swaybar/image.h} (53%) rename common/background-image.c => swaybar/image.c (99%) diff --git a/common/meson.build b/common/meson.build index 3756075a..c0ce1f68 100644 --- a/common/meson.build +++ b/common/meson.build @@ -1,7 +1,6 @@ lib_sway_common = static_library( 'sway-common', files( - 'background-image.c', 'cairo.c', 'gesture.c', 'ipc-client.c', @@ -14,7 +13,6 @@ lib_sway_common = static_library( ), dependencies: [ cairo, - gdk_pixbuf, pango, pangocairo, wayland_client.partial_dependency(compile_args: true) diff --git a/include/background-image.h b/include/swaybar/image.h similarity index 53% rename from include/background-image.h rename to include/swaybar/image.h index 67c27c84..53a210dd 100644 --- a/include/background-image.h +++ b/include/swaybar/image.h @@ -1,5 +1,5 @@ -#ifndef _SWAY_BACKGROUND_IMAGE_H -#define _SWAY_BACKGROUND_IMAGE_H +#ifndef _SWAYBAR_IMAGE_H +#define _SWAYBAR_IMAGE_H #include cairo_surface_t *load_image(const char *path); diff --git a/common/background-image.c b/swaybar/image.c similarity index 99% rename from common/background-image.c rename to swaybar/image.c index 2df10dd2..ed24b9f9 100644 --- a/common/background-image.c +++ b/swaybar/image.c @@ -1,7 +1,7 @@ #include -#include "background-image.h" #include "config.h" #include "log.h" +#include "swaybar/image.h" #if HAVE_GDK_PIXBUF #include diff --git a/swaybar/meson.build b/swaybar/meson.build index e5f1811e..34bbdeea 100644 --- a/swaybar/meson.build +++ b/swaybar/meson.build @@ -26,6 +26,7 @@ executable( 'bar.c', 'config.c', 'i3bar.c', + 'image.c', 'input.c', 'ipc.c', 'main.c', diff --git a/swaybar/tray/item.c b/swaybar/tray/item.c index c7938a35..d5fe50b1 100644 --- a/swaybar/tray/item.c +++ b/swaybar/tray/item.c @@ -7,12 +7,12 @@ #include #include "swaybar/bar.h" #include "swaybar/config.h" +#include "swaybar/image.h" #include "swaybar/input.h" #include "swaybar/tray/host.h" #include "swaybar/tray/icon.h" #include "swaybar/tray/item.h" #include "swaybar/tray/tray.h" -#include "background-image.h" #include "cairo_util.h" #include "list.h" #include "log.h"