OLD | NEW |
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 <stdbool.h> | 18 #include <stdbool.h> |
19 #include <stdint.h> | 19 #include <stdint.h> |
20 | 20 |
21 #include "mojo/public/c/bindings/array.h" | 21 #include "mojo/public/c/bindings/array.h" |
22 #include "mojo/public/c/bindings/buffer.h" | 22 #include "mojo/public/c/bindings/buffer.h" |
23 #include "mojo/public/c/bindings/interface.h" | 23 #include "mojo/public/c/bindings/interface.h" |
24 #include "mojo/public/c/bindings/lib/type_table.h" | 24 #include "mojo/public/c/bindings/lib/type_descriptor.h" |
25 #include "mojo/public/c/bindings/map.h" | 25 #include "mojo/public/c/bindings/map.h" |
26 #include "mojo/public/c/bindings/string.h" | 26 #include "mojo/public/c/bindings/string.h" |
27 #include "mojo/public/c/bindings/validation.h" | 27 #include "mojo/public/c/bindings/validation.h" |
28 #include "mojo/public/c/system/handle.h" | 28 #include "mojo/public/c/system/handle.h" |
29 | 29 |
30 // Imports. | 30 // Imports. |
31 {{range $import := .Imports -}} | 31 {{range $import := .Imports -}} |
32 #include "{{$import}}" | 32 #include "{{$import}}" |
33 {{end}} | 33 {{end}} |
34 | 34 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 {{range $interface := .Interfaces -}} | 80 {{range $interface := .Interfaces -}} |
81 {{template "GenerateInterface" $interface}} | 81 {{template "GenerateInterface" $interface}} |
82 {{end}} | 82 {{end}} |
83 | 83 |
84 // Type tables declarations for structs and unions. | 84 // Type tables declarations for structs and unions. |
85 {{template "GenerateTypeTableDeclarations" .TypeTable}} | 85 {{template "GenerateTypeTableDeclarations" .TypeTable}} |
86 | 86 |
87 #endif // {{.HeaderGuard}} | 87 #endif // {{.HeaderGuard}} |
88 {{- end }} | 88 {{- end }} |
89 ` | 89 ` |
OLD | NEW |