diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt index 80d7fad4..8c49fe1f 100644 --- a/lua/CMakeLists.txt +++ b/lua/CMakeLists.txt @@ -44,7 +44,7 @@ if(BUILD_X11) endif(BUILD_LUA_CAIRO) if(BUILD_LUA_IMLIB2) - include_directories(${luaimlib2_includes} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + include_directories(${luaimlib2_includes} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ../src) if(IMLIB2_VERSION VERSION_GREATER_EQUAL "1.10.0") wrap_tolua(luaimlib2_src imlib2.pkg) diff --git a/lua/libcairo_imlib2_helper.h b/lua/libcairo_imlib2_helper.h index 66799006..c86bebd1 100644 --- a/lua/libcairo_imlib2_helper.h +++ b/lua/libcairo_imlib2_helper.h @@ -46,7 +46,7 @@ void cairo_place_image(const char *file, cairo_t *cr, int x, int y, return; } - image = imlib_load_image(file); + image = (Imlib_Image *)imlib_load_image(file); if (!image) { NORM_ERR("cairoimagehelper: Couldn't load %s\n", file); return; @@ -62,7 +62,7 @@ void cairo_place_image(const char *file, cairo_t *cr, int x, int y, } /* create scaled version of image to later extract the alpha channel */ - alpha_image = imlib_create_cropped_scaled_image (0, 0, w, h, width, height); + alpha_image = imlib_create_cropped_scaled_image(0, 0, w, h, width, height); /* create temporary image */ premul = imlib_create_image(width, height); @@ -87,7 +87,7 @@ void cairo_place_image(const char *file, cairo_t *cr, int x, int y, /* now pass the result to cairo */ result = cairo_image_surface_create_for_data( - (void *)imlib_image_get_data_for_reading_only(), CAIRO_FORMAT_ARGB32, + (unsigned char *)imlib_image_get_data_for_reading_only(), CAIRO_FORMAT_ARGB32, width, height, stride); cairo_set_source_surface(cr, result, x, y); @@ -124,7 +124,7 @@ void cairo_draw_image(const char *file, cairo_surface_t *cs, int x, int y, return; } - Imlib_Image *image = imlib_load_image(file); + Imlib_Image *image = (Imlib_Image *)imlib_load_image(file); if (!image) { NORM_ERR("cairoimagehelper: Couldn't load %s\n", file); return; diff --git a/lua/logging.h b/lua/logging.h deleted file mode 100644 index 836344f2..00000000 --- a/lua/logging.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Conky, a system monitor, based on torsmo - * - * Any original torsmo code is licensed under the BSD license - * - * All code written since the fork of torsmo is licensed under the GPL - * - * Please see COPYING for details - * - * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen - * Copyright (c) 2005-2021 Brenden Matthews, Philip Kovacs, et. al. - * (see AUTHORS) - * All rights reserved. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef _LOGGING_H -#define _LOGGING_H - -#include "config.h" - -/* Very basic reimplementation of logging.h in c for bindings. */ - -#define NORM_ERR(...) \ - fprintf(stderr, PACKAGE_NAME ": "); \ - fprintf (stderr, __VA_ARGS__); \ - fputs("\n", stderr); - -#endif /* _LOGGING_H */