Ask users to share use cases

This commit is contained in:
Héctor Ramón Jiménez 2019-09-05 09:59:38 +02:00
parent 3fb06f6666
commit c48739029b
7 changed files with 37 additions and 3 deletions

View file

@ -11,6 +11,12 @@ readme = "README.md"
keywords = ["gui", "ui", "graphics", "interface", "widgets"] keywords = ["gui", "ui", "graphics", "interface", "widgets"]
categories = ["gui"] categories = ["gui"]
[badges]
maintenance = { status = "actively-developed" }
[package.metadata.docs.rs]
features = ["winit"]
[dependencies] [dependencies]
stretch = "0.2" stretch = "0.2"
twox-hash = "1.5" twox-hash = "1.5"

View file

@ -1,6 +1,11 @@
use crate::input::{keyboard, mouse}; use crate::input::{keyboard, mouse};
/// A user interface event. /// A user interface event.
///
/// _**Note:** This type is largely incomplete! If you need to track
/// additional events, feel free to [open an issue] and share your use case!_
///
/// [open an issue]: https://github.com/hecrj/iced/issues
#[derive(PartialEq, Clone, Copy, Debug)] #[derive(PartialEq, Clone, Copy, Debug)]
pub enum Event { pub enum Event {
/// A keyboard event /// A keyboard event

View file

@ -1,4 +1,9 @@
/// The state of a button. /// The state of a button.
///
/// If you are using [`winit`], consider enabling the `winit` feature to get
/// conversion implementations for free!
///
/// [`winit`]: https://docs.rs/winit/0.20.0-alpha3/winit/
#[derive(Debug, Hash, Ord, PartialOrd, PartialEq, Eq, Clone, Copy)] #[derive(Debug, Hash, Ord, PartialOrd, PartialEq, Eq, Clone, Copy)]
pub enum ButtonState { pub enum ButtonState {
/// The button is pressed. /// The button is pressed.

View file

@ -3,6 +3,11 @@ use crate::input::ButtonState;
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq)]
/// A keyboard event. /// A keyboard event.
///
/// _**Note:** This type is largely incomplete! If you need to track
/// additional events, feel free to [open an issue] and share your use case!_
///
/// [open an issue]: https://github.com/hecrj/iced/issues
pub enum Event { pub enum Event {
/// A keyboard key was pressed or released. /// A keyboard key was pressed or released.
Input { Input {

View file

@ -1,8 +1,11 @@
/// The symbolic name of a keyboard key. /// The symbolic name of a keyboard key.
/// ///
/// This is mostly the `KeyCode` type found in `winit`. If you are using /// This is mostly the `KeyCode` type found in [`winit`].
/// `winit`, consider enabling the `winit` feature to get conversion ///
/// implementations for free! /// If you are using [`winit`], consider enabling the `winit` feature to get
/// conversion implementations for free!
///
/// [`winit`]: https://docs.rs/winit/0.20.0-alpha3/winit/
#[derive(Debug, Hash, Ord, PartialOrd, PartialEq, Eq, Clone, Copy)] #[derive(Debug, Hash, Ord, PartialOrd, PartialEq, Eq, Clone, Copy)]
#[repr(u32)] #[repr(u32)]
#[allow(missing_docs)] #[allow(missing_docs)]

View file

@ -1,4 +1,9 @@
/// The button of a mouse. /// The button of a mouse.
///
/// If you are using [`winit`], consider enabling the `winit` feature to get
/// conversion implementations for free!
///
/// [`winit`]: https://docs.rs/winit/0.20.0-alpha3/winit/
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)] #[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
pub enum Button { pub enum Button {
/// The left mouse button. /// The left mouse button.

View file

@ -2,6 +2,11 @@ use super::Button;
use crate::input::ButtonState; use crate::input::ButtonState;
/// A mouse event. /// A mouse event.
///
/// _**Note:** This type is largely incomplete! If you need to track
/// additional events, feel free to [open an issue] and share your use case!_
///
/// [open an issue]: https://github.com/hecrj/iced/issues
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq)]
pub enum Event { pub enum Event {
/// The mouse cursor entered the window. /// The mouse cursor entered the window.