// ui/display/mojom/screen_infos.mojom-data-view.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file defines XDataView for type traits and can be included in
// _mojom_traits.h definitions but otherwise please use .mojom-forward.h,
// .mojom-shared.h or .mojom.h.

// IWYU pragma: private
// IWYU pragma: friend "traits"

#ifndef UI_DISPLAY_MOJOM_SCREEN_INFOS_MOJOM_DATA_VIEW_H_
#define UI_DISPLAY_MOJOM_SCREEN_INFOS_MOJOM_DATA_VIEW_H_

#include <stdint.h>

#include <functional>
#include <iosfwd>
#include <type_traits>
#include <utility>
#include "mojo/public/cpp/bindings/array_data_view.h"
#include "mojo/public/cpp/bindings/string_data_view.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"

#include "ui/display/mojom/screen_infos.mojom-shared-internal.h"
#include "ui/display/mojom/screen_info.mojom-shared.h"
#include "ui/gfx/geometry/mojom/geometry.mojom-shared.h"


namespace display::mojom {
class ScreenInfosDataView;



}  // display::mojom


namespace mojo {
namespace internal {

template <>
struct MojomTypeTraits<::display::mojom::ScreenInfosDataView> {
  using Data = ::display::mojom::internal::ScreenInfos_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

}  // namespace internal
}  // namespace mojo


namespace display::mojom {


class ScreenInfosDataView {
 public:
  ScreenInfosDataView() = default;

  ScreenInfosDataView(
      internal::ScreenInfos_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetScreenInfosDataView(
      mojo::ArrayDataView<::display::mojom::ScreenInfoDataView>* output);

  template <typename UserType>
  [[nodiscard]] bool ReadScreenInfos(UserType* output) {
    
    auto* pointer = data_->screen_infos.Get();
    return mojo::internal::Deserialize<mojo::ArrayDataView<::display::mojom::ScreenInfoDataView>>(
        pointer, output, message_);
  }
  int64_t current_display_id() const {
    return data_->current_display_id;
  }
  inline void GetSystemCursorSizeDataView(
      ::gfx::mojom::SizeDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadSystemCursorSize(UserType* output) {
    
    auto* pointer = data_->system_cursor_size.Get();
    return mojo::internal::Deserialize<::gfx::mojom::SizeDataView>(
        pointer, output, message_);
  }
 private:
  internal::ScreenInfos_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


}  // display::mojom

#endif  // UI_DISPLAY_MOJOM_SCREEN_INFOS_MOJOM_DATA_VIEW_H_