[NUI] Binding DISPATCH_KEY_EVENTS
authorjoogab.yun <joogab.yun@samsung.com>
Fri, 10 Sep 2021 07:49:23 +0000 (16:49 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 9 Nov 2021 05:57:53 +0000 (14:57 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.ViewProperty.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs
src/Tizen.NUI/src/public/BaseComponents/ViewEnum.cs

index 173f307..076b4dc 100755 (executable)
@@ -86,6 +86,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_View_Property_ACCESSIBILITY_ATTRIBUTES_get")]
             public static extern int AccessibilityAttributesGet();
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_View_Property_DISPATCH_KEY_EVENTS_get")]
+            public static extern int DispatchKeyEventsGet();
         }
     }
 }
index 68f8732..6746df1 100755 (executable)
@@ -3018,5 +3018,27 @@ namespace Tizen.NUI.BaseComponents
                 return transitionOptions;
             }
         }
+
+        /// <summary>
+        /// Gets or sets the status of whether the view should emit key event signals.
+        /// If a View's DispatchKeyEvents is set to false, then it's children will not emit a key event signal either.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool DispatchKeyEvents
+        {
+            get
+            {
+                return (bool)GetValue(DispatchKeyEventsProperty);
+            }
+            set
+            {
+                SetValue(DispatchKeyEventsProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
+
+
+
+
     }
 }
index ceab7fd..feb9a3d 100755 (executable)
@@ -1049,6 +1049,26 @@ namespace Tizen.NUI.BaseComponents
         }));
 
         /// <summary>
+        /// DispatchKeyEventsProperty
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly BindableProperty DispatchKeyEventsProperty = BindableProperty.Create(nameof(DispatchKeyEvents), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+        {
+            var view = (View)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DispatchKeyEvents, new Tizen.NUI.PropertyValue((bool)newValue));
+            }
+        }),
+        defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+        {
+            var view = (View)bindable;
+            bool temp = false;
+            Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DispatchKeyEvents).Get(out temp);
+            return temp;
+        }));
+
+        /// <summary>
         /// LeaveRequiredProperty
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
index bbc1e6e..1c51aae 100755 (executable)
@@ -226,6 +226,7 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int AccessibilityRole = Interop.ViewProperty.AccessibilityRoleGet();
             internal static readonly int AccessibilityHighlightable = Interop.ViewProperty.AccessibilityHighlightableGet();
             internal static readonly int AccessibilityAttributes = Interop.ViewProperty.AccessibilityAttributesGet();
+            internal static readonly int DispatchKeyEvents = Interop.ViewProperty.DispatchKeyEventsGet();
         }
     }
 }