Derive clone, copy, debug for enums

This commit is contained in:
Wilson Giese
2016-10-23 23:36:13 -07:00
parent 1d652dd5db
commit 438e083fc3
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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,
+1
View File
@@ -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,