diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-10-29 10:00:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-29 10:00:32 -0400 |
commit | 0ec0f705b66f1d527e24ddd5f99bd29e402a6bb0 (patch) | |
tree | fec6a477145188b9dda3713c8ff8992a2f60b030 /support/magicleap/Servo2D/code/src.gen | |
parent | e580250d5d99060b0ee8d88e3ff66b6d9ec24050 (diff) | |
parent | dab8f4a97fe8c122d24281ea7c62ccb3c7bba621 (diff) | |
download | servo-0ec0f705b66f1d527e24ddd5f99bd29e402a6bb0.tar.gz servo-0ec0f705b66f1d527e24ddd5f99bd29e402a6bb0.zip |
Auto merge of #21985 - asajeffrey:magicleap, r=jdm
Support building for Magic Leap.
<!-- Please describe your changes on the following line: -->
This PR gets Servo to build for Magic Leap, and provides a dummy Servo2D app.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it's a port to a new architecture
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21985)
<!-- Reviewable:end -->
Diffstat (limited to 'support/magicleap/Servo2D/code/src.gen')
-rw-r--r-- | support/magicleap/Servo2D/code/src.gen/SceneDescriptor.cpp | 54 | ||||
-rw-r--r-- | support/magicleap/Servo2D/code/src.gen/scenesGen.cpp | 49 |
2 files changed, 103 insertions, 0 deletions
diff --git a/support/magicleap/Servo2D/code/src.gen/SceneDescriptor.cpp b/support/magicleap/Servo2D/code/src.gen/SceneDescriptor.cpp new file mode 100644 index 00000000000..08bb47d61ac --- /dev/null +++ b/support/magicleap/Servo2D/code/src.gen/SceneDescriptor.cpp @@ -0,0 +1,54 @@ +// -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- +// +// THE CONTENTS OF THIS FILE IS GENERATED BY CODE AND +// ANY MODIFICATIONS WILL BE OVERWRITTEN +// +// -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- + +// %BANNER_BEGIN% +// --------------------------------------------------------------------- +// %COPYRIGHT_BEGIN% +// +// Copyright (c) 2018 Magic Leap, Inc. All Rights Reserved. +// Use of this file is governed by the Creator Agreement, located +// here: https://id.magicleap.com/creator-terms +// +// %COPYRIGHT_END% +// --------------------------------------------------------------------- +// %BANNER_END% + +#include <SceneDescriptor.h> + +SceneDescriptor::SceneDescriptor(const char * exportedName, const char * id, const char * sceneGraphPath, const char * resourceModelPath, const ExportedNodeReferences& exportedNodeReferences, bool initiallyInstanced) +: + exportedName_(exportedName), + id_(id), + sceneGraphPath_(sceneGraphPath), + resourceModelPath_(resourceModelPath), + exportedNodeReferences_(exportedNodeReferences), + initiallyInstanced_(initiallyInstanced) { +} + +const std::string & SceneDescriptor::getExportedName() const { + return exportedName_; +} + +const std::string & SceneDescriptor::getId() const { + return id_; +} + +const std::string & SceneDescriptor::getSceneGraphPath() const { + return sceneGraphPath_; +} + +const std::string & SceneDescriptor::getResourceModelPath() const { + return resourceModelPath_; +} + +const SceneDescriptor::ExportedNodeReferences & SceneDescriptor::getExportedNodeReferences() const { + return exportedNodeReferences_; +} + +bool SceneDescriptor::getInitiallyInstanced() const { + return initiallyInstanced_; +} diff --git a/support/magicleap/Servo2D/code/src.gen/scenesGen.cpp b/support/magicleap/Servo2D/code/src.gen/scenesGen.cpp new file mode 100644 index 00000000000..6c40880be9e --- /dev/null +++ b/support/magicleap/Servo2D/code/src.gen/scenesGen.cpp @@ -0,0 +1,49 @@ +// -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- +// +// THE CONTENTS OF THIS FILE IS GENERATED BY CODE AND +// ANY MODIFICATIONS WILL BE OVERWRITTEN +// +// -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- + +// %BANNER_BEGIN% +// --------------------------------------------------------------------- +// %COPYRIGHT_BEGIN% +// +// Copyright (c) 2018 Magic Leap, Inc. All Rights Reserved. +// Use of this file is governed by the Creator Agreement, located +// here: https://id.magicleap.com/creator-terms +// +// %COPYRIGHT_END% +// --------------------------------------------------------------------- +// %BANNER_END% + +#include <scenesGen.h> + +namespace Servo2D_exportedNodes { + const std::string content = "content"; + const std::string backButton = "backButton"; + const std::string fwdButton = "fwdButton"; + const std::string urlBar = "urlBar"; +} + +namespace scenes { + + const SceneDescriptor::ExportedNodeReferences Servo2D_exportedNodesMap = { + {"content", Servo2D_exportedNodes::content}, + {"backButton", Servo2D_exportedNodes::backButton}, + {"fwdButton", Servo2D_exportedNodes::fwdButton}, + {"urlBar", Servo2D_exportedNodes::urlBar} + }; + + const SceneDescriptor Servo2D( + "Servo2D", + "root", + "/assets/scenes/scenes/Servo2D.scene.xml", + "/assets/scenes/scenes/Servo2D.scene.res.xml", + Servo2D_exportedNodesMap, + true); + + const SceneDescriptorReferences exportedScenes = { + {Servo2D.getExportedName(), Servo2D} + }; +} |