orx  1.14
Portable Game Engine
orxAndroid.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2022 Orx-Project
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  *
18  * 2. Altered source versions must be plainly marked as such, and must not be
19  * misrepresented as being the original software.
20  *
21  * 3. This notice may not be removed or altered from any source
22  * distribution.
23  */
24 
42 #ifndef _orxANDROID_H_
43 #define _orxANDROID_H_
44 
45 #include <jni.h>
46 #include <pthread.h>
47 #include <stdlib.h>
48 
49 #define KZ_CONFIG_ANDROID "Android"
50 #define KZ_CONFIG_SURFACE_SCALE "SurfaceScale"
51 #define KZ_CONFIG_ACCELEROMETER_FREQUENCY "AccelerometerFrequency"
52 
53 #include <android/native_window.h>
54 
55 #define LOOPER_ID_SENSOR LOOPER_ID_USER
56 
57 #if defined(__cplusplus)
58 extern "C"
59 {
60 #endif
61 
62 typedef struct __orxANDROID_KEY_EVENT_t {
63  orxU32 u32Action;
64  orxU32 u32KeyCode;
65 
67 
68 typedef struct __orxANDROID_SURFACE_CHANGED_EVENT_t {
69  orxU32 u32Width;
70  orxU32 u32Height;
71 
73 
77 ANativeWindow *orxAndroid_GetNativeWindow();
78 
83 
88 
93 
98 
102 orxSTATUS orxFASTCALL orxAndroid_JNI_SetupThread(void *_pContext);
103 
104 #if defined(__cplusplus)
105 }
106 #endif
107 
108 #define orxANDROID_EVENT_TYPE_KEYBOARD (orxEVENT_TYPE)(orxEVENT_TYPE_FIRST_RESERVED + 0)
109 #define orxANDROID_EVENT_KEYBOARD_DOWN 0
110 #define orxANDROID_EVENT_KEYBOARD_UP 1
111 
112 #define orxANDROID_EVENT_TYPE_SURFACE (orxEVENT_TYPE)(orxEVENT_TYPE_FIRST_RESERVED + 1)
113 #define orxANDROID_EVENT_SURFACE_DESTROYED 0
114 #define orxANDROID_EVENT_SURFACE_CREATED 1
115 #define orxANDROID_EVENT_SURFACE_CHANGED 2
116 
117 #define orxANDROID_EVENT_TYPE_ACCELERATE (orxEVENT_TYPE)(orxEVENT_TYPE_FIRST_RESERVED + 2)
118 
119 #endif /* _orxANDROID_H_ */
120 
orxSTATUS orxFASTCALL orxAndroid_JNI_SetupThread(void *_pContext)
orxU32 orxAndroid_JNI_GetRotation()
ANativeWindow * orxAndroid_GetNativeWindow()
void orxAndroid_PumpEvents()
const char * orxAndroid_GetInternalStoragePath()
orxSTATUS
Definition: orxType.h:256
orxSTATUS orxAndroid_RegisterAPKResource()

Generated for orx by doxygen 1.8.11