diff options
author | Ben Bridle <bridle.benjamin@gmail.com> | 2023-10-11 08:21:10 +1300 |
---|---|---|
committer | Ben Bridle <bridle.benjamin@gmail.com> | 2023-10-11 08:21:10 +1300 |
commit | 8e08d723ff7a853f2b10dc0f1408911d5801cea8 (patch) | |
tree | 50efd2967e93f8bc1009f242a405ec18335f0aa6 /src/press_state.rs | |
parent | a6e97019bd53e4478c846f8f636c18ecb53bece2 (diff) | |
download | phosphor-8e08d723ff7a853f2b10dc0f1408911d5801cea8.zip |
Rewrite phosphor
This has been a long-awaited task, the code has been accumulating small
changes for a while now. This commit consolidates all these changes in
order to make the code more readable and maintainable for the future.
Notable changes:
- Remove the concept of a ProgramController
- Remove all of the dead OpenGL stub code
- Update winit to version 28.1, from 27.4
- Use softbuffer for writing pixels to the native display server
Diffstat (limited to 'src/press_state.rs')
-rw-r--r-- | src/press_state.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/press_state.rs b/src/press_state.rs deleted file mode 100644 index 5136d66..0000000 --- a/src/press_state.rs +++ /dev/null @@ -1,26 +0,0 @@ -use winit::event::ElementState; - -/// Denotes whether an event was a press event or a release event. -#[derive(Clone, Copy, PartialEq, Debug)] -pub enum PressState { - Pressed, - Released, -} - -impl PressState { - pub fn is_pressed(&self) -> bool { - *self == Self::Pressed - } - pub fn is_released(&self) -> bool { - *self == Self::Released - } -} - -impl From<ElementState> for PressState { - fn from(value: ElementState) -> Self { - match value { - ElementState::Pressed => PressState::Pressed, - ElementState::Released => PressState::Released, - } - } -} |