Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion third_party/wff/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ java -jar wff-validator.jar <format-version> <any options> <your-watchface.xml>
For example:

```shell
java -jar wff-validator.jar 4 ~/MyWatchface/res/raw/watchface.xml
java -jar wff-validator.jar 5 ~/MyWatchface/res/raw/watchface.xml
```

[xsd-files]: specification/documents/1
Expand Down
87 changes: 87 additions & 0 deletions third_party/wff/specification/documents/5/bitmapFontsElement.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2023 Samsung Electronics Co., Ltd All Rights Reserved

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="common/attributes/geometricAttributes.xsd"/>
<xs:include schemaLocation="common/simpleTypes/resourceType.xsd"/>


<xs:complexType name="_characterBitmapImportDataType">
<xs:attribute name="name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="."/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>

<xs:attribute name="resource" type="resourcePathType" use="required"/>
<xs:attributeGroup ref="sizeAttributesRequired"/>
<xs:attributeGroup ref="margins"/>
</xs:complexType>

<xs:complexType name="_wordBitmapImportDataType">
<xs:attribute name="name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value=".{1,}"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>

<xs:attribute name="resource" type="resourcePathType" use="required"/>
<xs:attributeGroup ref="sizeAttributesRequired"/>
<xs:attributeGroup ref="margins"/>
</xs:complexType>

<xs:element name="BitmapFonts">
<xs:complexType>
<xs:annotation>
<xs:documentation>
User-defined bitmap fonts can be declared in this scope.
</xs:documentation>
</xs:annotation>

<xs:choice maxOccurs="unbounded">
<xs:element name="BitmapFont" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:annotation>
<xs:documentation>
User-defined bitmap font can be declared with this element.
Put the name for the family attribute in the font element.
</xs:documentation>
</xs:annotation>

<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:choice>
<xs:element name="Character" type="_characterBitmapImportDataType"/>
<xs:element name="Word" type="_wordBitmapImportDataType"/>
</xs:choice>
</xs:choice>

<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>

<xs:unique name="Validation.Unique.BitmapFont.Child.Name">
<xs:selector xpath="*"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
53 changes: 53 additions & 0 deletions third_party/wff/specification/documents/5/clock/analogClock.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2023 Samsung Electronics Co., Ltd All Rights Reserved

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="../group/renderModeType.xsd"/>
<xs:include schemaLocation="../common/attributes/geometricAttributes.xsd"/>
<xs:include schemaLocation="../common/transform/pivotType.xsd"/>
<xs:include schemaLocation="../common/variant/variantElements.xsd" />
<xs:include schemaLocation="hourHand.xsd"/>
<xs:include schemaLocation="minuteHand.xsd"/>
<xs:include schemaLocation="secondHand.xsd"/>

<xs:element name="AnalogClock">
<xs:annotation>
<xs:documentation>
AnalogClock is a container that represents a traditional clock with
rotating hands.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element ref="HourHand" minOccurs="0" maxOccurs="2"/>
<xs:element ref="MinuteHand" minOccurs="0" maxOccurs="2"/>
<xs:element ref="SecondHand" minOccurs="0" maxOccurs="2"/>
<xs:element ref="Localization" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Variant" minOccurs="0" maxOccurs="unbounded"/>
</xs:all>

<xs:attributeGroup ref="geometricAttributesRequired"/>
<xs:attributeGroup ref="pivot2D"/>
<xs:attribute name="angle" type="angleType"/>
<xs:attribute ref="alpha"/>
<xs:attribute name="scaleX" type='xs:float'/>
<xs:attribute name="scaleY" type='xs:float'/>
<xs:attribute name="renderMode" type="renderModeType" default="SOURCE"/>
<xs:attribute name="tintColor" type='colorAttributeType'/>
</xs:complexType>
</xs:element>
</xs:schema>
49 changes: 49 additions & 0 deletions third_party/wff/specification/documents/5/clock/digitalClock.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2023 Samsung Electronics Co., Ltd All Rights Reserved

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="../group/renderModeType.xsd"/>
<xs:include schemaLocation="../common/attributes/geometricAttributes.xsd"/>
<xs:include schemaLocation="../common/transform/pivotType.xsd"/>
<xs:include schemaLocation="../userConfiguration/listConfigurationElement.xsd"/>
<xs:include schemaLocation="../common/variant/variantElements.xsd" />
<xs:include schemaLocation="timeText.xsd"/>

<xs:element name="DigitalClock">
<xs:annotation>
<xs:documentation>
DigitalClock is a container for text-based formatted time.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element ref="Localization" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Variant" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="TimeText" minOccurs="1" maxOccurs="unbounded"/>
</xs:all>

