1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "javax_microedition_m3g_World.h" |
|
19 |
|
20 JNIEXPORT void JNICALL Java_javax_microedition_m3g_World__1setBackground |
|
21 (JNIEnv* aEnv, jclass, jint aHandle, jint aHBackground) |
|
22 { |
|
23 M3G_DO_LOCK |
|
24 m3gSetBackground((M3GWorld)aHandle, (M3GBackground)aHBackground); |
|
25 M3G_DO_UNLOCK(aEnv) |
|
26 } |
|
27 |
|
28 JNIEXPORT jint JNICALL Java_javax_microedition_m3g_World__1ctor |
|
29 (JNIEnv* aEnv, jclass, jint aM3g) |
|
30 { |
|
31 M3G_DO_LOCK |
|
32 jint handle = (M3Guint)m3gCreateWorld((M3GInterface)aM3g); |
|
33 M3G_DO_UNLOCK(aEnv) |
|
34 return handle; |
|
35 } |
|
36 |
|
37 JNIEXPORT jint JNICALL Java_javax_microedition_m3g_World__1getBackground |
|
38 (JNIEnv* aEnv, jclass, jint aHandle) |
|
39 { |
|
40 M3G_DO_LOCK |
|
41 jint bg = (M3Guint)m3gGetBackground((M3GWorld)aHandle); |
|
42 M3G_DO_UNLOCK(aEnv) |
|
43 return bg; |
|
44 } |
|
45 |
|
46 JNIEXPORT jint JNICALL Java_javax_microedition_m3g_World__1getActiveCamera |
|
47 (JNIEnv* aEnv, jclass, jint aHandle) |
|
48 { |
|
49 M3G_DO_LOCK |
|
50 jint camera = (M3Guint)m3gGetActiveCamera((M3GWorld)aHandle); |
|
51 M3G_DO_UNLOCK(aEnv) |
|
52 return camera; |
|
53 } |
|
54 |
|
55 JNIEXPORT void JNICALL Java_javax_microedition_m3g_World__1setActiveCamera |
|
56 (JNIEnv* aEnv, jclass, jint aHandle, jint aHCamera) |
|
57 { |
|
58 M3G_DO_LOCK |
|
59 m3gSetActiveCamera((M3GWorld)aHandle, (M3GCamera)aHCamera); |
|
60 M3G_DO_UNLOCK(aEnv) |
|
61 } |
|