From 438e083fc31ce4b6b1ecf9cd4db2da694fbddd89 Mon Sep 17 00:00:00 2001 From: Wilson Giese Date: Sun, 23 Oct 2016 23:36:13 -0700 Subject: [PATCH] Derive clone, copy, debug for enums --- src/event.rs | 2 ++ src/event_source.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/event.rs b/src/event.rs index ff710b4..4254055 100644 --- a/src/event.rs +++ b/src/event.rs @@ -11,6 +11,7 @@ pub type CGKeyCode = libc::uint16_t; /// /// [Ref] (http://opensource.apple.com//source/IOHIDFamily/IOHIDFamily-308/IOHIDSystem/IOKit/hidsystem/IOLLEvent.h) #[repr(C)] +#[derive(Clone, Copy, Debug)] pub enum CGEventFlags { // Device-independent modifier key bits. AlphaShift = 0x00010000, @@ -32,6 +33,7 @@ pub enum CGEventFlags { /// Possible tapping points for events. #[repr(C)] +#[derive(Clone, Copy, Debug)] pub enum CGEventTapLocation { HIDEventTap, SessionEventTap, diff --git a/src/event_source.rs b/src/event_source.rs index 5a1ad34..16fa86b 100644 --- a/src/event_source.rs +++ b/src/event_source.rs @@ -6,6 +6,7 @@ use std::ptr; /// Possible source states of an event source. #[repr(C)] +#[derive(Clone, Copy, Debug)] pub enum CGEventSourceStateID { Private = -1, CombinedSessionState = 0,