diff options
author | Kenneth Russel <[email protected]> | 2006-02-26 18:48:26 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-02-26 18:48:26 +0000 |
commit | 0192562ce71078ce91cf02458ee92bc4603dc8ad (patch) | |
tree | 020dbae88647ea50021739a69b82a6c27e517129 /doc/manual/example6/function.cfg | |
parent | e24dc9a626d1548f67dc79b8f73c519c392bda33 (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/example6/function.cfg')
-rw-r--r-- | doc/manual/example6/function.cfg | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/manual/example6/function.cfg b/doc/manual/example6/function.cfg new file mode 100644 index 0000000..c94e856 --- /dev/null +++ b/doc/manual/example6/function.cfg @@ -0,0 +1,25 @@ +Package testfunction +Style AllStatic +JavaClass TestFunction +JavaOutputDir gensrc/java +NativeOutputDir gensrc/native + +# Get returned array's capacity from XGetVisualInfo to be correct +TemporaryCVariableDeclaration XGetVisualInfo int count; +TemporaryCVariableAssignment XGetVisualInfo count = _ptr3[0]; +ReturnValueCapacity XGetVisualInfo count * sizeof(XVisualInfo) + +# Helper routine to make the ReturnedArrayLength expression below work correctly +CustomJavaCode TestFunction private static int getFirstElement(IntBuffer buf) { return buf.get(buf.position()); } +CustomJavaCode TestFunction private static int getFirstElement(int[] arr, int offset) { return arr[offset]; } +ReturnedArrayLength XGetVisualInfo getFirstElement({3}) + +# We don't need the Display and Visual data structures to be +# explicitly exposed +Opaque long Display * +Opaque long Visual * +# Ignore the empty Display and Visual data structures (though made +# opaque, the references from XVisualInfo and elsewhere are still +# traversed) +Ignore Display +Ignore Visual |