ProcessAppleEvent() 정적인 개인적인 메소드

static private ProcessAppleEvent ( IntPtr inEvent ) : void
inEvent System.IntPtr
리턴 void
예제 #1
0
        static OSStatus EventHandler(IntPtr inCaller, IntPtr inEvent, IntPtr userData)
        {
            EventInfo evt = new EventInfo(inEvent);

            switch (evt.EventClass)
            {
            case EventClass.Application:
                switch (evt.AppEventKind)
                {
                default:
                    return(OSStatus.EventNotHandled);
                }


            case EventClass.AppleEvent:
                // only event here is the apple event.
                Debug.Print("Processing apple event.");
                API.ProcessAppleEvent(inEvent);
                break;

            case EventClass.Keyboard:
            case EventClass.Mouse:
                if (WindowEventHandler != null)
                {
                    return(WindowEventHandler.DispatchEvent(inCaller, inEvent, evt, userData));
                }

                break;
            }

            return(OSStatus.EventNotHandled);
        }
예제 #2
0
        private static OSStatus EventHandler(IntPtr inCaller, IntPtr inEvent, IntPtr userData)
        {
            EventInfo evt = new EventInfo(inEvent);

            switch (evt.EventClass)
            {
            case EventClass.Keyboard:
            case EventClass.Mouse:
                if (Application.WindowEventHandler != null)
                {
                    return(Application.WindowEventHandler.DispatchEvent(inCaller, inEvent, evt, userData));
                }
                else
                {
                    break;
                }

            case EventClass.Application:
                int num = (int)evt.AppEventKind;
                return(OSStatus.EventNotHandled);

            case EventClass.AppleEvent:
                API.ProcessAppleEvent(inEvent);
                break;
            }
            return(OSStatus.EventNotHandled);
        }