summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwenfeng.ge <wenfeng.ge@samsung.com>2017-04-12 09:54:39 +0800
committerwenfeng.ge <wenfeng.ge@samsung.com>2017-04-12 14:51:20 +0800
commit750a38863cb5e0cf2dead9a86c719df38648f1b1 (patch)
treeeb540628a178c2364df15b578f4b35bced57398e
parenta594d13a0f68861d774efbe96fbdcc26497854d1 (diff)
downloadelm-sharp-750a38863cb5e0cf2dead9a86c719df38648f1b1.tar.gz
elm-sharp-750a38863cb5e0cf2dead9a86c719df38648f1b1.tar.bz2
elm-sharp-750a38863cb5e0cf2dead9a86c719df38648f1b1.zip
Add Api comments for EcoreEvent,EcoreKeyEventArgs
Change-Id: I36d52ab507d9740699cbdf26c688d0137abb1d82 Signed-off-by: wenfeng.ge <wenfeng.ge@samsung.com>
-rwxr-xr-xElmSharp/ElmSharp/Color.cs57
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/EcoreEvent.cs58
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/EcoreKeyEventArgs.cs17
3 files changed, 132 insertions, 0 deletions
diff --git a/ElmSharp/ElmSharp/Color.cs b/ElmSharp/ElmSharp/Color.cs
index 8b2845f..7bc0cb8 100755
--- a/ElmSharp/ElmSharp/Color.cs
+++ b/ElmSharp/ElmSharp/Color.cs
@@ -259,24 +259,81 @@ namespace ElmSharp
}
#region Color Definitions
+ /// <summary>
+ /// The Tansparent is a predefined Color, it's rgba value is (0, 0, 0, 0).
+ /// </summary>
public static readonly Color Transparent = FromRgba(0, 0, 0, 0);
+ /// <summary>
+ /// The Aqua is a predefined Color instance, it's rgb value is (0, 255, 255).
+ /// </summary>
public static readonly Color Aqua = FromRgb(0, 255, 255);
+ /// <summary>
+ /// The Black is a predefined Color instance, it's rgb value is (0, 0, 0).
+ /// </summary>
public static readonly Color Black = FromRgb(0, 0, 0);
+ /// <summary>
+ /// The Blue is a predefined Color instance, it's rgb value is (0, 0, 255).
+ /// </summary>
public static readonly Color Blue = FromRgb(0, 0, 255);
+ /// <summary>
+ /// The Fuchsia is a predefined Color instance, it's rgb value is (255, 0, 255).
+ /// </summary>
public static readonly Color Fuchsia = FromRgb(255, 0, 255);
+ /// <summary>
+ /// The Gray is a predefined Color instance, it's rgb value is (128, 128, 128).
+ /// </summary>
public static readonly Color Gray = FromRgb(128, 128, 128);
+ /// <summary>
+ /// The Green is a predefined Color instance, it's rgb value is (0, 128, 0).
+ /// </summary>
public static readonly Color Green = FromRgb(0, 128, 0);
+ /// <summary>
+ /// The Lime is a predefined Color instance, it's rgb value is (0, 255, 0).
+ /// </summary>
public static readonly Color Lime = FromRgb(0, 255, 0);
+ /// <summary>
+ /// The Maroon is a predefined Color instance, it's rgb value is (128, 0, 0).
+ /// </summary>
public static readonly Color Maroon = FromRgb(128, 0, 0);
+ /// <summary>
+ /// The Navy is a predefined Color instance, it's rgb value is (0, 0, 128).
+ /// </summary>
public static readonly Color Navy = FromRgb(0, 0, 128);
+ /// <summary>
+ /// The Olive is a predefined Color instance, it's rgb value is (128, 128, 0).
+ /// </summary>
public static readonly Color Olive = FromRgb(128, 128, 0);
+ /// <summary>
+ /// The Orange is a predefined Color instance, it's rgb value is (255, 165, 0).
+ /// </summary>
public static readonly Color Orange = FromRgb(255, 165, 0);
+ /// <summary>
+ /// The Purple is a predefined Color instance, it's rgb value is (128, 0, 128).
+ /// </summary>
public static readonly Color Purple = FromRgb(128, 0, 128);
+ /// <summary>
+ /// The Pink is a predefined Color instance, it's rgb value is (255, 102, 255).
+ /// </summary>
public static readonly Color Pink = FromRgb(255, 102, 255);
+ /// <summary>
+ /// The Red is a predefined Color instance, it's rgb value is (255, 0, 0).
+ /// </summary>
public static readonly Color Red = FromRgb(255, 0, 0);
+ /// <summary>
+ /// The Silver is a predefined Color instance, it's rgb value is (192, 192, 192).
+ /// </summary>
public static readonly Color Silver = FromRgb(192, 192, 192);
+ /// <summary>
+ /// The Teal is a predefined Color instance, it's rgb value is (0, 128, 128).
+ /// </summary>
public static readonly Color Teal = FromRgb(0, 128, 128);
+ /// <summary>
+ /// The White is a predefined Color instance, it's rgb value is (255, 255, 255).
+ /// </summary>
public static readonly Color White = FromRgb(255, 255, 255);
+ /// <summary>
+ /// The Yellow is a predefined Color instance, it's rgb value is (255, 255, 0).
+ /// </summary>
public static readonly Color Yellow = FromRgb(255, 255, 0);
#endregion
}
diff --git a/ElmSharp/ElmSharp/EcoreEvent.cs b/ElmSharp/ElmSharp/EcoreEvent.cs
index 4556747..e42310c 100644..100755
--- a/ElmSharp/ElmSharp/EcoreEvent.cs
+++ b/ElmSharp/ElmSharp/EcoreEvent.cs
@@ -21,16 +21,47 @@ using System.Runtime.InteropServices;
namespace ElmSharp
{
+ /// <summary>
+ /// The EcoreEventType is type of EcoreEvent.
+ /// It includes some predefined instance.
+ /// </summary>
public class EcoreEventType
{
+ /// <summary>
+ /// Key down Ecore event type.
+ /// </summary>
public static readonly EcoreEventType KeyDown = new EcoreEventType(Interop.Libraries.EcoreInput, "ECORE_EVENT_KEY_DOWN");
+ /// <summary>
+ /// Key Up Ecore event type.
+ /// </summary>
public static readonly EcoreEventType KeyUp = new EcoreEventType(Interop.Libraries.EcoreInput, "ECORE_EVENT_KEY_UP");
+ /// <summary>
+ /// Mouse Button Down Ecore event type.
+ /// </summary>
public static readonly EcoreEventType MouseButtonDown = new EcoreEventType(Interop.Libraries.EcoreInput, "ECORE_EVENT_MOUSE_BUTTON_DOWN");
+ /// <summary>
+ /// Mouse Button Up Ecore event type.
+ /// </summary>
public static readonly EcoreEventType MouseButtonUp = new EcoreEventType(Interop.Libraries.EcoreInput, "ECORE_EVENT_MOUSE_BUTTON_UP");
+ /// <summary>
+ /// Mouse Button Cancel Ecore event type.
+ /// </summary>
public static readonly EcoreEventType MouseButtonCancel = new EcoreEventType(Interop.Libraries.EcoreInput, "ECORE_EVENT_MOUSE_BUTTON_CANCEL");
+ /// <summary>
+ /// Mouse Move Ecore event type.
+ /// </summary>
public static readonly EcoreEventType MouseMove = new EcoreEventType(Interop.Libraries.EcoreInput, "ECORE_EVENT_MOUSE_MOVE");
+ /// <summary>
+ /// Mouse Wheel Ecore event type.
+ /// </summary>
public static readonly EcoreEventType MouseWheel = new EcoreEventType(Interop.Libraries.EcoreInput, "ECORE_EVENT_MOUSE_WHEEL");
+ /// <summary>
+ /// Mouse In Ecore event type.
+ /// </summary>
public static readonly EcoreEventType MouseIn = new EcoreEventType(Interop.Libraries.EcoreInput, "ECORE_EVENT_MOUSE_IN");
+ /// <summary>
+ /// Mouse Out Ecore event type.
+ /// </summary>
public static readonly EcoreEventType MouseOut = new EcoreEventType(Interop.Libraries.EcoreInput, "ECORE_EVENT_MOUSE_OUT");
private string _lib;
@@ -44,6 +75,10 @@ namespace ElmSharp
_typeValue = -1;
}
+ /// <summary>
+ /// Gets the value associated with the specified type.
+ /// </summary>
+ /// <returns>The value of type.</returns>
public int GetValue()
{
if (_typeValue < 0)
@@ -63,6 +98,10 @@ namespace ElmSharp
}
}
+ /// <summary>
+ /// The EcoreEvent is a class to help to create events are being notified of events.
+ /// </summary>
+ /// <typeparam name="TEventArgs">Kinds of EventArgs</typeparam>
public class EcoreEvent<TEventArgs> : IDisposable where TEventArgs : EventArgs
{
public delegate TEventArgs EventInfoParser(IntPtr data, EcoreEventType type, IntPtr info);
@@ -72,10 +111,19 @@ namespace ElmSharp
private readonly EventInfoParser _parser;
private readonly List<NativeCallback> _nativeCallbacks = new List<NativeCallback>();
+ /// <summary>
+ /// Creates and initializes a new instance of the EcoreEvent class.
+ /// </summary>
+ /// <param name="type">EcoreEventType</param>
public EcoreEvent(EcoreEventType type) : this(type, null)
{
}
+ /// <summary>
+ /// Creates and initializes a new instance of the EcoreEvent class.
+ /// </summary>
+ /// <param name="type">EcoreEventType</param>
+ /// <param name="parser">EventInfoParser</param>
public EcoreEvent(EcoreEventType type, EventInfoParser parser)
{
_eventType = type;
@@ -94,6 +142,9 @@ namespace ElmSharp
public EventHandler<TEventArgs> eventHandler;
}
+ /// <summary>
+ /// On Event Handler of EcoreEvent.
+ /// </summary>
public event EventHandler<TEventArgs> On
{
add
@@ -142,8 +193,15 @@ namespace ElmSharp
}
}
+ /// <summary>
+ /// Event class for EcoreEvent
+ /// </summary>
public class EcoreEvent : EcoreEvent<EventArgs>
{
+ /// <summary>
+ /// Creates and initializes a new instance of the EcoreEvent class.
+ /// </summary>
+ /// <param name="type">EcoreEventType</param>
public EcoreEvent(EcoreEventType type) : base(type)
{
}
diff --git a/ElmSharp/ElmSharp/EcoreKeyEventArgs.cs b/ElmSharp/ElmSharp/EcoreKeyEventArgs.cs
index ad26b00..d057716 100644..100755
--- a/ElmSharp/ElmSharp/EcoreKeyEventArgs.cs
+++ b/ElmSharp/ElmSharp/EcoreKeyEventArgs.cs
@@ -19,11 +19,28 @@ using System.Runtime.InteropServices;
namespace ElmSharp
{
+ /// <summary>
+ /// It inherits System.EventArgs.
+ /// The EcoreKeyEventArgs is a EventArgs to record Ecore event's key name and key code.
+ /// </summary>
public class EcoreKeyEventArgs : EventArgs
{
+ /// <summary>
+ /// Gets the KeyName property.The return type is string.
+ /// </summary>
public string KeyName { get; private set; }
+ /// <summary>
+ /// Gets the KeyCode property.The return type is int.
+ /// </summary>
public int KeyCode { get; private set; }
+ /// <summary>
+ /// Creates and initializes a new instance of the EcoreKeyEventArgs class.
+ /// </summary>
+ /// <param name="data">data</param>
+ /// <param name="type">type</param>
+ /// <param name="info">information </param>
+ /// <returns>new instance of the EcoreKeyEventArgs class</returns>
public static EcoreKeyEventArgs Create(IntPtr data, EcoreEventType type, IntPtr info)
{
var evt = Marshal.PtrToStructure<EcoreEventKey>(info);