Provides control and event injection access to the native Kanzi application. More...
Static Public Member Functions | |
static synchronized native boolean | applicationExists () |
Checks if the native Kanzi application already exists. | |
static synchronized native void | createApplication () throws IllegalThreadStateException |
Creates and initializes native Kanzi application. | |
static synchronized native void | destroyApplication () |
Destroys the running native Kanzi application. | |
static native void | focusEvent (boolean focusState) |
Updates the focus state of the output View to the native Kanzi application. | |
static native void | haltApplication () |
Halts the running native Kanzi application. | |
static native void | keyEvent (int buttonCode, int keyState, int modifiers, int repeatCount) |
Passes a key event to the native Kanzi application. | |
static native void | orientateEvent (int orientation) |
Updates the new orientation of the output surface to the native Kanzi application. | |
static native void | resizeEvent (int width, int height) |
After resize, updates the new dimensions of the output surface to the native Kanzi application. | |
static synchronized native void | runApplication (Object surface) throws IllegalThreadStateException |
Starts running the native Kanzi application. | |
static native int | submitTask (Object runnable) |
Submits a runnable task to Kanzi task dispatcher. | |
static native long | touchEventAddCursor (long touchCursors, int id, int cursorState, float x, float y, float pressure, float area) |
Adds a touch event cursor to the set of touches in the native Kanzi application. | |
static native void | touchEventCommit (int touchState, long touchCursors) |
Commits the active set of cursors in the native Kanzi application and releases the internally allocated list of cursors. | |
static native void | updateContextReference (Object context) |
Updates the native side references to current Context. | |
static native void | updateViewReference (Object kanziView) |
Updates the native side references to the Kanzi UI view. | |
Provides control and event injection access to the native Kanzi application.
|
static |
Checks if the native Kanzi application already exists.
|
static |
Creates and initializes native Kanzi application.
IllegalThreadStateException | if native application already exists. |
|
static |
Destroys the running native Kanzi application.
The application can not be resumed. Use createApplication() to re-create the application.
|
static |
Updates the focus state of the output View to the native Kanzi application.
com.rightware.kanzi.KanziView
calls this method internally.
focusState | If com.rightware.kanzi.KanziView has focus, true, otherwise false. |
|
static |
Halts the running native Kanzi application.
To resume the application, call runApplication().
|
static |
Passes a key event to the native Kanzi application.
The KeyEvent callback of com.rightware.kanzi.KanziView
calls this method internally.
buttonCode | A key code that represents the button pressed from android.view.KeyEvent. |
keyState | com.rightware.kanzi.KanziNativeLibrary#KEY_STATE_PRESSED or com.rightware.kanzi.KanziNativeLibrary#KEY_STATE_RELEASED . |
modifiers | Modifier key states from android.view.KeyEvent::getMetaState(). |
repeatCount | The key repeat count when keyState is com.rightware.kanzi.KanziNativeLibrary#KEY_STATE_PRESSED . |
|
static |
Updates the new orientation of the output surface to the native Kanzi application.
The SurfaceHolder callback of com.rightware.kanzi.KanziView
calls this method internally.
|
static |
After resize, updates the new dimensions of the output surface to the native Kanzi application.
The SurfaceHolder callback of com.rightware.kanzi.KanziView
calls this method internally.
width | Width of the output surface in pixels. |
height | Height of the output surface in pixels. |
|
static |
Starts running the native Kanzi application.
surface | A render surface from KanziView. |
IllegalThreadStateException | if native application is not created or is already running. |
|
static |
Submits a runnable task to Kanzi task dispatcher.
If the task dispatcher is not initialized, this function fails.
runnable | The task to be run. |
|
static |
Adds a touch event cursor to the set of touches in the native Kanzi application.
You must release the returned touchCursors pointer using KanziNativeLibrary#touchEventCommit(int, long)
. com.rightware.kanzi.KanziView
calls this method internally.
touchCursors | A pointer to the list of currently active set of touches. |
id | Cursor ID from android.view.MotionEvent::getPointerId(int). |
cursorState | com.rightware.kanzi.KanziNativeLibrary#TOUCH_POINT_STATE_PRESSED , com.rightware.kanzi.KanziNativeLibrary#TOUCH_POINT_STATE_STATIONARY , com.rightware.kanzi.KanziNativeLibrary#TOUCH_POINT_STATE_MOVED or com.rightware.kanzi.KanziNativeLibrary#TOUCH_POINT_STATE_RELEASED . |
x | X coordinate of the cursor from android.view.MotionEvent::getX(). |
y | Y coordinate of the cursor from android.view.MotionEvent::getY(). |
pressure | Pressure of the cursor from android.view.MotionEvent::getPressure(). |
area | Area of the cursor from }. A pointer to the list of currently active set of touches. |
|
static |
Commits the active set of cursors in the native Kanzi application and releases the internally allocated list of cursors.
com.rightware.kanzi.KanziView
calls this method internally.
touchState | com.rightware.kanzi.KanziNativeLibrary#TOUCH_STATE_BEGIN , com.rightware.kanzi.KanziNativeLibrary#TOUCH_STATE_UPDATE or com.rightware.kanzi.KanziNativeLibrary#TOUCH_STATE_END . |
touchCursors | A pointer to the list of currently active set of touches. |
|
static |
Updates the native side references to current Context.
context | Reference to context. |
|
static |
Updates the native side references to the Kanzi UI view.
kanziView | Reference to output. |