From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- widget/WidgetMessageUtils.h | 74 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 widget/WidgetMessageUtils.h (limited to 'widget/WidgetMessageUtils.h') diff --git a/widget/WidgetMessageUtils.h b/widget/WidgetMessageUtils.h new file mode 100644 index 0000000000..8ec0860f75 --- /dev/null +++ b/widget/WidgetMessageUtils.h @@ -0,0 +1,74 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_WidgetMessageUtils_h +#define mozilla_WidgetMessageUtils_h + +#include "ipc/EnumSerializer.h" +#include "ipc/IPCMessageUtils.h" +#include "mozilla/DimensionRequest.h" +#include "mozilla/GfxMessageUtils.h" +#include "mozilla/LookAndFeel.h" +#include "mozilla/widget/ThemeChangeKind.h" +#include "nsIWidget.h" +#include "nsStyleConsts.h" + +namespace IPC { + +template <> +struct ParamTraits + : public BitFlagsEnumSerializer { +}; + +template <> +struct ParamTraits + : ContiguousEnumSerializer { + using IdType = std::underlying_type_t; +}; + +template <> +struct ParamTraits + : ContiguousEnumSerializer { + using IdType = std::underlying_type_t; +}; + +template <> +struct ParamTraits + : ContiguousEnumSerializerInclusive {}; + +template <> +struct ParamTraits + : ContiguousEnumSerializer {}; + +template <> +struct ParamTraits + : ContiguousEnumSerializerInclusive< + nsIWidget::TouchpadGesturePhase, + nsIWidget::TouchpadGesturePhase::PHASE_BEGIN, + nsIWidget::TouchpadGesturePhase::PHASE_END> {}; + +template <> +struct ParamTraits + : public BitFlagsEnumSerializer {}; + +template <> +struct ParamTraits + : public ContiguousEnumSerializerInclusive { +}; + +DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::DimensionRequest, mDimensionKind, mX, + mY, mWidth, mHeight); + +} // namespace IPC + +#endif // WidgetMessageUtils_h -- cgit v1.2.3