From 880653d31a8f1ff8384fdbc75b84934bceecfdb8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 18 Nov 2000 06:43:49 +0000 Subject: Initial revision --- gl4java/system/GljMSJDirect.java | 77 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 gl4java/system/GljMSJDirect.java (limited to 'gl4java/system/GljMSJDirect.java') diff --git a/gl4java/system/GljMSJDirect.java b/gl4java/system/GljMSJDirect.java new file mode 100644 index 0000000..125d5c0 --- /dev/null +++ b/gl4java/system/GljMSJDirect.java @@ -0,0 +1,77 @@ +/** + * @(#) GljMSJDirect.java + */ + + +package gl4java.system; + +/** + * The base toolkit class for MS-JVM JDirect calls ! + * + * The methods in this class are used by gl4java.GLContext ! + * Because this class MUST compiled with the MS-JVM Java Compiler + * I have decided to put it out of gl4java.GLContext, + * although this can be a security hole ... + * But we must be able to use GL4Java without MS-JVM bytecode. + * + * The Tag @security(checkDllCalls=off) makes us able to + * use these methods outside of these class, + * without a security check all the time. + * The security check is performed at link-time ! + * + * This is the same for gl4java.GLUFuncMSJDirect + * and gl4java.GLFuncMSJDirect ! + * + * @see gl4java.GLContext + * @version 1.00 + * @author Ron Cemer, Sven Goethel + * + */ + +/** @security(checkDllCalls=off) */ +public class GljMSJDirect extends Object +{ + + /* JDirect DLL functions */ + + public static final void OGLWindowMsgPump() + { OGLWindowMsgPumpJDirect(); } + + + /** + * @dll.import("GL4JavaGljMSJDirect") + */ + private static native void OGLWindowMsgPumpJDirect(); + + public static final int createOGLWindowNative(int hwndParent, + int x, int y, + int width, + int height) + { return createOGLWindowNativeJDirect(hwndParent, x,y, width, height); } + + /** + * @dll.import("GL4JavaGljMSJDirect", auto) + */ + private static native int createOGLWindowNativeJDirect(int hwndParent, + int x, int y, + int width, + int height); + + public static final void destroyOGLWindowNative(int hdc) + { destroyOGLWindowNativeJDirect(hdc); } + + /** + * @dll.import("GL4JavaGljMSJDirect") + */ + private static native void destroyOGLWindowNativeJDirect(int hdc); + + public static final void moveOGLWindowNative(int hdc, int x, int y, int width, int height) + { moveOGLWindowNativeJDirect(hdc, x, y, width, height); } + + /** + * @dll.import("GL4JavaGljMSJDirect") + */ + private static native void moveOGLWindowNativeJDirect(int hdc, int x, int y, int width, int height); + +} + -- cgit v1.2.3