mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-11 12:50:36 +01:00
f5c6d3e945
find -type f | # list all regular files grep -E '\.(h|cpp|mm)$' | # filter for source files grep -v '/mt_' | # filter out generated files grep -v '/vendor/' | # and vendored GL grep -v '/test/image_loader_test.cpp' | # and this file (has giant literals arrays) xargs -n 1 -P $(nproc) clang-format -i # reformat everything Co-authored-by: numzero <numzer0@yandex.ru>
36 lines
848 B
C++
36 lines
848 B
C++
// This file is part of the "Irrlicht Engine".
|
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
|
|
#pragma once
|
|
|
|
#include <jni.h>
|
|
|
|
struct android_app;
|
|
|
|
namespace irr
|
|
{
|
|
namespace jni
|
|
{
|
|
|
|
//! Minimal JNI wrapper class around android.view.KeyEvent
|
|
//! NOTE: Only functions we actually use in the engine are wrapped
|
|
//! This is currently not written to support multithreading - meaning threads are not attached/detached to the Java VM (to be discussed)
|
|
class CKeyEventWrapper
|
|
{
|
|
public:
|
|
CKeyEventWrapper(JNIEnv *jniEnv, int action, int code);
|
|
~CKeyEventWrapper();
|
|
|
|
int getUnicodeChar(int metaState);
|
|
|
|
private:
|
|
static jclass Class_KeyEvent;
|
|
static jmethodID Method_getUnicodeChar;
|
|
static jmethodID Method_constructor;
|
|
JNIEnv *JniEnv;
|
|
jobject JniKeyEvent; // this object in java
|
|
};
|
|
|
|
} // namespace jni
|
|
} // namespace irr
|