• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef MOJO_PUBLIC_CPP_BASE_LOGFONT_WIN_MOJOM_TRAITS_H_
6 #define MOJO_PUBLIC_CPP_BASE_LOGFONT_WIN_MOJOM_TRAITS_H_
7 
8 #include <windows.h>
9 
10 #include <cstdint>
11 
12 #include "base/component_export.h"
13 #include "base/containers/span.h"
14 #include "base/macros.h"
15 #include "base/win/windows_types.h"
16 #include "mojo/public/cpp/bindings/struct_traits.h"
17 #include "mojo/public/mojom/base/logfont_win.mojom-shared.h"
18 
19 namespace mojo {
20 
21 template <>
COMPONENT_EXPORT(MOJO_BASE_MOJOM)22 struct COMPONENT_EXPORT(MOJO_BASE_MOJOM)
23     StructTraits<mojo_base::mojom::LOGFONTDataView, ::LOGFONT> {
24   static base::span<const uint8_t> bytes(const ::LOGFONT& input);
25   static bool Read(mojo_base::mojom::LOGFONTDataView data, ::LOGFONT* out);
26 };
27 
28 }  // namespace mojo
29 
30 #endif  // MOJO_PUBLIC_CPP_BASE_LOGFONT_WIN_MOJOM_TRAITS_H_
31