Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: mojom/generators/c/templates/header.tmpl.go

Issue 2229573002: Change the canonical way to include the C macros.h to <mojo/macros.h>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/services/gfx/images/cpp/image_pipe_producer_endpoint.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package templates 5 package templates
6 6
7 // TODO(vardhan): Include only the necessary headers for a particular 7 // TODO(vardhan): Include only the necessary headers for a particular
8 // mojom. 8 // mojom.
9 const GenerateHeaderFile = ` 9 const GenerateHeaderFile = `
10 {{- define "GenerateHeaderFile" -}} 10 {{- define "GenerateHeaderFile" -}}
11 // This file was auto-generated by the C bindings generator. 11 // This file was auto-generated by the C bindings generator.
12 12
13 #ifndef {{.HeaderGuard}} 13 #ifndef {{.HeaderGuard}}
14 #define {{.HeaderGuard}} 14 #define {{.HeaderGuard}}
15 15
16 #include <assert.h> 16 #include <assert.h>
17 #include <math.h> 17 #include <math.h>
18 #include <mojo/macros.h>
18 #include <stdbool.h> 19 #include <stdbool.h>
19 #include <stdint.h> 20 #include <stdint.h>
20 21
21 #include "mojo/public/c/bindings/array.h" 22 #include "mojo/public/c/bindings/array.h"
22 #include "mojo/public/c/bindings/buffer.h" 23 #include "mojo/public/c/bindings/buffer.h"
23 #include "mojo/public/c/bindings/interface.h" 24 #include "mojo/public/c/bindings/interface.h"
24 #include "mojo/public/c/bindings/lib/type_descriptor.h" 25 #include "mojo/public/c/bindings/lib/type_descriptor.h"
25 #include "mojo/public/c/bindings/map.h" 26 #include "mojo/public/c/bindings/map.h"
26 #include "mojo/public/c/bindings/string.h" 27 #include "mojo/public/c/bindings/string.h"
27 #include "mojo/public/c/bindings/validation.h" 28 #include "mojo/public/c/bindings/validation.h"
28 #include "mojo/public/c/system/handle.h" 29 #include "mojo/public/c/system/handle.h"
29 #include "mojo/public/c/system/macros.h"
30 30
31 // Imports. 31 // Imports.
32 {{range $import := .Imports -}} 32 {{range $import := .Imports -}}
33 #include "{{$import}}" 33 #include "{{$import}}"
34 {{end}} 34 {{end}}
35 35
36 MOJO_BEGIN_EXTERN_C 36 MOJO_BEGIN_EXTERN_C
37 37
38 // Forward declarations for structs. 38 // Forward declarations for structs.
39 {{range $struct := .Structs -}} 39 {{range $struct := .Structs -}}
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 {{end}} 85 {{end}}
86 86
87 // Type tables declarations for structs and unions. 87 // Type tables declarations for structs and unions.
88 {{template "GenerateTypeTableDeclarations" .TypeTable}} 88 {{template "GenerateTypeTableDeclarations" .TypeTable}}
89 89
90 MOJO_END_EXTERN_C 90 MOJO_END_EXTERN_C
91 91
92 #endif // {{.HeaderGuard}} 92 #endif // {{.HeaderGuard}}
93 {{- end }} 93 {{- end }}
94 ` 94 `
OLDNEW
« no previous file with comments | « mojo/services/gfx/images/cpp/image_pipe_producer_endpoint.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698