namespace ElmSharp.Accessible
{
-
+ /// <summary>
+ /// The delegate to define how to provide informations for <see cref="IAccessibleObject.Name"/> or <see cref="IAccessibleObject.Description"/>.
+ /// </summary>
+ /// <param name="obj">The sender obj.</param>
+ /// <returns>Return information for Name or Description.</returns>
public delegate string AccessibleInfoProvider (AccessibleObject obj);
+ /// <summary>
+ /// It's a base abstract class for <see cref="Widget"/>.
+ /// It provides available definitions for the screen reader, such as <see cref="IAccessibleObject.Name"/>, <see cref="IAccessibleObject.Description"/>, <see cref="IAccessibleObject.ReadingInfoType"/>, etc.
+ /// There's many the relationship between two accessible objects, like <see cref="ChildOf"/>, <see cref="ParentOf"/>, <see cref="FlowsTo"/>, <see cref="FlowsFrom"/>, etc.
+ /// </summary>
public abstract class AccessibleObject : EvasObject, IAccessibleObject
{
Interop.Elementary.Elm_Atspi_Reading_Info_Cb _nameProviderInternal;
Interop.Elementary.Elm_Atspi_Reading_Info_Cb _descriptionProviderInternal;
+ /// <summary>
+ /// Gets or sets the reading information types of an accessible object.
+ /// </summary>
ReadingInfoType IAccessibleObject.ReadingInfoType
{
get
(Interop.Elementary.Elm_Accessible_Reading_Info_Type)value);
}
}
+
+ /// <summary>
+ /// Gets or sets the role of the object in accessibility domain.
+ /// </summary>
AccessRole IAccessibleObject.Role
{
get
(Interop.Elementary.Elm_Atspi_Role)value);
}
}
+
+ /// <summary>
+ /// Gets or sets highlightable of given widget.
+ /// </summary>
bool IAccessibleObject.CanHighlight
{
get
Interop.Elementary.elm_atspi_accessible_can_highlight_set(Handle, value);
}
}
+
+ /// <summary>
+ /// Gets or sets the translation domain of "name" and "description" properties.
+ /// Translation domain should be set if application wants to support i18n for accessibily "name" and "description" properties.
+ /// When translation domain is set values of "name" and "description" properties will be translated with dgettext function using current translation domain as "domainname" parameter.
+ /// It is application developer responsibility to ensure that translation files are loaded and binded to translation domain when accessibility is enabled.
+ /// </summary>
string IAccessibleObject.TranslationDomain
{
get
Interop.Elementary.elm_atspi_accessible_translation_domain_set(Handle, value);
}
}
+
+ /// <summary>
+ /// Gets or sets an accessible name of the object.
+ /// </summary>
string IAccessibleObject.Name
{
get
Interop.Elementary.elm_atspi_accessible_name_set(Handle, value);
}
}
+
+ /// <summary>
+ /// Gets or sets contextual information about object.
+ /// </summary>
string IAccessibleObject.Description
{
get
}
}
+ /// <summary>
+ /// Gets or sets the delegate for <see cref="IAccessibleObject.Name"/>.
+ /// </summary>
AccessibleInfoProvider IAccessibleObject.NameProvider
{
get
}
}
}
+
+ /// <summary>
+ /// Gets or sets the delegate for <see cref = "IAccessibleObject.Description" />.
+ /// </summary>
AccessibleInfoProvider IAccessibleObject.DescriptionProvider
{
get
}
}
+ /// <summary>
+ /// Creates and initializes a new instance of the AccessibleObject class with parent EvasObject class parameter.
+ /// </summary>
+ /// <param name="parent">Parent EvasObject class </param>
public AccessibleObject(EvasObject parent) : base(parent)
{
}
+ /// <summary>
+ /// Creates and initializes a new instance of the AccessibleObject class.
+ /// </summary>
public AccessibleObject() : base()
{
}
+ /// <summary>
+ /// Defines the relationship between two accessible objects.
+ /// Relationships can be queried by Assistive Technology clients to provide customized feedback, improving overall user experience.
+ /// AppendRelation API is asymmetric, which means that appending, for example, relation <see cref="FlowsTo"/> from object A to B, do not append relation <see cref="FlowsFrom"/> from object B to object A.
+ /// </summary>
+ /// <param name="relation">The relationship between source object and target object of a given type.</param>
void IAccessibleObject.AppendRelation(IAccessibleRelation relation)
{
if (relation.Target == null) throw new ArgumentException("Target of Accessibility relation can not be null");
Interop.Elementary.elm_atspi_accessible_relationship_append(Handle, relation.Type, relation.Target.Handle);
}
+ /// <summary>
+ /// Removes the relationship between two accessible objects.
+ /// </summary>
+ /// <param name="relation">The relationship between source object and target object of a given type.</param>
void IAccessibleObject.RemoveRelation(IAccessibleRelation relation)
{
if (relation.Target == null) throw new ArgumentException("Target of Accessibility relation can not be null");
Interop.Elementary.elm_atspi_accessible_relationship_remove(Handle, relation.Type, relation.Target.Handle);
}
+ /// <summary>
+ /// Highlights accessible widget.
+ /// </summary>
public void Highlight()
{
Interop.Elementary.elm_atspi_component_highlight_grab(Handle);
}
+ /// <summary>
+ /// Clears highlight of accessible widget.
+ /// </summary>
public void Unhighlight()
{
Interop.Elementary.elm_atspi_component_highlight_clear(Handle);
namespace ElmSharp.Accessible
{
+ /// <summary>
+ /// IAccessibleRelation is a interface which defines the relationship between two accessible objects.
+ /// </summary>
public interface IAccessibleRelation
{
int Type { get; }
}
+ /// <summary>
+ /// To define label info for accessible object.
+ /// </summary>
public class LabelledBy : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is LabelledBy.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the LabelledBy type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_LABELLED_BY; }
}
}
+ /// <summary>
+ /// To define label info for accessible object.
+ /// </summary>
public class LabelFor : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is LabelFor.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the LabelFor type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_LABEL_FOR; }
}
}
+ /// <summary>
+ /// To define control relationship for accessible object.
+ /// </summary>
public class ControllerFor : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is ControllerFor.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the ControllerFor type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_CONTROLLER_FOR; }
}
}
+ /// <summary>
+ /// To define control relationship for accessible object.
+ /// </summary>
public class ControlledBy : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is ControlledBy.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the ControlledBy type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_CONTROLLED_BY; }
}
}
+ /// <summary>
+ /// To define member relationship for accessible object.
+ /// </summary>
public class MemberOf : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is MemberOf.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the MemberOf type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_MEMBER_OF; }
}
}
+ /// <summary>
+ /// To define tooltip for accessible object.
+ /// </summary>
public class TooltipFor : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is TooltipFor.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the TooltipFor type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_TOOLTIP_FOR; }
}
}
+ /// <summary>
+ /// To define child for accessible object.
+ /// </summary>
public class ChildOf : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is ChildOf.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the ChildOf type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_NODE_CHILD_OF; }
}
}
+ /// <summary>
+ /// To define parent for accessible object.
+ /// </summary>
public class ParentOf : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is ParentOf.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the ParentOf type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_NODE_PARENT_OF; }
}
}
+ /// <summary>
+ /// To define extend for accessible object.
+ /// </summary>
public class Extended : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is Extended.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the Extended type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_EXTENDED; }
}
}
+ /// <summary>
+ /// To define the custom reading order.
+ /// </summary>
public class FlowsTo : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is FlowsTo.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the FlowsTo type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_FLOWS_TO; }
}
}
+ /// <summary>
+ /// To define the custom reading order.
+ /// </summary>
public class FlowsFrom : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is FlowsFrom.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the FlowsFrom type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_FLOWS_FROM; }
}
}
+ /// <summary>
+ /// To define subwindow for accessible object.
+ /// </summary>
public class SubwindowOf : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is SubwindowOf.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the SubwindowOf type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_SUBWINDOW_OF; }
}
}
+ /// <summary>
+ /// To define embed for accessible object.
+ /// </summary>
public class Embeds : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is Embeds.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the Embeds type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_EMBEDS; }
}
}
+ /// <summary>
+ /// To define embed for accessible object.
+ /// </summary>
public class EmbeddedBy : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is EmbeddedBy.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the EmbeddedBy type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_EMBEDDED_BY; }
}
}
+ /// <summary>
+ /// To define popup for accessible object.
+ /// </summary>
public class PopupFor : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is PopupFor.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the PopupFor type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_POPUP_FOR; }
}
}
+ /// <summary>
+ /// To define parent window for accessible object.
+ /// </summary>
public class ParentWindowOf : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is ParentWindowOf.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the ParentWindowOf type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_PARENT_WINDOW_OF; }
}
}
+ /// <summary>
+ /// To define description for accessible object.
+ /// </summary>
public class DescriptionFor : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is DescriptionFor.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the DescriptionFor type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_DESCRIPTION_FOR; }
}
}
+ /// <summary>
+ /// To define description for accessible object.
+ /// </summary>
public class DescribedBy : IAccessibleRelation
{
+ /// <summary>
+ /// Gets or sets the target object which is DescribedBy.
+ /// </summary>
public AccessibleObject Target { get; set; }
+
+ /// <summary>
+ /// Gets the DescribedBy type.
+ /// </summary>
public int Type
{
get { return (int)Interop.Elementary.Elm_Atspi_Relation_Type.ELM_ATSPI_RELATION_DESCRIBED_BY; }