From: Richard Huang Date: Fri, 3 Mar 2017 10:42:55 +0000 (+0000) Subject: Fix downcast issue for C# CustomView X-Git-Tag: dali_1.2.30~11^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=a65bfc3f5f61060ce3b7e0104d4da5f8f9b9dc87 Fix downcast issue for C# CustomView Change-Id: I112e52e28da3440ddf7e5d3de6fe67e4963f8663 --- diff --git a/plugins/dali-swig/Makefile.am b/plugins/dali-swig/Makefile.am index 2f81c64..d963c69 100755 --- a/plugins/dali-swig/Makefile.am +++ b/plugins/dali-swig/Makefile.am @@ -78,6 +78,11 @@ $(BUILT_SOURCES): SWIG/*.i ./property-wrapper.rb ./constructor-generator.rb +# have manual binding for View now, but cannot stop swig generating binding for +# it as otherwise swig will not generate correct binding for any classes inherited +# from it, therefore have to delete the automatic binding for View in the end + rm -f automatic/csharp/View.cs + dist-hook: $(BUILT_SOURCES) mkdir -p $(distdir)/automatic/cpp cp ./automatic/cpp/*.cpp $(distdir)/automatic/cpp diff --git a/plugins/dali-swig/examples/dali-test.cs b/plugins/dali-swig/examples/dali-test.cs index ce7899b..856a4dd 100644 --- a/plugins/dali-swig/examples/dali-test.cs +++ b/plugins/dali-swig/examples/dali-test.cs @@ -21,6 +21,75 @@ using Dali; namespace MyCSharpExample { + class MyView : View + { + private string _myOwnName; + public int _myCurrentValue; + + public MyView() + { + _myCurrentValue = 0; + } + + public string MyOwnName + { + get + { + return _myOwnName; + } + set + { + _myOwnName = value; + } + } + } + + class MyButton : PushButton + { + private string _myOwnName; + public int _myCurrentValue; + + public MyButton() + { + _myCurrentValue = 0; + } + + public string MyOwnName + { + get + { + return _myOwnName; + } + set + { + _myOwnName = value; + } + } + } + + class MySpin : Spin + { + private string _myOwnName; + public int _myCurrentValue; + + public MySpin() + { + _myCurrentValue = 0; + } + + public string MyOwnName + { + get + { + return _myOwnName; + } + set + { + _myOwnName = value; + } + } + } + class Example { [UnmanagedFunctionPointer(CallingConvention.StdCall)] @@ -116,6 +185,8 @@ namespace MyCSharpExample color.B += 10; color.A += 10; Console.WriteLine( " Color r = " + color.R + ", g = " + color.G + ", b = " + color.B + ", a = " + color.A ); + + ViewDownCastTest(); } public void RectanglePaddingClassTest() @@ -412,6 +483,133 @@ namespace MyCSharpExample } } + public void ViewDownCastTest() + { + View container = new View(); + container.Position = new Position(-800.0f, -800.0f, 0.0f); + Stage.GetCurrent().Add(container); + + // Test downcast for native control + TextLabel myLabel = new TextLabel(); + myLabel.Name = "MyLabelName"; + myLabel.Text = "MyText"; + + Console.WriteLine("myLabel.Name = " + myLabel.Name + ", Text = " + myLabel.Text); + + container.Add(myLabel); + + Actor myLabelActor = container.FindChildByName("MyLabelName"); + if(myLabelActor) + { + TextLabel newLabel = View.DownCast(myLabelActor); + if(newLabel) + { + Console.WriteLine("Downcast to TextLabel successful: newLabel Name = " + newLabel.Name + ", Text = " + newLabel.Text); + } + else + { + Console.WriteLine("Downcast to TextLabel failed!"); + } + } + + // Test downcast for class directly inherited from View + MyView myView = new MyView(); + myView.Name = "MyViewName"; + myView.MyOwnName = "MyOwnViewName"; + myView._myCurrentValue = 5; + + Console.WriteLine("myView.Name = " + myView.Name + ", MyOwnName = " + myView.MyOwnName + ", myCurrentValue = " + myView._myCurrentValue); + + container.Add(myView); + + Actor myViewActor = container.FindChildByName("MyViewName"); + if(myViewActor) + { + MyView newView = View.DownCast(myViewActor); + if(newView) + { + Console.WriteLine("Downcast to MyView successful: newView Name = " + newView.Name + ", MyOwnName = " + newView.MyOwnName + ", myCurrentValue = " + newView._myCurrentValue); + } + else + { + Console.WriteLine("Downcast to MyView failed!"); + } + } + + // Test downcast for class directly inherited from native control + MyButton myButton = new MyButton(); + myButton.Name = "MyButtonName"; + myButton.MyOwnName = "MyOwnViewName"; + myButton.LabelText = "MyLabelText"; + myButton._myCurrentValue = 5; + + Console.WriteLine("myButton.Name = " + myButton.Name + ", MyOwnName = " + myButton.MyOwnName + ", LabelText = " + myButton.LabelText + ", myCurrentValue = " + myButton._myCurrentValue); + + container.Add(myButton); + + Actor myButtonActor = container.FindChildByName("MyButtonName"); + if(myButtonActor) + { + MyButton newButton = View.DownCast(myButtonActor); + if(newButton) + { + Console.WriteLine("Downcast to MyButton successful: newButton Name = " + newButton.Name + ", MyOwnName = " + newButton.MyOwnName + ", LabelText = " + myButton.LabelText + ", myCurrentValue = " + newButton._myCurrentValue); + } + else + { + Console.WriteLine("Downcast to MyButton failed!"); + } + } + + // Test downcast for a CustomView + Spin spin = new Spin(); + spin.Name = "SpinName"; + spin.MaxValue = 8888; + + Console.WriteLine("spin.Name = " + spin.Name + ", MaxValue = " + spin.MaxValue); + + container.Add(spin); + + Actor spinActor = container.FindChildByName("SpinName"); + if(spinActor) + { + Spin newSpin = View.DownCast(spinActor); + if(newSpin) + { + Console.WriteLine("Downcast to Spin successful: newSpin Name = " + newSpin.Name + ", MaxValue = " + newSpin.MaxValue); + } + else + { + Console.WriteLine("Downcast to Spin failed!"); + } + } + + // Test downcast for class inherited from a CustomView + MySpin mySpin = new MySpin(); + mySpin.Name = "MySpinName"; + mySpin.MyOwnName = "MyOwnSpinName"; + mySpin.MaxValue = 8888; + mySpin._myCurrentValue = 5; + + Console.WriteLine("mySpin.Name = " + mySpin.Name + ", MyOwnName = " + mySpin.MyOwnName + ", MaxValue = " + mySpin.MaxValue + ", currentValue = " + mySpin._myCurrentValue); + + container.Add(mySpin); + + Actor mySpinActor = container.FindChildByName("MySpinName"); + if(mySpinActor) + { + MySpin newSpin = View.DownCast(mySpinActor); + if(newSpin) + { + Console.WriteLine("Downcast to MySpin successful: newSpin Name = " + newSpin.Name + ", MyOwnName = " + newSpin.MyOwnName + ", MaxValue = " + newSpin.MaxValue + ", currentValue = " + newSpin._myCurrentValue); + } + else + { + Console.WriteLine("Downcast to MySpin failed!"); + } + } + } + public void MainLoop() { _application.MainLoop (); diff --git a/plugins/dali-swig/examples/date-picker-using-json.cs b/plugins/dali-swig/examples/date-picker-using-json.cs index daa7326..ade1b72 100644 --- a/plugins/dali-swig/examples/date-picker-using-json.cs +++ b/plugins/dali-swig/examples/date-picker-using-json.cs @@ -66,21 +66,19 @@ namespace MyCSharpExample Actor month = actorTree.FindChildByName("Month" ); Actor day = actorTree.FindChildByName("Day"); - // need to get the actual C# View associated with the actor, - _spinYear = (Spin ) ViewRegistry.GetCustomViewFromActor( year ); - _spinMonth = (Spin ) ViewRegistry.GetCustomViewFromActor( month ); - _spinDay = (Spin ) ViewRegistry.GetCustomViewFromActor( day ); + // need to get the actual C# Spin object associated with the actor, + _spinYear = View.DownCast( year ); + _spinMonth = View.DownCast( month ); + _spinDay = View.DownCast( day ); _spinYear.Value = 2099; _spinMonth.Value = 5; _spinDay.Value = 23; - _spinYear.SetKeyboardFocusable(true); _spinMonth.SetKeyboardFocusable(true); _spinDay.SetKeyboardFocusable(true); - FocusManager keyboardFocusManager = FocusManager.Instance; keyboardFocusManager.PreFocusChange += OnKeyboardPreFocusChange; keyboardFocusManager.FocusedActorEnterKeyPressed += OnFocusedActorEnterKeyPressed; diff --git a/plugins/dali-swig/manual/csharp/View.cs b/plugins/dali-swig/manual/csharp/View.cs new file mode 100644 index 0000000..8589e70 --- /dev/null +++ b/plugins/dali-swig/manual/csharp/View.cs @@ -0,0 +1,1325 @@ +/** Copyright (c) 2017 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 Dali { + + using System; + using System.Runtime.InteropServices; + + +public class View : CustomActor { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn) { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + + // Register this instance of view in the view registry. + ViewRegistry.RegisterView(this); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~View() { + DisposeQueue.Instance.Add(this); + } + + public override void Dispose() { + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_View(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + base.Dispose(); + } + } + + /** + * @brief Event arguments that passed via KeyInputFocusGained signal + * + */ + public class KeyInputFocusGainedEventArgs : EventArgs + { + private View _view; + + /** + * @brief View - is the view that gets Key Input Focus + * + */ + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + } + + /** + * @brief Event arguments that passed via KeyInputFocusLost signal + * + */ + public class KeyInputFocusLostEventArgs : EventArgs + { + private View _view; + + /** + * @brief View - is the view that loses Key Input Focus + * + */ + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + } + + /** + * @brief Event arguments that passed via Key signal + * + */ + public class KeyEventArgs : EventArgs + { + private View _view; + private Key _key; + + /** + * @brief View - is the view that recieves the key. + * + */ + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + + /** + * @brief Key - is the key sent to the View. + * + */ + public Key Key + { + get + { + return _key; + } + set + { + _key = value; + } + } + } + + /** + * @brief Event arguments that passed via OnRelayout signal + * + */ + public class OnRelayoutEventArgs : EventArgs + { + private View _view; + + /** + * @brief View - is the view that is being resized upon relayout + * + */ + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + } + + + /** + * @brief Event arguments that passed via Touch signal + * + */ + public class TouchEventArgs : EventArgs + { + private View _view; + private Touch _touch; + + /** + * @brief View - is the view that is being touched + * + */ + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + + /** + * @brief Touch - contains the information of touch points + * + */ + public Touch Touch + { + get + { + return _touch; + } + set + { + _touch = value; + } + } + } + + /** + * @brief Event arguments that passed via Hover signal + * + */ + public class HoverEventArgs : EventArgs + { + private View _view; + private Hover _hover; + + /** + * @brief View - is the view that is being hovered + * + */ + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + + /** + * @brief Hover - contains touch points that represent the points + * that are currently being hovered or the points where a hover has stopped + * + */ + public Hover Hover + { + get + { + return _hover; + } + set + { + _hover = value; + } + } + } + + /** + * @brief Event arguments that passed via Wheel signal + * + */ + public class WheelEventArgs : EventArgs + { + private View _view; + private Wheel _wheel; + + /** + * @brief View - is the view that is being wheeled + * + */ + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + + /** + * @brief Wheel - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL + * + */ + public Wheel Wheel + { + get + { + return _wheel; + } + set + { + _wheel = value; + } + } + } + + /** + * @brief Event arguments that passed via OnStage signal + * + */ + public class OnStageEventArgs : EventArgs + { + private View _view; + + /** + * @brief View - is the view that is being connected to the stage + * + */ + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + } + + /** + * @brief Event arguments that passed via OffStage signal + * + */ + public class OffStageEventArgs : EventArgs + { + private View _view; + + /** + * @brief View - is the view that is being disconnected from the stage + * + */ + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + } + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void KeyInputFocusGainedCallbackDelegate(IntPtr control); + private DaliEventHandler _KeyInputFocusGainedEventHandler; + private KeyInputFocusGainedCallbackDelegate _KeyInputFocusGainedCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void KeyInputFocusLostCallbackDelegate(IntPtr control); + private DaliEventHandler _KeyInputFocusLostEventHandler; + private KeyInputFocusLostCallbackDelegate _KeyInputFocusLostCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr key); + private DaliEventHandlerWithReturnType _KeyHandler; + private KeyCallbackDelegate _KeyCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void OnRelayoutEventCallbackDelegate(IntPtr control); + private DaliEventHandler _viewOnRelayoutEventHandler; + private OnRelayoutEventCallbackDelegate _viewOnRelayoutEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool TouchCallbackDelegate(IntPtr view, IntPtr touch); + private DaliEventHandlerWithReturnType _viewTouchHandler; + private TouchCallbackDelegate _viewTouchCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool HoverCallbackDelegate(IntPtr view, IntPtr hover); + private DaliEventHandlerWithReturnType _viewHoverHandler; + private HoverCallbackDelegate _viewHoverCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool WheelCallbackDelegate(IntPtr view, IntPtr wheel); + private DaliEventHandlerWithReturnType _viewWheelHandler; + private WheelCallbackDelegate _viewWheelCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void OnStageEventCallbackDelegate(IntPtr control); + private DaliEventHandler _viewOnStageEventHandler; + private OnStageEventCallbackDelegate _viewOnStageEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void OffStageEventCallbackDelegate(IntPtr control); + private DaliEventHandler _viewOffStageEventHandler; + private OffStageEventCallbackDelegate _viewOffStageEventCallbackDelegate; + + /** + * @brief Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler + * (in the type of KeyInputFocusGainedEventHandler-DaliEventHandler) + * provided by the user. KeyInputFocusGained signal is emitted when the control gets Key Input Focus. + */ + public event DaliEventHandler KeyInputFocusGained + { + add + { + lock(this) + { + // Restricted to only one listener + if (_KeyInputFocusGainedEventHandler == null) + { + _KeyInputFocusGainedEventHandler += value; + Console.WriteLine("View Key EVENT Locked...."); + _KeyInputFocusGainedCallbackDelegate = new KeyInputFocusGainedCallbackDelegate(OnKeyInputFocusGained); + this.KeyInputFocusGainedSignal().Connect(_KeyInputFocusGainedCallbackDelegate); + } + } + } + + remove + { + lock(this) + { + if (_KeyInputFocusGainedEventHandler != null) + { + this.KeyInputFocusGainedSignal().Disconnect(_KeyInputFocusGainedCallbackDelegate); + } + + _KeyInputFocusGainedEventHandler -= value; + } + } + } + + private void OnKeyInputFocusGained(IntPtr view) + { + KeyInputFocusGainedEventArgs e = new KeyInputFocusGainedEventArgs(); + Console.WriteLine("View Key ...."); + // Populate all members of "e" (KeyInputFocusGainedEventArgs) with real data + e.View = Dali.View.GetViewFromPtr(view); + + if (_KeyInputFocusGainedEventHandler != null) + { + //here we send all data to user event handlers + _KeyInputFocusGainedEventHandler(this, e); + } + + } + + /** + * @brief Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler + * (in the type of KeyInputFocusLostEventHandler-DaliEventHandler) + * provided by the user. KeyInputFocusLost signal is emitted when the control loses Key Input Focus. + */ + public event DaliEventHandler KeyInputFocusLost + { + add + { + lock(this) + { + // Restricted to only one listener + if (_KeyInputFocusLostEventHandler == null) + { + _KeyInputFocusLostEventHandler += value; + + _KeyInputFocusLostCallbackDelegate = new KeyInputFocusLostCallbackDelegate(OnKeyInputFocusLost); + this.KeyInputFocusLostSignal().Connect(_KeyInputFocusLostCallbackDelegate); + } + } + } + + remove + { + lock(this) + { + if (_KeyInputFocusLostEventHandler != null) + { + this.KeyInputFocusLostSignal().Disconnect(_KeyInputFocusLostCallbackDelegate); + } + + _KeyInputFocusLostEventHandler -= value; + } + } + } + + private void OnKeyInputFocusLost(IntPtr view) + { + KeyInputFocusLostEventArgs e = new KeyInputFocusLostEventArgs(); + + // Populate all members of "e" (KeyInputFocusLostEventArgs) with real data + e.View = Dali.View.GetViewFromPtr(view); + + if (_KeyInputFocusLostEventHandler != null) + { + //here we send all data to user event handlers + _KeyInputFocusLostEventHandler(this, e); + } + } + + /** + * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler + * (in the type of KeyHandler-DaliEventHandlerWithReturnType) + * provided by the user. KeyPressed signal is emitted when key event is received. + */ + public event DaliEventHandlerWithReturnType KeyPressed + { + add + { + lock(this) + { + // Restricted to only one listener + if (_KeyHandler == null) + { + _KeyHandler += value; + + _KeyCallbackDelegate = new KeyCallbackDelegate(OnKey); + this.KeyEventSignal().Connect(_KeyCallbackDelegate); + } + } + } + + remove + { + lock(this) + { + if (_KeyHandler != null) + { + this.KeyEventSignal().Disconnect(_KeyCallbackDelegate); + } + + _KeyHandler -= value; + } + } + } + + private bool OnKey(IntPtr view, IntPtr key) + { + KeyEventArgs e = new KeyEventArgs(); + + // Populate all members of "e" (KeyEventArgs) with real data + e.View = Dali.View.GetViewFromPtr(view); + e.Key = Dali.Key.GetKeyFromPtr(key); + + if (_KeyHandler != null) + { + //here we send all data to user event handlers + return _KeyHandler(this, e); + } + return false; + + } + + /** + * @brief Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler + * (in the type of OnRelayoutEventHandler) provided by the user. + * OnRelayout signal is emitted after the size has been set on the view during relayout. + */ + public event DaliEventHandler OnRelayoutEvent + { + add + { + lock(this) + { + // Restricted to only one listener + if (_viewOnRelayoutEventHandler == null) + { + _viewOnRelayoutEventHandler += value; + Console.WriteLine("View OnRelayoutEventArgs Locked...."); + _viewOnRelayoutEventCallbackDelegate = new OnRelayoutEventCallbackDelegate(OnRelayout); + this.OnRelayoutSignal().Connect(_viewOnRelayoutEventCallbackDelegate); + } + } + } + + remove + { + lock(this) + { + if (_viewOnRelayoutEventHandler != null) + { + this.OnRelayoutSignal().Disconnect(_viewOnRelayoutEventCallbackDelegate); + } + + _viewOnRelayoutEventHandler -= value; + } + } + } + + // Callback for View OnRelayout signal + private void OnRelayout(IntPtr data) + { + OnRelayoutEventArgs e = new OnRelayoutEventArgs(); + Console.WriteLine("View OnRelayoutEventArgs...."); + // Populate all members of "e" (OnRelayoutEventArgs) with real data + e.View = View.GetViewFromPtr(data); + + if (_viewOnRelayoutEventHandler != null) + { + //here we send all data to user event handlers + _viewOnRelayoutEventHandler(this, e); + } + } + + /** + * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler + * (in the type of TouchHandler-DaliEventHandlerWithReturnType) + * provided by the user. Touched signal is emitted when touch input is received. + */ + public event DaliEventHandlerWithReturnType Touched + { + add + { + lock(this) + { + // Restricted to only one listener + if (_viewTouchHandler == null) + { + _viewTouchHandler += value; + Console.WriteLine("View Touch EVENT LOCKED...."); + _viewTouchCallbackDelegate = new TouchCallbackDelegate(OnTouch); + this.TouchSignal().Connect(_viewTouchCallbackDelegate); + } + } + } + + remove + { + lock(this) + { + if (_viewTouchHandler != null) + { + this.TouchSignal().Disconnect(_viewTouchCallbackDelegate); + } + + _viewTouchHandler -= value; + } + } + } + + // Callback for View TouchSignal + private bool OnTouch(IntPtr view, IntPtr touch) + { + TouchEventArgs e = new TouchEventArgs(); + Console.WriteLine("View Touch EVENT...."); + // Populate all members of "e" (TouchEventArgs) with real data + e.View = View.GetViewFromPtr(view); + e.Touch = Dali.Touch.GetTouchFromPtr(touch); + + if (_viewTouchHandler != null) + { + //here we send all data to user event handlers + return _viewTouchHandler(this, e); + } + + return false; + } + + /** + * @brief Event for Hovered signal which can be used to subscribe/unsubscribe the event handler + * (in the type of HoverHandler-DaliEventHandlerWithReturnType) + * provided by the user. Hovered signal is emitted when hover input is received. + */ + public event DaliEventHandlerWithReturnType Hovered + { + add + { + lock(this) + { + // Restricted to only one listener + if (_viewHoverHandler == null) + { + _viewHoverHandler += value; + + _viewHoverCallbackDelegate = new HoverCallbackDelegate(OnHover); + this.HoveredSignal().Connect(_viewHoverCallbackDelegate); + } + } + } + + remove + { + lock(this) + { + if (_viewHoverHandler != null) + { + this.HoveredSignal().Disconnect(_viewHoverCallbackDelegate); + } + + _viewHoverHandler -= value; + } + } + } + + // Callback for View Hover signal + private bool OnHover(IntPtr view, IntPtr hover) + { + HoverEventArgs e = new HoverEventArgs(); + + // Populate all members of "e" (HoverEventArgs) with real data + e.View = View.GetViewFromPtr(view); + e.Hover = Dali.Hover.GetHoverFromPtr(hover); + + if (_viewHoverHandler != null) + { + //here we send all data to user event handlers + return _viewHoverHandler(this, e); + } + + return false; + } + + /** + * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler + * (in the type of WheelHandler-DaliEventHandlerWithReturnType) + * provided by the user. WheelMoved signal is emitted when wheel event is received. + */ + public event DaliEventHandlerWithReturnType WheelMoved + { + add + { + lock(this) + { + // Restricted to only one listener + if (_viewWheelHandler == null) + { + _viewWheelHandler += value; + Console.WriteLine("View Wheel EVENT LOCKED...."); + _viewWheelCallbackDelegate = new WheelCallbackDelegate(OnWheel); + this.WheelEventSignal().Connect(_viewWheelCallbackDelegate); + } + } + } + + remove + { + lock(this) + { + if (_viewWheelHandler != null) + { + this.WheelEventSignal().Disconnect(_viewWheelCallbackDelegate); + } + + _viewWheelHandler -= value; + } + } + } + + // Callback for View Wheel signal + private bool OnWheel(IntPtr view, IntPtr wheel) + { + WheelEventArgs e = new WheelEventArgs(); + Console.WriteLine("View Wheel EVENT ...."); + // Populate all members of "e" (WheelEventArgs) with real data + e.View = View.GetViewFromPtr(view); + e.Wheel = Dali.Wheel.GetWheelFromPtr(wheel); + + if (_viewWheelHandler != null) + { + //here we send all data to user event handlers + return _viewWheelHandler(this, e); + } + + return false; + } + + /** + * @brief Event for OnStage signal which can be used to subscribe/unsubscribe the event handler + * (in the type of OnStageEventHandler) provided by the user. + * OnStage signal is emitted after the view has been connected to the stage. + */ + public event DaliEventHandler OnStageEvent + { + add + { + lock(this) + { + // Restricted to only one listener + if (_viewOnStageEventHandler == null) + { + _viewOnStageEventHandler += value; + + _viewOnStageEventCallbackDelegate = new OnStageEventCallbackDelegate(OnStage); + this.OnStageSignal().Connect(_viewOnStageEventCallbackDelegate); + } + } + } + + remove + { + lock(this) + { + if (_viewOnStageEventHandler != null) + { + this.OnStageSignal().Disconnect(_viewOnStageEventCallbackDelegate); + } + + _viewOnStageEventHandler -= value; + } + } + } + + // Callback for View OnStage signal + private void OnStage(IntPtr data) + { + OnStageEventArgs e = new OnStageEventArgs(); + + // Populate all members of "e" (OnStageEventArgs) with real data + e.View = View.GetViewFromPtr(data); + + //Console.WriteLine("############# OnStage()! e.View.Name=" + e.View.Name); + + if (_viewOnStageEventHandler != null) + { + //here we send all data to user event handlers + _viewOnStageEventHandler(this, e); + } + } + + /** + * @brief Event for OffStage signal which can be used to subscribe/unsubscribe the event handler + * (in the type of OffStageEventHandler) provided by the user. + * OffStage signal is emitted after the view has been disconnected from the stage. + */ + public event DaliEventHandler OffStageEvent + { + add + { + lock(this) + { + // Restricted to only one listener + if (_viewOffStageEventHandler == null) + { + _viewOffStageEventHandler += value; + + _viewOffStageEventCallbackDelegate = new OffStageEventCallbackDelegate(OffStage); + this.OnStageSignal().Connect(_viewOffStageEventCallbackDelegate); + } + } + } + + remove + { + lock(this) + { + if (_viewOffStageEventHandler != null) + { + this.OnStageSignal().Disconnect(_viewOffStageEventCallbackDelegate); + } + + _viewOffStageEventHandler -= value; + } + } + } + + // Callback for View OffStage signal + private void OffStage(IntPtr data) + { + OffStageEventArgs e = new OffStageEventArgs(); + + // Populate all members of "e" (OffStageEventArgs) with real data + e.View = View.GetViewFromPtr(data); + + if (_viewOffStageEventHandler != null) + { + //here we send all data to user event handlers + _viewOffStageEventHandler(this, e); + } + } + + public static View GetViewFromPtr(global::System.IntPtr cPtr) { + View ret = new View(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public class Property : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~Property() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_View_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } + + public static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get(); + public static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get(); + public static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get(); + + public Property() : this(NDalicPINVOKE.new_View_Property(), true) { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get(); + public static readonly int BACKGROUND_COLOR = NDalicPINVOKE.View_Property_BACKGROUND_COLOR_get(); + public static readonly int BACKGROUND_IMAGE = NDalicPINVOKE.View_Property_BACKGROUND_IMAGE_get(); + public static readonly int KEY_INPUT_FOCUS = NDalicPINVOKE.View_Property_KEY_INPUT_FOCUS_get(); + public static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get(); + + } + + public class KeyboardFocus : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal KeyboardFocus(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyboardFocus obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~KeyboardFocus() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_View_KeyboardFocus(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } + + public KeyboardFocus() : this(NDalicPINVOKE.new_View_KeyboardFocus(), true) { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public enum Direction { + LEFT, + RIGHT, + UP, + DOWN, + PAGE_UP, + PAGE_DOWN + } + } + + public View () : this (NDalicPINVOKE.View_New(), true) { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true) { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public View Assign(View handle) { + View ret = new View(NDalicPINVOKE.View_Assign(swigCPtr, View.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private new static View DownCast(BaseHandle handle) { + View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static T DownCast(Actor actor) where T : View + { + return (T)( ViewRegistry.GetViewFromActor( actor ) ); + } + + public void SetKeyInputFocus() { + NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool HasKeyInputFocus() { + bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void ClearKeyInputFocus() { + NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PinchGestureDetector GetPinchGestureDetector() { + PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PanGestureDetector GetPanGestureDetector() { + PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public TapGestureDetector GetTapGestureDetector() { + TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public LongPressGestureDetector GetLongPressGestureDetector() { + LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetStyleName(string styleName) { + NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public string GetStyleName() { + string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetBackgroundColor(Vector4 color) { + NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector4 GetBackgroundColor() { + Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetBackgroundImage(Image image) { + NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ClearBackground() { + NDalicPINVOKE.View_ClearBackground(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ControlKeySignal KeyEventSignal() { + ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public KeyInputFocusSignal KeyInputFocusGainedSignal() { + KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public KeyInputFocusSignal KeyInputFocusLostSignal() { + KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true) { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public enum PropertyRange { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX, + CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX+1000 + } + + public string StyleName + { + get + { + string temp; + GetProperty( View.Property.STYLE_NAME).Get( out temp ); + return temp; + } + set + { + SetProperty( View.Property.STYLE_NAME, new Dali.Property.Value( value ) ); + } + } + + public Vector4 BackgroundColor + { + get + { + Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f); + GetProperty( View.Property.BACKGROUND_COLOR).Get( temp ); + return temp; + } + set + { + SetProperty( View.Property.BACKGROUND_COLOR, new Dali.Property.Value( value ) ); + } + } + + public Dali.Property.Map BackgroundImage + { + get + { + Dali.Property.Map temp = new Dali.Property.Map(); + GetProperty( View.Property.BACKGROUND_IMAGE).Get( temp ); + return temp; + } + set + { + SetProperty( View.Property.BACKGROUND_IMAGE, new Dali.Property.Value( value ) ); + } + } + + public bool KeyInputFocus + { + get + { + bool temp = false; + GetProperty( View.Property.KEY_INPUT_FOCUS).Get( ref temp ); + return temp; + } + set + { + SetProperty( View.Property.KEY_INPUT_FOCUS, new Dali.Property.Value( value ) ); + } + } + + public Dali.Property.Map Background + { + get + { + Dali.Property.Map temp = new Dali.Property.Map(); + GetProperty( View.Property.BACKGROUND).Get( temp ); + return temp; + } + set + { + SetProperty( View.Property.BACKGROUND, new Dali.Property.Value( value ) ); + } + } + + public string State + { + get + { + string temp; + GetProperty( View.Property.STATE).Get( out temp ); + return temp; + } + set + { + SetProperty( View.Property.STATE, new Dali.Property.Value( value ) ); + } + } + + public string SubState + { + get + { + string temp; + GetProperty( View.Property.SUB_STATE).Get( out temp ); + return temp; + } + set + { + SetProperty( View.Property.SUB_STATE, new Dali.Property.Value( value ) ); + } + } + + public Dali.Property.Map Tooltip + { + get + { + Dali.Property.Map temp = new Dali.Property.Map(); + GetProperty( View.Property.TOOLTIP).Get( temp ); + return temp; + } + set + { + SetProperty( View.Property.TOOLTIP, new Dali.Property.Value( value ) ); + } + } + + public string TooltipText + { + set + { + SetProperty( View.Property.TOOLTIP, new Dali.Property.Value( value ) ); + } + } + + public float Flex + { + get + { + float temp = 0.0f; + GetProperty( FlexContainer.ChildProperty.FLEX).Get( ref temp ); + return temp; + } + set + { + SetProperty( FlexContainer.ChildProperty.FLEX, new Dali.Property.Value( value ) ); + } + } + + public int AlignSelf + { + get + { + int temp = 0; + GetProperty( FlexContainer.ChildProperty.ALIGN_SELF).Get( ref temp ); + return temp; + } + set + { + SetProperty( FlexContainer.ChildProperty.ALIGN_SELF, new Dali.Property.Value( value ) ); + } + } + + public Vector4 FlexMargin + { + get + { + Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f); + GetProperty( FlexContainer.ChildProperty.FLEX_MARGIN).Get( temp ); + return temp; + } + set + { + SetProperty( FlexContainer.ChildProperty.FLEX_MARGIN, new Dali.Property.Value( value ) ); + } + } + + public Vector2 CellIndex + { + get + { + Vector2 temp = new Vector2(0.0f,0.0f); + GetProperty( TableView.ChildProperty.CELL_INDEX).Get( temp ); + return temp; + } + set + { + SetProperty( TableView.ChildProperty.CELL_INDEX, new Dali.Property.Value( value ) ); + } + } + + public float RowSpan + { + get + { + float temp = 0.0f; + GetProperty( TableView.ChildProperty.ROW_SPAN).Get( ref temp ); + return temp; + } + set + { + SetProperty( TableView.ChildProperty.ROW_SPAN, new Dali.Property.Value( value ) ); + } + } + + public float ColumnSpan + { + get + { + float temp = 0.0f; + GetProperty( TableView.ChildProperty.COLUMN_SPAN).Get( ref temp ); + return temp; + } + set + { + SetProperty( TableView.ChildProperty.COLUMN_SPAN, new Dali.Property.Value( value ) ); + } + } + + public string CellHorizontalAlignment + { + get + { + string temp; + GetProperty( TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get( out temp ); + return temp; + } + set + { + SetProperty( TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Dali.Property.Value( value ) ); + } + } + + public string CellVerticalAlignment + { + get + { + string temp; + GetProperty( TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get( out temp ); + return temp; + } + set + { + SetProperty( TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Dali.Property.Value( value ) ); + } + } +} + +} diff --git a/plugins/dali-swig/manual/csharp/ViewRegistry.cs b/plugins/dali-swig/manual/csharp/ViewRegistry.cs index c2be678..bd9fecb 100644 --- a/plugins/dali-swig/manual/csharp/ViewRegistry.cs +++ b/plugins/dali-swig/manual/csharp/ViewRegistry.cs @@ -51,14 +51,14 @@ namespace Dali /// in MyControl.h /// class MyControl : public Control /// { - /// struct Property + /// struct Property + /// { + /// enum /// { - /// enum - /// { - /// HOURS = Control::CONTROL_PROPERTY_END_INDEX + 1 - /// } - /// } - /// + /// HOURS = Control::CONTROL_PROPERTY_END_INDEX + 1 + /// } + /// } + /// } /// /// in MyControl-impl.cpp /// @@ -139,9 +139,9 @@ namespace Dali private PropertyRangeManager _propertyRangeManager; /// - /// Given a C++ custom control the dictionary allows us to find what CustomView it belongs to + /// Given a C++ control the dictionary allows us to find which C# control (View) it belongs to /// - private Dictionary _controlMap; + private Dictionary _controlMap; /// // Maps the name of a custom view to a create instance function @@ -177,7 +177,7 @@ namespace Dali _getPropertyCallback = new GetPropertyDelegate (GetProperty); _setPropertyCallback = new SetPropertyDelegate (SetProperty); - _controlMap = new Dictionary(); + _controlMap = new Dictionary(); _constructorMap = new Dictionary>(); _propertyRangeManager = new PropertyRangeManager(); @@ -199,7 +199,7 @@ namespace Dali } /// - /// Called directly from DALi C++ type registry to create a control (View) uses no marshalling. + /// Called directly from DALi C++ type registry to create a control (View) using no marshalling. /// /// Pointer to the Control (Views) handle /// C pointer to the Control (View) name @@ -215,17 +215,7 @@ namespace Dali { // Create the control CustomView newControl = controlConstructor (); - - // Store the mapping between this instance of the custom control and native part - // We store a pointer to the RefObject for the control - IntPtr cPtr = newControl.GetPtrfromActor(); - RefObject refObj = newControl.GetObjectPtr (); - IntPtr refCptr = (IntPtr) RefObject.getCPtr(refObj); - - //Console.WriteLine ("________Storing ref object cptr in control map Hex: {0:X}", refCptr); - Instance._controlMap.Add (refCptr , newControl ); - - return cPtr; // return pointer to handle + return newControl.GetPtrfromActor(); // return pointer to handle } else { @@ -234,6 +224,25 @@ namespace Dali } } + /// + /// Store the mapping between this instance of control (View) and native part. + /// + /// The instance of control (View) + public static void RegisterView( View view ) + { + // We store a pointer to the RefObject for the control + RefObject refObj = view.GetObjectPtr(); + IntPtr refCptr = (IntPtr) RefObject.getCPtr(refObj); + + //Console.WriteLine ("________Storing ref object cptr in control map Hex: {0:X}", refCptr); + if ( !Instance._controlMap.ContainsKey(refCptr) ) + { + Instance._controlMap.Add(refCptr, view ); + } + + return; + } + private static IntPtr GetProperty( IntPtr controlPtr, IntPtr propertyName ) { string name = System.Runtime.InteropServices.Marshal.PtrToStringAnsi (propertyName); @@ -260,19 +269,16 @@ namespace Dali } } - public static CustomView GetCustomViewFromActor( Actor actor ) + public static View GetViewFromActor( Actor actor ) { // we store a dictionary of ref-obects (C++ land) to custom views (C# land) - Dali.CustomView view; + Dali.View view; RefObject refObj = actor.GetObjectPtr (); IntPtr refObjectPtr = (IntPtr) RefObject.getCPtr(refObj); if ( Instance._controlMap.TryGetValue ( refObjectPtr, out view) ) { - - // call the get property function - return view; } else @@ -346,7 +352,7 @@ namespace Dali private IntPtr GetPropertyValue ( IntPtr controlPtr, string propertyName) { // Get the C# control that maps to the C++ control - Dali.CustomView view; + Dali.View view; BaseHandle baseHandle = new BaseHandle (controlPtr, false); @@ -356,7 +362,6 @@ namespace Dali if ( _controlMap.TryGetValue ( refObjectPtr, out view) ) { - // call the get property function System.Object val = view.GetType ().GetProperty (propertyName).GetAccessors () [0].Invoke (view, null); @@ -377,7 +382,7 @@ namespace Dali private void SetPropertyValue ( IntPtr controlPtr, string propertyName, IntPtr propertyValuePtr) { // Get the C# control that maps to the C++ control - Dali.CustomView view; + Dali.View view; //Console.WriteLine ("SetPropertyValue refObjectPtr = {0:X}", controlPtr);