summaryrefslogtreecommitdiffstats
path: root/kernel/include
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include')
-rw-r--r--kernel/include/dds.h36
-rw-r--r--kernel/include/fmt_codec_cd_func.h6
-rw-r--r--kernel/include/ksquirrel-libs/fileio.h4
-rw-r--r--kernel/include/ksquirrel-libs/fmt_codec_base.h2
-rw-r--r--kernel/include/ksquirrel-libs/fmt_types.h2
-rw-r--r--kernel/include/ksquirrel-libs/fmt_utils.h18
-rw-r--r--kernel/include/ksquirrel-libs/ksquirrel_libs_export.h33
7 files changed, 87 insertions, 14 deletions
diff --git a/kernel/include/dds.h b/kernel/include/dds.h
new file mode 100644
index 0000000..5e7af28
--- /dev/null
+++ b/kernel/include/dds.h
@@ -0,0 +1,36 @@
+/* This file is part of ksquirrel-libs (http://ksquirrel.sf.net)
+
+ Copyright (c) 2007 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 DDS_H
+#define DDS_H
+
+struct RGBA;
+struct DDSINFO;
+
+struct DDSINFO
+{
+ int w, h;
+ RGBA **img;
+};
+
+bool dds_read(const std::string &file, DDSINFO&);
+
+#endif
diff --git a/kernel/include/fmt_codec_cd_func.h b/kernel/include/fmt_codec_cd_func.h
index da38f56..271e678 100644
--- a/kernel/include/fmt_codec_cd_func.h
+++ b/kernel/include/fmt_codec_cd_func.h
@@ -22,12 +22,14 @@
#ifndef KSQUIRREL_LIBS_CLASS_DEFINITION_create_destroy_H
#define KSQUIRREL_LIBS_CLASS_DEFINITION_create_destroy_H
-extern "C" fmt_codec_base* codec_create()
+#include "ksquirrel-libs/ksquirrel_libs_export.h"
+
+extern "C" LIBKSQUIRREL_EXPORT fmt_codec_base* codec_create()
{
return (new fmt_codec);
}
-extern "C" void codec_destroy(fmt_codec_base *p)
+extern "C" LIBKSQUIRREL_EXPORT void codec_destroy(fmt_codec_base *p)
{
delete p;
}
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