Exemple #1
0
        bool HandleWindowEvent(ScreenEvent ev)
        {
            IntPtr handle = IntPtr.Zero; ;
            var res=new IntPtr[] { handle };
            ev.GetVoidProperty(PropertyType.SCREEN_PROPERTY_WINDOW, ref res);
            //Console.WriteLine("Break Point, res[0]= " + res[0]);
            handle = res[0];

            if (!_windows.ContainsKey(handle))
            {
                return false;
            }
            _windows[handle].HandleEvent(ev);
            return true;
        }
Exemple #2
0
        internal bool HandleEvent(ScreenEvent ev)
        {
            Debug.Print("Window  XX {0}: Shall handle {1} event.", Handle, ev.Type);
            switch (ev.Type)
            {
                case EventType.SCREEN_EVENT_CLOSE:
                    if (OnClose != null)
                    {
                        OnClose();
                        return true;
                    }
                    break;
                case EventType.SCREEN_EVENT_CREATE:
                    if (OnCreate != null)
                    {
                        OnCreate();
                        return true;
                    }
                    break;
            }

            return false;
        }