summaryrefslogtreecommitdiffstats
path: root/doc/manual/example7
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-02-26 18:48:26 +0000
committerKenneth Russel <[email protected]>2006-02-26 18:48:26 +0000
commit0192562ce71078ce91cf02458ee92bc4603dc8ad (patch)
tree020dbae88647ea50021739a69b82a6c27e517129 /doc/manual/example7
parente24dc9a626d1548f67dc79b8f73c519c392bda33 (diff)
Added XGetVisualInfo and glXChooseFBConfig examples from JOGL.
Intended initial set of configuration file examples is now complete. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@19 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'doc/manual/example7')
-rw-r--r--doc/manual/example7/function.cfg15
-rw-r--r--doc/manual/example7/function.h5
-rw-r--r--doc/manual/example7/gen.sh17
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