Separate C# classes into Internal and Public
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / public / CustomView.cs
@@ -19,7 +19,7 @@ namespace Dali
 {
     public class CustomView : ViewWrapper
     {
-        public CustomView(string typeName, ViewWrapperImpl.CustomViewBehaviour behaviour) : base(typeName, new ViewWrapperImpl(behaviour))
+        public CustomView(string typeName, CustomViewBehaviour behaviour) : base(typeName, new ViewWrapperImpl(behaviour))
         {
             // Registering CustomView virtual functions to viewWrapperImpl delegates.
             viewWrapperImpl.OnStageConnection = new ViewWrapperImpl.OnStageConnectionDelegate(OnStageConnection);
@@ -51,11 +51,11 @@ namespace Dali
             viewWrapperImpl.OnAccessibilityTouch = new ViewWrapperImpl.OnAccessibilityTouchDelegate(OnAccessibilityTouch);
             viewWrapperImpl.OnAccessibilityValueChange = new ViewWrapperImpl.OnAccessibilityValueChangeDelegate(OnAccessibilityValueChange);
             viewWrapperImpl.OnAccessibilityZoom = new ViewWrapperImpl.OnAccessibilityZoomDelegate(OnAccessibilityZoom);
-            viewWrapperImpl.OnKeyInputFocusGained = new ViewWrapperImpl.OnKeyInputFocusGainedDelegate(OnKeyInputFocusGained);
-            viewWrapperImpl.OnKeyInputFocusLost = new ViewWrapperImpl.OnKeyInputFocusLostDelegate(OnKeyInputFocusLost);
-            viewWrapperImpl.GetNextKeyboardFocusableActor = new ViewWrapperImpl.GetNextKeyboardFocusableActorDelegate(GetNextKeyboardFocusableView);
-            viewWrapperImpl.OnKeyboardFocusChangeCommitted = new ViewWrapperImpl.OnKeyboardFocusChangeCommittedDelegate(OnKeyboardFocusChangeCommitted);
-            viewWrapperImpl.OnKeyboardEnter = new ViewWrapperImpl.OnKeyboardEnterDelegate(OnKeyboardEnter);
+            viewWrapperImpl.OnFocusGained = new ViewWrapperImpl.OnFocusGainedDelegate(OnFocusGained);
+            viewWrapperImpl.OnFocusLost = new ViewWrapperImpl.OnFocusLostDelegate(OnFocusLost);
+            viewWrapperImpl.GetNextFocusableActor = new ViewWrapperImpl.GetNextFocusableActorDelegate(GetNextFocusableView);
+            viewWrapperImpl.OnFocusChangeCommitted = new ViewWrapperImpl.OnFocusChangeCommittedDelegate(OnFocusChangeCommitted);
+            viewWrapperImpl.OnFocusEnter = new ViewWrapperImpl.OnFocusEnterDelegate(OnFocusEnter);
             viewWrapperImpl.OnPinch = new ViewWrapperImpl.OnPinchDelegate(OnPinch);
             viewWrapperImpl.OnPan = new ViewWrapperImpl.OnPanDelegate(OnPan);
             viewWrapperImpl.OnTap = new ViewWrapperImpl.OnTapDelegate(OnTap);
@@ -117,9 +117,9 @@ namespace Dali
          * The control doesn't support it by default.
          * @param[in] isSupported Whether this control supports two dimensional keyboard navigation.
          */
-        public void SetKeyboardNavigationSupport(bool isSupported)
+        public void SetFocusNavigationSupport(bool isSupported)
         {
-            viewWrapperImpl.SetKeyboardNavigationSupport(isSupported);
+            viewWrapperImpl.SetFocusNavigationSupport(isSupported);
         }
 
         /**
@@ -127,9 +127,9 @@ namespace Dali
          *
          * @return true if this control supports two dimensional keyboard navigation.
          */
-        public bool IsKeyboardNavigationSupported()
+        public bool IsFocusNavigationSupported()
         {
-            return viewWrapperImpl.IsKeyboardNavigationSupported();
+            return viewWrapperImpl.IsFocusNavigationSupported();
         }
 
         /**
@@ -139,9 +139,9 @@ namespace Dali
          * can be limitied to its child views). The control is not a focus group by default.
          * @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation.
          */
-        public void SetAsKeyboardFocusGroup(bool isFocusGroup)
+        public void SetAsFocusGroup(bool isFocusGroup)
         {
-            viewWrapperImpl.SetAsKeyboardFocusGroup(isFocusGroup);
+            viewWrapperImpl.SetAsFocusGroup(isFocusGroup);
         }
 
         /**
@@ -149,9 +149,9 @@ namespace Dali
          *
          * @return true if this control is set as a focus group for keyboard navigation.
          */
-        public bool IsKeyboardFocusGroup()
+        public bool IsFocusGroup()
         {
-            return viewWrapperImpl.IsKeyboardFocusGroup();
+            return viewWrapperImpl.IsFocusGroup();
         }
 
         /**
@@ -166,9 +166,9 @@ namespace Dali
         /**
          * @brief Called by the KeyboardFocusManager.
          */
-        public void KeyboardEnter()
+        public void FocusEnter()
         {
-            viewWrapperImpl.KeyboardEnter();
+            viewWrapperImpl.FocusEnter();
         }
 
         /**
@@ -177,7 +177,7 @@ namespace Dali
          * @param[in] key The key event.
          * @return True if the event was consumed.
          */
-        public bool EmitKeyEventSignal(Key key)
+        internal bool EmitKeyEventSignal(Key key)
         {
             return viewWrapperImpl.EmitKeyEventSignal(key);
         }
@@ -345,9 +345,9 @@ namespace Dali
          *
          * @param[in] focusGained True if gained, False if lost
          */
-        protected void EmitKeyInputFocusSignal(bool focusGained)
+        protected void EmitFocusSignal(bool focusGained)
         {
-            viewWrapperImpl.EmitKeyInputFocusSignal( focusGained );
+            viewWrapperImpl.EmitFocusSignal( focusGained );
         }
 
         /**
@@ -639,7 +639,7 @@ namespace Dali
          * Derived classes should override this to perform custom accessibility activation.
          * @return true if this control can perform accessibility activation.
          */
-        public virtual bool OnAccessibilityActivated()
+        internal virtual bool OnAccessibilityActivated()
         {
             return false;
         }
@@ -651,7 +651,7 @@ namespace Dali
          * @param[in] gesture The pan gesture.
          * @return true if the pan gesture has been consumed by this control
          */
-        public virtual bool OnAccessibilityPan(PanGesture gestures)
+        internal virtual bool OnAccessibilityPan(PanGesture gestures)
         {
             return false;
         }
@@ -663,7 +663,7 @@ namespace Dali
          * @param[in] touch The touch event.
          * @return true if the touch event has been consumed by this control
          */
-        public virtual bool OnAccessibilityTouch(Touch touch)
+        internal virtual bool OnAccessibilityTouch(Touch touch)
         {
             return false;
         }
@@ -675,7 +675,7 @@ namespace Dali
          * @param[in] isIncrease Whether the value should be increased or decreased
          * @return true if the value changed action has been consumed by this control
          */
-        public virtual bool OnAccessibilityValueChange(bool isIncrease)
+        internal virtual bool OnAccessibilityValueChange(bool isIncrease)
         {
             return false;
         }
@@ -686,7 +686,7 @@ namespace Dali
          *
          * @return true if the zoom action has been consumed by this control
          */
-        public virtual bool OnAccessibilityZoom()
+        internal virtual bool OnAccessibilityZoom()
         {
             return false;
         }
@@ -697,7 +697,7 @@ namespace Dali
          *
          * @return true if the zoom action has been consumed by this control
          */
-        public virtual void OnKeyInputFocusGained()
+        public virtual void OnFocusGained()
         {
         }
 
@@ -706,7 +706,7 @@ namespace Dali
          *
          * Should be overridden by derived classes if they need to customize what happens when focus is lost.
          */
-        public virtual void OnKeyInputFocusLost()
+        public virtual void OnFocusLost()
         {
         }
 
@@ -719,7 +719,7 @@ namespace Dali
          * @param[in] loopEnabled Whether the focus movement should be looped within the view.
          * @return the next keyboard focusable view in this control or an empty handle if no view can be focused.
          */
-        public virtual View GetNextKeyboardFocusableView(View currentFocusedView, View.KeyboardFocus.Direction direction, bool loopEnabled)
+        public virtual View GetNextFocusableView(View currentFocusedView, View.Focus.Direction direction, bool loopEnabled)
         {
             return new View();
         }
@@ -732,7 +732,7 @@ namespace Dali
          *
          * @param[in] commitedFocusableView The commited focusable view.
          */
-        public virtual void OnKeyboardFocusChangeCommitted(View commitedFocusableView)
+        public virtual void OnFocusChangeCommitted(View commitedFocusableView)
         {
         }
 
@@ -742,7 +742,7 @@ namespace Dali
          * Derived classes should override this to perform custom actions.
          * @return true if this control supported this action.
          */
-        public virtual bool OnKeyboardEnter()
+        public virtual bool OnFocusEnter()
         {
             return false;
         }
@@ -816,4 +816,13 @@ namespace Dali
         {
         }
     }
+
+    public enum CustomViewBehaviour
+    {
+        VIEW_BEHAVIOUR_DEFAULT = 0,
+        DISABLE_SIZE_NEGOTIATION = 1 << 0,
+        REQUIRES_KEYBOARD_NAVIGATION_SUPPORT = 1 << 5,
+        DISABLE_STYLE_CHANGE_SIGNALS = 1 << 6,
+        LAST_VIEW_BEHAVIOUR_FLAG
+    }
 }