guardia-messenger/node_modules/react-native/ReactCommon/react/renderer/uimanager/UIManagerBinding.h
DESKTOP-TKLFCPRython f29f525c77 refactor: 101.79.17.164 → zioinfo.co.kr 전체 도메인 변환 + Manager UI 배포
- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스)
- Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포
- 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 10:09:17 +09:00

93 lines
2.6 KiB
C++

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <folly/dynamic.h>
#include <jsi/jsi.h>
#include <react/renderer/core/RawValue.h>
#include <react/renderer/uimanager/PointerEventsProcessor.h>
#include <react/renderer/uimanager/UIManager.h>
#include <react/renderer/uimanager/primitives.h>
namespace facebook::react {
/*
* Exposes UIManager to JavaScript realm.
*/
class UIManagerBinding : public jsi::HostObject {
public:
/*
* Installs UIManagerBinding into JavaScript runtime if needed.
* Creates and sets `UIManagerBinding` into the global namespace.
* Thread synchronization must be enforced externally.
*/
static void createAndInstallIfNeeded(
jsi::Runtime& runtime,
const std::shared_ptr<UIManager>& uiManager);
/*
* Returns a pointer to UIManagerBinding previously installed into a runtime.
* Thread synchronization must be enforced externally.
*/
static std::shared_ptr<UIManagerBinding> getBinding(jsi::Runtime& runtime);
UIManagerBinding(std::shared_ptr<UIManager> uiManager);
~UIManagerBinding() override;
jsi::Value getInspectorDataForInstance(
jsi::Runtime& runtime,
const EventEmitter& eventEmitter) const;
/*
* Delivers raw event data to JavaScript.
* Thread synchronization must be enforced externally.
*/
void dispatchEvent(
jsi::Runtime& runtime,
const EventTarget* eventTarget,
const std::string& type,
ReactEventPriority priority,
const EventPayload& payload) const;
/*
* Invalidates the binding and underlying UIManager.
* Allows to save some resources and prevents UIManager's delegate to be
* called.
* Calling public methods of this class after calling this method is UB.
* Can be called on any thread.
*/
void invalidate() const;
/*
* `jsi::HostObject` specific overloads.
*/
jsi::Value get(jsi::Runtime& runtime, const jsi::PropNameID& name) override;
UIManager& getUIManager();
private:
/*
* Internal method that sends the event to JS. Should only be called from
* UIManagerBinding::dispatchEvent.
*/
void dispatchEventToJS(
jsi::Runtime& runtime,
const EventTarget* eventTarget,
const std::string& type,
ReactEventPriority priority,
const EventPayload& payload) const;
std::shared_ptr<UIManager> uiManager_;
std::unique_ptr<jsi::Function> eventHandler_;
mutable PointerEventsProcessor pointerEventsProcessor_;
mutable ReactEventPriority currentEventPriority_;
};
} // namespace facebook::react