1 %module(directors="1") OgreBites
2 %{
3 /* Includes the header in the wrapper code */
4 #include "Ogre.h"
5 #include "OgreBuildSettings.h"
6 #include "OgreApplicationContext.h"
7 #include "OgreSGTechniqueResolverListener.h"
8 #include "OgreCameraMan.h"
9 #include "OgreTrays.h"
10 #include "OgreAdvancedRenderControls.h"
11 #include "OgreUnifiedHighLevelGpuProgram.h"
12 #include "OgrePredefinedControllers.h"
13 %}
14 
15 %include std_string.i
16 %include exception.i
17 %include stdint.i
18 %import "Ogre.i"
19 
20 #define _OgreBitesExport
21 
22 %include "OgreSGTechniqueResolverListener.h"
23 %feature("director") OgreBites::ApplicationContext;
24 %feature("director") OgreBites::InputListener;
25 %include "OgreInput.h"
26 
27 #ifdef __ANDROID__
28 %{
29 #include <android/native_window_jni.h>
30 #include <android/asset_manager_jni.h>
31 
32 JNIEnv* OgreJNIGetEnv();
33 %}
34 
35 %ignore OgreBites::ApplicationContext::initApp;
36 %ignore OgreBites::ApplicationContext::initAppForAndroid(AAssetManager*, ANativeWindow*);
37 %extend OgreBites::ApplicationContext {
initAppForAndroid(jobject assetManager,jobject surface)38     void initAppForAndroid(jobject assetManager, jobject surface) {
39         OgreAssert(assetManager, "assetManager is NULL");
40         OgreAssert(surface, "surface is NULL");
41 
42         AAssetManager* assetMgr = AAssetManager_fromJava(OgreJNIGetEnv(), assetManager);
43         ANativeWindow* nativeWnd = ANativeWindow_fromSurface(OgreJNIGetEnv(), surface);
44         $self->initAppForAndroid(assetMgr, nativeWnd);
45     }
46 }
47 #endif
48 
49 %include "OgreApplicationContext.h"
50 %include "OgreCameraMan.h"
51 // deprecated
52 %ignore OgreBites::TrayManager::getWidget(TrayLocation, unsigned int);
53 %ignore OgreBites::TrayManager::getNumWidgets(TrayLocation);
54 %ignore OgreBites::TrayManager::getWidgetIterator;
55 %ignore OgreBites::SelectMenu::getItemsCount;
56 #ifndef SWIGCSHARP
57 %include "OgreTrays.h"
58 %include "OgreAdvancedRenderControls.h"
59 #endif