From 5c8b5b35111b59975144232432b9fa8106c4f259 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 1 Nov 2023 02:36:50 +0300 Subject: [PATCH] Documentation: extensions: add doc about native-object --- Documentation/extensions/native-object.md | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Documentation/extensions/native-object.md diff --git a/Documentation/extensions/native-object.md b/Documentation/extensions/native-object.md new file mode 100644 index 00000000..91afbd24 --- /dev/null +++ b/Documentation/extensions/native-object.md @@ -0,0 +1,25 @@ +# GetNativeObject API + +To be able to use platform-specific features or get optional engine interfaces, we've added a simple call to MobilityAPI on client DLL and PhysicsAPI for server DLL and extended MenuAPI for menu DLL. + +It's defined like this: + +``` +void *pfnGetNativeObject( const char *name ); +``` + +#### Cross-platform objects + +Only these objects are guaranteed to be available on all targets. + +| Object name | Interface | +|-------------|-----------| +| `VFileSystem009` | Provides C++ interface to filesystem, binary-compatible with Valve's VFileSystem009. | +| `XashFileSystemXXX` | Provides C interface to filesystem. This interface is unstable and not recommended for generic use, outside of engine internals. For more info about current version look into `filesystem.h`. | + +#### Android-specific objects + +| Object name | Interface | +|-------------|-----------| +| `JNIEnv` | Allows interfacing with Java Native Interface. | +| `ActivityClass` | Returns JNI object for engine Android activity class. |