Ocean
jni/GLView.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_PLATFORM_ANDROID_APPLICATION_JNI_GL_VIEW_H
9 #define META_OCEAN_PLATFORM_ANDROID_APPLICATION_JNI_GL_VIEW_H
10 
12 
13 #include <jni.h>
14 
15 /**
16  * Java native interface function to initialize the application view.
17  * @param env JNI environment
18  * @param javaThis JNI object
19  * @return True, if succeeded
20  * @ingroup platformandroidapplicationjni
21  */
22 extern "C" jboolean Java_com_meta_ocean_platform_android_application_GLView_initialize(JNIEnv* env, jobject javaThis);
23 
24 /**
25  * Java native interface function to release the application view.
26  * @param env JNI environment
27  * @param javaThis JNI object
28  * @return True, if succeeded
29  * @ingroup platformandroidapplicationjni
30  */
31 extern "C" jboolean Java_com_meta_ocean_platform_android_application_GLView_release(JNIEnv* env, jobject javaThis);
32 
33 /**
34  * Java native interface function resizing the framebuffer.
35  * @param env JNI environment
36  * @param javaThis JNI object
37  * @param width Horizontal window size position in pixel
38  * @param height Vertical window size in pixel
39  * @ingroup platformandroidapplicationjni
40  */
41 extern "C" jboolean Java_com_meta_ocean_platform_android_application_GLView_resize(JNIEnv* env, jobject javaThis, jint width, jint height);
42 
43 /**
44  * Java native interface function rendering the next frame.
45  * @param env JNI environment
46  * @param javaThis JNI object
47  * @return True, if succeeded
48  * @ingroup platformandroidapplicationjni
49  */
50 extern "C" jboolean Java_com_meta_ocean_platform_android_application_GLView_render(JNIEnv* env, jobject javaThis);
51 
52 /**
53  * Java native interface function for touch down events.
54  * @param env JNI environment
55  * @param javaThis JNI object
56  * @param x Horizontal touch position in pixel
57  * @param y Vertical touch position in pixel
58  * @ingroup platformandroidapplicationjni
59  */
60 extern "C" void Java_com_meta_ocean_platform_android_application_GLView_onTouchDown(JNIEnv* env, jobject javaThis, jfloat x, jfloat y);
61 
62 /**
63  * Java native interface function for (touch) move events.
64  * @param env JNI environment
65  * @param javaThis JNI object
66  * @param x Horizontal (touch) move position in pixel
67  * @param y Vertical (touch) move position in pixel
68  * @ingroup platformandroidapplicationjni
69  */
70 extern "C" void Java_com_meta_ocean_platform_android_application_GLView_onTouchMove(JNIEnv* env, jobject javaThis, jfloat x, jfloat y);
71 
72 /**
73  * Java native interface function for touch up events.
74  * @param env JNI environment
75  * @param javaThis JNI object
76  * @param x Horizontal touch position in pixel
77  * @param y Vertical touch position in pixel
78  * @ingroup platformandroidapplicationjni
79  */
80 extern "C" void Java_com_meta_ocean_platform_android_application_GLView_onTouchUp(JNIEnv* env, jobject javaThis, jfloat x, jfloat y);
81 
82 /**
83  * Java native interface function for resume events.
84  * @param env JNI environment
85  * @param javaThis JNI object
86  * @ingroup platformandroidapplicationjni
87  */
88 extern "C" void Java_com_meta_ocean_platform_android_application_GLView_onActivityResume(JNIEnv* env, jobject javaThis);
89 
90 /**
91  * Java native interface function for pause events.
92  * @param env JNI environment
93  * @param javaThis JNI object
94  * @ingroup platformandroidapplicationjni
95  */
96 extern "C" void Java_com_meta_ocean_platform_android_application_GLView_onActivityPause(JNIEnv* env, jobject javaThis);
97 
98 /**
99  * Java native interface function for stop events.
100  * @param env JNI environment
101  * @param javaThis JNI object
102  * @ingroup platformandroidapplicationjni
103  */
104 extern "C" void Java_com_meta_ocean_platform_android_application_GLView_onActivityStop(JNIEnv* env, jobject javaThis);
105 
106 /**
107  * Java native interface function for destroy events.
108  * @param env JNI environment
109  * @param javaThis JNI object
110  * @ingroup platformandroidapplicationjni
111  */
113 
114 /**
115  * Java native interface function for permission granted events.
116  * @param env JNI environment
117  * @param javaThis JNI object
118  * @param permission The permission which has been granted
119  * @ingroup platformandroidapplicationjni
120  */
121 extern "C" void Java_com_meta_ocean_platform_android_application_GLView_onPermissionGranted(JNIEnv* env, jobject javaThis, jstring permission);
122 
123 /**
124  * Java native interface function to register the instance function for the corresponding native C++ class.
125  * @param env JNI environment
126  * @param javaThis JNI object
127  * @ingroup platformandroidapplicationjni
128  */
130 
131 #endif // META_OCEAN_PLATFORM_ANDROID_APPLICATION_JNI_GL_VIEW_H
void Java_com_meta_ocean_platform_android_application_GLView_onTouchUp(JNIEnv *env, jobject javaThis, jfloat x, jfloat y)
Java native interface function for touch up events.
jboolean Java_com_meta_ocean_platform_android_application_GLView_resize(JNIEnv *env, jobject javaThis, jint width, jint height)
Java native interface function resizing the framebuffer.
void Java_com_meta_ocean_platform_android_application_GLView_onTouchMove(JNIEnv *env, jobject javaThis, jfloat x, jfloat y)
Java native interface function for (touch) move events.
void Java_com_meta_ocean_platform_android_application_GLView_onActivityPause(JNIEnv *env, jobject javaThis)
Java native interface function for pause events.
void Java_com_meta_ocean_platform_android_application_GLView_onActivityResume(JNIEnv *env, jobject javaThis)
Java native interface function for resume events.
void Java_com_meta_ocean_platform_android_application_GLView_onTouchDown(JNIEnv *env, jobject javaThis, jfloat x, jfloat y)
Java native interface function for touch down events.
jboolean Java_com_meta_ocean_platform_android_application_GLView_release(JNIEnv *env, jobject javaThis)
Java native interface function to release the application view.
void Java_com_meta_ocean_platform_android_application_GLView_onActivityDestroy(JNIEnv *env, jobject javaThis)
Java native interface function for destroy events.
jboolean Java_com_meta_ocean_platform_android_application_GLView_initialize(JNIEnv *env, jobject javaThis)
Java native interface function to initialize the application view.
void Java_com_meta_ocean_platform_android_application_GLView_onPermissionGranted(JNIEnv *env, jobject javaThis, jstring permission)
Java native interface function for permission granted events.
jboolean Java_com_meta_ocean_platform_android_application_GLView_render(JNIEnv *env, jobject javaThis)
Java native interface function rendering the next frame.
void Java_com_meta_ocean_platform_android_application_GLView_registerInstance(JNIEnv *env, jobject javaThis)
Java native interface function to register the instance function for the corresponding native C++ cla...
void Java_com_meta_ocean_platform_android_application_GLView_onActivityStop(JNIEnv *env, jobject javaThis)
Java native interface function for stop events.