// 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.
Delegate[] delegateList = _keyEventHandler.GetInvocationList();
// Oring the result of each callback.
- foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
+ foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
{
- result |= del( this, e );
+ result |= del(this, e);
}
}
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
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));
}
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));
}
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));
}
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;
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
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
return GetRendererCount();
}
}
+
}
}
/// </summary>
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.
Window ret = new Window(NDalicPINVOKE.Stage_GetCurrent(), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
- }
-
- internal static bool IsInstalled()
- {
+ }\r
+\r
+ internal static bool IsInstalled()\r
+ {
bool ret = NDalicPINVOKE.Stage_IsInstalled();
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
+ return ret;\r
+ }
/*********************************************************************************/
/*** will be removed/deprecated ***/
/// Gets the count of supported auxiliary hints of the window.
/// </summary>
/// <returns>The number of supported auxiliary hints.</returns>
- public uint GetSupportedAuxiliaryHintCount() {
+ public uint GetSupportedAuxiliaryHintCount()\r
+ {
uint ret = NDalicPINVOKE.GetSupportedAuxiliaryHintCount(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// </summary>
/// <param name="index">The index of the supported auxiliary hint lists.</param>
/// <returns>The auxiliary hint string of the index.</returns>
- public string GetSupportedAuxiliaryHint(uint index) {
+ public string GetSupportedAuxiliaryHint(uint index)\r
+ {
string ret = NDalicPINVOKE.GetSupportedAuxiliaryHint(swigCPtr, index);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// <param name="hint">The auxiliary hint string.</param>
/// <param name="value">The value string.</param>
/// <returns>The ID of created auxiliary hint, or 0 on failure.</returns>
- public uint AddAuxiliaryHint(string hint, string value) {
+ public uint AddAuxiliaryHint(string hint, string value)\r
+ {
uint ret = NDalicPINVOKE.AddAuxiliaryHint(swigCPtr, hint, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// </summary>
/// <param name="id">The ID of the auxiliary hint.</param>
/// <returns>True if no error occurred, false otherwise.</returns>
- public bool RemoveAuxiliaryHint(uint id) {
+ public bool RemoveAuxiliaryHint(uint id)\r
+ {
bool ret = NDalicPINVOKE.RemoveAuxiliaryHint(swigCPtr, id);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// <param name="id">The auxiliary hint ID.</param>
/// <param name="value">The value string to be set.</param>
/// <returns>True if no error occurred, false otherwise.</returns>
- public bool SetAuxiliaryHintValue(uint id, string value) {
+ public bool SetAuxiliaryHintValue(uint id, string value)\r
+ {
bool ret = NDalicPINVOKE.SetAuxiliaryHintValue(swigCPtr, id, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// </summary>
/// <param name="id">The auxiliary hint ID.</param>
/// <returns>The string value of the auxiliary hint ID, or an empty string if none exists.</returns>
- public string GetAuxiliaryHintValue(uint id) {
+ public string GetAuxiliaryHintValue(uint id)\r
+ {
string ret = NDalicPINVOKE.GetAuxiliaryHintValue(swigCPtr, id);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// </summary>
/// <param name="hint">The auxiliary hint string.</param>
/// <returns>The ID of auxiliary hint string, or 0 on failure.</returns>
- public uint GetAuxiliaryHintId(string hint) {
+ public uint GetAuxiliaryHintId(string hint)\r
+ {
uint ret = NDalicPINVOKE.GetAuxiliaryHintId(swigCPtr, hint);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// Sets a region to accept input events.
/// </summary>
/// <param name="inputRegion">The region to accept input events.</param>
- public void SetInputRegion(Rectangle inputRegion) {
+ public void SetInputRegion(Rectangle inputRegion)\r
+ {
NDalicPINVOKE.SetInputRegion(swigCPtr, Rectangle.getCPtr(inputRegion));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// </summary>
/// <param name="level">The notification window level.</param>
/// <returns>True if no error occurred, false otherwise.</returns>
- public bool SetNotificationLevel(NotificationLevel level) {
+ public bool SetNotificationLevel(NotificationLevel level)\r
+ {
bool ret = NDalicPINVOKE.SetNotificationLevel(swigCPtr, (int)level);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// Gets a priority level for the specified notification window.
/// </summary>
/// <returns>The notification window level.</returns>
- public NotificationLevel GetNotificationLevel() {
+ public NotificationLevel GetNotificationLevel()\r
+ {
NotificationLevel ret = (NotificationLevel)NDalicPINVOKE.GetNotificationLevel(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// Sets a transparent window's visual state to opaque.
/// </summary>
/// <param name="opaque">Whether the window's visual state is opaque.</param>
- public void SetOpaqueState(bool opaque) {
+ public void SetOpaqueState(bool opaque)\r
+ {
NDalicPINVOKE.SetOpaqueState(swigCPtr, opaque);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// Returns whether a transparent window's visual state is opaque or not.
/// </summary>
/// <returns>True if the window's visual state is opaque, false otherwise.</returns>
- public bool IsOpaqueState() {
+ public bool IsOpaqueState()\r
+ {
bool ret = NDalicPINVOKE.IsOpaqueState(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// </summary>
/// <param name="screenMode">The screen mode.</param>
/// <returns>True if no error occurred, false otherwise.</returns>
- public bool SetScreenMode(ScreenMode screenMode) {
+ public bool SetScreenMode(ScreenMode screenMode)\r
+ {
bool ret = NDalicPINVOKE.SetScreenMode(swigCPtr, (int)screenMode);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// Gets a screen mode of the window.
/// </summary>
/// <returns>The screen mode.</returns>
- public ScreenMode GetScreenMode() {
+ public ScreenMode GetScreenMode()\r
+ {
ScreenMode ret = (ScreenMode)NDalicPINVOKE.GetScreenMode(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// </summary>
/// <param name="brightness">The preferred brightness (0 to 100).</param>
/// <returns>True if no error occurred, false otherwise.</returns>
- public bool SetBrightness(int brightness) {
+ public bool SetBrightness(int brightness)\r
+ {
bool ret = NDalicPINVOKE.SetBrightness(swigCPtr, brightness);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// Gets preffered brightness of the window.
/// </summary>
/// <returns>The preffered brightness.</returns>
- public int GetBrightness() {
+ public int GetBrightness()\r
+ {
int ret = NDalicPINVOKE.GetBrightness(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
{
return GetLayerCount();
}
- }
+ }\r
+\r
+\r
+ /*********************************************************************************/\r
+ /*** will be removed/deprecated ***/\r
+ /*********************************************************************************/\r
+ /// <summary>\r
+ /// will be deprecated at nui_0.2.50\r
+ /// </summary>\r
+ public event EventHandler<TouchEventArgs> TouchEvent
+ {
+ add
+ {
+ lock (this)
+ {
+ _stageTouchHandler += value;
+ _stageTouchCallbackDelegate = OnStageTouch;
+ this.TouchSignal().Connect(_stageTouchCallbackDelegate);
+ }
+ }
+ remove
+ {
+ lock (this)
+ {
+ if (_stageTouchHandler != null)
+ {
+ this.TouchSignal().Disconnect(_stageTouchCallbackDelegate);
+ }
+ _stageTouchHandler -= value;
+ }
+ }
+ }\r
+ /// <summary>\r
+ /// will be deprecated at nui_0.2.50\r
+ /// </summary>\r
+ public event EventHandler<WheelEventArgs> WheelEvent
+ {
+ add
+ {
+ if (_stageWheelHandler == null)
+ {
+ _stageWheelCallbackDelegate = OnStageWheel;
+ WheelEventSignal().Connect(_stageWheelCallbackDelegate);
+ }
+ _stageWheelHandler += value;
+ }
+ remove
+ {
+ _stageWheelHandler -= value;
+ if (_stageWheelHandler == null && WheelEventSignal().Empty() == false)
+ {
+ WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
+ }
+ }
+ }\r
+ /// <summary>\r
+ /// will be deprecated at nui_0.2.50\r
+ /// </summary>
+ public event EventHandler<KeyEventArgs> KeyEvent
+ {
+ add
+ {
+ if (_stageKeyHandler == null)
+ {
+ _stageKeyCallbackDelegate = OnStageKey;
+ KeyEventSignal().Connect(_stageKeyCallbackDelegate);
+ }
+ _stageKeyHandler += value;
+ }
+ remove
+ {
+ _stageKeyHandler -= value;
+ if (_stageKeyHandler == null && KeyEventSignal().Empty() == false)
+ {
+ KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
+ }
+ }
+ }\r
+\r
+ /// <summary>\r
+ /// will be deprecated at nui_0.2.50\r
+ /// </summary>\r
+ /// <param name="layer"></param>\r
+ public void AddLayer(Layer layer)\r
+ {\r
+ NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));\r
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+ }\r
+\r
+ /*********************************************************************************/\r
+ /*** will be removed/deprecated ***/\r
+ /*********************************************************************************/\r
+\r
+\r
}
}