Fix building when wxWidgets has TIFF support disabled
This was SVN commit r8026.
This commit is contained in:
parent
0e2dd1671c
commit
ac9340584c
@ -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"));
|
||||
|
@ -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>
|
||||
{
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user