extern "C" fn cancel_operation(this: &Object, _sel: Sel, _sender: id) {
    trace_scope!("cancelOperation:");
    unsafe {
        let state_ptr: *mut c_void = *this.get_ivar("winitState");
        let state = &mut *(state_ptr as *mut ViewState);

        let scancode = 0x2f;
        let virtual_keycode = scancode_to_keycode(scancode);
        debug_assert_eq!(virtual_keycode, Some(VirtualKeyCode::Period));

        let event: id = msg_send![NSApp(), currentEvent];

        update_potentially_stale_modifiers(state, event);

        #[allow(deprecated)]
        let window_event = Event::WindowEvent {
            window_id: WindowId(get_window_id(state.ns_window)),
            event: WindowEvent::KeyboardInput {
                device_id: DEVICE_ID,
                input: KeyboardInput {
                    state: ElementState::Pressed,
                    scancode: scancode as _,
                    virtual_keycode,
                    modifiers: event_mods(event),
                },
                is_synthetic: false,
            },
        };

        AppState::queue_event(EventWrapper::StaticEvent(window_event));
    }
}
// Allows us to receive Cmd-. (the shortcut for closing a dialog)
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=300620#c6
Allows us to receive Cmd-.
Allows us to receive Cmd - .
extern "C" fn cancel_operation(this: &Object, _sel: Sel, _sender: id) {
    trace_scope!("cancelOperation:");
    unsafe {
        let state_ptr: *mut c_void = *this.get_ivar("winitState");
        let state = &mut *(state_ptr as *mut ViewState);
        let scancode = 0x2f;
        let virtual_keycode = scancode_to_keycode(scancode);
        debug_assert_eq!(virtual_keycode, Some(VirtualKeyCode::Period));
        let event: id = msg_send![NSApp(), currentEvent];
        update_potentially_stale_modifiers(state, event);
        #[allow(deprecated)]
        let window_event = Event::WindowEvent {
            window_id: WindowId(get_window_id(state.ns_window)),
            event: WindowEvent::KeyboardInput {
                device_id: DEVICE_ID,
                input: KeyboardInput {
                    state: ElementState::Pressed,
                    scancode: scancode as _,
                    virtual_keycode,
                    modifiers: event_mods(event),
                },
                is_synthetic: false,
            },
        };
        AppState::queue_event(EventWrapper::StaticEvent(window_event));
    }
}
extern " " fn cancel_operation ( this : & Object , _sel : Sel , _sender : id ) { trace_scope ! ( " " ) ; unsafe { let state_ptr : * mut c_void = * this . get_ivar ( " " ) ; let state = & mut * ( state_ptr as * mut ViewState ) ; let scancode = 0x2f ; let virtual_keycode = scancode_to_keycode ( scancode ) ; debug_assert_eq ! ( virtual_keycode Some ( VirtualKeyCode Period ) ) ; let event : id = msg_send ! [ NSApp ( ) currentEvent ] ; update_potentially_stale_modifiers ( state , event ) ; # [ allow ( deprecated ) ] let window_event = Event :: WindowEvent { window_id : WindowId ( get_window_id ( state . ns_window ) ) , event : WindowEvent :: KeyboardInput { device_id : DEVICE_ID , input : KeyboardInput { state : ElementState :: Pressed , scancode : scancode as _ , virtual_keycode , modifiers : event_mods ( event ) , } , is_synthetic : false , } , } ; AppState :: queue_event ( EventWrapper :: StaticEvent ( window_event ) ) ; } }
Allows us to receive Cmd-.
Allows us to receive Cmd - .
this
&Object
_sel
Sel
_sender
id