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"]
categories = ["gui"]
[badges]
maintenance = { status = "actively-developed" }
[package.metadata.docs.rs]
features = ["winit"]
[dependencies]
stretch = "0.2"
twox-hash = "1.5"

View file

@ -1,6 +1,11 @@
use crate::input::{keyboard, mouse};
/// 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)]
pub enum Event {
/// A keyboard event

View file

@ -1,4 +1,9 @@
/// 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)]
pub enum ButtonState {
/// The button is pressed.

View file

@ -3,6 +3,11 @@ use crate::input::ButtonState;
#[derive(Debug, Clone, Copy, PartialEq)]
/// 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 {
/// A keyboard key was pressed or released.
Input {

View file

@ -1,8 +1,11 @@
/// The symbolic name of a keyboard key.
///
/// This is mostly the `KeyCode` type found in `winit`. If you are using
/// `winit`, consider enabling the `winit` feature to get conversion
/// implementations for free!
/// This is mostly the `KeyCode` type found in [`winit`].
///
/// 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)]
#[repr(u32)]
#[allow(missing_docs)]

View file

@ -1,4 +1,9 @@
/// 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)]
pub enum Button {
/// The left mouse button.

View file

@ -2,6 +2,11 @@ use super::Button;
use crate::input::ButtonState;
/// 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)]
pub enum Event {
/// The mouse cursor entered the window.