no bug - Correct some typos in the comments. a=typo-fix
[gecko.git] / accessible / ios / Platform.mm
blobb4342ec5559cda7d096ac42a91f1670961d3d055
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 "Platform.h"
8 #include "RemoteAccessible.h"
9 #include "DocAccessibleParent.h"
11 #import "MUIAccessible.h"
13 namespace mozilla {
14 namespace a11y {
16 bool ShouldA11yBeEnabled() {
17   // XXX: Figure out proper a11y activation strategies in iOS.
18   return true;
21 void PlatformInit() {}
23 void PlatformShutdown() {}
25 void ProxyCreated(RemoteAccessible* aProxy) {
26   MUIAccessible* mozWrapper = [[MUIAccessible alloc] initWithAccessible:aProxy];
27   aProxy->SetWrapper(reinterpret_cast<uintptr_t>(mozWrapper));
30 void ProxyDestroyed(RemoteAccessible* aProxy) {
31   MUIAccessible* wrapper = GetNativeFromGeckoAccessible(aProxy);
32   [wrapper expire];
33   [wrapper release];
34   aProxy->SetWrapper(0);
37 void PlatformEvent(Accessible*, uint32_t) {}
39 void PlatformStateChangeEvent(Accessible*, uint64_t, bool) {}
41 void PlatformFocusEvent(Accessible* aTarget,
42                         const LayoutDeviceIntRect& aCaretRect) {}
44 void PlatformCaretMoveEvent(Accessible* aTarget, int32_t aOffset,
45                             bool aIsSelectionCollapsed, int32_t aGranularity,
46                             const LayoutDeviceIntRect& aCaretRect,
47                             bool aFromUser) {}
49 void PlatformTextChangeEvent(Accessible*, const nsAString&, int32_t, uint32_t,
50                              bool, bool) {}
52 void PlatformShowHideEvent(Accessible*, Accessible*, bool, bool) {}
54 void PlatformSelectionEvent(Accessible*, Accessible*, uint32_t) {}
56 }  // namespace a11y
57 }  // namespace mozilla