From: dongsug.song Date: Wed, 21 Jun 2017 10:50:33 +0000 (+0900) Subject: [Tizen] keep old APIs to avoid build error X-Git-Tag: submit/trunk/20170823.075128~91^2~125 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f64a2675b1706d6319a1b452b417de6e8167d7d;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Tizen] keep old APIs to avoid build error Change-Id: I888689c527263e7e932a92cf43837ad569089ec2 Signed-off-by: dongsug.song --- diff --git a/src/Tizen.NUI/src/public/FocusManager.cs b/src/Tizen.NUI/src/public/FocusManager.cs index 8419eba..8986a04 100755 --- a/src/Tizen.NUI/src/public/FocusManager.cs +++ b/src/Tizen.NUI/src/public/FocusManager.cs @@ -682,74 +682,74 @@ namespace Tizen.NUI View proposedView = View.DownCast(proposed); return _customFocusAlgorithm.GetNextFocusableView(currentView, proposedView, direction); } - } - - - /*********************************************************************************/ - /*** will be removed/deprecated ***/ - /*********************************************************************************/ - - /// - ///Event arguments that passed via FocusedViewEnterKey signal - /// - public class FocusedViewEnterKeyEventArgs : EventArgs - { - private View _view; - - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - } - + } + + + /*********************************************************************************/ + /*** will be removed/deprecated ***/ + /*********************************************************************************/ + + /// + ///Event arguments that passed via FocusedViewEnterKey signal + /// + public class FocusedViewEnterKeyEventArgs : EventArgs + { + private View _view; + + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + } + private EventHandler _focusedViewEnterKeyEventHandler2; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusedViewEnterKeyEventCallback2(IntPtr view); private FocusedViewEnterKeyEventCallback2 _focusedViewEnterKeyEventCallback2; - - /// - /// FocusedViewActivated will be triggered when the current focused view has the enter key pressed on it. - /// - public event EventHandler FocusedViewEnterKeyPressed - { - add - { - if (_focusedViewEnterKeyEventCallback2 == null) - { - _focusedViewEnterKeyEventCallback2 = OnFocusedViewEnterKey2; - FocusedViewEnterKeySignal().Connect(_focusedViewEnterKeyEventCallback2); - } - _focusedViewEnterKeyEventHandler2 += value; - } - remove - { - _focusedViewEnterKeyEventHandler2 -= value; - - if (_focusedViewEnterKeyEventCallback2 == null && FocusedViewEnterKeySignal().Empty() == false) - { - FocusedViewEnterKeySignal().Disconnect(_focusedViewEnterKeyEventCallback2); - } - } - } - - private void OnFocusedViewEnterKey2(IntPtr view) - { - FocusedViewEnterKeyEventArgs e = new FocusedViewEnterKeyEventArgs(); - - e.View = View.GetViewFromPtr(view); - - if (_focusedViewEnterKeyEventHandler2 != null) - { - _focusedViewEnterKeyEventHandler2(this, e); - } - } + + /// + /// FocusedViewActivated will be triggered when the current focused view has the enter key pressed on it. + /// + public event EventHandler FocusedViewEnterKeyPressed + { + add + { + if (_focusedViewEnterKeyEventCallback2 == null) + { + _focusedViewEnterKeyEventCallback2 = OnFocusedViewEnterKey2; + FocusedViewEnterKeySignal().Connect(_focusedViewEnterKeyEventCallback2); + } + _focusedViewEnterKeyEventHandler2 += value; + } + remove + { + _focusedViewEnterKeyEventHandler2 -= value; + + if (_focusedViewEnterKeyEventCallback2 == null && FocusedViewEnterKeySignal().Empty() == false) + { + FocusedViewEnterKeySignal().Disconnect(_focusedViewEnterKeyEventCallback2); + } + } + } + + private void OnFocusedViewEnterKey2(IntPtr view) + { + FocusedViewEnterKeyEventArgs e = new FocusedViewEnterKeyEventArgs(); + + e.View = View.GetViewFromPtr(view); + + if (_focusedViewEnterKeyEventHandler2 != null) + { + _focusedViewEnterKeyEventHandler2(this, e); + } + } } diff --git a/src/Tizen.NUI/src/public/Layer.cs b/src/Tizen.NUI/src/public/Layer.cs index 4fbf526..282e2f5 100755 --- a/src/Tizen.NUI/src/public/Layer.cs +++ b/src/Tizen.NUI/src/public/Layer.cs @@ -1,398 +1,398 @@ -/** 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 Tizen.NUI -{ - using Tizen.NUI.BaseComponents; - - /// - /// Layers provide a mechanism for overlaying groups of actors on top of each other. - /// - public class Layer : Animatable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal Layer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Layer_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Layer obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Layer(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - - internal class Property - { - internal static readonly int BEHAVIOR = NDalicPINVOKE.Layer_Property_BEHAVIOR_get(); - } - - /// - /// Creates a Layer object. - /// - public Layer() : this(NDalicPINVOKE.Layer_New(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } +/** 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 Tizen.NUI +{ + using Tizen.NUI.BaseComponents; + + /// + /// Layers provide a mechanism for overlaying groups of actors on top of each other. + /// + public class Layer : Animatable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal Layer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Layer_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Layer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Layer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + internal class Property + { + internal static readonly int BEHAVIOR = NDalicPINVOKE.Layer_Property_BEHAVIOR_get(); + } + + /// + /// Creates a Layer object. + /// + public Layer() : this(NDalicPINVOKE.Layer_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } /// /// this method will be changed as internal method on later release /// - public new static Layer DownCast(BaseHandle handle) - { - Layer ret = new Layer(NDalicPINVOKE.Layer_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Search through this layer's hierarchy for an view with the given unique ID. - /// - ///
This layer(the parent) has been initialized.
- /// The actor itself is also considered in the search. - /// The id of the child to find - /// A handle to the view if found, or an empty handle if not. - public View FindChildById(uint id) - { - View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Adds a child view to this layer. - /// - ///
This layer(the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent layer.
- /// The child will be referenced by its parent. This means that the child will be kept alive, even if the handle passed into this method is reset or destroyed. - /// If the child already has a parent, it will be removed from old parent and reparented to this layer. This may change child's position, color, scale etc as it now inherits them from this layer. - /// The child - public void Add(View child) - { - NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Removes a child View from this layer. If the view was not a child of this layer, this is a no-op. - /// - ///
This layer(the parent) has been initialized. The child view is not the same as the parent view.
- /// The child - public void Remove(View child) - { - NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Queries the depth of the layer.
- /// 0 is the bottom most layer, higher number is on top.
- ///
- public uint Depth - { - get - { - return GetDepth(); - } - } - - internal uint GetDepth() - { - uint ret = NDalicPINVOKE.Layer_GetDepth(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Increments the depth of the layer. - /// - public void Raise() - { - NDalicPINVOKE.Layer_Raise(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Decrements the depth of the layer. - /// - public void Lower() - { - NDalicPINVOKE.Layer_Lower(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal void RaiseAbove(Layer target) - { - NDalicPINVOKE.Layer_RaiseAbove(swigCPtr, Layer.getCPtr(target)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal void LowerBelow(Layer target) - { - NDalicPINVOKE.Layer_LowerBelow(swigCPtr, Layer.getCPtr(target)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Raises the layer to the top. - /// - public void RaiseToTop() - { - NDalicPINVOKE.Layer_RaiseToTop(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Lowers the layer to the bottom. - /// - public void LowerToBottom() - { - NDalicPINVOKE.Layer_LowerToBottom(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Moves the layer directly above the given layer.
- /// After the call, this layers depth will be immediately above target.
- ///
- /// Layer to get on top of - public void MoveAbove(Layer target) - { - NDalicPINVOKE.Layer_MoveAbove(swigCPtr, Layer.getCPtr(target)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Moves the layer directly below the given layer.
- /// After the call, this layers depth will be immediately below target.
- ///
- /// Layer to get below of - public void MoveBelow(Layer target) - { - NDalicPINVOKE.Layer_MoveBelow(swigCPtr, Layer.getCPtr(target)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private void SetBehavior(LayerBehavior behavior) - { - NDalicPINVOKE.Layer_SetBehavior(swigCPtr, (int)behavior); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private LayerBehavior GetBehavior() - { - Layer.LayerBehavior ret = (Layer.LayerBehavior)NDalicPINVOKE.Layer_GetBehavior(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void SetSortFunction(SWIGTYPE_p_f_r_q_const__Dali__Vector3__float function) - { - NDalicPINVOKE.Layer_SetSortFunction(swigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.getCPtr(function)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal void SetTouchConsumed(bool consume) - { - NDalicPINVOKE.Layer_SetTouchConsumed(swigCPtr, consume); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal bool IsTouchConsumed() - { - bool ret = NDalicPINVOKE.Layer_IsTouchConsumed(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void SetHoverConsumed(bool consume) - { - NDalicPINVOKE.Layer_SetHoverConsumed(swigCPtr, consume); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal bool IsHoverConsumed() - { - bool ret = NDalicPINVOKE.Layer_IsHoverConsumed(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Retrieves child view by index. - /// - ///
The View has been initialized.
- /// The index of the child to retrieve - /// The view for the given index or empty handle if children not initialized - public View GetChildAt(uint index) - { - System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index); - cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr); - cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr); - - BaseHandle ret = new BaseHandle(cPtr, false); - - View temp = ViewRegistry.GetViewFromBaseHandle(ret); - - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - return temp ?? null; - } - - /// - /// Enumeration for the behavior of the layer. - /// - public enum LayerBehavior - { - Layer2D, - LayerUI = Layer2D, - Layer3D - } - - internal enum TreeDepthMultiplier - { - TREE_DEPTH_MULTIPLIER = 10000 - } - - /// - /// Layer Behavior, type String(Layer.LayerBehavior) - /// - public Layer.LayerBehavior Behavior - { - get - { - return GetBehavior(); - } - set - { - SetBehavior(value); - } - } - - /// - /// Retrieves and sets the Layer's opacity.
- ///
- public float Opacity - { - get - { - float temp = 0.0f; - GetProperty(View.Property.OPACITY).Get(out temp); - return temp; - } - set - { - SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Retrieves and sets the Layer's visibility. - /// - public bool Visibility - { - get - { - bool temp = false; - GetProperty(View.Property.VISIBLE).Get(out temp); - return temp; - } - set - { - SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Get the number of children held by the layer. - /// - public uint ChildCount - { - get - { - uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// Gets/Sets the Layer's name. - /// - public string Name - { - get - { - return GetName(); - } - set - { - SetName(value); - } - } - - internal string GetName() - { - string ret = NDalicPINVOKE.Actor_GetName(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void SetName(string name) - { - NDalicPINVOKE.Actor_SetName(swigCPtr, name); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } -} + public new static Layer DownCast(BaseHandle handle) + { + Layer ret = new Layer(NDalicPINVOKE.Layer_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Search through this layer's hierarchy for an view with the given unique ID. + /// + ///
This layer(the parent) has been initialized.
+ /// The actor itself is also considered in the search. + /// The id of the child to find + /// A handle to the view if found, or an empty handle if not. + public View FindChildById(uint id) + { + View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Adds a child view to this layer. + /// + ///
This layer(the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent layer.
+ /// The child will be referenced by its parent. This means that the child will be kept alive, even if the handle passed into this method is reset or destroyed. + /// If the child already has a parent, it will be removed from old parent and reparented to this layer. This may change child's position, color, scale etc as it now inherits them from this layer. + /// The child + public void Add(View child) + { + NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Removes a child View from this layer. If the view was not a child of this layer, this is a no-op. + /// + ///
This layer(the parent) has been initialized. The child view is not the same as the parent view.
+ /// The child + public void Remove(View child) + { + NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Queries the depth of the layer.
+ /// 0 is the bottom most layer, higher number is on top.
+ ///
+ public uint Depth + { + get + { + return GetDepth(); + } + } + + internal uint GetDepth() + { + uint ret = NDalicPINVOKE.Layer_GetDepth(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Increments the depth of the layer. + /// + public void Raise() + { + NDalicPINVOKE.Layer_Raise(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Decrements the depth of the layer. + /// + public void Lower() + { + NDalicPINVOKE.Layer_Lower(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal void RaiseAbove(Layer target) + { + NDalicPINVOKE.Layer_RaiseAbove(swigCPtr, Layer.getCPtr(target)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal void LowerBelow(Layer target) + { + NDalicPINVOKE.Layer_LowerBelow(swigCPtr, Layer.getCPtr(target)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Raises the layer to the top. + /// + public void RaiseToTop() + { + NDalicPINVOKE.Layer_RaiseToTop(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Lowers the layer to the bottom. + /// + public void LowerToBottom() + { + NDalicPINVOKE.Layer_LowerToBottom(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Moves the layer directly above the given layer.
+ /// After the call, this layers depth will be immediately above target.
+ ///
+ /// Layer to get on top of + public void MoveAbove(Layer target) + { + NDalicPINVOKE.Layer_MoveAbove(swigCPtr, Layer.getCPtr(target)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Moves the layer directly below the given layer.
+ /// After the call, this layers depth will be immediately below target.
+ ///
+ /// Layer to get below of + public void MoveBelow(Layer target) + { + NDalicPINVOKE.Layer_MoveBelow(swigCPtr, Layer.getCPtr(target)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private void SetBehavior(LayerBehavior behavior) + { + NDalicPINVOKE.Layer_SetBehavior(swigCPtr, (int)behavior); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private LayerBehavior GetBehavior() + { + Layer.LayerBehavior ret = (Layer.LayerBehavior)NDalicPINVOKE.Layer_GetBehavior(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void SetSortFunction(SWIGTYPE_p_f_r_q_const__Dali__Vector3__float function) + { + NDalicPINVOKE.Layer_SetSortFunction(swigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.getCPtr(function)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal void SetTouchConsumed(bool consume) + { + NDalicPINVOKE.Layer_SetTouchConsumed(swigCPtr, consume); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal bool IsTouchConsumed() + { + bool ret = NDalicPINVOKE.Layer_IsTouchConsumed(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void SetHoverConsumed(bool consume) + { + NDalicPINVOKE.Layer_SetHoverConsumed(swigCPtr, consume); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal bool IsHoverConsumed() + { + bool ret = NDalicPINVOKE.Layer_IsHoverConsumed(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Retrieves child view by index. + /// + ///
The View has been initialized.
+ /// The index of the child to retrieve + /// The view for the given index or empty handle if children not initialized + public View GetChildAt(uint index) + { + System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index); + cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr); + cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr); + + BaseHandle ret = new BaseHandle(cPtr, false); + + View temp = ViewRegistry.GetViewFromBaseHandle(ret); + + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + return temp ?? null; + } + + /// + /// Enumeration for the behavior of the layer. + /// + public enum LayerBehavior + { + Layer2D, + LayerUI = Layer2D, + Layer3D + } + + internal enum TreeDepthMultiplier + { + TREE_DEPTH_MULTIPLIER = 10000 + } + + /// + /// Layer Behavior, type String(Layer.LayerBehavior) + /// + public Layer.LayerBehavior Behavior + { + get + { + return GetBehavior(); + } + set + { + SetBehavior(value); + } + } + + /// + /// Retrieves and sets the Layer's opacity.
+ ///
+ public float Opacity + { + get + { + float temp = 0.0f; + GetProperty(View.Property.OPACITY).Get(out temp); + return temp; + } + set + { + SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Retrieves and sets the Layer's visibility. + /// + public bool Visibility + { + get + { + bool temp = false; + GetProperty(View.Property.VISIBLE).Get(out temp); + return temp; + } + set + { + SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Get the number of children held by the layer. + /// + public uint ChildCount + { + get + { + uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + /// + /// Gets/Sets the Layer's name. + /// + public string Name + { + get + { + return GetName(); + } + set + { + SetName(value); + } + } + + internal string GetName() + { + string ret = NDalicPINVOKE.Actor_GetName(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void SetName(string name) + { + NDalicPINVOKE.Actor_SetName(swigCPtr, name); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } +} diff --git a/src/Tizen.NUI/src/public/Path.cs b/src/Tizen.NUI/src/public/Path.cs index f1a6b79..39690ea 100755 --- a/src/Tizen.NUI/src/public/Path.cs +++ b/src/Tizen.NUI/src/public/Path.cs @@ -90,17 +90,17 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - + } + /// /// this method will be changed as internal method on later release /// - public new static Path DownCast(BaseHandle handle) - { - Path ret = new Path(NDalicPINVOKE.Path_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public new static Path DownCast(BaseHandle handle) + { + Path ret = new Path(NDalicPINVOKE.Path_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } /// /// Adds an interpolation point. diff --git a/src/Tizen.NUI/src/public/Position2D.cs b/src/Tizen.NUI/src/public/Position2D.cs index c773814..b840d8c 100755 --- a/src/Tizen.NUI/src/public/Position2D.cs +++ b/src/Tizen.NUI/src/public/Position2D.cs @@ -15,348 +15,348 @@ * */ -namespace Tizen.NUI -{ - +namespace Tizen.NUI +{ + /// /// Position2D is a two dimensional vector. /// - public class Position2D : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Position2D(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(Position2D obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~Position2D() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Vector2(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - disposed = true; - } - + public class Position2D : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Position2D(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(Position2D obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~Position2D() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Vector2(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + disposed = true; + } + /// /// Addition operator. /// /// Vector to add /// Vector to add /// A vector containing the result of the addition - public static Position2D operator +(Position2D arg1, Position2D arg2) - { - return arg1.Add(arg2); - } - + public static Position2D operator +(Position2D arg1, Position2D arg2) + { + return arg1.Add(arg2); + } + /// /// Subtraction operator. /// /// Vector to subtract /// Vector to subtract /// A vector containing the result of the subtraction - public static Position2D operator -(Position2D arg1, Position2D arg2) - { - return arg1.Subtract(arg2); - } - + public static Position2D operator -(Position2D arg1, Position2D arg2) + { + return arg1.Subtract(arg2); + } + /// /// Unary negation operator. /// /// Vector to netate /// A vector containing the negation - public static Position2D operator -(Position2D arg1) - { - return arg1.Subtract(); - } - + public static Position2D operator -(Position2D arg1) + { + return arg1.Subtract(); + } + /// /// Multiplication operator. /// /// Vector to multiply /// Vector to multiply /// A vector containing the result of the multiplication - public static Position2D operator *(Position2D arg1, Position2D arg2) - { - return arg1.Multiply(arg2); - } - + public static Position2D operator *(Position2D arg1, Position2D arg2) + { + return arg1.Multiply(arg2); + } + /// /// Multiplication operator. /// /// Vector to multiply /// The int value to scale the vector /// A vector containing the result of the multiplication - public static Position2D operator *(Position2D arg1, int arg2) - { - return arg1.Multiply(arg2); - } - + public static Position2D operator *(Position2D arg1, int arg2) + { + return arg1.Multiply(arg2); + } + /// /// Division operator. /// /// Vector to divide /// Vector to divide /// A vector containing the result of the division - public static Position2D operator /(Position2D arg1, Position2D arg2) - { - return arg1.Divide(arg2); - } - + public static Position2D operator /(Position2D arg1, Position2D arg2) + { + return arg1.Divide(arg2); + } + /// /// Division operator. /// /// Vector to divide /// The int value to scale the vector by /// A vector containing the result of the division - public static Position2D operator /(Position2D arg1, int arg2) - { - return arg1.Divide(arg2); - } - + public static Position2D operator /(Position2D arg1, int arg2) + { + return arg1.Divide(arg2); + } + /// /// Const array subscript operator overload. Should be 0, or 1. /// /// Subscript index /// The float at the given index - public float this[uint index] - { - get - { - return ValueOfIndex(index); - } - } - - internal static Position2D GetPosition2DFromPtr(global::System.IntPtr cPtr) - { - Position2D ret = new Position2D(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - + public float this[uint index] + { + get + { + return ValueOfIndex(index); + } + } + + internal static Position2D GetPosition2DFromPtr(global::System.IntPtr cPtr) + { + Position2D ret = new Position2D(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + /// /// Constructor /// - public Position2D() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - + public Position2D() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + /// /// Constructor /// /// x component /// y component - public Position2D(int x, int y) : this(NDalicPINVOKE.new_Vector2__SWIG_1((float)x, (float)y), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - + public Position2D(int x, int y) : this(NDalicPINVOKE.new_Vector2__SWIG_1((float)x, (float)y), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + /// /// Constructor /// /// Position to create this vector from - public Position2D(Position position) : this(NDalicPINVOKE.new_Vector2__SWIG_3(Position.getCPtr(position)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private Position2D Add(Position2D rhs) - { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Add(swigCPtr, Position2D.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Position2D Subtract(Position2D rhs) - { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - private Position2D Multiply(Position2D rhs) - { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Position2D Multiply(int rhs) - { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_1(swigCPtr, (float)rhs), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - private Position2D Divide(Position2D rhs) - { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Position2D Divide(int rhs) - { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_1(swigCPtr, (float)rhs), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Position2D Subtract() - { - Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_1(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - + public Position2D(Position position) : this(NDalicPINVOKE.new_Vector2__SWIG_3(Position.getCPtr(position)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private Position2D Add(Position2D rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Add(swigCPtr, Position2D.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Position2D Subtract(Position2D rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + + private Position2D Multiply(Position2D rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Position2D Multiply(int rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_1(swigCPtr, (float)rhs), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + + private Position2D Divide(Position2D rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Position2D Divide(int rhs) + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_1(swigCPtr, (float)rhs), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Position2D Subtract() + { + Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_1(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + /// /// Compare if rhs is equal to. /// /// The vector to compare /// Returns true if the two vectors are equal, otherwise false - public bool EqualTo(Position2D rhs) - { - bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Position2D.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - + public bool EqualTo(Position2D rhs) + { + bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Position2D.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + /// /// Compare if rhs is not equal to. /// /// The vector to compare /// Returns true if the two vectors are not equal, otherwise false - public bool NotEqualTo(Position2D rhs) - { - bool ret = NDalicPINVOKE.Vector2_NotEqualTo(swigCPtr, Position2D.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private int ValueOfIndex(uint index) - { - int ret = (int)NDalicPINVOKE.Vector2_ValueOfIndex__SWIG_0(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - + public bool NotEqualTo(Position2D rhs) + { + bool ret = NDalicPINVOKE.Vector2_NotEqualTo(swigCPtr, Position2D.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private int ValueOfIndex(uint index) + { + int ret = (int)NDalicPINVOKE.Vector2_ValueOfIndex__SWIG_0(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + /// /// x component. /// - public int X - { - set - { - NDalicPINVOKE.Vector2_X_set(swigCPtr, (float)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.Vector2_X_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return (int)ret; - } - } - + public int X + { + set + { + NDalicPINVOKE.Vector2_X_set(swigCPtr, (float)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Vector2_X_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return (int)ret; + } + } + /// /// y component. /// - public int Y - { - set - { - NDalicPINVOKE.Vector2_Y_set(swigCPtr, (float)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.Vector2_Y_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return (int)ret; - } - } - + public int Y + { + set + { + NDalicPINVOKE.Vector2_Y_set(swigCPtr, (float)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Vector2_Y_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return (int)ret; + } + } + /// /// Convert a position2D instance to a vector2 instance. /// - public static implicit operator Vector2(Position2D position2d) - { - return new Vector2((float)position2d.X, (float)position2d.Y); - } - + public static implicit operator Vector2(Position2D position2d) + { + return new Vector2((float)position2d.X, (float)position2d.Y); + } + /// /// Convert a vector2 instance to a position2D instance. /// - public static implicit operator Position2D(Vector2 vec) - { - return new Position2D((int)vec.X, (int)vec.Y); - } - + public static implicit operator Position2D(Vector2 vec) + { + return new Position2D((int)vec.X, (int)vec.Y); + } + } } diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 17213e4..bc028f6 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -94,13 +94,13 @@ namespace Tizen.NUI Window ret = new Window(NDalicPINVOKE.Stage_GetCurrent(), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; - } - - internal static bool IsInstalled() + } + + internal static bool IsInstalled() { bool ret = NDalicPINVOKE.Stage_IsInstalled(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + return ret; } /*********************************************************************************/ @@ -154,7 +154,7 @@ namespace Tizen.NUI /// Gets the count of supported auxiliary hints of the window. /// /// The number of supported auxiliary hints. - public uint GetSupportedAuxiliaryHintCount() + public uint GetSupportedAuxiliaryHintCount() { uint ret = NDalicPINVOKE.GetSupportedAuxiliaryHintCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -166,7 +166,7 @@ namespace Tizen.NUI /// /// The index of the supported auxiliary hint lists. /// The auxiliary hint string of the index. - public string GetSupportedAuxiliaryHint(uint index) + public string GetSupportedAuxiliaryHint(uint index) { string ret = NDalicPINVOKE.GetSupportedAuxiliaryHint(swigCPtr, index); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -179,7 +179,7 @@ namespace Tizen.NUI /// The auxiliary hint string. /// The value string. /// The ID of created auxiliary hint, or 0 on failure. - public uint AddAuxiliaryHint(string hint, string value) + public uint AddAuxiliaryHint(string hint, string value) { uint ret = NDalicPINVOKE.AddAuxiliaryHint(swigCPtr, hint, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -191,7 +191,7 @@ namespace Tizen.NUI /// /// The ID of the auxiliary hint. /// True if no error occurred, false otherwise. - public bool RemoveAuxiliaryHint(uint id) + public bool RemoveAuxiliaryHint(uint id) { bool ret = NDalicPINVOKE.RemoveAuxiliaryHint(swigCPtr, id); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -204,7 +204,7 @@ namespace Tizen.NUI /// The auxiliary hint ID. /// The value string to be set. /// True if no error occurred, false otherwise. - public bool SetAuxiliaryHintValue(uint id, string value) + public bool SetAuxiliaryHintValue(uint id, string value) { bool ret = NDalicPINVOKE.SetAuxiliaryHintValue(swigCPtr, id, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -216,7 +216,7 @@ namespace Tizen.NUI /// /// The auxiliary hint ID. /// The string value of the auxiliary hint ID, or an empty string if none exists. - public string GetAuxiliaryHintValue(uint id) + public string GetAuxiliaryHintValue(uint id) { string ret = NDalicPINVOKE.GetAuxiliaryHintValue(swigCPtr, id); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -228,7 +228,7 @@ namespace Tizen.NUI /// /// The auxiliary hint string. /// The ID of auxiliary hint string, or 0 on failure. - public uint GetAuxiliaryHintId(string hint) + public uint GetAuxiliaryHintId(string hint) { uint ret = NDalicPINVOKE.GetAuxiliaryHintId(swigCPtr, hint); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -239,7 +239,7 @@ namespace Tizen.NUI /// Sets a region to accept input events. /// /// The region to accept input events. - public void SetInputRegion(Rectangle inputRegion) + public void SetInputRegion(Rectangle inputRegion) { NDalicPINVOKE.SetInputRegion(swigCPtr, Rectangle.getCPtr(inputRegion)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -268,7 +268,7 @@ namespace Tizen.NUI /// /// The notification window level. /// True if no error occurred, false otherwise. - public bool SetNotificationLevel(NotificationLevel level) + public bool SetNotificationLevel(NotificationLevel level) { bool ret = NDalicPINVOKE.SetNotificationLevel(swigCPtr, (int)level); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -279,7 +279,7 @@ namespace Tizen.NUI /// Gets a priority level for the specified notification window. /// /// The notification window level. - public NotificationLevel GetNotificationLevel() + public NotificationLevel GetNotificationLevel() { NotificationLevel ret = (NotificationLevel)NDalicPINVOKE.GetNotificationLevel(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -290,7 +290,7 @@ namespace Tizen.NUI /// Sets a transparent window's visual state to opaque. /// /// Whether the window's visual state is opaque. - public void SetOpaqueState(bool opaque) + public void SetOpaqueState(bool opaque) { NDalicPINVOKE.SetOpaqueState(swigCPtr, opaque); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -300,7 +300,7 @@ namespace Tizen.NUI /// Returns whether a transparent window's visual state is opaque or not. /// /// True if the window's visual state is opaque, false otherwise. - public bool IsOpaqueState() + public bool IsOpaqueState() { bool ret = NDalicPINVOKE.IsOpaqueState(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -312,7 +312,7 @@ namespace Tizen.NUI /// /// The screen mode. /// True if no error occurred, false otherwise. - public bool SetScreenMode(ScreenMode screenMode) + public bool SetScreenMode(ScreenMode screenMode) { bool ret = NDalicPINVOKE.SetScreenMode(swigCPtr, (int)screenMode); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -323,7 +323,7 @@ namespace Tizen.NUI /// Gets a screen mode of the window. /// /// The screen mode. - public ScreenMode GetScreenMode() + public ScreenMode GetScreenMode() { ScreenMode ret = (ScreenMode)NDalicPINVOKE.GetScreenMode(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -335,7 +335,7 @@ namespace Tizen.NUI /// /// The preferred brightness (0 to 100). /// True if no error occurred, false otherwise. - public bool SetBrightness(int brightness) + public bool SetBrightness(int brightness) { bool ret = NDalicPINVOKE.SetBrightness(swigCPtr, brightness); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -346,7 +346,7 @@ namespace Tizen.NUI /// Gets preffered brightness of the window. /// /// The preffered brightness. - public int GetBrightness() + public int GetBrightness() { int ret = NDalicPINVOKE.GetBrightness(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -1314,15 +1314,15 @@ namespace Tizen.NUI { return GetLayerCount(); } - } - - - /*********************************************************************************/ - /*** will be removed/deprecated ***/ - /*********************************************************************************/ - /// - /// will be deprecated at nui_0.2.50 - /// + } + + + /*********************************************************************************/ + /*** will be removed/deprecated ***/ + /*********************************************************************************/ + /// + /// will be deprecated at nui_0.2.50 + /// public event EventHandler TouchEvent { add @@ -1345,10 +1345,10 @@ namespace Tizen.NUI _stageTouchHandler -= value; } } - } - /// - /// will be deprecated at nui_0.2.50 - /// + } + /// + /// will be deprecated at nui_0.2.50 + /// public event EventHandler WheelEvent { add @@ -1368,9 +1368,9 @@ namespace Tizen.NUI WheelEventSignal().Disconnect(_stageWheelCallbackDelegate); } } - } - /// - /// will be deprecated at nui_0.2.50 + } + /// + /// will be deprecated at nui_0.2.50 /// public event EventHandler KeyEvent { @@ -1391,28 +1391,83 @@ namespace Tizen.NUI KeyEventSignal().Disconnect(_stageKeyCallbackDelegate); } } - } - /// - /// will be deprecated at nui_0.2.50 - /// - public void AddLayer(Layer layer) - { - NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - /// - /// will be deprecated at nui_0.2.50 - /// - public void RemoveLayer(Layer layer) - { - NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /*********************************************************************************/ - /*** will be removed/deprecated ***/ - /*********************************************************************************/ - - + } + /// + /// will be deprecated at nui_0.2.50 + /// + public void AddLayer(Layer layer) + { + NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + /// + /// will be deprecated at nui_0.2.50 + /// + public void RemoveLayer(Layer layer) + { + NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// will be deprecated at nui_0.2.50 + /// + public class WindowFocusChangedEventArgs : EventArgs + { + public bool FocusGained + { + get; + set; + } + } + + private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback2; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void WindowFocusChangedEventCallbackType2(bool focusGained); + private event EventHandler _windowFocusChangedEventHandler2; + + /// + /// will be deprecated at nui_0.2.50 + /// + public event EventHandler WindowFocusChanged + { + add + { + if (_windowFocusChangedEventHandler2 == null) + { + _windowFocusChangedEventCallback2 = OnWindowFocusedChanged2; + WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback2); + } + + _windowFocusChangedEventHandler2 += value; + } + remove + { + _windowFocusChangedEventHandler2 -= value; + + if (_windowFocusChangedEventHandler2 == null && WindowFocusChangedSignal().Empty() == false && _windowFocusChangedEventCallback2 != null) + { + WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2); + } + } + } + + private void OnWindowFocusedChanged2(bool focusGained) + { + WindowFocusChangedEventArgs e = new WindowFocusChangedEventArgs(); + + e.FocusGained = focusGained; + + if (_windowFocusChangedEventHandler2 != null) + { + _windowFocusChangedEventHandler2(this, e); + } + } + + /*********************************************************************************/ + /*** will be removed/deprecated ***/ + /*********************************************************************************/ + + } }