Add missing methods to ContextPopup 68/115268/2
authorSidharth Gupta <sid92.gupta@samsung.com>
Fri, 17 Feb 2017 06:46:09 +0000 (15:46 +0900)
committerSidharth Gupta <sid92.gupta@samsung.com>
Fri, 17 Feb 2017 06:50:28 +0000 (15:50 +0900)
Added:
- Method to clear context popup items
- Method to get direction priorities

Signed-off-by: Sidharth Gupta <sid92.gupta@samsung.com>
Change-Id: I5df26e45440d51f03d2647324ad869f5c9469f41

ElmSharp/ElmSharp/ContextPopup.cs

index cb1fe2f..7350760 100644 (file)
@@ -82,11 +82,26 @@ namespace ElmSharp
             }
         }
 
+        public void Clear()
+        {
+            Interop.Elementary.elm_ctxpopup_clear(Handle);
+        }
+
         public void SetDirectionPriorty(ContextPopupDirection first, ContextPopupDirection second, ContextPopupDirection third, ContextPopupDirection fourth)
         {
             Interop.Elementary.elm_ctxpopup_direction_priority_set(Handle, (int)first, (int)second, (int)third, (int)fourth);
         }
 
+        public void GetDirectionPriority(out ContextPopupDirection first, out ContextPopupDirection second, out ContextPopupDirection third, out ContextPopupDirection fourth)
+        {
+            int firstOut, secondOut, thirdOut, fourthOut;
+            Interop.Elementary.elm_ctxpopup_direction_priority_get(Handle, out firstOut, out secondOut, out thirdOut, out fourthOut);
+            first = (ContextPopupDirection)firstOut;
+            second = (ContextPopupDirection)secondOut;
+            third = (ContextPopupDirection)thirdOut;
+            fourth = (ContextPopupDirection)fourthOut;
+        }
+
         public ContextPopupItem Append(string label)
         {
             return Append(label, null);