private void OnWindowFocusedChanged(IntPtr window, bool focusGained)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (window == IntPtr.Zero)
{
NUILog.Error("OnWindowFocusedChanged() Window is null! Do nothing!");
private bool OnWindowTouch(IntPtr view, IntPtr touchData)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return false;
+ }
+
if (touchData == global::System.IntPtr.Zero)
{
NUILog.Error("touchData should not be null!");
private bool OnWindowInterceptTouch(IntPtr view, IntPtr touchData)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return false;
+ }
+
if (touchData == global::System.IntPtr.Zero)
{
NUILog.Error("touchData should not be null!");
private bool OnStageWheel(IntPtr rootLayer, IntPtr wheelEvent)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return false;
+ }
+
if (wheelEvent == global::System.IntPtr.Zero)
{
NUILog.Error("wheelEvent should not be null!");
private bool OnWindowInterceptWheel(IntPtr view, IntPtr wheelEvent)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return false;
+ }
+
if (wheelEvent == global::System.IntPtr.Zero)
{
NUILog.Error("wheelEvent should not be null!");
// Callback for Stage KeyEventsignal
private void OnStageKey(IntPtr data)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return;
+ }
+
if (stageKeyHandler != null)
{
KeyEventArgs e = new KeyEventArgs();
// Callback for Stage InterceptKeyEventsignal
private bool OnStageInterceptKey(IntPtr data)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return false;
+ }
+
bool consumed = false;
if (stageInterceptKeyHandler != null)
{
// Callback for Stage EventProcessingFinishedSignal
private void OnEventProcessingFinished()
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
stageEventProcessingFinishedEventHandler?.Invoke(this, null);
}
// Callback for Stage ContextLostSignal
private void OnContextLost()
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
stageContextLostEventHandler?.Invoke(this, null);
}
// Callback for Stage ContextRegainedSignal
private void OnContextRegained()
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
stageContextRegainedEventHandler?.Invoke(this, null);
}
// Callback for Stage SceneCreatedSignal
private void OnSceneCreated()
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
stageSceneCreatedEventHandler?.Invoke(this, null);
}
private void OnResized(IntPtr window, IntPtr windowSize)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (window == IntPtr.Zero)
{
NUILog.Error("OnResized() Window is null! Do nothing!");
private void OnWindowFocusedChanged2(IntPtr window, bool focusGained)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (window == IntPtr.Zero)
{
NUILog.Error("OnWindowFocusedChanged() Window is null! Do nothing!");
private void OnTransitionEffect(IntPtr window, int state, int type)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (window == global::System.IntPtr.Zero)
{
return;
private void OnMoved(IntPtr window, IntPtr position)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (window == global::System.IntPtr.Zero)
{
return;
private void OnOrientationChanged(IntPtr window, int orientation)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (window == global::System.IntPtr.Zero)
{
return;
private void OnKeyboardRepeatSettingsChanged()
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
keyboardRepeatSettingsChangedHandler?.Invoke(this, null);
return;
}
private void OnWindowMouseInOutEvent(IntPtr view, IntPtr mouseEvent)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return;
+ }
+
if (mouseEvent == global::System.IntPtr.Zero)
{
NUILog.Error("mouseEvent should not be null!");
private void OnMoveCompleted(IntPtr window, IntPtr position)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (window == global::System.IntPtr.Zero)
{
return;
private void OnResizeCompleted(IntPtr window, IntPtr size)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (window == global::System.IntPtr.Zero)
{
return;
private void OnWindowMouseRelativeEvent(IntPtr view, IntPtr mouseEvent)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return;
+ }
+
if (mouseEvent == global::System.IntPtr.Zero)
{
NUILog.Error("mouseEvent should not be null!");
private void OnWindowPointerConstraintsEvent(IntPtr view, IntPtr constraintsEvent)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return;
+ }
+
if (constraintsEvent == global::System.IntPtr.Zero)
{
NUILog.Error("constraintsEvent should not be null!");
private bool OnWindowHover(IntPtr view, IntPtr hoverData)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return false;
+ }
+
if (hoverData == global::System.IntPtr.Zero)
{
NUILog.Error("hoverData should not be null!");
private void OnDetentEvent(IntPtr wheelEvent)
{
+ if (IsDisposedOrQueued)
+ {
+ // Ignore native callback if the window is disposed or queued for disposal.
+ return;
+ }
+
WheelEventArgs e = new WheelEventArgs();
if (wheelEvent != global::System.IntPtr.Zero)
private void OnVisibilityChanged(IntPtr window, bool visibility)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (window == global::System.IntPtr.Zero)
{
NUILog.Error("[ERR] OnVisibilityChanged() window is null");
private void OnAuxiliaryMessage(IntPtr kData, IntPtr vData, IntPtr optionsArray)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (kData == IntPtr.Zero || vData == IntPtr.Zero)
{
return;
private void OnInsetsChanged(int partType, int partState, IntPtr extents)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (insetsChangedEventHandler != null)
{
InsetsChangedEventArgs e = new InsetsChangedEventArgs();
private void OnAccessibilityHighlight(IntPtr window, bool highlight)
{
+ if (IsDisposedOrQueued)
+ {
+ return;
+ }
+
if (window == global::System.IntPtr.Zero)
{
NUILog.Error("[ERR] OnAccessibilityHighlight() window is null");