diff options
author | Sven Gothel <[email protected]> | 2010-05-04 06:35:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-05-04 06:35:37 +0200 |
commit | 9e792dcef900de7039cd277459c0629abfab9f21 (patch) | |
tree | 81adfd1e07e2118675d62836e1289225f408bb00 /src/newt/native/NewtCommon.c | |
parent | a677e9db03ea44ea353fb9de61e2a86a6e063d0f (diff) |
NEWT Fixes:
- Common native in NewtCommon.c/.h
- Add simple NEWTEventFiFo, providing a pattern
to spool events by an EventListener and to process them
where it impacts (GLEventListener ..)
- Window [X11|Windows]: setSize/setPosition:
- always store the values,
- only act if valid and !fullscreen
- Window [X11]:
- Add requestFocus
- Add setTitle
- Fix parent/child window creation
- Fix parent/child window fullscreen (reparenting)
- JUnit Test: ParentTest:
- Shows parent and client window animation
- Client window shall be able to go into fullscreen,
ie disconnect/reconnect from its parent.
Test: Focus-client + type-'f'
- Both windows receive/dispatch events properly
Diffstat (limited to 'src/newt/native/NewtCommon.c')
-rw-r--r-- | src/newt/native/NewtCommon.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/newt/native/NewtCommon.c b/src/newt/native/NewtCommon.c new file mode 100644 index 000000000..8b64ec37f --- /dev/null +++ b/src/newt/native/NewtCommon.c @@ -0,0 +1,13 @@ + +#include "NewtCommon.h" + +jchar* NewtCommon_GetNullTerminatedStringChars(JNIEnv* env, jstring str) +{ + jchar* strChars = NULL; + strChars = calloc((*env)->GetStringLength(env, str) + 1, sizeof(jchar)); + if (strChars != NULL) { + (*env)->GetStringRegion(env, str, 0, (*env)->GetStringLength(env, str), strChars); + } + return strChars; +} + |