}
#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
}
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;
_typeValue = -1;
}
+ /// <summary>
+ /// Gets the value associated with the specified type.
+ /// </summary>
+ /// <returns>The value of type.</returns>
public int GetValue()
{
if (_typeValue < 0)
}
}
+ /// <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);
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;
public EventHandler<TEventArgs> eventHandler;
}
+ /// <summary>
+ /// On Event Handler of EcoreEvent.
+ /// </summary>
public event EventHandler<TEventArgs> On
{
add
}
}
+ /// <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)
{
}