Bug 1557368 [wpt PR 16856] - Update error type test for attachInternals(), a=testonly
[gecko.git] / accessible / ipc / IPCTypes.h
blob259b0d75741aad24eda82acbdb8ab9b3671f92e7
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=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 #ifndef mozilla_a11y_IPCTypes_h
8 #define mozilla_a11y_IPCTypes_h
10 #ifdef ACCESSIBILITY
11 # include "mozilla/a11y/Role.h"
13 namespace IPC {
15 template <>
16 struct ParamTraits<mozilla::a11y::role>
17 : public ContiguousEnumSerializerInclusive<mozilla::a11y::role,
18 mozilla::a11y::role::NOTHING,
19 mozilla::a11y::role::LAST_ROLE> {
22 } // namespace IPC
23 #else
24 namespace mozilla {
25 namespace a11y {
26 typedef uint32_t role;
27 } // namespace a11y
28 } // namespace mozilla
29 #endif // ACCESSIBILITY
31 /**
32 * Since IPDL does not support preprocessing, this header file allows us to
33 * define types used by PDocAccessible differently depending on platform.
36 #if defined(XP_WIN) && defined(ACCESSIBILITY)
38 // So that we don't include a bunch of other Windows junk.
39 # if !defined(COM_NO_WINDOWS_H)
40 # define COM_NO_WINDOWS_H
41 # endif // !defined(COM_NO_WINDOWS_H)
43 // COM headers pull in MSXML which conflicts with our own XMLDocument class.
44 // This define excludes those conflicting definitions.
45 # if !defined(__XMLDocument_FWD_DEFINED__)
46 # define __XMLDocument_FWD_DEFINED__
47 # endif // !defined(__XMLDocument_FWD_DEFINED__)
49 # include <combaseapi.h>
51 # include "mozilla/a11y/COMPtrTypes.h"
53 // This define in rpcndr.h messes up our code, so we must undefine it after
54 // COMPtrTypes.h has been included.
55 # if defined(small)
56 # undef small
57 # endif // defined(small)
59 #else
61 namespace mozilla {
62 namespace a11y {
64 typedef uint32_t IAccessibleHolder;
65 typedef uint32_t IDispatchHolder;
66 typedef uint32_t IHandlerControlHolder;
68 } // namespace a11y
69 } // namespace mozilla
71 #endif // defined(XP_WIN) && defined(ACCESSIBILITY)
73 #endif // mozilla_a11y_IPCTypes_h