Struct core_graphics::event::CGEvent
source · pub struct CGEvent(_);
Implementations
sourceimpl CGEvent
impl CGEvent
pub fn type_id() -> CFTypeID
pub fn new(source: CGEventSource) -> Result<CGEvent, ()>
pub fn new_keyboard_event(
source: CGEventSource,
keycode: CGKeyCode,
keydown: bool
) -> Result<CGEvent, ()>
pub fn new_mouse_event(
source: CGEventSource,
mouse_type: CGEventType,
mouse_cursor_position: CGPoint,
mouse_button: CGMouseButton
) -> Result<CGEvent, ()>
pub fn post(&self, tap_location: CGEventTapLocation)
pub fn location(&self) -> CGPoint
pub fn set_flags(&self, flags: CGEventFlags)
pub fn get_flags(&self) -> CGEventFlags
pub fn set_type(&self, event_type: CGEventType)
pub fn get_type(&self) -> CGEventType
pub fn set_string_from_utf16_unchecked(&self, buf: &[u16])
pub fn set_string(&self, string: &str)
pub fn get_integer_value_field(&self, field: CGEventField) -> i64
pub fn set_integer_value_field(&self, field: CGEventField, value: i64)
pub fn get_double_value_field(&self, field: CGEventField) -> f64
pub fn set_double_value_field(&self, field: CGEventField, value: f64)
Trait Implementations
sourceimpl AsRef<CGEventRef> for CGEvent
impl AsRef<CGEventRef> for CGEvent
sourcefn as_ref(&self) -> &CGEventRef
fn as_ref(&self) -> &CGEventRef
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Borrow<CGEventRef> for CGEvent
impl Borrow<CGEventRef> for CGEvent
sourcefn borrow(&self) -> &CGEventRef
fn borrow(&self) -> &CGEventRef
Immutably borrows from an owned value. Read more
sourceimpl Deref for CGEvent
impl Deref for CGEvent
type Target = CGEventRef
type Target = CGEventRef
The resulting type after dereferencing.
sourcefn deref(&self) -> &CGEventRef
fn deref(&self) -> &CGEventRef
Dereferences the value.
Auto Trait Implementations
impl RefUnwindSafe for CGEvent
impl !Send for CGEvent
impl !Sync for CGEvent
impl Unpin for CGEvent
impl UnwindSafe for CGEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more