1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* ***** BEGIN LICENSE BLOCK *****
3 : * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 : *
5 : * The contents of this file are subject to the Mozilla Public License Version
6 : * 1.1 (the "License"); you may not use this file except in compliance with
7 : * the License. You may obtain a copy of the License at
8 : * http://www.mozilla.org/MPL/
9 : *
10 : * Software distributed under the License is distributed on an "AS IS" basis,
11 : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 : * for the specific language governing rights and limitations under the
13 : * License.
14 : *
15 : * The Original Code is mozilla.org code.
16 : *
17 : * The Initial Developer of the Original Code is
18 : * Mozilla Foundation.
19 : * Portions created by the Initial Developer are Copyright (C) 2010
20 : * the Initial Developer. All Rights Reserved.
21 : *
22 : * Contributor(s):
23 : * Alexander Surkov <surkov.alexander@gmail.com> (original author)
24 : *
25 : * Alternatively, the contents of this file may be used under the terms of
26 : * either of the GNU General Public License Version 2 or later (the "GPL"),
27 : * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 : * in which case the provisions of the GPL or the LGPL are applicable instead
29 : * of those above. If you wish to allow use of your version of this file only
30 : * under the terms of either the GPL or the LGPL, and not to allow others to
31 : * use your version of this file under the terms of the MPL, indicate your
32 : * decision by deleting the provisions above and replace them with the notice
33 : * and other provisions required by the GPL or the LGPL. If you do not delete
34 : * the provisions above, a recipient may use your version of this file under
35 : * the terms of any one of the MPL, the GPL or the LGPL.
36 : *
37 : * ***** END LICENSE BLOCK ***** */
38 :
39 : #ifndef _nsAccEvent_H_
40 : #define _nsAccEvent_H_
41 :
42 : #include "nsIAccessibleEvent.h"
43 :
44 : #include "AccEvent.h"
45 :
46 : /**
47 : * Generic accessible event.
48 : */
49 : class nsAccEvent: public nsIAccessibleEvent
50 : {
51 : public:
52 0 : nsAccEvent(AccEvent* aEvent) : mEvent(aEvent) { }
53 0 : virtual ~nsAccEvent() { }
54 :
55 : NS_DECL_ISUPPORTS
56 : NS_DECL_NSIACCESSIBLEEVENT
57 :
58 : protected:
59 : nsRefPtr<AccEvent> mEvent;
60 :
61 : private:
62 : nsAccEvent();
63 : nsAccEvent(const nsAccEvent&);
64 : nsAccEvent& operator =(const nsAccEvent&);
65 : };
66 :
67 :
68 : /**
69 : * Accessible state change event.
70 : */
71 : class nsAccStateChangeEvent: public nsAccEvent,
72 : public nsIAccessibleStateChangeEvent
73 : {
74 : public:
75 0 : nsAccStateChangeEvent(AccStateChangeEvent* aEvent) : nsAccEvent(aEvent) { }
76 0 : virtual ~nsAccStateChangeEvent() { }
77 :
78 : NS_DECL_ISUPPORTS_INHERITED
79 : NS_DECL_NSIACCESSIBLESTATECHANGEEVENT
80 :
81 : private:
82 : nsAccStateChangeEvent();
83 : nsAccStateChangeEvent(const nsAccStateChangeEvent&);
84 : nsAccStateChangeEvent& operator =(const nsAccStateChangeEvent&);
85 : };
86 :
87 :
88 : /**
89 : * Accessible text change event.
90 : */
91 : class nsAccTextChangeEvent: public nsAccEvent,
92 : public nsIAccessibleTextChangeEvent
93 : {
94 : public:
95 0 : nsAccTextChangeEvent(AccTextChangeEvent* aEvent) : nsAccEvent(aEvent) { }
96 0 : virtual ~nsAccTextChangeEvent() { }
97 :
98 : NS_DECL_ISUPPORTS_INHERITED
99 : NS_DECL_NSIACCESSIBLETEXTCHANGEEVENT
100 :
101 : private:
102 : nsAccTextChangeEvent();
103 : nsAccTextChangeEvent(const nsAccTextChangeEvent&);
104 : nsAccTextChangeEvent& operator =(const nsAccTextChangeEvent&);
105 : };
106 :
107 :
108 : /**
109 : * Accessible hide event.
110 : */
111 : class nsAccHideEvent : public nsAccEvent,
112 : public nsIAccessibleHideEvent
113 : {
114 : public:
115 0 : nsAccHideEvent(AccHideEvent* aEvent) : nsAccEvent(aEvent) { }
116 0 : virtual ~nsAccHideEvent() { }
117 :
118 : NS_DECL_ISUPPORTS_INHERITED
119 : NS_DECL_NSIACCESSIBLEHIDEEVENT
120 :
121 : private:
122 : nsAccHideEvent() MOZ_DELETE;
123 : nsAccHideEvent(const nsAccHideEvent&) MOZ_DELETE;
124 : nsAccHideEvent& operator =(const nsAccHideEvent&) MOZ_DELETE;
125 : };
126 :
127 :
128 : /**
129 : * Accessible caret move event.
130 : */
131 : class nsAccCaretMoveEvent: public nsAccEvent,
132 : public nsIAccessibleCaretMoveEvent
133 : {
134 : public:
135 0 : nsAccCaretMoveEvent(AccCaretMoveEvent* aEvent) : nsAccEvent(aEvent) { }
136 0 : virtual ~nsAccCaretMoveEvent() { }
137 :
138 : NS_DECL_ISUPPORTS_INHERITED
139 : NS_DECL_NSIACCESSIBLECARETMOVEEVENT
140 :
141 : private:
142 : nsAccCaretMoveEvent();
143 : nsAccCaretMoveEvent(const nsAccCaretMoveEvent&);
144 : nsAccCaretMoveEvent& operator =(const nsAccCaretMoveEvent&);
145 : };
146 :
147 :
148 : /**
149 : * Accessible table change event.
150 : */
151 : class nsAccTableChangeEvent : public nsAccEvent,
152 : public nsIAccessibleTableChangeEvent
153 : {
154 : public:
155 0 : nsAccTableChangeEvent(AccTableChangeEvent* aEvent) : nsAccEvent(aEvent) { }
156 0 : virtual ~nsAccTableChangeEvent() { }
157 :
158 : NS_DECL_ISUPPORTS_INHERITED
159 : NS_DECL_NSIACCESSIBLETABLECHANGEEVENT
160 :
161 : private:
162 : nsAccTableChangeEvent();
163 : nsAccTableChangeEvent(const nsAccTableChangeEvent&);
164 : nsAccTableChangeEvent& operator =(const nsAccTableChangeEvent&);
165 : };
166 :
167 : /**
168 : * Accessible virtual cursor change event.
169 : */
170 : class nsAccVirtualCursorChangeEvent : public nsAccEvent,
171 : public nsIAccessibleVirtualCursorChangeEvent
172 : {
173 : public:
174 0 : nsAccVirtualCursorChangeEvent(AccVCChangeEvent* aEvent) :
175 0 : nsAccEvent(aEvent) { }
176 0 : virtual ~nsAccVirtualCursorChangeEvent() { }
177 :
178 : NS_DECL_ISUPPORTS_INHERITED
179 : NS_DECL_NSIACCESSIBLEVIRTUALCURSORCHANGEEVENT
180 :
181 : private:
182 : nsAccVirtualCursorChangeEvent() MOZ_DELETE;
183 : nsAccVirtualCursorChangeEvent(const nsAccVirtualCursorChangeEvent&) MOZ_DELETE;
184 : nsAccVirtualCursorChangeEvent& operator =(const nsAccVirtualCursorChangeEvent&) MOZ_DELETE;
185 : };
186 :
187 : #endif
188 :
|