orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
orxAndroid.h
Go to the documentation of this file.
1/* Orx - Portable Game Engine
2 *
3 * Copyright (c) 2008- 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
32
40
41
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#define orxEVENT_TYPE_ANDROID (orxEVENT_TYPE)(orxEVENT_TYPE_FIRST_RESERVED + 0)
54
55#include <android/native_window.h>
56
57#define LOOPER_ID_SENSOR LOOPER_ID_USER
58
59#if defined(__cplusplus)
60extern "C"
61{
62#endif
63
80
83typedef struct __orxANDROID_EVENT_PAYLOAD_t
84{
85 union
86 {
87 struct
88 {
89 orxU32 u32KeyCode;
90 } stKey;
91
92 struct
93 {
94 orxU32 u32Width;
95 orxU32 u32Height;
96 } stSurface;
97 };
98
100
105
110
115
120
125
130
134orxSTATUS orxFASTCALL orxAndroid_JNI_SetupThread(void *_pContext);
135
136#if defined(__cplusplus)
137}
138#endif
139
140#endif /* _orxANDROID_H_ */
141
orxSTATUS orxAndroid_RegisterAPKResource()
orxU32 orxAndroid_JNI_GetRotation()
void orxAndroid_PumpEvents()
orxFLOAT orxAndroid_JNI_GetPhysicalFrameRate()
orxANDROID_EVENT
Definition orxAndroid.h:67
orxSTATUS orxFASTCALL orxAndroid_JNI_SetupThread(void *_pContext)
const char * orxAndroid_GetInternalStoragePath()
ANativeWindow * orxAndroid_GetNativeWindow()
@ orxANDROID_EVENT_SURFACE_CHANGE
Definition orxAndroid.h:72
@ orxANDROID_EVENT_NUMBER
Definition orxAndroid.h:75
@ orxANDROID_EVENT_ACCELERATE
Definition orxAndroid.h:73
@ orxANDROID_EVENT_KEY_UP
Definition orxAndroid.h:69
@ orxANDROID_EVENT_SURFACE_DESTROY
Definition orxAndroid.h:71
@ orxANDROID_EVENT_NONE
Definition orxAndroid.h:77
@ orxANDROID_EVENT_KEY_DOWN
Definition orxAndroid.h:68
@ orxANDROID_EVENT_SURFACE_CREATE
Definition orxAndroid.h:70
orxSTATUS
Definition orxType.h:270

Generated for orx by doxygen 1.8.11