Bug 1769033 - Add OpenBSD sandboxing support r=gaston
[gecko.git] / editor / libeditor / EditorForwards.h
blob1bd2cc25ac6f1e01fe87afd716ce2b1922825719
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_EditorHelperForwards_h
7 #define mozilla_EditorHelperForwards_h
9 #include "mozilla/EnumSet.h"
11 #include <cstdint>
13 /******************************************************************************
14 * Forward declarations of other modules'
15 ******************************************************************************/
16 class nsIContent;
17 class nsINode;
19 template <typename T>
20 class nsCOMPtr;
22 template <typename T>
23 class RefPtr;
25 namespace mozilla {
27 template <typename T>
28 class OwningNonNull;
30 namespace dom {
31 class Element;
32 class Text;
33 } // namespace dom
35 /******************************************************************************
36 * enum classes
37 ******************************************************************************/
39 enum class EditAction; // mozilla/EditAction.h
40 enum class EditorCommandParamType : uint16_t; // mozilla/EditorCommands.h
41 enum class EditSubAction : int32_t; // mozilla/EditAction.h
42 enum class ParagraphSeparator; // mozilla/HTMLEditor.h
43 enum class SpecifiedStyle : uint8_t; // mozilla/TypeInState.h
44 enum class SuggestCaret; // mozilla/EditorUtils.h
46 enum class JoinNodesDirection; // HTMLEditHelper.h
47 enum class SplitNodeDirection; // HTMLEditHelper.h
49 /******************************************************************************
50 * enum sets
51 ******************************************************************************/
53 using SuggestCaretOptions = EnumSet<SuggestCaret>;
55 /******************************************************************************
56 * classes or structs which are required for template classes/structs
57 ******************************************************************************/
59 template <typename PT, typename CT>
60 class EditorDOMPointBase; // mozilla/EditorDOMPoint.h
62 using EditorDOMPoint =
63 EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent>>;
64 using EditorRawDOMPoint = EditorDOMPointBase<nsINode*, nsIContent*>;
65 using EditorDOMPointInText = EditorDOMPointBase<RefPtr<dom::Text>, nsIContent*>;
66 using EditorRawDOMPointInText = EditorDOMPointBase<dom::Text*, nsIContent*>;
68 /******************************************************************************
69 * classes
70 ******************************************************************************/
72 class AutoRangeArray; // mozilla/EditorUtils.h
73 class AutoSelectionRangeArray; // mozilla/EditorUtils.h
74 class AutoStyleCacheArray; // mozilla/TypeInState.h
75 class ChangeStyleTransaction; // mozilla/ChangeStyleTransaction.h
76 class CSSEditUtils; // mozilla/CSSEditUtils.h
77 class EditActionResult; // mozilla/EditorUtils.h
78 class EditTransactionBase; // mozilla/EditTransactionBase.h
79 class EditorBase; // mozilla/EditorBase.h
80 class HTMLEditor; // mozilla/HTMLEditor.h
81 class ManualNACPtr; // mozilla/ManualNAC.h
82 class RangeUpdater; // mozilla/SelectionState.h
83 class SelectionState; // mozilla/SelectionState.h
84 class StyleCache; // mozilla/TypeInState.h
85 class TextEditor; // mozilla/TextEditor.h
86 class TypeInState; // mozilla/TypeInState.h
88 class ChangeAttributeTransaction; // ChangeAttributeTransaction.h
89 class CompositionTransaction; // CompositionTransaction.h
90 class DeleteNodeTransaction; // DeleteNodeTransaction.h
91 class DeleteRangeTransaction; // DeleteRangeTransaction.h
92 class DeleteTextTransaction; // DeleteTextTransaction.h
93 class EditAggregateTransaction; // EditAggregateTransaction.h
94 class EditorEventListener; // EditorEventListener.h
95 class EditResult; // HTMLEditHelpers.h
96 class HTMLEditorEventListener; // HTMLEditorEventListener.h
97 class InsertNodeTransaction; // IntertNodeTransaction.h
98 class InsertTextTransaction; // InsertTextTransaction.h
99 class InterCiter; // InterCiter.h
100 class JoinNodesResult; // HTMLEditHelpers.h
101 class JoinNodesTransaction; // JoinNodesTransaction.h
102 class MoveNodeResult; // HTMLEditHelpers.h
103 class PlaceholderTransaction; // PlaceholderTransaction.h
104 class ReplaceTextTransaction; // ReplaceTextTransaction.h
105 class SplitNodeResult; // HTMLEditHelpers.h
106 class SplitNodeTransaction; // SplitNodeTransaction.h
107 class SplitRangeOffFromNodeResult; // HTMLEditHelpers.h
108 class SplitRangeOffResult; // HTMLEditHelpers.h
109 class WhiteSpaceVisibilityKeeper; // WSRunObject.h
110 class WSRunScanner; // WSRunObject.h
111 class WSScanResult; // WSRunObject.h
113 /******************************************************************************
114 * structs
115 ******************************************************************************/
117 struct PropItem; // mozilla/TypeInState.h
118 struct RangeItem; // mozilla/SelectionState.h
120 /******************************************************************************
121 * template classes
122 ******************************************************************************/
124 template <typename EditorDOMPointType>
125 class EditorDOMRangeBase; // mozilla/EditorDOMPoint.h
127 template <typename NodeType>
128 class CreateNodeResultBase; // mozilla/EditorUtils.h
130 template <typename EditorDOMPointType>
131 class ReplaceRangeDataBase; // mozilla/EditorUtils.h
133 /******************************************************************************
134 * aliases
135 ******************************************************************************/
137 using CreateContentResult = CreateNodeResultBase<nsIContent>;
138 using CreateElementResult = CreateNodeResultBase<dom::Element>;
139 using CreateTextResult = CreateNodeResultBase<dom::Text>;
141 using EditorDOMRange = EditorDOMRangeBase<EditorDOMPoint>;
142 using EditorRawDOMRange = EditorDOMRangeBase<EditorRawDOMPoint>;
143 using EditorDOMRangeInTexts = EditorDOMRangeBase<EditorDOMPointInText>;
144 using EditorRawDOMRangeInTexts = EditorDOMRangeBase<EditorRawDOMPointInText>;
146 using ReplaceRangeData = ReplaceRangeDataBase<EditorDOMPoint>;
147 using ReplaceRangeInTextsData = ReplaceRangeDataBase<EditorDOMPointInText>;
149 } // namespace mozilla
151 #endif // #ifndef mozilla_EditorHelperForwards_h