|
slot 0.0.1
A real time UI render framework
|
类 | |
| class | LayoutContext |
| class | ScopedGlobalRef |
| class | ScopedLocalRef |
| class | YogaJniException |
This is a modified version of Android's ScopedLocalRef class that can be found in the Android's JNI code.
| void facebook::yoga::vanillajni::assertNoPendingJniException | ( | JNIEnv * | env | ) |
Checks whether there is a pending JNI exception. If so, it logs an error message and aborts the current process. Otherwise it does nothing.


| void facebook::yoga::vanillajni::assertNoPendingJniExceptionIf | ( | JNIEnv * | env, |
| bool | condition ) |


| ScopedLocalRef< jobject > facebook::yoga::vanillajni::callStaticObjectMethod | ( | JNIEnv * | env, |
| jclass | clazz, | ||
| jmethodID | methodId, | ||
| ... ) |


| facebook::yoga::vanillajni::DEFINE_CALL_METHOD_FOR_PRIMITIVE_IMPLEMENTATION | ( | jfloat | , |
| Float | ) |
| facebook::yoga::vanillajni::DEFINE_CALL_METHOD_FOR_PRIMITIVE_IMPLEMENTATION | ( | jlong | , |
| Long | ) |
| facebook::yoga::vanillajni::DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE | ( | jfloat | , |
| Float | ) |
| facebook::yoga::vanillajni::DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE | ( | jlong | , |
| Long | ) |
| facebook::yoga::vanillajni::DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE | ( | void | , |
| Void | ) |

This method has to be called before using the vanillajni library. This method is typically called when doing initialization in the "on load" JNI hook of a particular library.
This method is thread safe, and after the first time it's called it has no initialization effect.
| env | use this output parameter to get a JNIEnv to use for things such as registering native methods and such. |
| vm | the VM instance passed by JNI. This is usually the VM instance that is passed to the "on load" JNI hook. |


| JNIEnv * facebook::yoga::vanillajni::getCurrentEnv | ( | ) |
Returns a JNIEnv* suitable for the current thread. If the current thread is not attached to the Java VM, this method aborts execution.


| jfieldID facebook::yoga::vanillajni::getFieldId | ( | JNIEnv * | env, |
| jclass | clazz, | ||
| const char * | fieldName, | ||
| const char * | fieldSignature ) |
Returns a class non-static field ID. Aborts if any error happens.


| jmethodID facebook::yoga::vanillajni::getMethodId | ( | JNIEnv * | env, |
| jclass | clazz, | ||
| const char * | methodName, | ||
| const char * | methodDescriptor ) |
Returns a jmethodID for a class non-static method. Aborts if any error happens.


| jmethodID facebook::yoga::vanillajni::getStaticMethodId | ( | JNIEnv * | env, |
| jclass | clazz, | ||
| const char * | methodName, | ||
| const char * | methodDescriptor ) |
Returns a jmethodID for a class static method. Aborts if any error happens.


| void facebook::yoga::vanillajni::logErrorMessageAndDie | ( | const char * | message | ) |
Logs an error message and aborts the current process.

| ScopedGlobalRef< T > facebook::yoga::vanillajni::make_global_ref | ( | T | globalRef | ) |

| ScopedLocalRef< T > facebook::yoga::vanillajni::make_local_ref | ( | JNIEnv * | env, |
| T | localRef ) |

| ScopedGlobalRef< jthrowable > facebook::yoga::vanillajni::newGlobalRef | ( | JNIEnv * | env, |
| jobject | obj ) |
Given a local or a global reference, this method creates a new global reference out of it. If any error happens, aborts the process.


| void facebook::yoga::vanillajni::registerNatives | ( | JNIEnv * | env, |
| const char * | className, | ||
| const JNINativeMethod | methods[], | ||
| size_t | numMethods ) |
Registers a set of methods for a JNI class. Aborts if registration fails.

