1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_WidgetMessageUtils_h
6 #define mozilla_WidgetMessageUtils_h
8 #include "ipc/IPCMessageUtils.h"
9 #include "mozilla/LookAndFeel.h"
10 #include "nsIWidget.h"
15 struct ParamTraits
<LookAndFeelInt
> {
16 typedef LookAndFeelInt paramType
;
18 static void Write(Message
* aMsg
, const paramType
& aParam
) {
19 WriteParam(aMsg
, static_cast<int32_t>(aParam
.id
));
20 WriteParam(aMsg
, aParam
.value
);
23 static bool Read(const Message
* aMsg
, PickleIterator
* aIter
,
26 if (ReadParam(aMsg
, aIter
, &id
) && ReadParam(aMsg
, aIter
, &value
)) {
27 aResult
->id
= static_cast<mozilla::LookAndFeel::IntID
>(id
);
28 aResult
->value
= value
;
36 struct ParamTraits
<nsTransparencyMode
>
37 : public ContiguousEnumSerializerInclusive
<nsTransparencyMode
,
39 eTransparencyBorderlessGlass
> {};
42 struct ParamTraits
<nsCursor
>
43 : public ContiguousEnumSerializer
<nsCursor
, eCursor_standard
,
48 #endif // WidgetMessageUtils_h