does not link yet due to a bug in mingw's ld. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@3074 92316355-f0b4-4df1-b90c-862c8a59935fremotes/tiles
@@ -21,7 +21,7 @@ make distclean || true | |||||
cd "${BUILDDIR}" | cd "${BUILDDIR}" | ||||
# Build for win32 | # Build for win32 | ||||
"${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib "$@" | |||||
"${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib CPPFLAGS="-I${SRCDIR}/win32/gdiplus/include" LIBS="-L${SRCDIR}/win32/gdiplus/lib" "$@" | |||||
make pkglibdir=/lib pkgdatadir=/data bindir=/bin | make pkglibdir=/lib pkgdatadir=/data bindir=/bin | ||||
# Install into our private directory | # Install into our private directory | ||||
make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/ | make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/ | ||||
@@ -20,6 +20,8 @@ AC_SUBST(LT_VERSION) | |||||
AM_PROG_CC_C_O | AM_PROG_CC_C_O | ||||
AC_PROG_CPP | AC_PROG_CPP | ||||
AC_PROG_CXX | |||||
AC_PROG_CXXCPP | |||||
AC_PROG_OBJC | AC_PROG_OBJC | ||||
_AM_DEPENDENCIES([OBJC]) | _AM_DEPENDENCIES([OBJC]) | ||||
OBJC="${CC}" | OBJC="${CC}" | ||||
@@ -148,7 +150,19 @@ if test "${ac_cv_my_have_gdi}" != "no"; then | |||||
AC_DEFINE(USE_GDI, 1, Define to 1 to use GDI) | AC_DEFINE(USE_GDI, 1, Define to 1 to use GDI) | ||||
fi | fi | ||||
AM_CONDITIONAL(USE_GDI, test "${ac_cv_my_have_gdi}" = "yes") | AM_CONDITIONAL(USE_GDI, test "${ac_cv_my_have_gdi}" = "yes") | ||||
AM_CONDITIONAL(USE_GDIPLUS, test "${ac_cv_my_have_gdi}" = "yes") | |||||
# Use Windows GDI+? | |||||
ac_cv_my_have_gdiplus="no" | |||||
AC_LANG_PUSH(C++) | |||||
AC_CHECK_HEADERS(Gdiplus.h, | |||||
[ac_cv_my_have_gdiplus="yes"], | |||||
[ac_cv_my_have_gdiplus="no"], | |||||
[#include <windows.h>]) | |||||
AC_LANG_POP(C++) | |||||
if test "${ac_cv_my_have_gdiplus}" != "no"; then | |||||
AC_DEFINE(USE_GDIPLUS, 1, Define to 1 to use GDI+) | |||||
fi | |||||
AM_CONDITIONAL(USE_GDIPLUS, test "${ac_cv_my_have_gdiplus}" = "yes") | |||||
# Use Cocoa? | # Use Cocoa? | ||||
ac_cv_my_have_cocoa="no" | ac_cv_my_have_cocoa="no" | ||||
@@ -26,11 +26,14 @@ | |||||
#include <Gdiplus.h> | #include <Gdiplus.h> | ||||
extern "C" { | |||||
#include "pipi.h" | #include "pipi.h" | ||||
#include "pipi_internals.h" | #include "pipi_internals.h" | ||||
} | |||||
extern "C" pipi_image_t *pipi_load_gdiplus(const char *name) | extern "C" pipi_image_t *pipi_load_gdiplus(const char *name) | ||||
{ | { | ||||
#if 0 | |||||
size_t len; | size_t len; | ||||
len = mbstowcs(NULL, name, 0); | len = mbstowcs(NULL, name, 0); | ||||
wchar_t *wname = new wchar_t[len + 1]; | wchar_t *wname = new wchar_t[len + 1]; | ||||
@@ -75,10 +78,13 @@ extern "C" pipi_image_t *pipi_load_gdiplus(const char *name) | |||||
img->u8 = 1; | img->u8 = 1; | ||||
return img; | return img; | ||||
#endif | |||||
return NULL; | |||||
} | } | ||||
extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name) | extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name) | ||||
{ | { | ||||
#if 0 | |||||
wchar_t const *fmt; | wchar_t const *fmt; | ||||
if(strstr(name, ".gif")) | if(strstr(name, ".gif")) | ||||
fmt = L"image/gif"; | fmt = L"image/gif"; | ||||
@@ -148,6 +154,7 @@ extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name) | |||||
delete[] wname; | delete[] wname; | ||||
delete b; | delete b; | ||||
#endif | |||||
return 0; | return 0; | ||||
} | } | ||||
@@ -82,6 +82,11 @@ pipi_image_t *pipi_load_sdl(const char *name); | |||||
int pipi_save_sdl(pipi_image_t *img, const char *name); | int pipi_save_sdl(pipi_image_t *img, const char *name); | ||||
#endif | #endif | ||||
#ifdef USE_GDIPLUS | |||||
pipi_image_t *pipi_load_gdiplus(const char *name); | |||||
int pipi_save_gdiplus(pipi_image_t *img, const char *name); | |||||
#endif | |||||
#ifdef USE_GDI | #ifdef USE_GDI | ||||
pipi_image_t *pipi_load_gdi(const char *name); | pipi_image_t *pipi_load_gdi(const char *name); | ||||
int pipi_save_gdi(pipi_image_t *img, const char *name); | int pipi_save_gdi(pipi_image_t *img, const char *name); | ||||
@@ -530,7 +530,7 @@ enum ObjectType | |||||
inline BOOL | inline BOOL | ||||
ObjectTypeIsValid( | ObjectTypeIsValid( | ||||
ObjectType type | |||||
enum ObjectType type | |||||
) | ) | ||||
{ | { | ||||
return ((type >= ObjectTypeMin) && (type <= ObjectTypeMax)); | return ((type >= ObjectTypeMin) && (type <= ObjectTypeMax)); | ||||
@@ -32,7 +32,7 @@ extern "C" { | |||||
VOID | VOID | ||||
WINGDIPAPI | WINGDIPAPI | ||||
GdipDisplayPaletteWindowNotify(WindowNotifyEnum notify); | |||||
GdipDisplayPaletteWindowNotify(enum WindowNotifyEnum notify); | |||||
#endif | #endif | ||||