diff options
Diffstat (limited to 'doc/manual/example7')
-rw-r--r-- | doc/manual/example7/function.cfg | 15 | ||||
-rw-r--r-- | doc/manual/example7/function.h | 5 | ||||
-rw-r--r-- | doc/manual/example7/gen.sh | 17 |
3 files changed, 37 insertions, 0 deletions
diff --git a/doc/manual/example7/function.cfg b/doc/manual/example7/function.cfg new file mode 100644 index 0000000..2ac8560 --- /dev/null +++ b/doc/manual/example7/function.cfg @@ -0,0 +1,15 @@ +Package testfunction +Style AllStatic +JavaClass TestFunction +JavaOutputDir gensrc/java +NativeOutputDir gensrc/native + +TemporaryCVariableDeclaration glXChooseFBConfig int count; +TemporaryCVariableAssignment glXChooseFBConfig count = _ptr3[0]; +ReturnValueLength glXChooseFBConfig count + +# We don't need the Display data structure to be explicitly exposed +Opaque long Display * +# Ignore the empty Display data structure (though made opaque, the +# reference from glxChooseFBConfig is still traversed) +Ignore Display diff --git a/doc/manual/example7/function.h b/doc/manual/example7/function.h new file mode 100644 index 0000000..2882d2a --- /dev/null +++ b/doc/manual/example7/function.h @@ -0,0 +1,5 @@ +typedef struct {} Display; +typedef struct __GLXFBConfigRec *GLXFBConfig; + +GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen, + const int *attribList, int *nitems ); diff --git a/doc/manual/example7/gen.sh b/doc/manual/example7/gen.sh new file mode 100644 index 0000000..6fb971e --- /dev/null +++ b/doc/manual/example7/gen.sh @@ -0,0 +1,17 @@ +#!/bin/ksh + +JAVA=java +GLUEGEN_JAR=../../../build/gluegen.jar +ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar + +NAME=`uname` + +if [ $NAME="Windows*" ] ; then + SEP=\; +elif [ $NAME="CYGWIN*" ] ; then + SEP=\; +else + SEP=: +fi + +java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h |