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

Side by Side Diff: mojo/dart/packages/mojo_services/lib/mojo/ui/layouts.mojom.dart

Issue 1433183002: Generate Mojom Types for Dart (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Simplify identifier_store for Go and Dart Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 library layouts_mojom; 5 library layouts_mojom;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:mojo/bindings.dart' as bindings; 9 import 'package:mojo/bindings.dart' as bindings;
10 import 'package:mojo/core.dart' as core; 10 import 'package:mojo/core.dart' as core;
11 import 'package:mojo/mojo/mojom_types.mojom.dart' as mojom_types;
12
11 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; 13 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom;
12 import 'package:mojo_services/mojo/surface_id.mojom.dart' as surface_id_mojom; 14 import 'package:mojo_services/mojo/surface_id.mojom.dart' as surface_id_mojom;
13 15
14 16
15 17
16 class BoxConstraints extends bindings.Struct { 18 class BoxConstraints extends bindings.Struct {
17 static const List<bindings.StructDataHeader> kVersions = const [ 19 static const List<bindings.StructDataHeader> kVersions = const [
18 const bindings.StructDataHeader(24, 0) 20 const bindings.StructDataHeader(24, 0)
19 ]; 21 ];
20 int minWidth = 0; 22 int minWidth = 0;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 Map toJson() { 101 Map toJson() {
100 Map map = new Map(); 102 Map map = new Map();
101 map["minWidth"] = minWidth; 103 map["minWidth"] = minWidth;
102 map["maxWidth"] = maxWidth; 104 map["maxWidth"] = maxWidth;
103 map["minHeight"] = minHeight; 105 map["minHeight"] = minHeight;
104 map["maxHeight"] = maxHeight; 106 map["maxHeight"] = maxHeight;
105 return map; 107 return map;
106 } 108 }
107 } 109 }
108 110
111 mojom_types.MojomStruct _layouts_BoxConstraints__() {
112 return new mojom_types.MojomStruct()
113 ..declData = (new mojom_types.DeclarationData()..shortName = 'BoxConstraints ')
114 ..fields = <mojom_types.StructField>[
115 new mojom_types.StructField()
116 ..declData = (new mojom_types.DeclarationData()..shortName = 'MinWidth')
117 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.IN T32),
118
119 new mojom_types.StructField()
120 ..declData = (new mojom_types.DeclarationData()..shortName = 'MaxWidth')
121 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.IN T32),
122
123 new mojom_types.StructField()
124 ..declData = (new mojom_types.DeclarationData()..shortName = 'MinHeight' )
125 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.IN T32),
126
127 new mojom_types.StructField()
128 ..declData = (new mojom_types.DeclarationData()..shortName = 'MaxHeight' )
129 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.IN T32),
130 ];
131 }
132
109 133
110 class ViewLayoutParams extends bindings.Struct { 134 class ViewLayoutParams extends bindings.Struct {
111 static const List<bindings.StructDataHeader> kVersions = const [ 135 static const List<bindings.StructDataHeader> kVersions = const [
112 const bindings.StructDataHeader(24, 0) 136 const bindings.StructDataHeader(24, 0)
113 ]; 137 ];
114 BoxConstraints constraints = null; 138 BoxConstraints constraints = null;
115 double devicePixelRatio = 1.0; 139 double devicePixelRatio = 1.0;
116 140
117 ViewLayoutParams() : super(kVersions.last.size); 141 ViewLayoutParams() : super(kVersions.last.size);
118 142
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 200 }
177 201
178 Map toJson() { 202 Map toJson() {
179 Map map = new Map(); 203 Map map = new Map();
180 map["constraints"] = constraints; 204 map["constraints"] = constraints;
181 map["devicePixelRatio"] = devicePixelRatio; 205 map["devicePixelRatio"] = devicePixelRatio;
182 return map; 206 return map;
183 } 207 }
184 } 208 }
185 209
210 mojom_types.MojomStruct _layouts_ViewLayoutParams__() {
211 return new mojom_types.MojomStruct()
212 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewLayoutPara ms')
213 ..fields = <mojom_types.StructField>[
214 new mojom_types.StructField()
215 ..declData = (new mojom_types.DeclarationData()..shortName = 'Constraint s')
216 ..type = (new mojom_types.Type()
217 ..typeReference = (new mojom_types.TypeReference()
218
219 ..identifier = '_layouts_BoxConstraints__'
220 ..typeKey = '_layouts_BoxConstraints__'
221 )),
222
223 new mojom_types.StructField()
224 ..declData = (new mojom_types.DeclarationData()..shortName = 'DevicePixe lRatio')
225 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.FL OAT),
226 ];
227 }
228
186 229
187 class ViewLayoutInfo extends bindings.Struct { 230 class ViewLayoutInfo extends bindings.Struct {
188 static const List<bindings.StructDataHeader> kVersions = const [ 231 static const List<bindings.StructDataHeader> kVersions = const [
189 const bindings.StructDataHeader(24, 0) 232 const bindings.StructDataHeader(24, 0)
190 ]; 233 ];
191 surface_id_mojom.SurfaceId surfaceId = null; 234 surface_id_mojom.SurfaceId surfaceId = null;
192 geometry_mojom.Size size = null; 235 geometry_mojom.Size size = null;
193 236
194 ViewLayoutInfo() : super(kVersions.last.size); 237 ViewLayoutInfo() : super(kVersions.last.size);
195 238
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 297 }
255 298
256 Map toJson() { 299 Map toJson() {
257 Map map = new Map(); 300 Map map = new Map();
258 map["surfaceId"] = surfaceId; 301 map["surfaceId"] = surfaceId;
259 map["size"] = size; 302 map["size"] = size;
260 return map; 303 return map;
261 } 304 }
262 } 305 }
263 306
307 mojom_types.MojomStruct _layouts_ViewLayoutInfo__() {
308 return new mojom_types.MojomStruct()
309 ..declData = (new mojom_types.DeclarationData()..shortName = 'ViewLayoutInfo ')
310 ..fields = <mojom_types.StructField>[
311 new mojom_types.StructField()
312 ..declData = (new mojom_types.DeclarationData()..shortName = 'SurfaceId' )
313 ..type = (new mojom_types.Type()
314 ..typeReference = (new mojom_types.TypeReference()
315
316 ..identifier = '_surface_id_SurfaceId__'
317 ..typeKey = '_surface_id_SurfaceId__'
318 )),
319
320 new mojom_types.StructField()
321 ..declData = (new mojom_types.DeclarationData()..shortName = 'Size')
322 ..type = (new mojom_types.Type()
323 ..typeReference = (new mojom_types.TypeReference()
324
325 ..identifier = '_geometry_Size__'
326 ..typeKey = '_geometry_Size__'
327 )),
328 ];
329 }
264 330
331
332
333
334
335
336
337
338
339 var _MojomDesc__ = _initDescriptions();
340
341 Map<String, mojom_types.UserDefinedType> _initDescriptions() {
342 var map = new Map<String, mojom_types.UserDefinedType>();
343
344 map["_layouts_BoxConstraints__"] =
345 new mojom_types.UserDefinedType()
346 ..structType = _layouts_BoxConstraints__();
347
348
349
350
351
352
353
354
355
356
357
358 map["_layouts_ViewLayoutParams__"] =
359 new mojom_types.UserDefinedType()
360 ..structType = _layouts_ViewLayoutParams__();
361
362
363
364
365
366
367
368 map["_layouts_ViewLayoutInfo__"] =
369 new mojom_types.UserDefinedType()
370 ..structType = _layouts_ViewLayoutInfo__();
371
372
373
374
375
376
377 geometry_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserD efinedType udt) {
378 map[s] = udt;
379 });
380 surface_id_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.Use rDefinedType udt) {
381 map[s] = udt;
382 });
383 return map;
384 }
385
386 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
387 return _MojomDesc__;
388 }
389
390
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698