Skip to content

Commit d80bb15

Browse files
committed
APL-CORE: January 2021 Release of the APL 1.5 compliant core engine (1.5.0)
For more details on this release refer to CHANGELOG.md To learn about APL see: https://developer.amazon.com/docs/alexa-presentation-language/understand-apl.html
1 parent 17ff12c commit d80bb15

File tree

223 files changed

+20536
-3392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+20536
-3392
lines changed

CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# Changelog
22

3+
## [1.5.0]
4+
5+
This release adds support for version 1.5 of the APL specification.
6+
7+
### Added
8+
9+
- New Math functions: Math.isNaN, Math.isInf and Math.isFinite
10+
- New Array functions: Array.indexOf, Array.range, Array.slice
11+
- New String function: String.length
12+
- Report visible children from Sequence and GridSequence components
13+
- DropShadow filter for AVG
14+
- Accessibility: add fontScale, screenMode, screenReader, and timing properties to environment.
15+
- Accessibility: Added actions and role to base component.
16+
- Extensions: extensions can provide custom image filters
17+
- Support bind in AVG
18+
- Report when the visual context is dirty
19+
- Alpha feature: handle scrolling and paging in the APL Core library
20+
- Alpha feature: scroll snapping
21+
- Alpha feature: custom transitions for Pager
22+
23+
### Changed
24+
25+
- Updated reported APL version to 1.5
26+
- Accessibility: Update accessibilityLabel property to be dynamic
27+
- Update AVG inflation to support the multi-child inflation rules
28+
- Update gesture processing to consider applied transforms
29+
- Bug fixes
30+
- Build improvements
31+
32+
See README.md for more details on alpha features.
33+
34+
35+
336
## [1.4.1]
437

