// ui/display/mojom/gamma_ramp_rgb_entry.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_GAMMA_RAMP_RGB_ENTRY_MOJOM_DATA_VIEW_H_
#define UI_DISPLAY_MOJOM_GAMMA_RAMP_RGB_ENTRY_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/gamma_ramp_rgb_entry.mojom-shared-internal.h"


namespace display::mojom {
class GammaRampRGBEntryDataView;



}  // display::mojom


namespace mojo {
namespace internal {

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

}  // namespace internal
}  // namespace mojo


namespace display::mojom {


class GammaRampRGBEntryDataView {
 public:
  GammaRampRGBEntryDataView() = default;

  GammaRampRGBEntryDataView(
      internal::GammaRampRGBEntry_Data* data,
      mojo::Message* message)
      : data_(data) {}

  bool is_null() const { return !data_; }
  uint16_t r() const {
    return data_->r;
  }
  uint16_t g() const {
    return data_->g;
  }
  uint16_t b() const {
    return data_->b;
  }
 private:
  internal::GammaRampRGBEntry_Data* data_ = nullptr;
};


}  // display::mojom

#endif  // UI_DISPLAY_MOJOM_GAMMA_RAMP_RGB_ENTRY_MOJOM_DATA_VIEW_H_