diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-05-27 18:38:14 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-21 19:58:56 +0900 |
commit | af121719c99a99fc3444d181777a6177f0d59dba (patch) | |
tree | 786cf8548c92daf560733278701d95d3079b1d2f /kernel/include/ksquirrel-libs | |
parent | 5b8d2d73599f1a06c2106ef71b9774dada86e076 (diff) | |
download | libksquirrel-af121719c99a99fc3444d181777a6177f0d59dba.tar.gz libksquirrel-af121719c99a99fc3444d181777a6177f0d59dba.zip |
Conversion to cmake building system
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kernel/include/ksquirrel-libs')
-rw-r--r-- | kernel/include/ksquirrel-libs/fileio.h | 4 | ||||
-rw-r--r-- | kernel/include/ksquirrel-libs/fmt_codec_base.h | 2 | ||||
-rw-r--r-- | kernel/include/ksquirrel-libs/fmt_types.h | 2 | ||||
-rw-r--r-- | kernel/include/ksquirrel-libs/fmt_utils.h | 18 | ||||
-rw-r--r-- | kernel/include/ksquirrel-libs/ksquirrel_libs_export.h | 33 |
5 files changed, 47 insertions, 12 deletions
diff --git a/kernel/include/ksquirrel-libs/fileio.h b/kernel/include/ksquirrel-libs/fileio.h index 3bf3921..354d630 100644 --- a/kernel/include/ksquirrel-libs/fileio.h +++ b/kernel/include/ksquirrel-libs/fileio.h @@ -36,7 +36,7 @@ using namespace std; // read binary data -class ifstreamK : public ifstream +class LIBKSQUIRREL_EXPORT ifstreamK : public ifstream { public: ifstreamK(); @@ -60,7 +60,7 @@ class ifstreamK : public ifstream }; // write binary data -class ofstreamK : public ofstream +class LIBKSQUIRREL_EXPORT ofstreamK : public ofstream { public: ofstreamK(); diff --git a/kernel/include/ksquirrel-libs/fmt_codec_base.h b/kernel/include/ksquirrel-libs/fmt_codec_base.h index cae04ea..003c44c 100644 --- a/kernel/include/ksquirrel-libs/fmt_codec_base.h +++ b/kernel/include/ksquirrel-libs/fmt_codec_base.h @@ -34,7 +34,7 @@ ////////////////////////////////// -class fmt_codec_base +class LIBKSQUIRREL_EXPORT fmt_codec_base { public: fmt_codec_base() diff --git a/kernel/include/ksquirrel-libs/fmt_types.h b/kernel/include/ksquirrel-libs/fmt_types.h index 75b6f02..28a049f 100644 --- a/kernel/include/ksquirrel-libs/fmt_types.h +++ b/kernel/include/ksquirrel-libs/fmt_types.h @@ -22,6 +22,8 @@ #ifndef KSQUIRREL_LIBS_TYPES_H #define KSQUIRREL_LIBS_TYPES_H +#include "ksquirrel_libs_export.h" + typedef char s8; typedef unsigned char u8; diff --git a/kernel/include/ksquirrel-libs/fmt_utils.h b/kernel/include/ksquirrel-libs/fmt_utils.h index 1ab42e3..b320b08 100644 --- a/kernel/include/ksquirrel-libs/fmt_utils.h +++ b/kernel/include/ksquirrel-libs/fmt_utils.h @@ -39,26 +39,26 @@ struct RGBA; namespace fmt_utils { - void fillAlpha(RGBA *scan, int w, u8 value = 255); + void LIBKSQUIRREL_EXPORT fillAlpha(RGBA *scan, int w, u8 value = 255); // flip the image vertically // usually BMP, SGI (or some other formats) need to be flipped - void flipv(s8 *image, s32 bytes_w, s32 h); + void LIBKSQUIRREL_EXPORT flipv(s8 *image, s32 bytes_w, s32 h); // flip the image horizontally - void fliph(s8 *image, s32 w, s32 h, s32 bpp); + void LIBKSQUIRREL_EXPORT fliph(s8 *image, s32 w, s32 h, s32 bpp); // Big endian to Little endian conversion - u16 konvertWord(u16 a); - u32 konvertLong(u32 a); + u16 LIBKSQUIRREL_EXPORT konvertWord(u16 a); + u32 LIBKSQUIRREL_EXPORT konvertLong(u32 a); // return color system name by bpp. // for example 32 bpp means RGBA image, 1 bpp - monochrome - std::string colorSpaceByBpp(const s32 bpp); + std::string LIBKSQUIRREL_EXPORT colorSpaceByBpp(const s32 bpp); - void expandMono1Byte(const u32 byte, u8 *array); - void expandMono2Byte(const u32 byte, u8 *array); - void expandMono4Byte(const u32 byte, u8 *array); + void LIBKSQUIRREL_EXPORT expandMono1Byte(const u32 byte, u8 *array); + void LIBKSQUIRREL_EXPORT expandMono2Byte(const u32 byte, u8 *array); + void LIBKSQUIRREL_EXPORT expandMono4Byte(const u32 byte, u8 *array); } #endif diff --git a/kernel/include/ksquirrel-libs/ksquirrel_libs_export.h b/kernel/include/ksquirrel-libs/ksquirrel_libs_export.h new file mode 100644 index 0000000..2f49ba4 --- /dev/null +++ b/kernel/include/ksquirrel-libs/ksquirrel_libs_export.h @@ -0,0 +1,33 @@ +/* This file is part of ksquirrel-libs (http://ksquirrel.sf.net) + + Copyright (c) 2005 Dmitry Baryshev <ksquirrel@tut.by> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later + version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KSQUIRREL_LIBS_EXPORT_H +#define KSQUIRREL_LIBS_EXPORT_H + +#include <kdemacros.h> + +#ifdef __KDE_HAVE_GCC_VISIBILITY +#define LIBKSQUIRREL_EXPORT __attribute__ ((visibility("default"))) +#else +#define LIBKSQUIRREL_EXPORT +#endif + +#endif |