common: move load_image to swaybar

swaynag, swaymsg, and sway do not use this function and are
unlikely to in the future.
This commit is contained in:
Manuel Stoeckl 2023-11-23 08:40:41 -05:00 committed by Simon Ser
parent 439122e887
commit e633fe0b40
5 changed files with 5 additions and 6 deletions

View file

@ -1,7 +1,6 @@
lib_sway_common = static_library( lib_sway_common = static_library(
'sway-common', 'sway-common',
files( files(
'background-image.c',
'cairo.c', 'cairo.c',
'gesture.c', 'gesture.c',
'ipc-client.c', 'ipc-client.c',
@ -14,7 +13,6 @@ lib_sway_common = static_library(
), ),
dependencies: [ dependencies: [
cairo, cairo,
gdk_pixbuf,
pango, pango,
pangocairo, pangocairo,
wayland_client.partial_dependency(compile_args: true) wayland_client.partial_dependency(compile_args: true)

View file

@ -1,5 +1,5 @@
#ifndef _SWAY_BACKGROUND_IMAGE_H #ifndef _SWAYBAR_IMAGE_H
#define _SWAY_BACKGROUND_IMAGE_H #define _SWAYBAR_IMAGE_H
#include <cairo.h> #include <cairo.h>
cairo_surface_t *load_image(const char *path); cairo_surface_t *load_image(const char *path);

View file

@ -1,7 +1,7 @@
#include <assert.h> #include <assert.h>
#include "background-image.h"
#include "config.h" #include "config.h"
#include "log.h" #include "log.h"
#include "swaybar/image.h"
#if HAVE_GDK_PIXBUF #if HAVE_GDK_PIXBUF
#include <gdk-pixbuf/gdk-pixbuf.h> #include <gdk-pixbuf/gdk-pixbuf.h>

View file

@ -26,6 +26,7 @@ executable(
'bar.c', 'bar.c',
'config.c', 'config.c',
'i3bar.c', 'i3bar.c',
'image.c',
'input.c', 'input.c',
'ipc.c', 'ipc.c',
'main.c', 'main.c',

View file

@ -7,12 +7,12 @@
#include <string.h> #include <string.h>
#include "swaybar/bar.h" #include "swaybar/bar.h"
#include "swaybar/config.h" #include "swaybar/config.h"
#include "swaybar/image.h"
#include "swaybar/input.h" #include "swaybar/input.h"
#include "swaybar/tray/host.h" #include "swaybar/tray/host.h"
#include "swaybar/tray/icon.h" #include "swaybar/tray/icon.h"
#include "swaybar/tray/item.h" #include "swaybar/tray/item.h"
#include "swaybar/tray/tray.h" #include "swaybar/tray/tray.h"
#include "background-image.h"
#include "cairo_util.h" #include "cairo_util.h"
#include "list.h" #include "list.h"
#include "log.h" #include "log.h"