///
/// JHybridNitroDeviceModuleSpec.cpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © 2024 Marc Rousavy @ Margelo
///

#include "JHybridNitroDeviceModuleSpec.hpp"

// Forward declaration of `DeviceTraits` to properly resolve imports.
namespace margelo::nitro::stylesheet { struct DeviceTraits; }
// Forward declaration of `ColorScheme` to properly resolve imports.
namespace margelo::nitro::stylesheet { enum class ColorScheme; }
// Forward declaration of `ScreenDimensions` to properly resolve imports.
namespace margelo::nitro::stylesheet { struct ScreenDimensions; }
// Forward declaration of `ScreenInsets` to properly resolve imports.
namespace margelo::nitro::stylesheet { struct ScreenInsets; }
// Forward declaration of `ScreenOrientation` to properly resolve imports.
namespace margelo::nitro::stylesheet { enum class ScreenOrientation; }
// Forward declaration of `HapticTypes` to properly resolve imports.
namespace margelo::nitro::stylesheet { enum class HapticTypes; }

#include "DeviceTraits.hpp"
#include "JDeviceTraits.hpp"
#include "ColorScheme.hpp"
#include "JColorScheme.hpp"
#include "ScreenDimensions.hpp"
#include "JScreenDimensions.hpp"
#include <string>
#include "ScreenInsets.hpp"
#include "JScreenInsets.hpp"
#include "ScreenOrientation.hpp"
#include "JScreenOrientation.hpp"
#include "HapticTypes.hpp"
#include "JHapticTypes.hpp"

namespace margelo::nitro::stylesheet {

  jni::local_ref<JHybridNitroDeviceModuleSpec::jhybriddata> JHybridNitroDeviceModuleSpec::initHybrid(jni::alias_ref<jhybridobject> jThis) {
    return makeCxxInstance(jThis);
  }

  void JHybridNitroDeviceModuleSpec::registerNatives() {
    registerHybrid({
      makeNativeMethod("initHybrid", JHybridNitroDeviceModuleSpec::initHybrid),
    });
  }

  size_t JHybridNitroDeviceModuleSpec::getExternalMemorySize() noexcept {
    static const auto method = _javaPart->getClass()->getMethod<jlong()>("getMemorySize");
    return method(_javaPart);
  }

  // Properties
  

  // Methods
  DeviceTraits JHybridNitroDeviceModuleSpec::getDeviceTraits() {
    static const auto method = _javaPart->getClass()->getMethod<jni::local_ref<JDeviceTraits>()>("getDeviceTraits");
    auto __result = method(_javaPart);
    return __result->toCpp();
  }
  void JHybridNitroDeviceModuleSpec::runHaptic(HapticTypes type) {
    static const auto method = _javaPart->getClass()->getMethod<void(jni::alias_ref<JHapticTypes> /* type */)>("runHaptic");
    method(_javaPart, JHapticTypes::fromCpp(type));
  }
  ColorScheme JHybridNitroDeviceModuleSpec::getColorScheme() {
    static const auto method = _javaPart->getClass()->getMethod<jni::local_ref<JColorScheme>()>("getColorScheme");
    auto __result = method(_javaPart);
    return __result->toCpp();
  }
  ScreenDimensions JHybridNitroDeviceModuleSpec::getScreenDimensions() {
    static const auto method = _javaPart->getClass()->getMethod<jni::local_ref<JScreenDimensions>()>("getScreenDimensions");
    auto __result = method(_javaPart);
    return __result->toCpp();
  }
  std::string JHybridNitroDeviceModuleSpec::getContentSizeCategory() {
    static const auto method = _javaPart->getClass()->getMethod<jni::local_ref<jni::JString>()>("getContentSizeCategory");
    auto __result = method(_javaPart);
    return __result->toStdString();
  }
  ScreenInsets JHybridNitroDeviceModuleSpec::getScreenInsets() {
    static const auto method = _javaPart->getClass()->getMethod<jni::local_ref<JScreenInsets>()>("getScreenInsets");
    auto __result = method(_javaPart);
    return __result->toCpp();
  }
  double JHybridNitroDeviceModuleSpec::getDisplayScale() {
    static const auto method = _javaPart->getClass()->getMethod<double()>("getDisplayScale");
    auto __result = method(_javaPart);
    return __result;
  }
  double JHybridNitroDeviceModuleSpec::getFontScale() {
    static const auto method = _javaPart->getClass()->getMethod<double()>("getFontScale");
    auto __result = method(_javaPart);
    return __result;
  }
  bool JHybridNitroDeviceModuleSpec::getIsRTL() {
    static const auto method = _javaPart->getClass()->getMethod<jboolean()>("getIsRTL");
    auto __result = method(_javaPart);
    return static_cast<bool>(__result);
  }
  ScreenOrientation JHybridNitroDeviceModuleSpec::getScreenOrientation() {
    static const auto method = _javaPart->getClass()->getMethod<jni::local_ref<JScreenOrientation>()>("getScreenOrientation");
    auto __result = method(_javaPart);
    return __result->toCpp();
  }
  double JHybridNitroDeviceModuleSpec::getPixelRatio() {
    static const auto method = _javaPart->getClass()->getMethod<double()>("getPixelRatio");
    auto __result = method(_javaPart);
    return __result;
  }

} // namespace margelo::nitro::stylesheet
