-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathJHybridBindableArtboardSpec.hpp
More file actions
66 lines (49 loc) · 1.87 KB
/
JHybridBindableArtboardSpec.hpp
File metadata and controls
66 lines (49 loc) · 1.87 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
64
65
66
///
/// 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 jni::HybridClass<JHybridBindableArtboardSpec, JHybridObject>,
public virtual HybridBindableArtboardSpec {
public:
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/rive/HybridBindableArtboardSpec;";
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
static void registerNatives();
protected:
// C++ constructor (called from Java via `initHybrid()`)
explicit JHybridBindableArtboardSpec(jni::alias_ref<jhybridobject> jThis) :
HybridObject(HybridBindableArtboardSpec::TAG),
HybridBase(jThis),
_javaPart(jni::make_global(jThis)) {}
public:
~JHybridBindableArtboardSpec() override {
// Hermes GC can destroy JS objects on a non-JNI Thread.
jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
}
public:
size_t getExternalMemorySize() noexcept override;
bool equals(const std::shared_ptr<HybridObject>& other) override;
void dispose() noexcept override;
std::string toString() override;
public:
inline const jni::global_ref<JHybridBindableArtboardSpec::javaobject>& getJavaPart() const noexcept {
return _javaPart;
}
public:
// Properties
std::string getArtboardName() override;
public:
// Methods
private:
friend HybridBase;
using HybridBase::HybridBase;
jni::global_ref<JHybridBindableArtboardSpec::javaobject> _javaPart;
};
} // namespace margelo::nitro::rive