aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native/KDWindow.c
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-09-27 12:20:38 +0200
committerSven Gothel <[email protected]>2011-09-27 12:20:38 +0200
commit472a9c60b5599bb01883c628339ab29628511ed5 (patch)
tree3431c8bc9da58f7e371b18657d0db99422e96245 /src/newt/native/KDWindow.c
parentdf85f0dfafc09e147f9d422adf5ee8eabf67977b (diff)
NEWT: Adapt to GlueGen's Lock ChangeSet, all java callbacks for native have 'defer' 1st argument
- Adapt to GlueGen's Lock ChangeSet: e4baba27507ce78e64a150ec6f69fb96f5721a34 - All java callbacks for native have 'defer' 1st argument. This allows enqueuing resulting events to the EDT if required, ie. the native thread may not be 'compatible' (MacOSX). - MacOSX-Native: enqueue key/mouse events and defer:=true for all java callbacks Since we are comming from a 3rd-party thread (AWT/NSApp-MainThread) we shall not abuse it.
Diffstat (limited to 'src/newt/native/KDWindow.c')
-rw-r--r--src/newt/native/KDWindow.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/newt/native/KDWindow.c b/src/newt/native/KDWindow.c
index 21ad312d0..5f1affed1 100644
--- a/src/newt/native/KDWindow.c
+++ b/src/newt/native/KDWindow.c
@@ -127,7 +127,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDDisplay_DispatchMessages
KDint32 v[2];
if(!kdGetWindowPropertyiv(kdWindow, KD_WINDOWPROPERTY_SIZE, v)) {
DBG_PRINT( "event window size change : src: %p %dx%d\n", userData, v[0], v[1]);
- (*env)->CallVoidMethod(env, javaWindow, sizeChangedID, (jint) v[0], (jint) v[1], JNI_FALSE);
+ (*env)->CallVoidMethod(env, javaWindow, sizeChangedID, JNI_FALSE, (jint) v[0], (jint) v[1], JNI_FALSE);
} else {
DBG_PRINT( "event window size change error: src: %p %dx%d\n", userData, v[0], v[1]);
}
@@ -141,7 +141,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDDisplay_DispatchMessages
KDboolean visible;
kdGetWindowPropertybv(kdWindow, KD_WINDOWPROPERTY_VISIBILITY, &visible);
DBG_PRINT( "event window visibility: src: %p, v:%d\n", userData, visible);
- (*env)->CallVoidMethod(env, javaWindow, visibleChangedID, visible?JNI_TRUE:JNI_FALSE);
+ (*env)->CallVoidMethod(env, javaWindow, visibleChangedID, JNI_FALSE, visible?JNI_TRUE:JNI_FALSE);
}
break;
default:
@@ -187,8 +187,8 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_kd_KDWindow_initIDs
#endif
#endif
windowCreatedID = (*env)->GetMethodID(env, clazz, "windowCreated", "(J)V");
- sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(IIZ)V");
- visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(Z)V");
+ sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(ZIIZ)V");
+ visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(ZZ)V");
windowDestroyNotifyID = (*env)->GetMethodID(env, clazz, "windowDestroyNotify", "()V");
sendMouseEventID = (*env)->GetMethodID(env, clazz, "sendMouseEvent", "(IIIIII)V");
sendKeyEventID = (*env)->GetMethodID(env, clazz, "sendKeyEvent", "(IIIC)V");
@@ -287,7 +287,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDWindow_setVisible0
KDboolean v = (visible==JNI_TRUE)?KD_TRUE:KD_FALSE;
kdSetWindowPropertybv(w, KD_WINDOWPROPERTY_VISIBILITY, &v);
DBG_PRINT( "[setVisible] v=%d\n", visible);
- (*env)->CallVoidMethod(env, obj, visibleChangedID, visible); // FIXME: or send via event ?
+ (*env)->CallVoidMethod(env, obj, visibleChangedID, JNI_FALSE, visible); // FIXME: or defer=true ?
}
JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDWindow_setFullScreen0
@@ -317,6 +317,6 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDWindow_setSize0
DBG_PRINT( "[setSize] v=%dx%d, res=%d\n", width, height, res);
(void)res;
- (*env)->CallVoidMethod(env, obj, sizeChangedID, (jint) width, (jint) height, JNI_FALSE);
+ (*env)->CallVoidMethod(env, obj, sizeChangedID, JNI_FALSE, (jint) width, (jint) height, JNI_FALSE);
}