From fd20b483215a209874fd3f7ceadbc9e6be03e0fe Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Wed, 21 Jun 2017 15:15:08 +0900 Subject: [PATCH] [Tizen] keep important ... This reverts commit ab12a8f5394fe476f7bf9fd2dfb2a2e9c2311171. Conflicts: Tizen.NUI/src/public/BaseComponents/View.cs Change-Id: I7a1a9dc561cae1d7b3a3197c883c205adbe33523 --- Tizen.NUI/Tizen.NUI.csproj | 4 +- Tizen.NUI/TizenTVNUI.snk | Bin 0 -> 596 bytes Tizen.NUI/src/internal/FriendAssembly.cs | 3 +- Tizen.NUI/src/internal/Size.cs | 3 + Tizen.NUI/src/public/BaseComponents/View.cs | 146 ++++++++++++------------- Tizen.NUI/src/public/Layer.cs | 36 ++++++- Tizen.NUI/src/public/Window.cs | 159 +++++++++++++++++++++++----- 7 files changed, 248 insertions(+), 103 deletions(-) create mode 100755 Tizen.NUI/TizenTVNUI.snk mode change 100644 => 100755 Tizen.NUI/src/internal/FriendAssembly.cs diff --git a/Tizen.NUI/Tizen.NUI.csproj b/Tizen.NUI/Tizen.NUI.csproj index e460d87..b963ee9 100755 --- a/Tizen.NUI/Tizen.NUI.csproj +++ b/Tizen.NUI/Tizen.NUI.csproj @@ -1,4 +1,4 @@ - + 0.2.42 @@ -17,6 +17,8 @@ netstandard1.6 $(DefineConstants);DEBUG_ON;DOT_NET_CORE + False + TizenTVNUI.snk diff --git a/Tizen.NUI/TizenTVNUI.snk b/Tizen.NUI/TizenTVNUI.snk new file mode 100755 index 0000000000000000000000000000000000000000..957e8d4291ea37f8a12179b82d2bf2aa9a91bb65 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50098)L|iJEjWxNRS7!7s?=#q)A7>(6uu>BHY#BbkpRMM<4=Sy7 z4MAA@q1A+zm$1_DArKk{4;^AvJ=xg!7Z@;1l^=gsJW&4(m&g=PW*@N@zh=5hnh6L^ zBIxKy^eQ~9D|XeH5=B^-jD!;aTaBQ+q5a6}=SQaM>+R9Z67E%5=|rbiTQ^D0f{z8Q zJ9$kahz1m(D(8?4V|!}<(jiYP7t(o&q=pRs!CAjI8h?-B!7PnP08 zsVVdv2V=?}gf%>vxXGK(r-7#Zu9KX$kM%kQFiXMvb#hh-Iv8JfH~N_tj)rbKrpq`7 z-}xgBMT_hM6PYNU->hzejZ0wikeWPiK<483PR+0nUZg%D!6Dh0RBhTSj!d8k%TF&P zArWG-S`))=qh`=?X`PsRdn}_{bh;zX=VU$I6Y*;yEu!V=_#opj9ZEeoc~3$&;wl#E zRc$zsbgY>HKUvx-9)cM`ri(t3vH|EXc^bOEHK8h4GxO?;I*y*dc)@Llgbp?73gZ4; zU#NV{Xd5Us)s@8+2gQ^m-%uxq*a!d&ZhL+740b<~&5iF~cO20s;rnBno i0s?OA*a~jf&Gn;FARp + /// will be changed as internal class in nui_0.2.50 + /// public class Size : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/Tizen.NUI/src/public/BaseComponents/View.cs b/Tizen.NUI/src/public/BaseComponents/View.cs index 02e2352..eeaec42 100755 --- a/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/Tizen.NUI/src/public/BaseComponents/View.cs @@ -43,12 +43,12 @@ namespace Tizen.NUI.BaseComponents // you can override it to clean-up your own resources. protected override void Dispose(DisposeTypes type) { - if(disposed) + if (disposed) { return; } - if(type == DisposeTypes.Explicit) + if (type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. @@ -227,9 +227,9 @@ namespace Tizen.NUI.BaseComponents Delegate[] delegateList = _keyEventHandler.GetInvocationList(); // Oring the result of each callback. - foreach ( EventHandlerWithReturnType del in delegateList ) + foreach (EventHandlerWithReturnType del in delegateList) { - result |= del( this, e ); + result |= del(this, e); } } @@ -1173,21 +1173,21 @@ namespace Tizen.NUI.BaseComponents switch (temp) { case 0: - { - return States.Normal; - } + { + return States.Normal; + } case 1: - { - return States.Focused; - } + { + return States.Focused; + } case 2: - { - return States.Disabled; - } + { + return States.Disabled; + } default: - { - return States.Normal; - } + { + return States.Normal; + } } } set @@ -1228,25 +1228,25 @@ namespace Tizen.NUI.BaseComponents switch (value) { case States.Normal: - { - valueToString = "NORMAL"; - break; - } + { + valueToString = "NORMAL"; + break; + } case States.Focused: - { - valueToString = "FOCUSED"; - break; - } + { + valueToString = "FOCUSED"; + break; + } case States.Disabled: - { - valueToString = "DISABLED"; - break; - } + { + valueToString = "DISABLED"; + break; + } default: - { - valueToString = "NORMAL"; - break; - } + { + valueToString = "NORMAL"; + break; + } } SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString)); } @@ -1475,25 +1475,25 @@ namespace Tizen.NUI.BaseComponents switch (value) { case Tizen.NUI.HorizontalAlignmentType.Left: - { - valueToString = "left"; - break; - } + { + valueToString = "left"; + break; + } case Tizen.NUI.HorizontalAlignmentType.Center: - { - valueToString = "center"; - break; - } + { + valueToString = "center"; + break; + } case Tizen.NUI.HorizontalAlignmentType.Right: - { - valueToString = "right"; - break; - } + { + valueToString = "right"; + break; + } default: - { - valueToString = "left"; - break; - } + { + valueToString = "left"; + break; + } } SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString)); } @@ -1532,25 +1532,25 @@ namespace Tizen.NUI.BaseComponents switch (value) { case Tizen.NUI.VerticalAlignmentType.Top: - { - valueToString = "top"; - break; - } + { + valueToString = "top"; + break; + } case Tizen.NUI.VerticalAlignmentType.Center: - { - valueToString = "center"; - break; - } + { + valueToString = "center"; + break; + } case Tizen.NUI.VerticalAlignmentType.Bottom: - { - valueToString = "bottom"; - break; - } + { + valueToString = "bottom"; + break; + } default: - { - valueToString = "top"; - break; - } + { + valueToString = "top"; + break; + } } SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString)); } @@ -2773,7 +2773,8 @@ namespace Tizen.NUI.BaseComponents return ret; } - internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) { + internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) + { ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; @@ -3347,13 +3348,13 @@ namespace Tizen.NUI.BaseComponents switch (temp) { case "NORMAL": - return DrawModeType.Normal; + return DrawModeType.Normal; case "OVERLAY_2D": - return DrawModeType.Overlay2D; + return DrawModeType.Overlay2D; case "STENCIL": - return DrawModeType.Stencil; + return DrawModeType.Stencil; default: - return DrawModeType.Normal; + return DrawModeType.Normal; } } set @@ -3643,11 +3644,11 @@ namespace Tizen.NUI.BaseComponents switch (temp) { case "DISABLED": - return ClippingModeType.Disabled; + return ClippingModeType.Disabled; case "CLIP_CHILDREN": - return ClippingModeType.ClipChildren; + return ClippingModeType.ClipChildren; default: - return ClippingModeType.Disabled; + return ClippingModeType.Disabled; } } set @@ -3722,5 +3723,6 @@ namespace Tizen.NUI.BaseComponents return GetRendererCount(); } } + } } diff --git a/Tizen.NUI/src/public/Layer.cs b/Tizen.NUI/src/public/Layer.cs index 4c48ab6..52ad9d7 100755 --- a/Tizen.NUI/src/public/Layer.cs +++ b/Tizen.NUI/src/public/Layer.cs @@ -37,12 +37,12 @@ namespace Tizen.NUI protected override void Dispose(DisposeTypes type) { - if(disposed) + if (disposed) { return; } - if(type == DisposeTypes.Explicit) + if (type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. @@ -367,6 +367,36 @@ namespace Tizen.NUI 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/Tizen.NUI/src/public/Window.cs b/Tizen.NUI/src/public/Window.cs index 0c6163f..2dfcba2 100755 --- a/Tizen.NUI/src/public/Window.cs +++ b/Tizen.NUI/src/public/Window.cs @@ -59,12 +59,12 @@ namespace Tizen.NUI /// protected override void Dispose(DisposeTypes type) { - if(disposed) + if (disposed) { return; } - if(type == DisposeTypes.Explicit) + if (type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. @@ -94,14 +94,14 @@ 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; + } /*********************************************************************************/ /*** will be removed/deprecated ***/ @@ -154,7 +154,8 @@ 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(); return ret; @@ -165,7 +166,8 @@ 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(); return ret; @@ -177,7 +179,8 @@ 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(); return ret; @@ -188,7 +191,8 @@ 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(); return ret; @@ -200,7 +204,8 @@ 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(); return ret; @@ -211,7 +216,8 @@ 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(); return ret; @@ -222,7 +228,8 @@ 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(); return ret; @@ -232,7 +239,8 @@ 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(); } @@ -260,7 +268,8 @@ 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(); return ret; @@ -270,7 +279,8 @@ 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(); return ret; @@ -280,7 +290,8 @@ 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(); } @@ -289,7 +300,8 @@ 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(); return ret; @@ -300,7 +312,8 @@ 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(); return ret; @@ -310,7 +323,8 @@ 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(); return ret; @@ -321,7 +335,8 @@ 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(); return ret; @@ -331,7 +346,8 @@ 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(); return ret; @@ -1298,6 +1314,99 @@ namespace Tizen.NUI { return GetLayerCount(); } - } + } + + + /*********************************************************************************/ + /*** will be removed/deprecated ***/ + /*********************************************************************************/ + /// + /// will be deprecated at nui_0.2.50 + /// + public event EventHandler TouchEvent + { + add + { + lock (this) + { + _stageTouchHandler += value; + _stageTouchCallbackDelegate = OnStageTouch; + this.TouchSignal().Connect(_stageTouchCallbackDelegate); + } + } + remove + { + lock (this) + { + if (_stageTouchHandler != null) + { + this.TouchSignal().Disconnect(_stageTouchCallbackDelegate); + } + _stageTouchHandler -= value; + } + } + } + /// + /// will be deprecated at nui_0.2.50 + /// + public event EventHandler WheelEvent + { + add + { + if (_stageWheelHandler == null) + { + _stageWheelCallbackDelegate = OnStageWheel; + WheelEventSignal().Connect(_stageWheelCallbackDelegate); + } + _stageWheelHandler += value; + } + remove + { + _stageWheelHandler -= value; + if (_stageWheelHandler == null && WheelEventSignal().Empty() == false) + { + WheelEventSignal().Disconnect(_stageWheelCallbackDelegate); + } + } + } + /// + /// will be deprecated at nui_0.2.50 + /// + public event EventHandler KeyEvent + { + add + { + if (_stageKeyHandler == null) + { + _stageKeyCallbackDelegate = OnStageKey; + KeyEventSignal().Connect(_stageKeyCallbackDelegate); + } + _stageKeyHandler += value; + } + remove + { + _stageKeyHandler -= value; + if (_stageKeyHandler == null && KeyEventSignal().Empty() == false) + { + 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 removed/deprecated ***/ + /*********************************************************************************/ + + } } -- 2.7.4