-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathJHybridBindableArtboardSpec.hpp
More file actions
63 lines (48 loc) · 2.03 KB
/
JHybridBindableArtboardSpec.hpp
File metadata and controls
63 lines (48 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
///
/// HybridBindableArtboardSpec.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///
#pragma once
#include <NitroModules/JHybridObject.hpp>
#include <fbjni/fbjni.h>
#include "HybridBindableArtboardSpec.hpp"
namespace margelo::nitro::rive {
using namespace facebook;
class JHybridBindableArtboardSpec: public virtual HybridBindableArtboardSpec, public virtual JHybridObject {
public:
struct JavaPart: public jni::JavaClass<JavaPart, JHybridObject::JavaPart> {
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/rive/HybridBindableArtboardSpec;";
std::shared_ptr<JHybridBindableArtboardSpec> getJHybridBindableArtboardSpec();
};
struct CxxPart: public jni::HybridClass<CxxPart, JHybridObject::CxxPart> {
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/rive/HybridBindableArtboardSpec$CxxPart;";
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
static void registerNatives();
using HybridBase::HybridBase;
protected:
std::shared_ptr<JHybridObject> createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) override;
};
public:
explicit JHybridBindableArtboardSpec(const jni::local_ref<JHybridBindableArtboardSpec::JavaPart>& javaPart):
HybridObject(HybridBindableArtboardSpec::TAG),
JHybridObject(javaPart),
_javaPart(jni::make_global(javaPart)) {}
~JHybridBindableArtboardSpec() override {
// Hermes GC can destroy JS objects on a non-JNI Thread.
jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
}
public:
inline const jni::global_ref<JHybridBindableArtboardSpec::JavaPart>& getJavaPart() const noexcept {
return _javaPart;
}
public:
// Properties
std::string getArtboardName() override;
public:
// Methods
private:
jni::global_ref<JHybridBindableArtboardSpec::JavaPart> _javaPart;
};
} // namespace margelo::nitro::rive