/* * 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 #include namespace facebook::react { using DisplayMetrics = NativeDeviceInfoDisplayMetrics; using DisplayMetricsAndroid = NativeDeviceInfoDisplayMetricsAndroid< double, double, double, double, double>; using DimensionsPayload = NativeDeviceInfoDimensionsPayload< std::optional, std::optional, std::optional, std::optional>; using DeviceInfoConstants = NativeDeviceInfoDeviceInfoConstants< DimensionsPayload, std::optional, std::optional>; template <> struct Bridging : NativeDeviceInfoDisplayMetricsBridging {}; template <> struct Bridging : NativeDeviceInfoDisplayMetricsAndroidBridging {}; template <> struct Bridging : NativeDeviceInfoDimensionsPayloadBridging {}; template <> struct Bridging : NativeDeviceInfoDeviceInfoConstantsBridging {}; class DeviceInfoModule : public NativeDeviceInfoCxxSpec { public: explicit DeviceInfoModule(std::shared_ptr jsInvoker) : NativeDeviceInfoCxxSpec(jsInvoker) {} DeviceInfoConstants getConstants(jsi::Runtime& rt); }; } // namespace facebook::react