LeviLamina
Loading...
Searching...
No Matches
Extension.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7namespace Json { class Value; }
8// clang-format on
9
10namespace Webview {
11
12struct Extension {
13public:
14 // virtual functions
15 // NOLINTBEGIN
16 virtual ~Extension() = default;
17
18 virtual void
19 setupMessageSender(::std::function<void(::std::string, ::std::string, ::std::string)> messageSender) = 0;
20
21 virtual bool shouldProcessMessage(::std::string const& functionNamespace, ::std::string const& func) = 0;
22
23 virtual bool onMessageReceived(
24 ::std::string const& functionNamespace,
25 ::std::string const& func,
26 ::std::optional<::Json::Value> arguments
27 ) = 0;
28
29 virtual bool isShutdownInProgress();
30
31 virtual void onShutdown();
32
33 virtual void onLoadingBegin(::std::function<void(::std::string)> handler);
34 // NOLINTEND
35
36public:
37 // virtual function thunks
38 // NOLINTBEGIN
39#ifdef LL_PLAT_C
40 MCNAPI bool $isShutdownInProgress();
41
42 MCNAPI void $onShutdown();
43#endif
44
45
46 // NOLINTEND
47};
48
49} // namespace Webview
Definition Value.h:16
Definition Extension.h:12