Fix building when wxWidgets has TIFF support disabled

This was SVN commit r8026.
This commit is contained in:
Ykkrosh 2010-08-22 18:06:46 +00:00
parent 0e2dd1671c
commit ac9340584c
3 changed files with 7 additions and 0 deletions

View File

@ -572,10 +572,12 @@ bool wxjs::gui::InitClass(JSContext *cx, JSObject *global)
if (! obj )
return false;
#if wxUSE_LIBTIFF
obj = TIFFHandler::JSInit(cx, global, ImageHandler::GetClassPrototype());
wxASSERT_MSG(obj != NULL, wxT("wxTIFFHandler prototype creation failed"));
if (! obj )
return false;
#endif
obj = XPMHandler::JSInit(cx, global, ImageHandler::GetClassPrototype());
wxASSERT_MSG(obj != NULL, wxT("wxXPMHandler prototype creation failed"));

View File

@ -143,11 +143,13 @@ namespace wxjs
static ImageHandlerPrivate* Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, bool constructing);
};
#if wxUSE_LIBTIFF
class TIFFHandler : public ApiWrapper<TIFFHandler, ImageHandlerPrivate>
{
public:
static ImageHandlerPrivate* Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, bool constructing);
};
#endif
class XPMHandler : public ApiWrapper<XPMHandler, ImageHandlerPrivate>
{

View File

@ -38,6 +38,8 @@
using namespace wxjs;
using namespace wxjs::gui;
#if wxUSE_LIBTIFF
/***
* <file>misc/tiffhdlr</file>
* <module>gui</module>
@ -52,3 +54,4 @@ ImageHandlerPrivate* TIFFHandler::Construct(JSContext *cx, JSObject *obj, uintN
return new ImageHandlerPrivate(new wxTIFFHandler(), true);
};
#endif // wxUSE_LIBTIFF