538
This is a bug fix release of apl-core-library.

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ project(APLCoreEngine
2020
set(CMAKE_CXX_STANDARD 11)
2121
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2222

23+
if (NOT APL_CORE_DIR)
24+
set(APL_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
25+
endif()
26+
2327
include(options.cmake)
2428

2529
set(APL_PATCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/patches")

NOTICE.txt

+1-21
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,4 @@ limitations under the License.
1818
THIRD PARTY COMPONENTS
1919
**********************
2020

21-
This software includes third party software subject to the following
22-
copyrights:
23-
24-
- JSON parsing for C++ from RapidJSON - Copyright (C) 2015 THL A29 Limited,
25-
a Tencent company, and Milo Yip.
26-
27-
- Parsing Expression Grammar Template Library -
28-
Copyright (c) 2007-2019 Dr. Colin Hirsch and Daniel Frey.
29-
30-
- Yoga - Copyright (c) Facebook, Inc. and its affiliates.
31-
32-
- C++ test framework from Google Test - Copyright 2008, Google Inc.
33-
34-
- Extension for writing and using C++ mock classes from Google Mock -
35-
Copyright 2008, Google Inc.
36-
37-
NOTE: Other license terms may apply to certain, identified software files
38-
contained within or distributed with the accompanying software if such terms
39-
are included in the directory containing the accompanying software. Such
40-
other license terms will then apply in lieu of the terms of the software
41-
license above.
21+
This software includes third party software. See THIRD-PARTY-NOTICES.txt for details.

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ create Alexa experiences with visual renderings on their device or platform in
1212
the programming language of their choice.
1313

1414
# Architecture
15-
<pre> APL Core Library
15+
```
16+
APL Core Library
1617
1718
+----------------------------------------------------------+
1819
| +---------------+ +----------------+ +----------------+ |
@@ -44,7 +45,8 @@ the programming language of their choice.
4445
| OS1 Native| | Cross Platform| | Cross Platform| | OS4 Native |
4546
| View Host | | View Host | | View Host | | View Host |
4647
| | | | | | | |
47-
+---------------+ +---------------+ +---------------+ +---------------+</pre>
48+
+---------------+ +---------------+ +---------------+ +---------------+
49+
```
4850

4951
Above is shown the high-level architecture of the APL Core Library, showing
5052
its interaction with a few possible view host implementations.

THIRD-PARTY-NOTICES.txt

+198
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
** googletest; version 1.8.1 -- https://github.com/google/googletest
2+
Copyright 2005-2009, 2013, Google Inc.
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are
7+
met:
8+
9+
* Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
* Redistributions in binary form must reproduce the above
12+
copyright notice, this list of conditions and the following disclaimer
13+
in the documentation and/or other materials provided with the
14+
distribution.
15+
* Neither the name of Google Inc. nor the names of its
16+
contributors may be used to endorse or promote products derived from
17+
this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
31+
------
32+
33+
** rapidjson; version 1.1.0 -- https://github.com/miloyip/rapidjson
34+
Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights
35+
reserved.
36+
37+
MIT License
38+
39+
Tencent is pleased to support the open source community by making RapidJSON
40+
available.
41+
42+
Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights
43+
reserved.
44+
45+
If you have downloaded a copy of the RapidJSON binary from Tencent, please note
46+
that the RapidJSON binary is licensed under the MIT License.
47+
If you have downloaded a copy of the RapidJSON source code from Tencent, please
48+
note that RapidJSON source code is licensed under the MIT License, except for
49+
the third-party components listed below which are subject to different license
50+
terms. Your integration of RapidJSON into your own projects may require
51+
compliance with the MIT License, as well as the other licenses applicable to
52+
the third-party components included within RapidJSON. To avoid the problematic
53+
JSON license in your own projects, it's sufficient to exclude the
54+
bin/jsonchecker/ directory, as it's the only code under the JSON license.
55+
A copy of the MIT License is included in this file.
56+
57+
Other dependencies and licenses:
58+
59+
Open Source Software Licensed Under the BSD License:
60+
--------------------------------------------------------------------
61+
62+
The msinttypes r29
63+
Copyright (c) 2006-2013 Alexander Chemeris
64+
All rights reserved.
65+
66+
Redistribution and use in source and binary forms, with or without
67+
modification, are permitted provided that the following conditions are met:
68+
69+
* Redistributions of source code must retain the above copyright notice, this
70+
list of conditions and the following disclaimer.
71+
* Redistributions in binary form must reproduce the above copyright notice,
72+
this list of conditions and the following disclaimer in the documentation
73+
and/or other materials provided with the distribution.
74+
* Neither the name of copyright holder nor the names of its contributors may be
75+
used to endorse or promote products derived from this software without specific
76+
prior written permission.
77+
78+
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
79+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
80+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
81+
DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
82+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
83+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
84+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
85+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
86+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
87+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
88+
89+
Open Source Software Licensed Under the JSON License:
90+
--------------------------------------------------------------------
91+
92+
json.org
93+
Copyright (c) 2002 JSON.org
94+
All Rights Reserved.
95+
96+
JSON_checker
97+
Copyright (c) 2002 JSON.org
98+
All Rights Reserved.
99+
100+
101+
Terms of the JSON License:
102+
---------------------------------------------------
103+
104+
Permission is hereby granted, free of charge, to any person obtaining a copy of
105+
this software and associated documentation files (the "Software"), to deal in
106+
the Software without restriction, including without limitation the rights to
107+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
108+
of the Software, and to permit persons to whom the Software is furnished to do
109+
so, subject to the following conditions:
110+
111+
The above copyright notice and this permission notice shall be included in all
112+
copies or substantial portions of the Software.
113+
114+
The Software shall be used for Good, not Evil.
115+
116+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
117+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
118+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
119+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
120+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
121+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
122+
SOFTWARE.
123+
124+
125+
Terms of the MIT License:
126+
--------------------------------------------------------------------
127+
128+
Permission is hereby granted, free of charge, to any person obtaining a copy of
129+
this software and associated documentation files (the "Software"), to deal in
130+
the Software without restriction, including without limitation the rights to
131+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
132+
of the Software, and to permit persons to whom the Software is furnished to do
133+
so, subject to the following conditions:
134+
135+
The above copyright notice and this permission notice shall be included in all
136+
copies or substantial portions of the Software.
137+
138+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
139+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
140+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
141+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
142+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
143+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
144+
SOFTWARE
145+
146+
------
147+
148+
** yoga 1.16; version 1.16.0 -- https://yogalayout.com/
149+
Copyright (c) Facebook, Inc. and its affiliates.
150+
151+
MIT License
152+
153+
Copyright (c) Facebook, Inc. and its affiliates.
154+
155+
Permission is hereby granted, free of charge, to any person obtaining a copy
156+
of this software and associated documentation files (the "Software"), to deal
157+
in the Software without restriction, including without limitation the rights
158+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
159+
copies of the Software, and to permit persons to whom the Software is
160+
furnished to do so, subject to the following conditions:
161+
162+
The above copyright notice and this permission notice shall be included in all
163+
copies or substantial portions of the Software.
164+
165+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
166+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
167+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
168+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
169+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
170+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
171+
SOFTWARE.
172+
173+
------
174+
175+
** pegtl 2.8; version 2.8.1 -- https://github.com/taocpp/PEGTL/
176+
Copyright (c) 2007-2020 Dr. Colin Hirsch and Daniel Frey
177+
178+
The MIT License (MIT)
179+
180+
Copyright (c) 2007-2019 Dr. Colin Hirsch and Daniel Frey
181+
182+
Permission is hereby granted, free of charge, to any person obtaining a copy
183+
of this software and associated documentation files (the "Software"), to deal
184+
in the Software without restriction, including without limitation the rights
185+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
186+
copies of the Software, and to permit persons to whom the Software is
187+
furnished to do so, subject to the following conditions:
188+
189+
The above copyright notice and this permission notice shall be included in all
190+
copies or substantial portions of the Software.
191+
192+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
193+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
194+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
195+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
196+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
197+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
198+
SOFTWARE.

aplcore/CMakeLists.txt

+12
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ add_subdirectory(src/utils)
6363

6464
set(PUBLIC_HEADER_LIST
6565
include/apl/apl.h
66+
${PROJECT_BINARY_DIR}/aplcore/include/apl/apl_config.h
6667
include/apl/dynamicdata.h)
6768

6869
set_target_properties(apl PROPERTIES
@@ -114,3 +115,14 @@ target_link_libraries(
114115
${log-lib})
115116

116117
endif(ANDROID)
118+
119+
install(TARGETS apl
120+
ARCHIVE DESTINATION lib
121+
LIBRARY DESTINATION lib
122+
PUBLIC_HEADER DESTINATION include/apl)
123+
install(DIRECTORY ${PROJECT_SOURCE_DIR}/aplcore/include/apl
124+
DESTINATION include
125+
FILES_MATCHING PATTERN "*.h")
126+
install(FILES ${YOGA_LIB}
127+
DESTINATION lib)
128+

aplcore/include/apl/action/action.h

+3-7
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ union ActionResolveArg {
4747
/**
4848
* Common base class of action contracts.
4949
*/
50-
class Action : public std::enable_shared_from_this<Action>, private Counter<Action>, public UserData<Action> {
50+
class Action : public std::enable_shared_from_this<Action>,
51+
public Counter<Action>,
52+
public UserData<Action> {
5153

5254
public:
5355
/**
@@ -189,12 +191,6 @@ class Action : public std::enable_shared_from_this<Action>, private Counter<Acti
189191
timeout_id mTimeoutId;
190192
const TimersPtr mTimers;
191193
ActionResolveArg mArgument;
192-
193-
#ifdef DEBUG_MEMORY_USE
194-
public:
195-
using Counter<Action>::itemsDelta;
196-
#endif
197-
198194
};
199195

200196
/**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0/
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
#ifndef _APL_ANIMATED_SCROLL_ACTION_H
17+
#define _APL_ANIMATED_SCROLL_ACTION_H
18+
19+
#include "apl/action/resourceholdingaction.h"
20+
21+
namespace apl {
22+
23+
class CoreCommand;
24+
class Easing;
25+
26+
class AnimatedScrollAction : public ResourceHoldingAction {
27+
protected:
28+
AnimatedScrollAction(const TimersPtr& timers,
29+
const ContextPtr& context,
30+
const CoreComponentPtr& scrollable);
31+
32+
void scroll(bool vertical, const Point& position);
33+
34+
CoreComponentPtr mContainer;
35+
36+
private:
37+
void advance(float from, float to);
38+
39+
EasingPtr mEasing;
40+
ActionPtr mCurrentAction;
41+
};
42+
43+
44+
} // namespace apl
45+
46+
#endif //_APL_ANIMATED_SCROLL_ACTION_H

aplcore/include/apl/action/animateitemaction.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class AnimateItemAction : public ResourceHoldingAction {
5252
const int mRepeatCount;
5353
const int mRepeatMode;
5454
const bool mFastMode;
55-
std::shared_ptr<Easing> mEasing;
55+
EasingPtr mEasing;
5656
};
5757

5858

0 commit comments

Comments
 (0)