Bug 1930826 - Fix memcpy usage to meet standard requirements r=jgilbert,necko-reviewe...
[gecko.git] / accessible / interfaces / nsIAccessiblePivot.idl
blobf48dc149c6722f51344bcc0d8ec525621d25cc0f
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
9 typedef short PivotMoveReason;
11 interface nsIAccessible;
12 interface nsIAccessibleTraversalRule;
14 /**
15 * The pivot interface encapsulates a reference to a single place in an accessible
16 * subtree. The pivot is a point or a range in the accessible tree. This interface
17 * provides traversal methods to move the pivot to next/prev state that complies
18 * to a given rule.
20 [scriptable, uuid(81fe5144-059b-42db-bd3a-f6ce3158d5e9)]
21 interface nsIAccessiblePivot : nsISupports
23 /**
24 * Move pivot to next object, from current position or given anchor,
25 * complying to given traversal rule.
27 * @param aRule [in] traversal rule to use.
28 * @param aAnchor [in] accessible to start search from, if not provided,
29 * current position will be used.
30 * @param aIncludeStart [in] include anchor accessible in search.
31 * @return next accessible node that matches rule in preorder.
33 [optional_argc] nsIAccessible next(in nsIAccessible aAnchor,
34 in nsIAccessibleTraversalRule aRule,
35 [optional] in boolean aIncludeStart);
37 /**
38 * Move pivot to previous object, from current position or given anchor,
39 * complying to given traversal rule.
41 * @param aRule [in] traversal rule to use.
42 * @param aAnchor [in] accessible to start search from, if not provided,
43 * current position will be used.
44 * @param aIncludeStart [in] include anchor accessible in search.
45 * @return previous accessible node that matches rule in preorder.
47 [optional_argc] nsIAccessible prev(in nsIAccessible aAnchor,
48 in nsIAccessibleTraversalRule aRule,
49 [optional] in boolean aIncludeStart);
51 /**
52 * Move pivot to first object in subtree complying to given traversal rule.
54 * @param aRule [in] traversal rule to use.
55 * @return first accessible node in subtree that matches rule in preorder.
57 nsIAccessible first(in nsIAccessibleTraversalRule aRule);
59 /**
60 * Move pivot to last object in subtree complying to given traversal rule.
62 * @param aRule [in] traversal rule to use.
63 * @return last accessible node in subtree that matches rule in preorder.
65 nsIAccessible last(in nsIAccessibleTraversalRule aRule);
67 /**
68 * Move pivot to given coordinate in screen pixels.
70 * @param aX [in] screen's x coordinate
71 * @param aY [in] screen's y coordinate
72 * @param aRule [in] raversal rule to use.
73 * @return highest accessible in subtree that matches rule at given point.
75 nsIAccessible atPoint(in long aX, in long aY,
76 in nsIAccessibleTraversalRule aRule);
79 [scriptable, uuid(e197460d-1eff-4247-b4bb-a43be1840dae)]
80 interface nsIAccessibleTraversalRule : nsISupports
82 /* Ignore this accessible object */
83 const unsigned short FILTER_IGNORE = 0x0;
84 /* Accept this accessible object */
85 const unsigned short FILTER_MATCH = 0x1;
86 /* Don't traverse accessibles children */
87 const unsigned short FILTER_IGNORE_SUBTREE = 0x2;
89 /**
90 * Determines if a given accessible is to be accepted in our traversal rule
92 * @param aAccessible [in] accessible to examine.
93 * @return a bitfield of FILTER_MATCH and FILTER_IGNORE_SUBTREE.
95 unsigned short match(in nsIAccessible aAccessible);