stuff
This commit is contained in:
parent
fd3644c340
commit
95e5712510
@ -1,5 +1,6 @@
|
|||||||
12/12/07 started 7.13.3
|
12/12/07 started 7.13.3
|
||||||
- added "include <cstring>" to VImage.cc to help gcc 4.3
|
- added "include <cstring>" to VImage.cc to help gcc 4.3
|
||||||
|
- started moving the python binding to dynamic wrapping
|
||||||
|
|
||||||
31/10/07 started 7.13.2
|
31/10/07 started 7.13.2
|
||||||
- build cimg on windows fixes
|
- build cimg on windows fixes
|
||||||
|
@ -238,9 +238,13 @@ public:
|
|||||||
void initdesc( int, int, int, TBandFmt, TCoding, TType,
|
void initdesc( int, int, int, TBandFmt, TCoding, TType,
|
||||||
float = 1.0, float = 1.0, int = 0, int = 0 ) throw( VError );
|
float = 1.0, float = 1.0, int = 0, int = 0 ) throw( VError );
|
||||||
|
|
||||||
|
/* Bindings wrap databased operations at runtime using reflection.
|
||||||
|
*/
|
||||||
|
#ifndef SWIG
|
||||||
/* Insert automatically generated headers.
|
/* Insert automatically generated headers.
|
||||||
*/
|
*/
|
||||||
#include "vipsc++.h"
|
#include "vipsc++.h"
|
||||||
|
#endif /*SWIG*/
|
||||||
|
|
||||||
/* No point getting SWIG to wrap these ... we do this by hand later so we can
|
/* No point getting SWIG to wrap these ... we do this by hand later so we can
|
||||||
* handle things like "a + 12" correctly.
|
* handle things like "a + 12" correctly.
|
||||||
@ -389,7 +393,7 @@ public:
|
|||||||
|
|
||||||
VIPS_NAMESPACE_END
|
VIPS_NAMESPACE_END
|
||||||
|
|
||||||
// Other VIPS protos
|
// Other VIPS protos we need
|
||||||
extern "C" {
|
extern "C" {
|
||||||
extern int im_init_world( const char *argv0 );
|
extern int im_init_world( const char *argv0 );
|
||||||
extern void im__print_all();
|
extern void im__print_all();
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
INCLUDES = -I${top_srcdir}/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ @PYTHON_INCLUDES@
|
INCLUDES = -I${top_srcdir}/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ @PYTHON_INCLUDES@
|
||||||
|
|
||||||
# we install to a directory inside the python area, since we are a module
|
# we install to a directory inside the python area, since we are a module
|
||||||
@ -5,18 +7,15 @@ vipsccdir = $(pyexecdir)/vipsCC
|
|||||||
|
|
||||||
vipscc_PYTHON = VImage.py VDisplay.py VError.py VMask.py __init__.py
|
vipscc_PYTHON = VImage.py VDisplay.py VError.py VMask.py __init__.py
|
||||||
|
|
||||||
# need an expanded VImage.h ... SWIG's preprocessor b0rks on includes inside
|
# I tried making a suffix rule for this (and defining SUFFIXES) but I couldn;t
|
||||||
# class definitions
|
# get it to work, how annoying
|
||||||
|
# FIXME at some point
|
||||||
vimagemodule.cxx: VImage.i
|
vimagemodule.cxx: VImage.i
|
||||||
cpp -DSWIG -E $(top_srcdir)/include/vips/VImage.h > VImage.h
|
|
||||||
swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/include -o $@ $<
|
swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/include -o $@ $<
|
||||||
|
|
||||||
vdisplaymodule.cxx: VDisplay.i
|
vdisplaymodule.cxx: VDisplay.i
|
||||||
swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/include -o $@ $<
|
swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/include -o $@ $<
|
||||||
|
|
||||||
verrormodule.cxx: VError.i
|
verrormodule.cxx: VError.i
|
||||||
swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/include -o $@ $<
|
swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/include -o $@ $<
|
||||||
|
|
||||||
vmaskmodule.cxx: VMask.i
|
vmaskmodule.cxx: VMask.i
|
||||||
swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/include -o $@ $<
|
swig -python -c++ -interface $(@:.cxx=) -I$(top_srcdir)/include -o $@ $<
|
||||||
|
|
||||||
@ -39,7 +38,7 @@ vmaskmodule_la_LIBADD = ../../libsrcCC/libvipsCC.la $(VIPS_LIBS)
|
|||||||
nodist_vmaskmodule_la_SOURCES = vmaskmodule.cxx
|
nodist_vmaskmodule_la_SOURCES = vmaskmodule.cxx
|
||||||
|
|
||||||
CLEANFILES = \
|
CLEANFILES = \
|
||||||
vimagemodule.cxx VImage.h \
|
vimagemodule.cxx \
|
||||||
verrormodule.cxx vdisplaymodule.cxx vmaskmodule.cxx \
|
verrormodule.cxx vdisplaymodule.cxx vmaskmodule.cxx \
|
||||||
VImage.py VDisplay.py VError.py VMask.py
|
VImage.py VDisplay.py VError.py VMask.py
|
||||||
|
|
||||||
|
@ -13,6 +13,13 @@
|
|||||||
*/
|
*/
|
||||||
%rename(__assign__) vips::VImage::operator=;
|
%rename(__assign__) vips::VImage::operator=;
|
||||||
|
|
||||||
|
/* We wrap the C++ VImage class as VImage_core, then write the user-visible
|
||||||
|
* VImage class ourselves with a %pythoncode (see below). Our hand-made VImage
|
||||||
|
* class wraps all the operators from the VIPS image operation database via
|
||||||
|
* __getattr__.
|
||||||
|
*/
|
||||||
|
%rename(VImage_core) VImage;
|
||||||
|
|
||||||
%include "std_list.i"
|
%include "std_list.i"
|
||||||
%include "std_complex.i"
|
%include "std_complex.i"
|
||||||
%include "std_vector.i"
|
%include "std_vector.i"
|
||||||
@ -31,11 +38,16 @@ namespace std {
|
|||||||
/* VImage defines a lot of other operator overloads ... but SWIGs autowrapping
|
/* VImage defines a lot of other operator overloads ... but SWIGs autowrapping
|
||||||
* doesn't work well for them. Do by hand later.
|
* doesn't work well for them. Do by hand later.
|
||||||
*/
|
*/
|
||||||
|
%include vips/VImage.h
|
||||||
|
|
||||||
/* Need the expanded VImage.h in this directory. SWIG b0rks on #includes
|
/* Now wrap SWIG's VImage_core with our own VImage class which does operations
|
||||||
* inside class definitions.
|
* from the VIPS operation database.
|
||||||
*/
|
*/
|
||||||
%include VImage.h
|
%pythoncode %{
|
||||||
|
class VImage (VImage_core):
|
||||||
|
def __getattr__ (self, name):
|
||||||
|
print "VImage getattr: ", name
|
||||||
|
%}
|
||||||
|
|
||||||
/* Helper code for vips_init().
|
/* Helper code for vips_init().
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user