public void Register(WindowEventType eventType, UnityAction callback) { switch (eventType) { case WindowEventType.OnShowBegin: this.onShowBegin.AddListener(callback); break; case WindowEventType.OnShowEnd: this.onShowEnd.AddListener(callback); break; case WindowEventType.OnHideBegin: this.onHideBegin.AddListener(callback); break; case WindowEventType.OnHideEnd: this.onHideEnd.AddListener(callback); break; case WindowEventType.OnWindowOpen: this.onWindowOpen.AddListener(callback); break; } }
public void Unregister(WindowEventType eventType, UnityAction callback) { switch (eventType) { case WindowEventType.OnShowBegin: this.onShowBegin.RemoveListener(callback); break; case WindowEventType.OnShowEnd: this.onShowEnd.RemoveListener(callback); break; case WindowEventType.OnHideBegin: this.onHideBegin.RemoveListener(callback); break; case WindowEventType.OnHideEnd: this.onHideEnd.RemoveListener(callback); break; case WindowEventType.OnWindowOpen: this.onWindowOpen.RemoveListener(callback); break; case WindowEventType.OnWindowActive: this.onWindowActive.RemoveListener(callback); break; case WindowEventType.OnWindowInactive: this.onWindowInactive.RemoveListener(callback); break; } }
public void ReleaseEvents(WindowEventType eventType) { switch (eventType) { case WindowEventType.OnShowBegin: this.onShowBegin.Invoke(); break; case WindowEventType.OnShowEnd: this.onShowEnd.Invoke(); break; case WindowEventType.OnHideBegin: this.onHideBegin.Invoke(); break; case WindowEventType.OnHideEnd: this.onHideEnd.Invoke(); break; case WindowEventType.OnWindowOpen: this.onWindowOpen.Invoke(); break; case WindowEventType.OnWindowActive: this.onWindowActive.Invoke(); break; case WindowEventType.OnWindowInactive: this.onWindowInactive.Invoke(); break; } }
public void ReleaseEvents(WindowEventType eventType) { switch (eventType) { case WindowEventType.OnInit: this.onInit.Invoke(); break; case WindowEventType.OnDeinit: this.onDeinit.Invoke(); break; } }
public void Unregister(WindowEventType eventType, UnityAction callback) { switch (eventType) { case WindowEventType.OnInit: this.onInit.RemoveListener(callback); break; case WindowEventType.OnDeinit: this.onDeinit.RemoveListener(callback); break; } }
void disposing(unoidl.com.sun.star.lang.EventObject Source) { LastKnownWindowState = WindowEventType.CLOSED; fireWindowEvent(WindowEventType.CLOSED, Source); }
public MouseWheelWindowEvent(WindowEventType type, IMainWindow window, Point windowPos, PointF uiPos, float delta) : base(type, window, windowPos, uiPos) { Delta = delta; }
public WindowEvent(WindowEventType type, IMainWindow window) { Type = type; Window = window; }
public MouseFocusEvent(WindowEventType type, IMainWindow window) : base(type, window) { }
public void RemoveEventListener(WindowEventType type, EventListener <WindowEvent <Window> > listener, bool useCapture = false) { }
private void ReleaseEvents(WindowEventType eventType) { this.events.Call(eventType); this.eventsInstance.Call(eventType); }
public WindowEvent(WindowEventType type) : this() { Type = type; }
private void ReleaseEvents(WindowEventType eventType) { this.once.ReleaseEvents(eventType); this.onEveryInstance.ReleaseEvents(eventType); }
void windowShown(unoidl.com.sun.star.lang.EventObject e) { LastKnownWindowState = WindowEventType.OPENED; fireWindowEvent(WindowEventType.OPENED, e); }
void windowHidden(unoidl.com.sun.star.lang.EventObject e) { LastKnownWindowState = WindowEventType.MINIMIZED; fireWindowEvent(WindowEventType.MINIMIZED, e); }
void windowEnabled(unoidl.com.sun.star.lang.EventObject e) { LastKnownWindowState = WindowEventType.ACTIVATED; fireWindowEvent(WindowEventType.ACTIVATED, e); }
/// <summary> /// Initializes a new instance of the <see cref="OoAccessibleDocWindowEventArgs"/> class. /// </summary> /// <param name="type">The original event type.</param> /// <param name="e">The native event object.</param> public OoAccessibleDocWindowEventArgs(WindowEventType type, EventObject e) { Type = type; E = e; }
/// <summary> /// Initializes a new instance of the <see cref="OoWindowEventArgs" /> class. /// </summary> /// <param name="window">The corresponding and event throwing window.</param> /// <param name="_type">The type of event.</param> public OoWindowEventArgs(OoAccessibleDocWnd window, WindowEventType _type = WindowEventType.UNKNOWN) { Window = window; Type = _type; }
void fireWindowEvent(WindowEventType type, EventObject e) { if (WindowEvent != null) { try { WindowEvent.Invoke(this, new OoAccessibleDocWindowEventArgs(type, e)); } catch (Exception ex) { Logger.Instance.Log(LogPriority.DEBUG, this, "cant fire window event", ex); } } }
private IntPtr hookCallback(int nCode, IntPtr wParam, IntPtr lParam) { bool result = true; if (nCode >= 0 && base.childProcedure != null) { if (this.manejadorEventos != null) { WINDOWINPUT hookStruct = new WINDOWINPUT(); int param = wParam.ToInt32(); WindowEventType tipoEvento = Enum.IsDefined(typeof(WindowEventType), param) ? (WindowEventType)Enum.ToObject(typeof(WindowEventType), param) : WindowEventType.WM_NULL; if (!tipoEvento.Equals(WindowEventType.WM_NULL)) { hookStruct = (WINDOWINPUT)Marshal.PtrToStructure(lParam, typeof(WINDOWINPUT)); Debug.WriteLine("Se ha interceptado un evento de tipo " + tipoEvento.ToString() + " con data { lParam = " + hookStruct.lParam + " , wParam = " + hookStruct.wParam + ", message = " + hookStruct.message + " , hwnd = " + hookStruct.hwnd + "} "); CREATESTRUCT data; RECT rectangulo; MACRO x; POINT punto; switch (tipoEvento) { case WindowEventType.WM_DESTROY: result = this.manejadorEventos.onBeforeWindowDestroy(this); break; case WindowEventType.WM_NCDESTROY: result = this.manejadorEventos.onWindowDestroy(this); break; case WindowEventType.WM_NCCREATE: data = (CREATESTRUCT)Marshal.PtrToStructure(hookStruct.lParam, typeof(CREATESTRUCT)); result = this.manejadorEventos.onBeforeWindowCreation(this, data); break; case WindowEventType.WM_CREATE: data = (CREATESTRUCT)Marshal.PtrToStructure(hookStruct.lParam, typeof(CREATESTRUCT)); result = this.manejadorEventos.onWindowCreation(this, data); break; case WindowEventType.WM_DPICHANGED: x = new MACRO { Number = hookStruct.wParam.ToUInt32() }; punto = new POINT(x.Low, x.High); rectangulo = (RECT)Marshal.PtrToStructure(hookStruct.lParam, typeof(RECT)); result = this.manejadorEventos.onWindowDPIChange(this, punto, rectangulo); break; case WindowEventType.WM_MOVING: rectangulo = (RECT)Marshal.PtrToStructure(hookStruct.lParam, typeof(RECT)); result = this.manejadorEventos.onWindowMoving(this, rectangulo); break; case WindowEventType.WM_MOVE: x = new MACRO { Number = unchecked ((uint)hookStruct.lParam.ToInt32()) }; punto = new POINT(x.Low, x.High); result = this.manejadorEventos.onWindowMoved(this, punto); break; case WindowEventType.WM_SIZING: rectangulo = (RECT)Marshal.PtrToStructure(hookStruct.lParam, typeof(RECT)); result = this.manejadorEventos.onWindowResizing(this, rectangulo); break; case WindowEventType.WM_SIZE: x = new MACRO { Number = unchecked ((uint)hookStruct.lParam.ToInt32()) }; punto = new POINT(x.Low, x.High); result = this.manejadorEventos.onWindowResized(this, punto); break; } } } } if (result) { return(CallNextHookEx(base.getHookID(), nCode, wParam, lParam)); } else { return((IntPtr)1); } }
public static extern int imaqGetLastEvent(ref WindowEventType type, ref int windowNumber, ref Tool tool, ref Rect rect);