<xs:attributeGroup ref="geometricAttributesRequired"/>
<xs:attributeGroup ref="pivot2D"/>
<xs:attribute name="angle" type="angleType"/>
<xs:attribute ref="alpha"/>
<xs:attribute name="scaleX" type='xs:float'/>
<xs:attribute name="scaleY" type='xs:float'/>
<xs:attribute name="renderMode" type="renderModeType" default="SOURCE"/>
<xs:attribute name="tintColor" type='colorAttributeType'/>
</xs:complexType>
</xs:element>
</xs:schema>
43 changes: 43 additions & 0 deletions third_party/wff/specification/documents/5/clock/hourHand.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2023 Samsung Electronics Co., Ltd All Rights Reserved

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="../common/attributes/geometricAttributes.xsd"/>
<xs:include schemaLocation="../common/transform/pivotType.xsd"/>
<xs:include schemaLocation="../userConfiguration/listConfigurationElement.xsd"/>
<xs:include schemaLocation="../common/variant/variantElements.xsd" />
<xs:include schemaLocation="../common/simpleTypes/resourceType.xsd" />

<xs:element name="HourHand">
<xs:annotation>
<xs:documentation>
A image that represents an hour hand, it rotates 360 degree in 12 hours.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element ref="Variant" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>

<xs:attribute name="resource" type="resourcePathType" use="required"/>
<xs:attributeGroup ref="geometricAttributesRequired"/>
<xs:attributeGroup ref="pivot2D"/>
<xs:attribute ref="alpha"/>
<xs:attribute name="tintColor" type='colorAttributeType'/>
</xs:complexType>
</xs:element>
</xs:schema>
42 changes: 42 additions & 0 deletions third_party/wff/specification/documents/5/clock/minuteHand.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2023 Samsung Electronics Co., Ltd All Rights Reserved

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="../common/attributes/geometricAttributes.xsd"/>
<xs:include schemaLocation="../common/transform/pivotType.xsd"/>
<xs:include schemaLocation="../userConfiguration/listConfigurationElement.xsd"/>
<xs:include schemaLocation="../common/variant/variantElements.xsd" />

<xs:element name="MinuteHand">
<xs:annotation>
<xs:documentation>
A image that represent a minute hand, it rotates 360 degree in 1 hour.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element ref="Variant" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>

<xs:attribute name="resource" type="resourcePathType" use="required"/>
<xs:attributeGroup ref="geometricAttributesRequired"/>
<xs:attributeGroup ref="pivot2D"/>
<xs:attribute ref="alpha"/>
<xs:attribute name="tintColor" type='colorAttributeType'/>
</xs:complexType>
</xs:element>
</xs:schema>
93 changes: 93 additions & 0 deletions third_party/wff/specification/documents/5/clock/secondHand.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2023 Samsung Electronics Co., Ltd All Rights Reserved

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="../common/attributes/geometricAttributes.xsd"/>
<xs:include schemaLocation="../common/transform/pivotType.xsd"/>
<xs:include schemaLocation="../userConfiguration/listConfigurationElement.xsd"/>
<xs:include schemaLocation="../common/variant/variantElements.xsd" />

<xs:element name="SecondHand">
<xs:annotation>
<xs:documentation>
A image that represents a second hand, it rotates 360 degree in 1 minute.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Variant" minOccurs="0" maxOccurs="unbounded" />
<xs:choice minOccurs="0" maxOccurs="1">
<xs:element ref="Sweep"/>
<xs:element ref="Tick"/>
</xs:choice>
</xs:sequence>

<xs:attribute name="resource" type="resourcePathType" use="required"/>
<xs:attributeGroup ref="geometricAttributesRequired"/>
<xs:attributeGroup ref="pivot2D"/>
<xs:attribute ref="alpha"/>
<xs:attribute name="tintColor" type='colorAttributeType'/>
</xs:complexType>
</xs:element>

<xs:element name="Sweep">
<xs:annotation>
<xs:documentation>
Definition of second hand movement.
The angle of the second hand will be updated by the given frequency for one second.

SYNC_TO_DEVICE means that the angle is updated smoothly as allowed by the device. (Since V2)
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="frequency" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="2"/>
<xs:enumeration value="5"/>
<xs:enumeration value="10"/>
<xs:enumeration value="15"/>
<xs:enumeration value="SYNC_TO_DEVICE" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:element name="Tick">
<xs:annotation>
<xs:documentation>
Definition of second hand movement. It has 2 attributes below.

Strength means intensity that exceeded the final value.
0.5 : has 125% peek value of the final value.
1.0 : has 200% peek value of the final value.

Duration means how long the animation is interpolated.
0.2 : 0 ~ 200 (ms) - interpolated value by given strength and time
200 ~ 800 (ms) - no movement.

These are used as x1, y1 parameters of the cubic bezier curve.
cubic-bezier((duration - 0.033) / duration, 1 + strength * 2, 1, 1)
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="strength" type="xs:float" use="required"/>
<xs:attribute name="duration" type="xs:float" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
Loading
Loading