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. More... | |
static synchronized native void | createApplication () throws IllegalThreadStateException |
Creates and initializes native Kanzi application. More... | |
static synchronized native void | destroyApplication () |
Destroys the running native Kanzi application. More... | |
static native void | focusEvent (boolean focusState) |
Updates the focus state of the output View to the native Kanzi application. More... | |
static native void | haltApplication () |
Halts the running native Kanzi application. More... | |
static native void | keyEvent (int buttonCode, int keyState, int modifiers, int repeatCount) |
Passes a key event to the native Kanzi application. More... | |
static native void | orientateEvent (int orientation) |
Updates the new orientation of the output surface to the native Kanzi application. More... | |
static native void | resizeEvent (int width, int height) |
After resize, updates the new dimensions of the output surface to the native Kanzi application. More... | |
static synchronized native void | runApplication (Object surface) throws IllegalThreadStateException |
Starts running the native Kanzi application. More... | |
static native int | submitTask (Object runnable) |
Submits a runnable task to Kanzi task dispatcher. More... | |
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. More... | |
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. More... | |
static native void | updateContextReference (Object context) |
Updates the native side references to current Context. More... | |
static native void | updateViewReference (Object kanziView) |
Updates the native side references to the Kanzi UI view. More... | |
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 |
|
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 KanziView calls this method internally.
buttonCode | A key code that represents the button pressed from android.view.KeyEvent. |
keyState | KanziNativeLibrary#KEY_STATE_PRESSED or KanziNativeLibrary#KEY_STATE_RELEASED. |
modifiers | Modifier key states from android.view.KeyEvent#getMetaState(). |
repeatCount | The key repeat count when keyState is KanziNativeLibrary#KEY_STATE_PRESSED. |
|
static |
Updates the new orientation of the output surface to the native Kanzi application.
The SurfaceHolder callback of KanziView calls this method internally.
orientation | KanziNativeLibrary#SCREEN_ORIENTATION_LANDSCAPE or KanziNativeLibrary#SCREEN_ORIENTATION_PORTRAIT. |
|
static |
After resize, updates the new dimensions of the output surface to the native Kanzi application.
The SurfaceHolder callback of 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). 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 | KanziNativeLibrary#TOUCH_POINT_STATE_PRESSED, KanziNativeLibrary#TOUCH_POINT_STATE_STATIONARY, KanziNativeLibrary#TOUCH_POINT_STATE_MOVED or 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.
KanziView calls this method internally.
touchState | KanziNativeLibrary#TOUCH_STATE_BEGIN, KanziNativeLibrary#TOUCH_STATE_UPDATE or 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. |