From 3287117d89f083aca30672dac6282eae2559e049 Mon Sep 17 00:00:00 2001 From: Enrico Lumetti Date: Sun, 8 Nov 2020 10:36:26 +0100 Subject: [PATCH] Add LICENSE --- AUTHORS | 2 ++ LICENSE | 0 src/bin/libinput_capture.rs | 3 ++- src/main.rs | 24 ++++++++++++------------ 4 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 AUTHORS create mode 100644 LICENSE diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..24a96cc --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Enrico Lumetti +Francesco Magliocca diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e69de29 diff --git a/src/bin/libinput_capture.rs b/src/bin/libinput_capture.rs index f931e52..5130d1f 100644 --- a/src/bin/libinput_capture.rs +++ b/src/bin/libinput_capture.rs @@ -1,6 +1,7 @@ use input::{Libinput, LibinputInterface}; use input::event::Event; use input::event::tablet_tool::{TabletToolEvent, TabletToolEventTrait}; +use std::time; use std::ffi::CString; use std::path::Path; use std::os::unix::io::{RawFd}; @@ -43,7 +44,7 @@ fn main() { while let Some(event) = libinput_ctx.next() { if let Event::Tablet(tablet_evt) = event { if let TabletToolEvent::Axis(axis_evt) = tablet_evt { - if true { //axis_evt.pressure() > 1e-3 { + if axis_evt.pressure() > 1e-3 { let pressure = axis_evt.pressure(); let x_t = axis_evt.x_transformed(1080); let y_t = axis_evt.y_transformed(1920); diff --git a/src/main.rs b/src/main.rs index d7b3964..2d6b9ef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,18 +1,18 @@ -// Copyright 2019 The Druid Authors. +// Stiletto +// Copyright (C) 2020 Stiletto 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 +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// http://www.apache.org/licenses/LICENSE-2.0 +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. // -// 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. - -//! An example of a custom drawing widget. +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . use std::rc::Rc; use druid::im::{vector, Vector};