Bug 1669129 - [devtools] Enable devtools.overflow.debugging.enabled. r=jdescottes
[gecko.git] / accessible / ipc / IPCTypes.h
blob8305c802b4801b4fcc101a7497cc6f1ab66921a5
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 #if defined(MOZ_WIDGET_COCOA)
74 # if defined(ACCESSIBILITY)
75 # include "mozilla/a11y/RangeTypes.h"
76 namespace IPC {
78 template <>
79 struct ParamTraits<mozilla::a11y::EWhichRange>
80 : public ContiguousEnumSerializerInclusive<
81 mozilla::a11y::EWhichRange, mozilla::a11y::EWhichRange::eLeftWord,
82 mozilla::a11y::EWhichRange::eStyle> {};
84 } // namespace IPC
86 # else
87 namespace mozilla {
88 namespace a11y {
89 typedef uint32_t EWhichRange;
90 } // namespace a11y
91 } // namespace mozilla
92 # endif // defined(ACCESSIBILITY)
93 #endif // defined(MOZ_WIDGET_COCOA)
95 #endif // mozilla_a11y_IPCTypes_h