- This signal is emitted when the values of keyboard repeat, such as delay and rate,
are changed globally.
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
--- /dev/null
+using global::System;
+using global::System.Runtime.InteropServices;
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class KeyboardRepeatSettingsChangedSignal
+ {
+ [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Keyboard_Repeat_Settings_ChangedSignal")]
+ public static extern global::System.IntPtr GetSignal(HandleRef jarg1);
+
+ [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Keyboard_Repeat_Settings_Changed_Signal_Empty")]
+ public static extern bool Empty(HandleRef jarg1);
+
+ [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Keyboard_Repeat_Settings_Changed_Signal_GetConnectionCount")]
+ public static extern uint GetConnectionCount(HandleRef jarg1);
+
+ [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Keyboard_Repeat_Settings_Changed_Signal_Connect")]
+ public static extern void Connect(HandleRef jarg1, HandleRef jarg2);
+
+ [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Keyboard_Repeat_Settings_Changed_Signal_Disconnect")]
+ public static extern void Disconnect(HandleRef jarg1, HandleRef jarg2);
+
+ [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Keyboard_Repeat_Settings_Changed_Signal_Emit")]
+ public static extern bool Emit(HandleRef jarg1);
+
+ [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Keyboard_Repeat_Settings_Changed_Signal_new")]
+ public static extern global::System.IntPtr NewSignal();
+
+ [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Keyboard_Repeat_Settings_Changed_Signal_delete")]
+ public static extern void DeleteSignal(HandleRef jarg1);
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal class KeyboardRepeatSettingsChangedSignal : Disposable
+ {
+
+ internal KeyboardRepeatSettingsChangedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.KeyboardRepeatSettingsChangedSignal.DeleteSignal(swigCPtr);
+ }
+
+ public bool Empty()
+ {
+ bool ret = Interop.KeyboardRepeatSettingsChangedSignal.Empty(swigCPtr);
+
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = Interop.KeyboardRepeatSettingsChangedSignal.GetConnectionCount(swigCPtr);
+
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public void Connect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+ {
+ Interop.KeyboardRepeatSettingsChangedSignal.Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Disconnect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+ {
+ Interop.KeyboardRepeatSettingsChangedSignal.Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public bool Emit()
+ {
+ bool ret = Interop.KeyboardRepeatSettingsChangedSignal.Emit(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public KeyboardRepeatSettingsChangedSignal(Window window) : this(Interop.KeyboardRepeatSettingsChangedSignal.GetSignal(Window.getCPtr(window)), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+}
/*
- * Copyright(c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback2;
private TransitionEffectEventCallbackType transitionEffectEventCallback;
private WindowTransitionEffectSignal transitionEffectSignal;
+ private KeyboardRepeatSettingsChangedEventCallbackType keyboardRepeatSettingsChangedEventCallback;
+ private KeyboardRepeatSettingsChangedSignal keyboardRepeatSettingsChangedSignal;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate void WindowFocusChangedEventCallbackType(IntPtr window, bool focusGained);
private delegate void WindowFocusChangedEventCallbackType2(IntPtr window, bool focusGained);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate void TransitionEffectEventCallbackType(IntPtr window, int state, int type);
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void KeyboardRepeatSettingsChangedEventCallbackType();
/// <summary>
/// FocusChanged event.
}
/// <summary>
+ /// Keyboard Repeat Settings Changed
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler KeyboardRepeatSettingsChanged
+ {
+ add
+ {
+ if (keyboardRepeatSettingsChangedHandler == null)
+ {
+ keyboardRepeatSettingsChangedEventCallback = OnKeyboardRepeatSettingsChanged;
+ KeyboardRepeatSettingsChangedEventSignal().Connect(keyboardRepeatSettingsChangedEventCallback);
+ }
+ keyboardRepeatSettingsChangedHandler += value;
+ }
+ remove
+ {
+ keyboardRepeatSettingsChangedHandler -= value;
+ if (keyboardRepeatSettingsChangedHandler == null && KeyboardRepeatSettingsChangedEventSignal().Empty() == false)
+ {
+ KeyboardRepeatSettingsChangedEventSignal().Disconnect(keyboardRepeatSettingsChangedEventCallback);
+ }
+ }
+ }
+
+ /// <summary>
/// ViewAdded will be triggered when the view added on Window
/// </summary>
/// <since_tizen> 6 </since_tizen>
private event EventHandler<ResizedEventArgs> _windowResizedEventHandler;
private event EventHandler<FocusChangedEventArgs> _windowFocusChangedEventHandler2;
private event EventHandler<TransitionEffectArgs> transitionEffectHandler;
+ private event EventHandler keyboardRepeatSettingsChangedHandler;
internal void SendViewAdded(View view)
{
{
TransitionEffectEventSignal().Disconnect(transitionEffectEventCallback);
}
+
+ if (keyboardRepeatSettingsChangedSignal != null)
+ {
+ KeyboardRepeatSettingsChangedEventSignal().Disconnect(keyboardRepeatSettingsChangedEventCallback);
+ }
}
private StageWheelSignal StageWheelEventSignal()
return transitionEffectSignal;
}
+ private KeyboardRepeatSettingsChangedSignal KeyboardRepeatSettingsChangedEventSignal()
+ {
+ if (keyboardRepeatSettingsChangedSignal == null)
+ {
+ keyboardRepeatSettingsChangedSignal = new KeyboardRepeatSettingsChangedSignal(this);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ return keyboardRepeatSettingsChangedSignal;
+ }
+
private void OnWindowFocusedChanged(IntPtr window, bool focusGained)
{
if (window == IntPtr.Zero)
return;
}
+ private void OnKeyboardRepeatSettingsChanged()
+ {
+ if (keyboardRepeatSettingsChangedHandler != null)
+ {
+ keyboardRepeatSettingsChangedHandler(this, null);
+ }
+ return;
+ }
+
/// <summary>
/// The focus changed event argument.
/// </summary>