diff options
Diffstat (limited to 'make/config/nativewindow')
-rw-r--r-- | make/config/nativewindow/x11-CustomJavaCode.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/make/config/nativewindow/x11-CustomJavaCode.java b/make/config/nativewindow/x11-CustomJavaCode.java index 4240c5e2f..d1e011184 100644 --- a/make/config/nativewindow/x11-CustomJavaCode.java +++ b/make/config/nativewindow/x11-CustomJavaCode.java @@ -1,4 +1,19 @@ + /** Interface to C language function: <br> <code> XRenderPictFormat * XRenderFindVisualFormat(Display * dpy, const Visual * visual); </code> */ + public static boolean XRenderFindVisualFormat(long dpy, long visual, XRenderPictFormat dest) { + if( dest == null ) { + throw new RuntimeException("dest is null"); + } + final ByteBuffer destBuffer = dest.getBuffer(); + if( !Buffers.isDirect(destBuffer) ) { + throw new RuntimeException("dest buffer is not direct"); + } + return XRenderFindVisualFormat1(dpy, visual, destBuffer); + } + /** Entry point to C language function: <code> XVisualInfo * XGetVisualInfo(Display * , long, XVisualInfo * , int * ); </code> */ + private static native boolean XRenderFindVisualFormat1(long dpy, long visual, ByteBuffer xRenderPictFormat); + + /** Interface to C language function: <br> <code> XVisualInfo * XGetVisualInfo(Display * , long, XVisualInfo * , int * ); </code> */ public static XVisualInfo[] XGetVisualInfo(long arg0, long arg1, XVisualInfo arg2, int[] arg3, int arg3_offset) { |