From 76e96dc8f5c77e75f36d86543263fcc60c83dbd0 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Fri, 3 May 2024 11:50:39 +0300 Subject: [PATCH] Standardize copyright headers. (#246) * Add the Linebender standard copyright header to all Rust source files. - Copyright year is based on the original file creation date. - Files that are based on other projects, mostly Druid, get the correct credit. - Files that were built from scratch for Xilem but had copy-pasted Druid headers get those headers corrected. * Add copyright header check to CI. * Add dedicated `LICENSE` files to each package to ensure it is part of the crates.io source distribution. * Add `AUTHORS` file to list most of the top contributors. - It does not need to be complete and additional entries are welcome via PRs. --- .github/copyright.sh | 23 ++ .github/workflows/ci.yml | 8 + AUTHORS | 20 ++ LICENSE | 1 + crates/masonry/Cargo.toml | 5 +- crates/masonry/examples/calc.rs | 5 +- crates/masonry/examples/custom_widget.rs | 5 +- crates/masonry/examples/hello_masonry.rs | 5 +- crates/masonry/examples/simple_image.rs | 5 +- crates/masonry/src/action.rs | 5 +- crates/masonry/src/app_driver.rs | 3 + crates/masonry/src/bloom.rs | 5 +- crates/masonry/src/box_constraints.rs | 5 +- crates/masonry/src/contexts.rs | 5 +- crates/masonry/src/debug_logger.rs | 5 +- crates/masonry/src/debug_values.rs | 5 +- crates/masonry/src/event.rs | 5 +- crates/masonry/src/event_loop_runner.rs | 3 + crates/masonry/src/ext_event.rs | 5 +- crates/masonry/src/lib.rs | 5 +- crates/masonry/src/paint_scene_helpers.rs | 3 + crates/masonry/src/promise.rs | 5 +- crates/masonry/src/render_root.rs | 3 + crates/masonry/src/testing/harness.rs | 5 +- crates/masonry/src/testing/helper_widgets.rs | 5 +- crates/masonry/src/testing/mod.rs | 5 +- crates/masonry/src/testing/screenshots.rs | 5 +- crates/masonry/src/testing/snapshot_utils.rs | 11 +- crates/masonry/src/text_helpers.rs | 3 + crates/masonry/src/theme.rs | 5 +- crates/masonry/src/util.rs | 5 +- crates/masonry/src/widget/align.rs | 5 +- crates/masonry/src/widget/button.rs | 5 +- crates/masonry/src/widget/checkbox.rs | 5 +- crates/masonry/src/widget/flex.rs | 5 +- crates/masonry/src/widget/image.rs | 5 +- crates/masonry/src/widget/label.rs | 5 +- crates/masonry/src/widget/mod.rs | 5 +- crates/masonry/src/widget/portal.rs | 5 +- crates/masonry/src/widget/scroll_bar.rs | 5 +- crates/masonry/src/widget/sized_box.rs | 5 +- crates/masonry/src/widget/spinner.rs | 5 +- crates/masonry/src/widget/split.rs | 5 +- crates/masonry/src/widget/tests/layout.rs | 5 +- .../src/widget/tests/lifecycle_basic.rs | 5 +- .../src/widget/tests/lifecycle_disable.rs | 5 +- .../src/widget/tests/lifecycle_focus.rs | 5 +- crates/masonry/src/widget/tests/mod.rs | 5 +- .../masonry/src/widget/tests/safety_rails.rs | 5 +- .../masonry/src/widget/tests/status_change.rs | 5 +- crates/masonry/src/widget/widget.rs | 5 +- crates/masonry/src/widget/widget_mut.rs | 5 +- crates/masonry/src/widget/widget_pod.rs | 5 +- crates/masonry/src/widget/widget_ref.rs | 5 +- crates/masonry/src/widget/widget_state.rs | 5 +- crates/xilem_core/LICENSE | 202 ++++++++++++++++++ crates/xilem_core/src/any_view.rs | 2 +- crates/xilem_core/src/id.rs | 2 +- crates/xilem_core/src/lib.rs | 2 +- crates/xilem_core/src/message.rs | 2 +- crates/xilem_core/src/sequence.rs | 2 +- crates/xilem_core/src/vec_splice.rs | 2 +- crates/xilem_core/src/view/adapt.rs | 3 + crates/xilem_core/src/view/memoize.rs | 2 +- crates/xilem_core/src/view/mod.rs | 2 +- crates/xilem_masonry/LICENSE | 202 ++++++++++++++++++ crates/xilem_masonry/examples/mason.rs | 3 + crates/xilem_masonry/src/any_view.rs | 3 + crates/xilem_masonry/src/id.rs | 3 + crates/xilem_masonry/src/lib.rs | 3 + crates/xilem_masonry/src/sequence.rs | 3 + crates/xilem_masonry/src/vec_splice.rs | 2 +- crates/xilem_masonry/src/view/button.rs | 3 + crates/xilem_masonry/src/view/checkbox.rs | 3 + crates/xilem_masonry/src/view/flex.rs | 3 + crates/xilem_masonry/src/view/label.rs | 3 + crates/xilem_masonry/src/view/mod.rs | 3 + crates/xilem_web/LICENSE | 202 ++++++++++++++++++ crates/xilem_web/src/app.rs | 2 +- crates/xilem_web/src/attribute.rs | 3 + crates/xilem_web/src/attribute_value.rs | 3 + crates/xilem_web/src/class.rs | 3 + crates/xilem_web/src/context.rs | 3 + crates/xilem_web/src/diff.rs | 3 + crates/xilem_web/src/elements.rs | 3 + crates/xilem_web/src/events.rs | 3 + crates/xilem_web/src/interfaces.rs | 3 + crates/xilem_web/src/lib.rs | 2 +- crates/xilem_web/src/one_of.rs | 3 + crates/xilem_web/src/optional_action.rs | 3 + crates/xilem_web/src/pointer.rs | 2 +- crates/xilem_web/src/style.rs | 3 + crates/xilem_web/src/svg/common_attrs.rs | 2 +- crates/xilem_web/src/svg/kurbo_shape.rs | 2 +- crates/xilem_web/src/svg/mod.rs | 3 + crates/xilem_web/src/vecmap.rs | 3 + crates/xilem_web/src/view.rs | 2 +- crates/xilem_web/src/view_ext.rs | 2 +- .../web_examples/counter/src/main.rs | 3 + .../counter_custom_element/src/main.rs | 3 + .../web_examples/mathml_svg/src/main.rs | 3 + .../xilem_web/web_examples/svgtoy/src/main.rs | 2 +- .../web_examples/todomvc/src/main.rs | 3 + .../web_examples/todomvc/src/state.rs | 3 + examples/hello_xilem.rs | 3 + examples/taffy.rs | 3 + src/app.rs | 15 +- src/app_main.rs | 15 +- src/geometry.rs | 3 + src/id.rs | 15 +- src/lib.rs | 3 + src/text.rs | 3 + src/view/async_list.rs | 15 +- src/view/button.rs | 15 +- src/view/layout_observer.rs | 15 +- src/view/linear_layout.rs | 15 +- src/view/list.rs | 15 +- src/view/mod.rs | 15 +- src/view/scroll_view.rs | 15 +- src/view/switch.rs | 15 +- src/view/taffy_layout.rs | 15 +- src/view/text.rs | 15 +- src/view/tree_structure_tracking.rs | 3 + src/view/use_state.rs | 15 +- src/view/view.rs | 15 +- src/widget/box_constraints.rs | 15 +- src/widget/button.rs | 15 +- src/widget/contexts.rs | 15 +- src/widget/core.rs | 15 +- src/widget/layout_observer.rs | 15 +- src/widget/linear_layout.rs | 15 +- src/widget/list.rs | 15 +- src/widget/mod.rs | 15 +- src/widget/piet_scene_helpers.rs | 3 + src/widget/raw_event.rs | 15 +- src/widget/scroll_view.rs | 15 +- src/widget/switch.rs | 15 +- src/widget/taffy_layout.rs | 15 +- src/widget/text.rs | 15 +- src/widget/tree_structure.rs | 3 + src/widget/widget.rs | 15 +- 141 files changed, 952 insertions(+), 537 deletions(-) create mode 100644 .github/copyright.sh create mode 100644 AUTHORS create mode 100644 crates/xilem_core/LICENSE create mode 100644 crates/xilem_masonry/LICENSE create mode 100644 crates/xilem_web/LICENSE diff --git a/.github/copyright.sh b/.github/copyright.sh new file mode 100644 index 00000000..c6e3522b --- /dev/null +++ b/.github/copyright.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# If there are new files with headers that can't match the conditions here, +# then the files can be ignored by an additional glob argument via the -g flag. +# For example: +# -g "!src/special_file.rs" +# -g "!src/special_directory" + +# Check all the standard Rust source files +output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Xilem Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0$\n\n" --files-without-match --multiline -g "*.rs" .) + +if [ -n "$output" ]; then + echo -e "The following files lack the correct copyright header:\n" + echo $output + echo -e "\n\nPlease add the following header:\n" + echo "// Copyright $(date +%Y) the Xilem Authors" + echo "// SPDX-License-Identifier: Apache-2.0" + echo -e "\n... rest of the file ...\n" + exit 1 +fi + +echo "All files have correct copyright headers." +exit 0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e4deae7..99a4fc0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,14 @@ jobs: - name: cargo fmt run: cargo fmt --all --check + - name: install ripgrep + run: | + sudo apt update + sudo apt install ripgrep + + - name: check copyright headers + run: bash .github/copyright.sh + test-stable: runs-on: ${{ matrix.os }} strategy: diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..ceee7b3c --- /dev/null +++ b/AUTHORS @@ -0,0 +1,20 @@ +# This is the list of Xilem's significant contributors. +# +# This does not necessarily list everyone who has contributed code, +# especially since many employees of one corporation may be contributing. +# To see the full list of contributors, see the revision history in +# source control. +Google LLC +Raph Levien +Philipp Mildenberger +Daniel McNab +Chad Brokaw +Kaur Kuut +Bruce Mitchener +Olivier Faure +Richard Dodd +Aaron Muir Hamilton +Jonas Platte +Nico Burns +Joe Neeman +John Skottis diff --git a/LICENSE b/LICENSE index 261eeb9e..d6456956 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/crates/masonry/Cargo.toml b/crates/masonry/Cargo.toml index 578de6cb..fd1defca 100644 --- a/crates/masonry/Cargo.toml +++ b/crates/masonry/Cargo.toml @@ -1,13 +1,12 @@ [package] -authors = ["Olivier FAURE "] categories = ["gui"] description = "Data-oriented Rust UI design toolkit." edition = "2021" keywords = ["gui", "ui", "toolkit"] -license = "Apache-2.0" +license.workspace = true name = "masonry" readme = "README.md" -repository = "https://github.com/PoignardAzur/masonry-rs" +repository.workspace = true rust-version = "1.75" version = "0.1.3" diff --git a/crates/masonry/examples/calc.rs b/crates/masonry/examples/calc.rs index ee446f3d..5013d36a 100644 --- a/crates/masonry/examples/calc.rs +++ b/crates/masonry/examples/calc.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Simple calculator. diff --git a/crates/masonry/examples/custom_widget.rs b/crates/masonry/examples/custom_widget.rs index d0974c79..64ef03e0 100644 --- a/crates/masonry/examples/custom_widget.rs +++ b/crates/masonry/examples/custom_widget.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! An example of a custom drawing widget. //! We draw an image, some text, a shape, and a curve. diff --git a/crates/masonry/examples/hello_masonry.rs b/crates/masonry/examples/hello_masonry.rs index 5f164af3..01d85adf 100644 --- a/crates/masonry/examples/hello_masonry.rs +++ b/crates/masonry/examples/hello_masonry.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! This is a very small example of how to setup a masonry application. //! It does the almost bare minimum while still being useful. diff --git a/crates/masonry/examples/simple_image.rs b/crates/masonry/examples/simple_image.rs index 85a1c870..174d2991 100644 --- a/crates/masonry/examples/simple_image.rs +++ b/crates/masonry/examples/simple_image.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! This showcase demonstrates how to use the image widget and is //! properties. You can change the parameters in the GUI to see how diff --git a/crates/masonry/src/action.rs b/crates/masonry/src/action.rs index 5c8573bc..5dca0bf5 100644 --- a/crates/masonry/src/action.rs +++ b/crates/masonry/src/action.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 use std::any::Any; use std::sync::Arc; diff --git a/crates/masonry/src/app_driver.rs b/crates/masonry/src/app_driver.rs index 765228b4..9f846140 100644 --- a/crates/masonry/src/app_driver.rs +++ b/crates/masonry/src/app_driver.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use crate::widget::WidgetMut; use crate::{Action, Widget, WidgetId}; diff --git a/crates/masonry/src/bloom.rs b/crates/masonry/src/bloom.rs index ad9457f7..67f7a79f 100644 --- a/crates/masonry/src/bloom.rs +++ b/crates/masonry/src/bloom.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A simple Bloom filter, used to track child widgets. diff --git a/crates/masonry/src/box_constraints.rs b/crates/masonry/src/box_constraints.rs index abacaf3a..fea68612 100644 --- a/crates/masonry/src/box_constraints.rs +++ b/crates/masonry/src/box_constraints.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use crate::kurbo::Size; diff --git a/crates/masonry/src/contexts.rs b/crates/masonry/src/contexts.rs index 8c65b7bb..d419d38e 100644 --- a/crates/masonry/src/contexts.rs +++ b/crates/masonry/src/contexts.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! The context types that are passed into various widget methods. diff --git a/crates/masonry/src/debug_logger.rs b/crates/masonry/src/debug_logger.rs index 317d4aef..71d80f27 100644 --- a/crates/masonry/src/debug_logger.rs +++ b/crates/masonry/src/debug_logger.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 #![allow(missing_docs)] diff --git a/crates/masonry/src/debug_values.rs b/crates/masonry/src/debug_values.rs index 229158c5..b585ef1d 100644 --- a/crates/masonry/src/debug_values.rs +++ b/crates/masonry/src/debug_values.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 #![allow(missing_docs)] diff --git a/crates/masonry/src/event.rs b/crates/masonry/src/event.rs index ab8dec64..9fb606d9 100644 --- a/crates/masonry/src/event.rs +++ b/crates/masonry/src/event.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Events. diff --git a/crates/masonry/src/event_loop_runner.rs b/crates/masonry/src/event_loop_runner.rs index 192a87d1..d5c48495 100644 --- a/crates/masonry/src/event_loop_runner.rs +++ b/crates/masonry/src/event_loop_runner.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::num::NonZeroUsize; use std::sync::Arc; diff --git a/crates/masonry/src/ext_event.rs b/crates/masonry/src/ext_event.rs index 84543eb3..6b73c2a6 100644 --- a/crates/masonry/src/ext_event.rs +++ b/crates/masonry/src/ext_event.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Simple handle for submitting external events. #![allow(unused)] diff --git a/crates/masonry/src/lib.rs b/crates/masonry/src/lib.rs index 2e65adaa..05f5b124 100644 --- a/crates/masonry/src/lib.rs +++ b/crates/masonry/src/lib.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A framework that aims to provide the foundation for Rust GUI libraries. //! diff --git a/crates/masonry/src/paint_scene_helpers.rs b/crates/masonry/src/paint_scene_helpers.rs index ad4e9f88..e82b0e82 100644 --- a/crates/masonry/src/paint_scene_helpers.rs +++ b/crates/masonry/src/paint_scene_helpers.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + #![allow(missing_docs)] use vello::{ diff --git a/crates/masonry/src/promise.rs b/crates/masonry/src/promise.rs index fba0a906..1e1943de 100644 --- a/crates/masonry/src/promise.rs +++ b/crates/masonry/src/promise.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2021 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 #![allow(missing_docs)] diff --git a/crates/masonry/src/render_root.rs b/crates/masonry/src/render_root.rs index 876cdf91..1c770bb9 100644 --- a/crates/masonry/src/render_root.rs +++ b/crates/masonry/src/render_root.rs @@ -1,3 +1,6 @@ +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 + use std::collections::VecDeque; // Automatically defaults to std::time::Instant on non Wasm platforms diff --git a/crates/masonry/src/testing/harness.rs b/crates/masonry/src/testing/harness.rs index e2f25b51..2b3e3621 100644 --- a/crates/masonry/src/testing/harness.rs +++ b/crates/masonry/src/testing/harness.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Tools and infrastructure for testing widgets. diff --git a/crates/masonry/src/testing/helper_widgets.rs b/crates/masonry/src/testing/helper_widgets.rs index d145f2a5..13bfcb0c 100644 --- a/crates/masonry/src/testing/helper_widgets.rs +++ b/crates/masonry/src/testing/helper_widgets.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Helper widgets for writing tests. //! diff --git a/crates/masonry/src/testing/mod.rs b/crates/masonry/src/testing/mod.rs index 4c76658d..ce33eeee 100644 --- a/crates/masonry/src/testing/mod.rs +++ b/crates/masonry/src/testing/mod.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Helper tools for writing unit tests. diff --git a/crates/masonry/src/testing/screenshots.rs b/crates/masonry/src/testing/screenshots.rs index 55658b36..3ff21a26 100644 --- a/crates/masonry/src/testing/screenshots.rs +++ b/crates/masonry/src/testing/screenshots.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 //! Helper functions for writing snapshot tests and comparing images. diff --git a/crates/masonry/src/testing/snapshot_utils.rs b/crates/masonry/src/testing/snapshot_utils.rs index 35c62cbf..7a86ceb4 100644 --- a/crates/masonry/src/testing/snapshot_utils.rs +++ b/crates/masonry/src/testing/snapshot_utils.rs @@ -1,12 +1,7 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2021 the Xilem Authors and Armin Ronacher +// SPDX-License-Identifier: Apache-2.0 -// This particular file was shamelessly stolen from the Insta crate, which is -// under the Apache License 2.0 as well. -// -// Repository: https://github.com/mitsuhiko/insta -// File this is based on: https://github.com/mitsuhiko/insta/blob/660f2b00e3092de50d4f7a59f28336d8a9da50b7/src/env.rs +// This is based on: https://github.com/mitsuhiko/insta/blob/660f2b00e3092de50d4f7a59f28336d8a9da50b7/src/env.rs // TODO - clean this all up - See #18 diff --git a/crates/masonry/src/text_helpers.rs b/crates/masonry/src/text_helpers.rs index c16e6529..71a41d25 100644 --- a/crates/masonry/src/text_helpers.rs +++ b/crates/masonry/src/text_helpers.rs @@ -1,3 +1,6 @@ +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 + //! Helper functions for working with text in Masonry. use parley::Layout; diff --git a/crates/masonry/src/theme.rs b/crates/masonry/src/theme.rs index 67bbfb56..c7e1410c 100644 --- a/crates/masonry/src/theme.rs +++ b/crates/masonry/src/theme.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Theme keys and initial values. diff --git a/crates/masonry/src/util.rs b/crates/masonry/src/util.rs index b33bb9f5..8d7ecaec 100644 --- a/crates/masonry/src/util.rs +++ b/crates/masonry/src/util.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Miscellaneous utility functions. diff --git a/crates/masonry/src/widget/align.rs b/crates/masonry/src/widget/align.rs index 75b3a0f2..a26637d2 100644 --- a/crates/masonry/src/widget/align.rs +++ b/crates/masonry/src/widget/align.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A widget that aligns its child (for example, centering it). diff --git a/crates/masonry/src/widget/button.rs b/crates/masonry/src/widget/button.rs index 264e3da9..d0d399eb 100644 --- a/crates/masonry/src/widget/button.rs +++ b/crates/masonry/src/widget/button.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A button widget. diff --git a/crates/masonry/src/widget/checkbox.rs b/crates/masonry/src/widget/checkbox.rs index aed612d2..c1c376dc 100644 --- a/crates/masonry/src/widget/checkbox.rs +++ b/crates/masonry/src/widget/checkbox.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A checkbox widget. diff --git a/crates/masonry/src/widget/flex.rs b/crates/masonry/src/widget/flex.rs index cf1e4f6f..1f14f62b 100644 --- a/crates/masonry/src/widget/flex.rs +++ b/crates/masonry/src/widget/flex.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A widget that arranges its children in a one-dimensional array. diff --git a/crates/masonry/src/widget/image.rs b/crates/masonry/src/widget/image.rs index f72e0069..54cc8284 100644 --- a/crates/masonry/src/widget/image.rs +++ b/crates/masonry/src/widget/image.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! An Image widget. //! Please consider using SVG and the SVG widget as it scales much better. diff --git a/crates/masonry/src/widget/label.rs b/crates/masonry/src/widget/label.rs index 99c798ed..15b679f9 100644 --- a/crates/masonry/src/widget/label.rs +++ b/crates/masonry/src/widget/label.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A label widget. diff --git a/crates/masonry/src/widget/mod.rs b/crates/masonry/src/widget/mod.rs index e3476795..100f4c47 100644 --- a/crates/masonry/src/widget/mod.rs +++ b/crates/masonry/src/widget/mod.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Common widgets. diff --git a/crates/masonry/src/widget/portal.rs b/crates/masonry/src/widget/portal.rs index bf01d4bb..6a9ad7d0 100644 --- a/crates/masonry/src/widget/portal.rs +++ b/crates/masonry/src/widget/portal.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 #![allow(missing_docs)] diff --git a/crates/masonry/src/widget/scroll_bar.rs b/crates/masonry/src/widget/scroll_bar.rs index da0a13b5..66d235b0 100644 --- a/crates/masonry/src/widget/scroll_bar.rs +++ b/crates/masonry/src/widget/scroll_bar.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 #![allow(missing_docs)] diff --git a/crates/masonry/src/widget/sized_box.rs b/crates/masonry/src/widget/sized_box.rs index 97c0a812..aebe1767 100644 --- a/crates/masonry/src/widget/sized_box.rs +++ b/crates/masonry/src/widget/sized_box.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A widget with predefined size. diff --git a/crates/masonry/src/widget/spinner.rs b/crates/masonry/src/widget/spinner.rs index caed291e..bc86383b 100644 --- a/crates/masonry/src/widget/spinner.rs +++ b/crates/masonry/src/widget/spinner.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! An animated spinner widget. diff --git a/crates/masonry/src/widget/split.rs b/crates/masonry/src/widget/split.rs index 5ed7cfa6..790c2cb9 100644 --- a/crates/masonry/src/widget/split.rs +++ b/crates/masonry/src/widget/split.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A widget which splits an area in two, with a settable ratio, and optional draggable resizing. diff --git a/crates/masonry/src/widget/tests/layout.rs b/crates/masonry/src/widget/tests/layout.rs index 670c10c3..4d42c2e8 100644 --- a/crates/masonry/src/widget/tests/layout.rs +++ b/crates/masonry/src/widget/tests/layout.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2020 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Tests related to layout. diff --git a/crates/masonry/src/widget/tests/lifecycle_basic.rs b/crates/masonry/src/widget/tests/lifecycle_basic.rs index 1dfc65d4..281b490b 100644 --- a/crates/masonry/src/widget/tests/lifecycle_basic.rs +++ b/crates/masonry/src/widget/tests/lifecycle_basic.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2021 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 #![allow(unused_imports)] diff --git a/crates/masonry/src/widget/tests/lifecycle_disable.rs b/crates/masonry/src/widget/tests/lifecycle_disable.rs index 9815e1e0..528e4342 100644 --- a/crates/masonry/src/widget/tests/lifecycle_disable.rs +++ b/crates/masonry/src/widget/tests/lifecycle_disable.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2021 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 #![allow(unused_imports)] diff --git a/crates/masonry/src/widget/tests/lifecycle_focus.rs b/crates/masonry/src/widget/tests/lifecycle_focus.rs index b878879b..c606af96 100644 --- a/crates/masonry/src/widget/tests/lifecycle_focus.rs +++ b/crates/masonry/src/widget/tests/lifecycle_focus.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2021 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 #![allow(unused)] diff --git a/crates/masonry/src/widget/tests/mod.rs b/crates/masonry/src/widget/tests/mod.rs index d6612155..b10b8cb9 100644 --- a/crates/masonry/src/widget/tests/mod.rs +++ b/crates/masonry/src/widget/tests/mod.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2021 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 // TODO - See https://github.com/PoignardAzur/masonry-rs/issues/58 diff --git a/crates/masonry/src/widget/tests/safety_rails.rs b/crates/masonry/src/widget/tests/safety_rails.rs index 4a9267cd..92033e26 100644 --- a/crates/masonry/src/widget/tests/safety_rails.rs +++ b/crates/masonry/src/widget/tests/safety_rails.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 use smallvec::smallvec; diff --git a/crates/masonry/src/widget/tests/status_change.rs b/crates/masonry/src/widget/tests/status_change.rs index 30f8509f..4319235b 100644 --- a/crates/masonry/src/widget/tests/status_change.rs +++ b/crates/masonry/src/widget/tests/status_change.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2021 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 use assert_matches::assert_matches; use winit::event::MouseButton; diff --git a/crates/masonry/src/widget/widget.rs b/crates/masonry/src/widget/widget.rs index 3207abba..754debe2 100644 --- a/crates/masonry/src/widget/widget.rs +++ b/crates/masonry/src/widget/widget.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::any::Any; use std::num::NonZeroU64; diff --git a/crates/masonry/src/widget/widget_mut.rs b/crates/masonry/src/widget/widget_mut.rs index 8b69897c..479f410e 100644 --- a/crates/masonry/src/widget/widget_mut.rs +++ b/crates/masonry/src/widget/widget_mut.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use crate::contexts::WidgetCtx; use crate::Widget; diff --git a/crates/masonry/src/widget/widget_pod.rs b/crates/masonry/src/widget/widget_pod.rs index cd12efd5..edf0e755 100644 --- a/crates/masonry/src/widget/widget_pod.rs +++ b/crates/masonry/src/widget/widget_pod.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use tracing::{info_span, trace, warn}; use vello::Scene; diff --git a/crates/masonry/src/widget/widget_ref.rs b/crates/masonry/src/widget/widget_ref.rs index b1d3290d..504435df 100644 --- a/crates/masonry/src/widget/widget_ref.rs +++ b/crates/masonry/src/widget/widget_ref.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::ops::Deref; diff --git a/crates/masonry/src/widget/widget_state.rs b/crates/masonry/src/widget/widget_state.rs index e81f94e4..565727bb 100644 --- a/crates/masonry/src/widget/widget_state.rs +++ b/crates/masonry/src/widget/widget_state.rs @@ -1,6 +1,5 @@ -// This software is licensed under Apache License 2.0 and distributed on an -// "as-is" basis without warranties of any kind. See the LICENSE file for -// details. +// Copyright 2018 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 #![cfg(not(tarpaulin_include))] diff --git a/crates/xilem_core/LICENSE b/crates/xilem_core/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/crates/xilem_core/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/crates/xilem_core/src/any_view.rs b/crates/xilem_core/src/any_view.rs index 78be91c4..172f1aa4 100644 --- a/crates/xilem_core/src/any_view.rs +++ b/crates/xilem_core/src/any_view.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 #[macro_export] diff --git a/crates/xilem_core/src/id.rs b/crates/xilem_core/src/id.rs index 24b53e6e..18590cf6 100644 --- a/crates/xilem_core/src/id.rs +++ b/crates/xilem_core/src/id.rs @@ -1,4 +1,4 @@ -// Copyright 2022 The Druid Authors. +// Copyright 2022 the Xilem Authors and the Druid Authors // SPDX-License-Identifier: Apache-2.0 use std::{ diff --git a/crates/xilem_core/src/lib.rs b/crates/xilem_core/src/lib.rs index 657ff0e7..afe57a0d 100644 --- a/crates/xilem_core/src/lib.rs +++ b/crates/xilem_core/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2022 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 //! Generic implementation of Xilem view traits. diff --git a/crates/xilem_core/src/message.rs b/crates/xilem_core/src/message.rs index b89c29e8..ac6bdb5a 100644 --- a/crates/xilem_core/src/message.rs +++ b/crates/xilem_core/src/message.rs @@ -1,4 +1,4 @@ -// Copyright 2022 The Druid Authors. +// Copyright 2022 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 use std::any::Any; diff --git a/crates/xilem_core/src/sequence.rs b/crates/xilem_core/src/sequence.rs index b2e2560e..5773fcca 100644 --- a/crates/xilem_core/src/sequence.rs +++ b/crates/xilem_core/src/sequence.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 #[doc(hidden)] diff --git a/crates/xilem_core/src/vec_splice.rs b/crates/xilem_core/src/vec_splice.rs index e438d761..b2aed303 100644 --- a/crates/xilem_core/src/vec_splice.rs +++ b/crates/xilem_core/src/vec_splice.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 pub struct VecSplice<'a, 'b, T> { diff --git a/crates/xilem_core/src/view/adapt.rs b/crates/xilem_core/src/view/adapt.rs index 9e521207..98dc8812 100644 --- a/crates/xilem_core/src/view/adapt.rs +++ b/crates/xilem_core/src/view/adapt.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + #[macro_export] macro_rules! generate_adapt_view { ($viewtrait:ident, $cx:ty, $changeflags:ty; $($ss:tt)*) => { diff --git a/crates/xilem_core/src/view/memoize.rs b/crates/xilem_core/src/view/memoize.rs index 36db4fec..f935c319 100644 --- a/crates/xilem_core/src/view/memoize.rs +++ b/crates/xilem_core/src/view/memoize.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Xilem Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 #[macro_export] diff --git a/crates/xilem_core/src/view/mod.rs b/crates/xilem_core/src/view/mod.rs index 3fc4837e..e9e39a78 100644 --- a/crates/xilem_core/src/view/mod.rs +++ b/crates/xilem_core/src/view/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 mod adapt; diff --git a/crates/xilem_masonry/LICENSE b/crates/xilem_masonry/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/crates/xilem_masonry/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/crates/xilem_masonry/examples/mason.rs b/crates/xilem_masonry/examples/mason.rs index b52eb29a..9988f962 100644 --- a/crates/xilem_masonry/examples/mason.rs +++ b/crates/xilem_masonry/examples/mason.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + // On Windows platform, don't show a console when opening the app. #![windows_subsystem = "windows"] diff --git a/crates/xilem_masonry/src/any_view.rs b/crates/xilem_masonry/src/any_view.rs index 4e37bd9e..e659546d 100644 --- a/crates/xilem_masonry/src/any_view.rs +++ b/crates/xilem_masonry/src/any_view.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::{any::Any, ops::Deref}; use masonry::widget::{WidgetMut, WidgetRef}; diff --git a/crates/xilem_masonry/src/id.rs b/crates/xilem_masonry/src/id.rs index 3bc5889b..8905c672 100644 --- a/crates/xilem_masonry/src/id.rs +++ b/crates/xilem_masonry/src/id.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::fmt::Debug; #[derive(Copy, Clone)] diff --git a/crates/xilem_masonry/src/lib.rs b/crates/xilem_masonry/src/lib.rs index a0902f30..b3405f9f 100644 --- a/crates/xilem_masonry/src/lib.rs +++ b/crates/xilem_masonry/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + #![allow(clippy::comparison_chain)] use std::{any::Any, collections::HashMap}; diff --git a/crates/xilem_masonry/src/sequence.rs b/crates/xilem_masonry/src/sequence.rs index aafec388..8dc2d368 100644 --- a/crates/xilem_masonry/src/sequence.rs +++ b/crates/xilem_masonry/src/sequence.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use masonry::{widget::WidgetMut, Widget, WidgetPod}; use crate::{ChangeFlags, MasonryView, MessageResult, ViewCx, ViewId}; diff --git a/crates/xilem_masonry/src/vec_splice.rs b/crates/xilem_masonry/src/vec_splice.rs index f7333c40..e69b49b1 100644 --- a/crates/xilem_masonry/src/vec_splice.rs +++ b/crates/xilem_masonry/src/vec_splice.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 use masonry::widget::WidgetMut; diff --git a/crates/xilem_masonry/src/view/button.rs b/crates/xilem_masonry/src/view/button.rs index 4d4eae63..0003ab27 100644 --- a/crates/xilem_masonry/src/view/button.rs +++ b/crates/xilem_masonry/src/view/button.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use masonry::{widget::WidgetMut, ArcStr, WidgetPod}; use crate::{ChangeFlags, MasonryView, MessageResult, ViewCx, ViewId}; diff --git a/crates/xilem_masonry/src/view/checkbox.rs b/crates/xilem_masonry/src/view/checkbox.rs index f0a6ca95..c62a664e 100644 --- a/crates/xilem_masonry/src/view/checkbox.rs +++ b/crates/xilem_masonry/src/view/checkbox.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use masonry::{widget::WidgetMut, ArcStr, WidgetPod}; use crate::{ChangeFlags, MasonryView, MessageResult, ViewCx, ViewId}; diff --git a/crates/xilem_masonry/src/view/flex.rs b/crates/xilem_masonry/src/view/flex.rs index 72e07c05..6e0911be 100644 --- a/crates/xilem_masonry/src/view/flex.rs +++ b/crates/xilem_masonry/src/view/flex.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::marker::PhantomData; use masonry::{ diff --git a/crates/xilem_masonry/src/view/label.rs b/crates/xilem_masonry/src/view/label.rs index 74cb570f..08abca96 100644 --- a/crates/xilem_masonry/src/view/label.rs +++ b/crates/xilem_masonry/src/view/label.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use masonry::{widget::WidgetMut, ArcStr, WidgetPod}; use crate::{ChangeFlags, Color, MasonryView, MessageResult, TextAlignment, ViewCx, ViewId}; diff --git a/crates/xilem_masonry/src/view/mod.rs b/crates/xilem_masonry/src/view/mod.rs index 4d5bc73a..0c95f892 100644 --- a/crates/xilem_masonry/src/view/mod.rs +++ b/crates/xilem_masonry/src/view/mod.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + mod button; pub use button::*; diff --git a/crates/xilem_web/LICENSE b/crates/xilem_web/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/crates/xilem_web/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/crates/xilem_web/src/app.rs b/crates/xilem_web/src/app.rs index f1fda028..f7c42b1a 100644 --- a/crates/xilem_web/src/app.rs +++ b/crates/xilem_web/src/app.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 use std::{cell::RefCell, rc::Rc}; diff --git a/crates/xilem_web/src/attribute.rs b/crates/xilem_web/src/attribute.rs index 1fb45560..12231151 100644 --- a/crates/xilem_web/src/attribute.rs +++ b/crates/xilem_web/src/attribute.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::borrow::Cow; use std::marker::PhantomData; diff --git a/crates/xilem_web/src/attribute_value.rs b/crates/xilem_web/src/attribute_value.rs index 3428a507..2d72b3d7 100644 --- a/crates/xilem_web/src/attribute_value.rs +++ b/crates/xilem_web/src/attribute_value.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + type CowStr = std::borrow::Cow<'static, str>; #[derive(PartialEq, Clone, Debug, PartialOrd)] diff --git a/crates/xilem_web/src/class.rs b/crates/xilem_web/src/class.rs index 66b83ca2..02547a0e 100644 --- a/crates/xilem_web/src/class.rs +++ b/crates/xilem_web/src/class.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::{borrow::Cow, marker::PhantomData}; use xilem_core::{Id, MessageResult}; diff --git a/crates/xilem_web/src/context.rs b/crates/xilem_web/src/context.rs index ce793851..c1fe6d4f 100644 --- a/crates/xilem_web/src/context.rs +++ b/crates/xilem_web/src/context.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::any::Any; use bitflags::bitflags; diff --git a/crates/xilem_web/src/diff.rs b/crates/xilem_web/src/diff.rs index 5506d29a..8fac0c1e 100644 --- a/crates/xilem_web/src/diff.rs +++ b/crates/xilem_web/src/diff.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::{cmp::Ordering, iter::Peekable}; /// Computes the diff between two `Iterators` that have a key value mapping and are ordered by key (e.g. a BTreeMap) diff --git a/crates/xilem_web/src/elements.rs b/crates/xilem_web/src/elements.rs index ee4b31e6..c1613be3 100644 --- a/crates/xilem_web/src/elements.rs +++ b/crates/xilem_web/src/elements.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::marker::PhantomData; use wasm_bindgen::{JsCast, UnwrapThrowExt}; diff --git a/crates/xilem_web/src/events.rs b/crates/xilem_web/src/events.rs index e417216c..84679304 100644 --- a/crates/xilem_web/src/events.rs +++ b/crates/xilem_web/src/events.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use crate::{ interfaces::{sealed::Sealed, Element}, view::DomNode, diff --git a/crates/xilem_web/src/interfaces.rs b/crates/xilem_web/src/interfaces.rs index e7ec6a81..dd9b32b7 100644 --- a/crates/xilem_web/src/interfaces.rs +++ b/crates/xilem_web/src/interfaces.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use crate::{ class::{Class, IntoClasses}, style::{IntoStyles, Style}, diff --git a/crates/xilem_web/src/lib.rs b/crates/xilem_web/src/lib.rs index 3821ecf7..0600378b 100644 --- a/crates/xilem_web/src/lib.rs +++ b/crates/xilem_web/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 //! A highly experimental web framework using the xilem architecture. diff --git a/crates/xilem_web/src/one_of.rs b/crates/xilem_web/src/one_of.rs index 7d912b99..40b22809 100644 --- a/crates/xilem_web/src/one_of.rs +++ b/crates/xilem_web/src/one_of.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use wasm_bindgen::throw_str; use crate::{ diff --git a/crates/xilem_web/src/optional_action.rs b/crates/xilem_web/src/optional_action.rs index de8021e9..83427a79 100644 --- a/crates/xilem_web/src/optional_action.rs +++ b/crates/xilem_web/src/optional_action.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + /// Implement this trait for types you want to use as actions. /// /// The trait exists because otherwise we couldn't provide versions diff --git a/crates/xilem_web/src/pointer.rs b/crates/xilem_web/src/pointer.rs index 7c738a64..52748564 100644 --- a/crates/xilem_web/src/pointer.rs +++ b/crates/xilem_web/src/pointer.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 //! Interactivity with pointer events. diff --git a/crates/xilem_web/src/style.rs b/crates/xilem_web/src/style.rs index ddd7364f..53789583 100644 --- a/crates/xilem_web/src/style.rs +++ b/crates/xilem_web/src/style.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::collections::BTreeMap; use std::marker::PhantomData; use std::{borrow::Cow, collections::HashMap}; diff --git a/crates/xilem_web/src/svg/common_attrs.rs b/crates/xilem_web/src/svg/common_attrs.rs index 69278d4a..ccd12dc3 100644 --- a/crates/xilem_web/src/svg/common_attrs.rs +++ b/crates/xilem_web/src/svg/common_attrs.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 use std::borrow::Cow; diff --git a/crates/xilem_web/src/svg/kurbo_shape.rs b/crates/xilem_web/src/svg/kurbo_shape.rs index 454319dd..ac45147c 100644 --- a/crates/xilem_web/src/svg/kurbo_shape.rs +++ b/crates/xilem_web/src/svg/kurbo_shape.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 //! Implementation of the View trait for various kurbo shapes. diff --git a/crates/xilem_web/src/svg/mod.rs b/crates/xilem_web/src/svg/mod.rs index f1b2815c..0b972ff9 100644 --- a/crates/xilem_web/src/svg/mod.rs +++ b/crates/xilem_web/src/svg/mod.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + pub(crate) mod common_attrs; pub(crate) mod kurbo_shape; diff --git a/crates/xilem_web/src/vecmap.rs b/crates/xilem_web/src/vecmap.rs index 7b7de838..eecc44ff 100644 --- a/crates/xilem_web/src/vecmap.rs +++ b/crates/xilem_web/src/vecmap.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use std::{borrow::Borrow, fmt, ops::Index}; /// Basically an ordered Map (similar as BTreeMap) with a Vec as backend for very few elements diff --git a/crates/xilem_web/src/view.rs b/crates/xilem_web/src/view.rs index 6a53e613..fedfe46c 100644 --- a/crates/xilem_web/src/view.rs +++ b/crates/xilem_web/src/view.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 //! Integration with xilem_core. This instantiates the View and related diff --git a/crates/xilem_web/src/view_ext.rs b/crates/xilem_web/src/view_ext.rs index f1ffbcd9..4a8aa79b 100644 --- a/crates/xilem_web/src/view_ext.rs +++ b/crates/xilem_web/src/view_ext.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 use crate::{view::View, Adapt, AdaptState, AdaptThunk}; diff --git a/crates/xilem_web/web_examples/counter/src/main.rs b/crates/xilem_web/web_examples/counter/src/main.rs index de1b9b90..e202d22e 100644 --- a/crates/xilem_web/web_examples/counter/src/main.rs +++ b/crates/xilem_web/web_examples/counter/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use xilem_web::{ document_body, elements::html as el, diff --git a/crates/xilem_web/web_examples/counter_custom_element/src/main.rs b/crates/xilem_web/web_examples/counter_custom_element/src/main.rs index ff9f0479..3547bc15 100644 --- a/crates/xilem_web/web_examples/counter_custom_element/src/main.rs +++ b/crates/xilem_web/web_examples/counter_custom_element/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use xilem_web::{ document_body, elements::custom_element, diff --git a/crates/xilem_web/web_examples/mathml_svg/src/main.rs b/crates/xilem_web/web_examples/mathml_svg/src/main.rs index ab00d799..9b2b41f7 100644 --- a/crates/xilem_web/web_examples/mathml_svg/src/main.rs +++ b/crates/xilem_web/web_examples/mathml_svg/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use wasm_bindgen::{JsCast, UnwrapThrowExt}; use xilem_web::{ document_body, elements::html, elements::mathml as ml, elements::svg, interfaces::*, App, diff --git a/crates/xilem_web/web_examples/svgtoy/src/main.rs b/crates/xilem_web/web_examples/svgtoy/src/main.rs index 509d3ffb..88ceaf43 100644 --- a/crates/xilem_web/web_examples/svgtoy/src/main.rs +++ b/crates/xilem_web/web_examples/svgtoy/src/main.rs @@ -1,4 +1,4 @@ -// Copyright 2023 the Druid Authors. +// Copyright 2023 the Xilem Authors // SPDX-License-Identifier: Apache-2.0 use xilem_web::{ diff --git a/crates/xilem_web/web_examples/todomvc/src/main.rs b/crates/xilem_web/web_examples/todomvc/src/main.rs index 74a6651d..2c180f22 100644 --- a/crates/xilem_web/web_examples/todomvc/src/main.rs +++ b/crates/xilem_web/web_examples/todomvc/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + mod state; use state::{AppState, Filter, Todo}; diff --git a/crates/xilem_web/web_examples/todomvc/src/state.rs b/crates/xilem_web/web_examples/todomvc/src/state.rs index 13d5b860..d911473e 100644 --- a/crates/xilem_web/web_examples/todomvc/src/state.rs +++ b/crates/xilem_web/web_examples/todomvc/src/state.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use serde::{Deserialize, Serialize}; use wasm_bindgen::UnwrapThrowExt; diff --git a/examples/hello_xilem.rs b/examples/hello_xilem.rs index c1c86c06..a4fd7067 100644 --- a/examples/hello_xilem.rs +++ b/examples/hello_xilem.rs @@ -1,3 +1,6 @@ +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 + use xilem::view::{button, h_stack, switch, v_stack}; use xilem::{view::View, App, AppLauncher}; diff --git a/examples/taffy.rs b/examples/taffy.rs index 37702627..3827f1d1 100644 --- a/examples/taffy.rs +++ b/examples/taffy.rs @@ -1,3 +1,6 @@ +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use xilem::{view::View, App, AppLauncher}; #[derive(Debug, Clone, PartialEq, Eq, Hash)] diff --git a/src/app.rs b/src/app.rs index 94fdb3df..d0ca158c 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::collections::HashSet; use std::time::Duration; diff --git a/src/app_main.rs b/src/app_main.rs index ed93c2fd..20bc4ee5 100644 --- a/src/app_main.rs +++ b/src/app_main.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::{num::NonZeroUsize, sync::Arc}; diff --git a/src/geometry.rs b/src/geometry.rs index 7fa12da8..582f711d 100644 --- a/src/geometry.rs +++ b/src/geometry.rs @@ -1,3 +1,6 @@ +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 + use crate::widget::BoxConstraints; use std::ops::Range; use vello::kurbo::{Point, Rect, Size, Vec2}; diff --git a/src/id.rs b/src/id.rs index 82b61fd9..c659c558 100644 --- a/src/id.rs +++ b/src/id.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::num::NonZeroU64; diff --git a/src/lib.rs b/src/lib.rs index 68ffe75d..5e62408e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + extern crate core; mod app; diff --git a/src/text.rs b/src/text.rs index 42f05d5b..3e5bcbb0 100644 --- a/src/text.rs +++ b/src/text.rs @@ -1,3 +1,6 @@ +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 + use parley::Layout; use vello::{ kurbo::Affine, diff --git a/src/view/async_list.rs b/src/view/async_list.rs index 23cb0d1a..e89c3c7e 100644 --- a/src/view/async_list.rs +++ b/src/view/async_list.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 //! A virtualized list of items that creates its view asynchronously. //! diff --git a/src/view/button.rs b/src/view/button.rs index a5ad7cda..30e015e6 100644 --- a/src/view/button.rs +++ b/src/view/button.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::any::Any; diff --git a/src/view/layout_observer.rs b/src/view/layout_observer.rs index 74005c27..b800aae0 100644 --- a/src/view/layout_observer.rs +++ b/src/view/layout_observer.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::{any::Any, marker::PhantomData}; diff --git a/src/view/linear_layout.rs b/src/view/linear_layout.rs index 30ee4764..5b5a2562 100644 --- a/src/view/linear_layout.rs +++ b/src/view/linear_layout.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::{any::Any, marker::PhantomData}; diff --git a/src/view/list.rs b/src/view/list.rs index 1fb1edb3..240d4189 100644 --- a/src/view/list.rs +++ b/src/view/list.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use crate::view::{Cx, ElementsSplice, ViewSequence}; use crate::widget::ChangeFlags; diff --git a/src/view/mod.rs b/src/view/mod.rs index f8a153ab..457e5b2b 100644 --- a/src/view/mod.rs +++ b/src/view/mod.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 // mod async_list; mod button; diff --git a/src/view/scroll_view.rs b/src/view/scroll_view.rs index 4014791c..6ebb58bf 100644 --- a/src/view/scroll_view.rs +++ b/src/view/scroll_view.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::{any::Any, marker::PhantomData}; diff --git a/src/view/switch.rs b/src/view/switch.rs index 00949038..40e57950 100644 --- a/src/view/switch.rs +++ b/src/view/switch.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::any::Any; diff --git a/src/view/taffy_layout.rs b/src/view/taffy_layout.rs index 33a4a1ed..026951f6 100644 --- a/src/view/taffy_layout.rs +++ b/src/view/taffy_layout.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 use std::{any::Any, marker::PhantomData}; diff --git a/src/view/text.rs b/src/view/text.rs index 1ec4fd48..676aaa5a 100644 --- a/src/view/text.rs +++ b/src/view/text.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::borrow::Cow; diff --git a/src/view/tree_structure_tracking.rs b/src/view/tree_structure_tracking.rs index aa5c797c..30bd4978 100644 --- a/src/view/tree_structure_tracking.rs +++ b/src/view/tree_structure_tracking.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use crate::{ id::Id, view::ElementsSplice, diff --git a/src/view/use_state.rs b/src/view/use_state.rs index fd0f2c3d..319ae43a 100644 --- a/src/view/use_state.rs +++ b/src/view/use_state.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 use std::{any::Any, marker::PhantomData, sync::Arc}; diff --git a/src/view/view.rs b/src/view/view.rs index 89cb81cb..a9adca58 100644 --- a/src/view/view.rs +++ b/src/view/view.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::{ collections::HashSet, diff --git a/src/widget/box_constraints.rs b/src/widget/box_constraints.rs index aee9416f..6405cc6e 100644 --- a/src/widget/box_constraints.rs +++ b/src/widget/box_constraints.rs @@ -1,16 +1,5 @@ -// Copyright 2019 The Druid Authors. -// -// 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. +// Copyright 2019 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! The fundamental druid types. diff --git a/src/widget/button.rs b/src/widget/button.rs index 59f118d0..5174bfdf 100644 --- a/src/widget/button.rs +++ b/src/widget/button.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use parley::Layout; use vello::{ diff --git a/src/widget/contexts.rs b/src/widget/contexts.rs index 2edb87c6..055e2419 100644 --- a/src/widget/contexts.rs +++ b/src/widget/contexts.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Contexts for the widget system. //! diff --git a/src/widget/core.rs b/src/widget/core.rs index 19f34803..76d7dde2 100644 --- a/src/widget/core.rs +++ b/src/widget/core.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Core types and mechanisms for the widget hierarchy. //! diff --git a/src/widget/layout_observer.rs b/src/widget/layout_observer.rs index 653ade9a..8ca18c05 100644 --- a/src/widget/layout_observer.rs +++ b/src/widget/layout_observer.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! The widget-side implementation of layout observers. //! diff --git a/src/widget/linear_layout.rs b/src/widget/linear_layout.rs index e3a890ba..68f3b2ab 100644 --- a/src/widget/linear_layout.rs +++ b/src/widget/linear_layout.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use crate::geometry::Axis; use crate::widget::{BoxConstraints, Event}; diff --git a/src/widget/list.rs b/src/widget/list.rs index 6c0bde53..cc328391 100644 --- a/src/widget/list.rs +++ b/src/widget/list.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A virtualized list of items. //! diff --git a/src/widget/mod.rs b/src/widget/mod.rs index 76dbbfc5..df81013e 100644 --- a/src/widget/mod.rs +++ b/src/widget/mod.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 mod box_constraints; mod button; diff --git a/src/widget/piet_scene_helpers.rs b/src/widget/piet_scene_helpers.rs index aecacf4b..2cb740ec 100644 --- a/src/widget/piet_scene_helpers.rs +++ b/src/widget/piet_scene_helpers.rs @@ -1,3 +1,6 @@ +// Copyright 2022 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use vello::{ kurbo::{self, Affine, Rect, Shape, Stroke}, peniko::{BrushRef, Color, ColorStopsSource, Fill, Gradient}, diff --git a/src/widget/raw_event.rs b/src/widget/raw_event.rs index 0b85dee5..d14af31f 100644 --- a/src/widget/raw_event.rs +++ b/src/widget/raw_event.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! Handling of platform and integration events at the widget level. //! diff --git a/src/widget/scroll_view.rs b/src/widget/scroll_view.rs index 1fdc1dfd..edcace2d 100644 --- a/src/widget/scroll_view.rs +++ b/src/widget/scroll_view.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 //! A simple scroll view. //! diff --git a/src/widget/switch.rs b/src/widget/switch.rs index 33edd876..7c6718da 100644 --- a/src/widget/switch.rs +++ b/src/widget/switch.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use vello::{ kurbo::{Circle, Point, Size}, diff --git a/src/widget/taffy_layout.rs b/src/widget/taffy_layout.rs index 08edb36f..f7e1ac86 100644 --- a/src/widget/taffy_layout.rs +++ b/src/widget/taffy_layout.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2023 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 use crate::{ geometry::Axis, diff --git a/src/widget/text.rs b/src/widget/text.rs index ea13dfe0..35eda680 100644 --- a/src/widget/text.rs +++ b/src/widget/text.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use parley::{FontContext, Layout}; use std::borrow::Cow; diff --git a/src/widget/tree_structure.rs b/src/widget/tree_structure.rs index 3c07af3c..5ff34c8d 100644 --- a/src/widget/tree_structure.rs +++ b/src/widget/tree_structure.rs @@ -1,3 +1,6 @@ +// Copyright 2024 the Xilem Authors +// SPDX-License-Identifier: Apache-2.0 + use crate::id::Id; use std::collections::HashMap; diff --git a/src/widget/widget.rs b/src/widget/widget.rs index dab5032e..1138baa3 100644 --- a/src/widget/widget.rs +++ b/src/widget/widget.rs @@ -1,16 +1,5 @@ -// Copyright 2022 The Druid Authors. -// -// 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. +// Copyright 2022 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 use std::any::Any; use std::ops::DerefMut;