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
>
17 typedef LookAndFeelInt paramType
;
19 static void Write(Message
* aMsg
, const paramType
& aParam
)
21 WriteParam(aMsg
, aParam
.id
);
22 WriteParam(aMsg
, aParam
.value
);
25 static bool Read(const Message
* aMsg
, PickleIterator
* aIter
, paramType
* aResult
)
28 if (ReadParam(aMsg
, aIter
, &id
) &&
29 ReadParam(aMsg
, aIter
, &value
)) {
31 aResult
->value
= value
;
39 struct ParamTraits
<nsTransparencyMode
> : public ContiguousEnumSerializerInclusive
<nsTransparencyMode
, eTransparencyOpaque
, eTransparencyBorderlessGlass
>
43 struct ParamTraits
<nsCursor
>
44 : public ContiguousEnumSerializer
<nsCursor
, eCursor_standard
, eCursorCount
>
50 #endif // WidgetMessageUtils_h