it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+#include <stdlib.h>
#include <jni.h>
#include <jawt.h>
#include <jawt_md.h>
static JAWT_DrawingSurface* (JNICALL _Jv_GetDrawingSurface) (JNIEnv* env,
jobject canvas);
static void (JNICALL _Jv_FreeDrawingSurface) (JAWT_DrawingSurface* surface);
+static void (JNICALL _Jv_AWTLock) (JNIEnv*);
+static void (JNICALL _Jv_AWTUnlock) (JNIEnv*);
JNIEXPORT jboolean JNICALL
JAWT_GetAWT (JNIEnv* env, JAWT* awt)
awt->GetDrawingSurface = _Jv_GetDrawingSurface;
awt->FreeDrawingSurface = _Jv_FreeDrawingSurface;
+ awt->Lock = _Jv_AWTLock;
+ awt->Unlock = _Jv_AWTUnlock;
return JNI_TRUE;
}
surface_info_x11->display = NULL;
surface_info_x11->drawable = 0;
+ surface_info_x11->visualID = 0;
free (surface_info);
surface_info = NULL;
surface_info_x11->display = classpath_jawt_get_default_display (env, canvas);
surface_info_x11->drawable = classpath_jawt_get_drawable (env, canvas);
+ surface_info_x11->visualID = classpath_jawt_get_visualID (env, canvas);
/* FIXME: also include bounding rectangle of drawing surface */
/* FIXME: also include current clipping region */
{
free (surface);
}
+
+static void
+(JNICALL _Jv_AWTLock) (JNIEnv* env)
+{
+ classpath_jawt_lock ();
+}
+
+static void
+(JNICALL _Jv_AWTUnlock) (JNIEnv* env)
+{
+ classpath_jawt_unlock ();
+}
+