CommonLibVR
FxDelegate.h
Go to the documentation of this file.
1 #pragma once
2 
5 #include "RE/G/GHash.h"
6 #include "RE/G/GPtr.h"
7 #include "RE/G/GString.h"
8 
9 namespace RE
10 {
11  class FxResponseArgsBase;
12  class GFxMovieView;
13 
15  {
16  public:
17  inline static constexpr auto RTTI = RTTI_FxDelegate;
18  inline static constexpr auto VTABLE = VTABLE_FxDelegate;
19 
20  struct CallbackDefn
21  {
22  public:
23  // members
24  GPtr<FxDelegateHandler> handler{ nullptr }; // 00
26  };
27  static_assert(sizeof(CallbackDefn) == 0x10);
28 
30  {
31  public:
32  UPInt operator()(const GString& a_data) const;
33  };
34  static_assert(std::is_empty_v<CallbackHashFunctor>);
35 
37 
38  FxDelegate() = default;
39  virtual ~FxDelegate() = default; // 00
40 
41  // override (GFxExternalInterface)
42  virtual void Callback(GFxMovieView* a_movieView, const char* a_methodName, const GFxValue* a_args, std::uint32_t a_argCount) override; // 01
43 
44  static void Invoke(GFxMovieView* a_movieView, const char* a_methodName, FxResponseArgsBase& a_args); // Call a method registered with the AS2 GameDelegate instance
45  static void Invoke2(GFxMovieView* a_movieView, const char* a_methodName, FxResponseArgsBase& a_args);
46 
49 
50  // members
52  private:
53  KEEP_FOR_RE()
54  };
55  static_assert(sizeof(FxDelegate) == 0x20);
56 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: FxDelegateHandler.h:12
void(const FxDelegateArgs &a_params) CallbackFn
Definition: FxDelegateHandler.h:17
Definition: FxDelegate.h:15
static constexpr auto RTTI
Definition: FxDelegate.h:17
static void Invoke(GFxMovieView *a_movieView, const char *a_methodName, FxResponseArgsBase &a_args)
virtual ~FxDelegate()=default
FxDelegate()=default
void RegisterHandler(FxDelegateHandler *a_callback)
void UnregisterHandler(FxDelegateHandler *a_callback)
static constexpr auto VTABLE
Definition: FxDelegate.h:18
virtual void Callback(GFxMovieView *a_movieView, const char *a_methodName, const GFxValue *a_args, std::uint32_t a_argCount) override
CallbackHash callbacks
Definition: FxDelegate.h:51
static void Invoke2(GFxMovieView *a_movieView, const char *a_methodName, FxResponseArgsBase &a_args)
Definition: FxResponseArgsBase.h:8
Definition: GFxExternalInterface.h:11
Definition: GFxMovieView.h:24
Definition: GFxValue.h:92
Definition: GPtr.h:7
Definition: GString.h:8
Definition: AbsorbEffect.h:6
std::size_t UPInt
Definition: SFTypes.h:5
constexpr REL::ID RTTI_FxDelegate(static_cast< std::uint64_t >(691071))
constexpr std::array< REL::ID, 1 > VTABLE_FxDelegate
Definition: Offsets_VTABLE.h:11677
Definition: FxDelegate.h:21
GPtr< FxDelegateHandler > handler
Definition: FxDelegate.h:24
FxDelegateHandler::CallbackFn * callback
Definition: FxDelegate.h:25
Definition: FxDelegate.h:30
UPInt operator()(const GString &a_data) const