2010-08-17 08:07:42 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
2010-08-17 08:07:42 +00:00
|
|
|
|
|
|
|
#ifndef nsGUIEventIPC_h__
|
|
|
|
#define nsGUIEventIPC_h__
|
|
|
|
|
2012-08-28 12:41:04 +00:00
|
|
|
#include "ipc/IPCMessageUtils.h"
|
2015-06-05 09:28:19 +00:00
|
|
|
#include "mozilla/ContentCache.h"
|
2013-07-26 19:28:31 +00:00
|
|
|
#include "mozilla/GfxMessageUtils.h"
|
2013-04-05 08:49:00 +00:00
|
|
|
#include "mozilla/dom/Touch.h"
|
2013-09-25 11:21:20 +00:00
|
|
|
#include "mozilla/MiscEvents.h"
|
2013-09-25 11:21:18 +00:00
|
|
|
#include "mozilla/MouseEvents.h"
|
2013-09-25 11:21:19 +00:00
|
|
|
#include "mozilla/TextEvents.h"
|
2013-09-25 11:21:16 +00:00
|
|
|
#include "mozilla/TouchEvents.h"
|
2016-07-20 11:37:00 +00:00
|
|
|
#include "InputData.h"
|
2010-08-17 08:07:42 +00:00
|
|
|
|
|
|
|
namespace IPC
|
|
|
|
{
|
|
|
|
|
2015-08-26 12:56:59 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::EventMessage>
|
|
|
|
{
|
|
|
|
typedef mozilla::EventMessage paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, static_cast<const mozilla::EventMessageType&>(aParam));
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2015-08-26 12:56:59 +00:00
|
|
|
{
|
|
|
|
mozilla::EventMessageType eventMessage = 0;
|
|
|
|
bool ret = ReadParam(aMsg, aIter, &eventMessage);
|
|
|
|
*aResult = static_cast<paramType>(eventMessage);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2012-12-16 01:26:03 +00:00
|
|
|
template<>
|
2013-09-14 02:39:41 +00:00
|
|
|
struct ParamTraits<mozilla::BaseEventFlags>
|
2012-12-16 01:26:03 +00:00
|
|
|
{
|
2013-09-14 02:39:41 +00:00
|
|
|
typedef mozilla::BaseEventFlags paramType;
|
2012-12-16 01:26:03 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2012-12-20 03:42:29 +00:00
|
|
|
aMsg->WriteBytes(&aParam, sizeof(aParam));
|
2012-12-16 01:26:03 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2012-12-16 01:26:03 +00:00
|
|
|
{
|
2016-05-16 21:32:37 +00:00
|
|
|
return aMsg->ReadBytesInto(aIter, aResult, sizeof(*aResult));
|
2012-12-16 01:26:03 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 08:07:42 +00:00
|
|
|
template<>
|
2013-10-02 03:46:04 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetEvent>
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-02 03:46:04 +00:00
|
|
|
typedef mozilla::WidgetEvent paramType;
|
2010-08-17 08:07:42 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2014-08-04 05:28:46 +00:00
|
|
|
WriteParam(aMsg,
|
|
|
|
static_cast<mozilla::EventClassIDType>(aParam.mClass));
|
2015-08-22 01:34:51 +00:00
|
|
|
WriteParam(aMsg, aParam.mMessage);
|
2016-04-18 14:09:02 +00:00
|
|
|
WriteParam(aMsg, aParam.mRefPoint);
|
2016-03-28 04:29:42 +00:00
|
|
|
WriteParam(aMsg, aParam.mTime);
|
2016-03-28 04:49:02 +00:00
|
|
|
WriteParam(aMsg, aParam.mTimeStamp);
|
2012-12-16 01:26:03 +00:00
|
|
|
WriteParam(aMsg, aParam.mFlags);
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2014-08-04 05:28:46 +00:00
|
|
|
mozilla::EventClassIDType eventClassID = 0;
|
|
|
|
bool ret = ReadParam(aMsg, aIter, &eventClassID) &&
|
2015-08-22 01:34:51 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mMessage) &&
|
2016-04-18 14:09:02 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mRefPoint) &&
|
2016-03-28 04:29:42 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mTime) &&
|
2016-03-28 04:49:02 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mTimeStamp) &&
|
2012-12-16 01:26:03 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mFlags);
|
2014-08-04 05:28:46 +00:00
|
|
|
aResult->mClass = static_cast<mozilla::EventClassID>(eventClassID);
|
2012-11-20 06:05:56 +00:00
|
|
|
return ret;
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-04-05 05:23:13 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::NativeEventData>
|
|
|
|
{
|
|
|
|
typedef mozilla::NativeEventData paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mBuffer);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2016-04-05 05:23:13 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mBuffer);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 08:07:42 +00:00
|
|
|
template<>
|
2013-10-02 03:46:03 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetGUIEvent>
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-02 03:46:03 +00:00
|
|
|
typedef mozilla::WidgetGUIEvent paramType;
|
2010-08-17 08:07:42 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-02 03:46:04 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetEvent>(aParam));
|
2016-04-05 05:23:13 +00:00
|
|
|
WriteParam(aMsg, aParam.mPluginEvent);
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2014-07-23 19:55:51 +00:00
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::WidgetEvent*>(aResult)) &&
|
2016-04-05 05:23:13 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mPluginEvent);
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
2013-10-01 07:23:02 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetInputEvent>
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-01 07:23:02 +00:00
|
|
|
typedef mozilla::WidgetInputEvent paramType;
|
2010-08-17 08:07:42 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-02 03:46:03 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetGUIEvent>(aParam));
|
2016-03-31 08:03:00 +00:00
|
|
|
WriteParam(aMsg, aParam.mModifiers);
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-02 03:46:03 +00:00
|
|
|
return ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetGUIEvent*>(aResult)) &&
|
2016-03-31 08:03:00 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mModifiers);
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-05-17 00:23:23 +00:00
|
|
|
template<>
|
2013-10-01 07:23:02 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetMouseEventBase>
|
2011-05-17 00:23:23 +00:00
|
|
|
{
|
2013-10-01 07:23:02 +00:00
|
|
|
typedef mozilla::WidgetMouseEventBase paramType;
|
2011-05-17 00:23:23 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-01 07:23:02 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetInputEvent>(aParam));
|
2011-05-17 00:23:23 +00:00
|
|
|
WriteParam(aMsg, aParam.button);
|
2012-04-25 03:00:01 +00:00
|
|
|
WriteParam(aMsg, aParam.buttons);
|
2011-05-17 00:23:23 +00:00
|
|
|
WriteParam(aMsg, aParam.pressure);
|
2015-03-06 21:45:59 +00:00
|
|
|
WriteParam(aMsg, aParam.hitCluster);
|
2011-05-17 00:23:23 +00:00
|
|
|
WriteParam(aMsg, aParam.inputSource);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2011-05-17 00:23:23 +00:00
|
|
|
{
|
2013-10-01 07:23:02 +00:00
|
|
|
return ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetInputEvent*>(aResult)) &&
|
2011-05-17 00:23:23 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->button) &&
|
2012-04-25 03:00:01 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->buttons) &&
|
2011-05-17 00:23:23 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->pressure) &&
|
2015-03-06 21:45:59 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->hitCluster) &&
|
2011-05-17 00:23:23 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->inputSource);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2012-08-12 01:42:34 +00:00
|
|
|
template<>
|
2013-10-16 09:37:36 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetWheelEvent>
|
2012-08-12 01:42:34 +00:00
|
|
|
{
|
2013-10-16 09:37:36 +00:00
|
|
|
typedef mozilla::WidgetWheelEvent paramType;
|
2012-08-12 01:42:34 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-01 07:23:02 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetMouseEventBase>(aParam));
|
2016-03-31 09:55:59 +00:00
|
|
|
WriteParam(aMsg, aParam.mDeltaX);
|
2016-03-31 09:09:47 +00:00
|
|
|
WriteParam(aMsg, aParam.mDeltaY);
|
2016-03-31 09:18:34 +00:00
|
|
|
WriteParam(aMsg, aParam.mDeltaZ);
|
2016-03-31 09:35:24 +00:00
|
|
|
WriteParam(aMsg, aParam.mDeltaMode);
|
2016-03-31 09:44:01 +00:00
|
|
|
WriteParam(aMsg, aParam.mCustomizedByUserPrefs);
|
2016-03-31 14:36:49 +00:00
|
|
|
WriteParam(aMsg, aParam.mMayHaveMomentum);
|
2016-03-31 14:45:55 +00:00
|
|
|
WriteParam(aMsg, aParam.mIsMomentum);
|
2014-07-07 09:54:14 +00:00
|
|
|
WriteParam(aMsg, aParam.mIsNoLineOrPageDelta);
|
2016-03-31 15:10:46 +00:00
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaX);
|
2016-03-31 15:10:09 +00:00
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaY);
|
2016-03-31 15:46:18 +00:00
|
|
|
WriteParam(aMsg, static_cast<uint8_t>(aParam.mScrollType));
|
2016-03-31 15:27:45 +00:00
|
|
|
WriteParam(aMsg, aParam.mOverflowDeltaX);
|
2016-03-31 15:36:55 +00:00
|
|
|
WriteParam(aMsg, aParam.mOverflowDeltaY);
|
2015-03-06 21:45:59 +00:00
|
|
|
WriteParam(aMsg, aParam.mViewPortIsOverscrolled);
|
2015-08-28 03:50:31 +00:00
|
|
|
WriteParam(aMsg, aParam.mCanTriggerSwipe);
|
2016-01-27 06:09:13 +00:00
|
|
|
WriteParam(aMsg, aParam.mAllowToOverrideSystemScrollSpeed);
|
2012-08-12 01:42:34 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2012-08-12 01:42:34 +00:00
|
|
|
{
|
2016-03-31 15:46:18 +00:00
|
|
|
uint8_t scrollType = 0;
|
2012-08-12 01:42:36 +00:00
|
|
|
bool rv =
|
2013-10-01 07:23:02 +00:00
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetMouseEventBase*>(aResult)) &&
|
2016-03-31 09:55:59 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaX) &&
|
2016-03-31 09:09:47 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaY) &&
|
2016-03-31 09:18:34 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaZ) &&
|
2016-03-31 09:35:24 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaMode) &&
|
2016-03-31 09:44:01 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCustomizedByUserPrefs) &&
|
2016-03-31 14:36:49 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mMayHaveMomentum) &&
|
2016-03-31 14:45:55 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsMomentum) &&
|
2014-07-07 09:54:14 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsNoLineOrPageDelta) &&
|
2016-03-31 15:10:46 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaX) &&
|
2016-03-31 15:10:09 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaY) &&
|
2012-08-12 01:42:36 +00:00
|
|
|
ReadParam(aMsg, aIter, &scrollType) &&
|
2016-03-31 15:27:45 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mOverflowDeltaX) &&
|
2016-03-31 15:36:55 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mOverflowDeltaY) &&
|
2015-08-28 03:50:31 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mViewPortIsOverscrolled) &&
|
2016-01-27 06:09:13 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCanTriggerSwipe) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mAllowToOverrideSystemScrollSpeed);
|
2016-03-31 14:54:42 +00:00
|
|
|
aResult->mScrollType =
|
2013-10-16 09:37:36 +00:00
|
|
|
static_cast<mozilla::WidgetWheelEvent::ScrollType>(scrollType);
|
2012-08-12 01:42:36 +00:00
|
|
|
return rv;
|
2012-08-12 01:42:34 +00:00
|
|
|
}
|
|
|
|
};
|
2011-06-22 00:32:43 +00:00
|
|
|
|
2016-11-20 01:49:00 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::WidgetPointerHelper>
|
|
|
|
{
|
|
|
|
typedef mozilla::WidgetPointerHelper paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.pointerId);
|
|
|
|
WriteParam(aMsg, aParam.tiltX);
|
|
|
|
WriteParam(aMsg, aParam.tiltY);
|
2017-02-09 02:49:00 +00:00
|
|
|
WriteParam(aMsg, aParam.twist);
|
|
|
|
WriteParam(aMsg, aParam.tangentialPressure);
|
2017-01-18 07:25:44 +00:00
|
|
|
// We don't serialize convertToPointer since it's temporarily variable and
|
|
|
|
// should be reset to default.
|
2016-11-20 01:49:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
bool rv;
|
|
|
|
rv = ReadParam(aMsg, aIter, &aResult->pointerId) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->tiltX) &&
|
2017-02-09 02:49:00 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->tiltY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->twist) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->tangentialPressure);
|
2016-11-20 01:49:00 +00:00
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-06-22 00:32:43 +00:00
|
|
|
template<>
|
2013-10-02 06:38:27 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetMouseEvent>
|
2011-06-22 00:32:43 +00:00
|
|
|
{
|
2013-10-02 06:38:27 +00:00
|
|
|
typedef mozilla::WidgetMouseEvent paramType;
|
2011-06-22 00:32:43 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-01 07:23:02 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetMouseEventBase>(aParam));
|
2016-11-20 01:49:00 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetPointerHelper>(aParam));
|
2016-05-10 12:15:05 +00:00
|
|
|
WriteParam(aMsg, aParam.mIgnoreRootScrollFrame);
|
2016-05-12 02:36:41 +00:00
|
|
|
WriteParam(aMsg, static_cast<paramType::ReasonType>(aParam.mReason));
|
2016-05-12 02:39:05 +00:00
|
|
|
WriteParam(aMsg, static_cast<paramType::ContextMenuTriggerType>(
|
|
|
|
aParam.mContextMenuTrigger));
|
2016-05-12 02:42:08 +00:00
|
|
|
WriteParam(aMsg, static_cast<paramType::ExitFromType>(aParam.mExitFrom));
|
2016-05-10 14:29:14 +00:00
|
|
|
WriteParam(aMsg, aParam.mClickCount);
|
2011-06-22 00:32:43 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2011-06-22 00:32:43 +00:00
|
|
|
{
|
|
|
|
bool rv;
|
2016-05-12 02:17:46 +00:00
|
|
|
paramType::ReasonType reason = 0;
|
2016-05-12 02:28:14 +00:00
|
|
|
paramType::ContextMenuTriggerType contextMenuTrigger = 0;
|
2016-05-12 02:32:53 +00:00
|
|
|
paramType::ExitFromType exitFrom = 0;
|
2013-10-01 07:23:02 +00:00
|
|
|
rv = ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetMouseEventBase*>(aResult)) &&
|
2016-11-20 01:49:00 +00:00
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetPointerHelper*>(aResult)) &&
|
2016-05-10 12:15:05 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIgnoreRootScrollFrame) &&
|
2011-06-22 00:32:43 +00:00
|
|
|
ReadParam(aMsg, aIter, &reason) &&
|
2016-05-12 02:28:14 +00:00
|
|
|
ReadParam(aMsg, aIter, &contextMenuTrigger) &&
|
2016-05-12 02:32:53 +00:00
|
|
|
ReadParam(aMsg, aIter, &exitFrom) &&
|
2016-11-20 01:49:00 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mClickCount);
|
2016-05-12 02:36:41 +00:00
|
|
|
aResult->mReason = static_cast<paramType::Reason>(reason);
|
2016-05-12 02:39:05 +00:00
|
|
|
aResult->mContextMenuTrigger =
|
2016-05-12 02:28:14 +00:00
|
|
|
static_cast<paramType::ContextMenuTrigger>(contextMenuTrigger);
|
2016-05-12 02:42:08 +00:00
|
|
|
aResult->mExitFrom = static_cast<paramType::ExitFrom>(exitFrom);
|
2011-06-22 00:32:43 +00:00
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-04-08 18:48:11 +00:00
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::WidgetDragEvent>
|
|
|
|
{
|
|
|
|
typedef mozilla::WidgetDragEvent paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetMouseEvent>(aParam));
|
2016-03-31 10:06:05 +00:00
|
|
|
WriteParam(aMsg, aParam.mUserCancelled);
|
2015-04-08 18:48:11 +00:00
|
|
|
WriteParam(aMsg, aParam.mDefaultPreventedOnContent);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2015-04-08 18:48:11 +00:00
|
|
|
{
|
|
|
|
bool rv =
|
|
|
|
ReadParam(aMsg, aIter, static_cast<mozilla::WidgetMouseEvent*>(aResult)) &&
|
2016-03-31 10:06:05 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mUserCancelled) &&
|
2015-04-08 18:48:11 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDefaultPreventedOnContent);
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-11-21 05:44:22 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::WidgetPointerEvent>
|
|
|
|
{
|
|
|
|
typedef mozilla::WidgetPointerEvent paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetMouseEvent>(aParam));
|
2016-08-03 08:18:04 +00:00
|
|
|
WriteParam(aMsg, aParam.mWidth);
|
2016-08-03 08:23:56 +00:00
|
|
|
WriteParam(aMsg, aParam.mHeight);
|
2016-08-03 08:34:53 +00:00
|
|
|
WriteParam(aMsg, aParam.mIsPrimary);
|
2013-11-21 05:44:22 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2013-11-21 05:44:22 +00:00
|
|
|
{
|
|
|
|
bool rv =
|
|
|
|
ReadParam(aMsg, aIter, static_cast<mozilla::WidgetMouseEvent*>(aResult)) &&
|
2016-08-03 08:18:04 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mWidth) &&
|
2016-08-03 08:23:56 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mHeight) &&
|
2016-08-03 08:34:53 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsPrimary);
|
2013-11-21 05:44:22 +00:00
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2012-07-16 02:58:43 +00:00
|
|
|
template<>
|
2013-09-27 06:20:57 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetTouchEvent>
|
2012-07-16 02:58:43 +00:00
|
|
|
{
|
2013-09-27 06:20:57 +00:00
|
|
|
typedef mozilla::WidgetTouchEvent paramType;
|
2012-07-16 02:58:43 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-01 07:23:02 +00:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetInputEvent&>(aParam));
|
2013-04-05 08:49:00 +00:00
|
|
|
// Sigh, Touch bites us again! We want to be able to do
|
2016-03-30 09:44:28 +00:00
|
|
|
// WriteParam(aMsg, aParam.mTouches);
|
|
|
|
const paramType::TouchArray& touches = aParam.mTouches;
|
2012-07-16 02:58:43 +00:00
|
|
|
WriteParam(aMsg, touches.Length());
|
|
|
|
for (uint32_t i = 0; i < touches.Length(); ++i) {
|
2013-07-10 09:53:09 +00:00
|
|
|
mozilla::dom::Touch* touch = touches[i];
|
2012-07-16 02:58:43 +00:00
|
|
|
WriteParam(aMsg, touch->mIdentifier);
|
|
|
|
WriteParam(aMsg, touch->mRefPoint);
|
|
|
|
WriteParam(aMsg, touch->mRadius);
|
|
|
|
WriteParam(aMsg, touch->mRotationAngle);
|
|
|
|
WriteParam(aMsg, touch->mForce);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2012-07-16 02:58:43 +00:00
|
|
|
{
|
2014-07-08 20:48:18 +00:00
|
|
|
paramType::TouchArray::size_type numTouches;
|
2013-10-01 07:23:02 +00:00
|
|
|
if (!ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetInputEvent*>(aResult)) ||
|
2012-07-16 02:58:43 +00:00
|
|
|
!ReadParam(aMsg, aIter, &numTouches)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
for (uint32_t i = 0; i < numTouches; ++i) {
|
2012-08-22 15:56:38 +00:00
|
|
|
int32_t identifier;
|
2013-08-02 07:05:16 +00:00
|
|
|
mozilla::LayoutDeviceIntPoint refPoint;
|
2015-11-10 05:37:31 +00:00
|
|
|
mozilla::LayoutDeviceIntPoint radius;
|
2012-07-16 02:58:43 +00:00
|
|
|
float rotationAngle;
|
|
|
|
float force;
|
|
|
|
if (!ReadParam(aMsg, aIter, &identifier) ||
|
|
|
|
!ReadParam(aMsg, aIter, &refPoint) ||
|
|
|
|
!ReadParam(aMsg, aIter, &radius) ||
|
|
|
|
!ReadParam(aMsg, aIter, &rotationAngle) ||
|
|
|
|
!ReadParam(aMsg, aIter, &force)) {
|
|
|
|
return false;
|
|
|
|
}
|
2016-03-30 09:44:28 +00:00
|
|
|
aResult->mTouches.AppendElement(
|
2013-08-02 07:05:16 +00:00
|
|
|
new mozilla::dom::Touch(
|
2015-02-01 22:27:31 +00:00
|
|
|
identifier, refPoint, radius, rotationAngle, force));
|
2012-07-16 02:58:43 +00:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-07-23 11:05:45 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::AlternativeCharCode>
|
|
|
|
{
|
|
|
|
typedef mozilla::AlternativeCharCode paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mUnshiftedCharCode);
|
|
|
|
WriteParam(aMsg, aParam.mShiftedCharCode);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2014-07-23 11:05:45 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mUnshiftedCharCode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mShiftedCharCode);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-06-22 00:32:43 +00:00
|
|
|
template<>
|
2013-10-01 07:22:58 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetKeyboardEvent>
|
2011-06-22 00:32:43 +00:00
|
|
|
{
|
2013-10-01 07:22:58 +00:00
|
|
|
typedef mozilla::WidgetKeyboardEvent paramType;
|
2011-06-22 00:32:43 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-01 07:23:02 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetInputEvent>(aParam));
|
2016-05-12 10:18:36 +00:00
|
|
|
WriteParam(aMsg,
|
|
|
|
static_cast<mozilla::KeyNameIndexType>(aParam.mKeyNameIndex));
|
|
|
|
WriteParam(aMsg,
|
|
|
|
static_cast<mozilla::CodeNameIndexType>(aParam.mCodeNameIndex));
|
2013-12-10 16:14:53 +00:00
|
|
|
WriteParam(aMsg, aParam.mKeyValue);
|
2014-05-25 02:08:58 +00:00
|
|
|
WriteParam(aMsg, aParam.mCodeValue);
|
2016-05-12 08:13:49 +00:00
|
|
|
WriteParam(aMsg, aParam.mKeyCode);
|
2016-05-13 07:06:18 +00:00
|
|
|
WriteParam(aMsg, aParam.mCharCode);
|
2016-03-19 11:57:11 +00:00
|
|
|
WriteParam(aMsg, aParam.mPseudoCharCode);
|
2016-05-12 08:57:21 +00:00
|
|
|
WriteParam(aMsg, aParam.mAlternativeCharCodes);
|
2013-11-07 11:17:32 +00:00
|
|
|
WriteParam(aMsg, aParam.mIsRepeat);
|
2016-04-22 16:22:49 +00:00
|
|
|
WriteParam(aMsg, aParam.mIsReserved);
|
2016-05-11 12:56:42 +00:00
|
|
|
WriteParam(aMsg, aParam.mAccessKeyForwardedToChild);
|
2016-05-12 09:17:22 +00:00
|
|
|
WriteParam(aMsg, aParam.mLocation);
|
2013-09-06 13:11:15 +00:00
|
|
|
WriteParam(aMsg, aParam.mUniqueId);
|
2016-03-15 05:50:16 +00:00
|
|
|
WriteParam(aMsg, aParam.mIsSynthesizedByTIP);
|
|
|
|
WriteParam(aMsg,
|
2016-05-12 10:18:36 +00:00
|
|
|
static_cast<paramType::InputMethodAppStateType>
|
2016-03-15 05:50:16 +00:00
|
|
|
(aParam.mInputMethodAppState));
|
2014-12-11 14:44:07 +00:00
|
|
|
#ifdef XP_MACOSX
|
|
|
|
WriteParam(aMsg, aParam.mNativeKeyCode);
|
|
|
|
WriteParam(aMsg, aParam.mNativeModifierFlags);
|
|
|
|
WriteParam(aMsg, aParam.mNativeCharacters);
|
|
|
|
WriteParam(aMsg, aParam.mNativeCharactersIgnoringModifiers);
|
2015-02-20 16:37:02 +00:00
|
|
|
WriteParam(aMsg, aParam.mPluginTextEventString);
|
2014-12-11 14:44:07 +00:00
|
|
|
#endif
|
2013-07-10 03:42:59 +00:00
|
|
|
// An OS-specific native event might be attached in |mNativeKeyEvent|, but
|
|
|
|
// that cannot be copied across process boundaries.
|
2011-06-22 00:32:43 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2011-06-22 00:32:43 +00:00
|
|
|
{
|
2016-05-12 10:18:36 +00:00
|
|
|
mozilla::KeyNameIndexType keyNameIndex = 0;
|
|
|
|
mozilla::CodeNameIndexType codeNameIndex = 0;
|
|
|
|
paramType::InputMethodAppStateType inputMethodAppState = 0;
|
2013-10-01 07:23:02 +00:00
|
|
|
if (ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetInputEvent*>(aResult)) &&
|
2013-04-26 07:41:27 +00:00
|
|
|
ReadParam(aMsg, aIter, &keyNameIndex) &&
|
2014-05-25 02:08:58 +00:00
|
|
|
ReadParam(aMsg, aIter, &codeNameIndex) &&
|
2013-12-10 16:14:53 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mKeyValue) &&
|
2014-05-25 02:08:58 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCodeValue) &&
|
2016-05-12 08:13:49 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mKeyCode) &&
|
2016-05-13 07:06:18 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCharCode) &&
|
2016-03-19 11:57:11 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mPseudoCharCode) &&
|
2016-05-12 08:57:21 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mAlternativeCharCodes) &&
|
2013-11-07 11:17:32 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsRepeat) &&
|
2016-04-22 16:22:49 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsReserved) &&
|
2016-05-11 12:56:42 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mAccessKeyForwardedToChild) &&
|
2016-05-12 09:17:22 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocation) &&
|
2016-03-15 05:50:16 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mUniqueId) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsSynthesizedByTIP) &&
|
|
|
|
ReadParam(aMsg, aIter, &inputMethodAppState)
|
2014-12-11 14:44:07 +00:00
|
|
|
#ifdef XP_MACOSX
|
|
|
|
&& ReadParam(aMsg, aIter, &aResult->mNativeKeyCode)
|
|
|
|
&& ReadParam(aMsg, aIter, &aResult->mNativeModifierFlags)
|
|
|
|
&& ReadParam(aMsg, aIter, &aResult->mNativeCharacters)
|
|
|
|
&& ReadParam(aMsg, aIter, &aResult->mNativeCharactersIgnoringModifiers)
|
2015-02-20 16:37:02 +00:00
|
|
|
&& ReadParam(aMsg, aIter, &aResult->mPluginTextEventString)
|
2014-12-11 14:44:07 +00:00
|
|
|
#endif
|
|
|
|
)
|
2013-08-19 18:33:27 +00:00
|
|
|
{
|
2013-09-14 02:39:41 +00:00
|
|
|
aResult->mKeyNameIndex = static_cast<mozilla::KeyNameIndex>(keyNameIndex);
|
2014-05-25 02:08:58 +00:00
|
|
|
aResult->mCodeNameIndex =
|
|
|
|
static_cast<mozilla::CodeNameIndex>(codeNameIndex);
|
2013-10-28 14:05:51 +00:00
|
|
|
aResult->mNativeKeyEvent = nullptr;
|
2016-03-15 05:50:16 +00:00
|
|
|
aResult->mInputMethodAppState =
|
2016-05-12 10:18:36 +00:00
|
|
|
static_cast<paramType::InputMethodAppState>(inputMethodAppState);
|
2013-04-26 07:41:27 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2011-06-22 00:32:43 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 08:07:42 +00:00
|
|
|
template<>
|
2013-10-01 07:22:59 +00:00
|
|
|
struct ParamTraits<mozilla::TextRangeStyle>
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-01 07:22:59 +00:00
|
|
|
typedef mozilla::TextRangeStyle paramType;
|
2010-08-17 08:07:42 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mDefinedStyles);
|
|
|
|
WriteParam(aMsg, aParam.mLineStyle);
|
|
|
|
WriteParam(aMsg, aParam.mIsBoldLine);
|
|
|
|
WriteParam(aMsg, aParam.mForegroundColor);
|
|
|
|
WriteParam(aMsg, aParam.mBackgroundColor);
|
|
|
|
WriteParam(aMsg, aParam.mUnderlineColor);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mDefinedStyles) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineStyle) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsBoldLine) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mForegroundColor) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mBackgroundColor) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUnderlineColor);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
2013-10-01 07:22:59 +00:00
|
|
|
struct ParamTraits<mozilla::TextRange>
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-01 07:22:59 +00:00
|
|
|
typedef mozilla::TextRange paramType;
|
2010-08-17 08:07:42 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mStartOffset);
|
|
|
|
WriteParam(aMsg, aParam.mEndOffset);
|
2016-06-04 00:49:21 +00:00
|
|
|
WriteParam(aMsg, mozilla::ToRawTextRangeType(aParam.mRangeType));
|
2010-08-17 08:07:42 +00:00
|
|
|
WriteParam(aMsg, aParam.mRangeStyle);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2016-06-04 00:49:21 +00:00
|
|
|
mozilla::RawTextRangeType rawTextRangeType;
|
|
|
|
if (ReadParam(aMsg, aIter, &aResult->mStartOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mEndOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &rawTextRangeType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRangeStyle)) {
|
|
|
|
aResult->mRangeType = mozilla::ToTextRangeType(rawTextRangeType);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-04 13:48:26 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::TextRangeArray>
|
|
|
|
{
|
|
|
|
typedef mozilla::TextRangeArray paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.Length());
|
|
|
|
for (uint32_t index = 0; index < aParam.Length(); index++) {
|
|
|
|
WriteParam(aMsg, aParam[index]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2014-03-04 13:48:26 +00:00
|
|
|
{
|
2014-07-08 20:48:18 +00:00
|
|
|
paramType::size_type length;
|
2014-03-04 13:48:26 +00:00
|
|
|
if (!ReadParam(aMsg, aIter, &length)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
for (uint32_t index = 0; index < length; index++) {
|
|
|
|
mozilla::TextRange textRange;
|
|
|
|
if (!ReadParam(aMsg, aIter, &textRange)) {
|
|
|
|
aResult->Clear();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
aResult->AppendElement(textRange);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 08:07:42 +00:00
|
|
|
template<>
|
2013-10-01 07:23:00 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetCompositionEvent>
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-01 07:23:00 +00:00
|
|
|
typedef mozilla::WidgetCompositionEvent paramType;
|
2010-08-17 08:07:42 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-02 03:46:03 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetGUIEvent>(aParam));
|
2014-10-07 10:01:46 +00:00
|
|
|
WriteParam(aMsg, aParam.mData);
|
2015-12-11 06:15:57 +00:00
|
|
|
WriteParam(aMsg, aParam.mNativeIMEContext);
|
2014-10-07 10:01:47 +00:00
|
|
|
bool hasRanges = !!aParam.mRanges;
|
|
|
|
WriteParam(aMsg, hasRanges);
|
|
|
|
if (hasRanges) {
|
|
|
|
WriteParam(aMsg, *aParam.mRanges.get());
|
|
|
|
}
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2014-10-07 10:01:47 +00:00
|
|
|
bool hasRanges;
|
|
|
|
if (!ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetGUIEvent*>(aResult)) ||
|
|
|
|
!ReadParam(aMsg, aIter, &aResult->mData) ||
|
2015-12-11 06:15:57 +00:00
|
|
|
!ReadParam(aMsg, aIter, &aResult->mNativeIMEContext) ||
|
2014-10-07 10:01:47 +00:00
|
|
|
!ReadParam(aMsg, aIter, &hasRanges)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!hasRanges) {
|
|
|
|
aResult->mRanges = nullptr;
|
|
|
|
} else {
|
|
|
|
aResult->mRanges = new mozilla::TextRangeArray();
|
|
|
|
if (!ReadParam(aMsg, aIter, aResult->mRanges.get())) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-01-31 07:17:12 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::FontRange>
|
|
|
|
{
|
|
|
|
typedef mozilla::FontRange paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mStartOffset);
|
|
|
|
WriteParam(aMsg, aParam.mFontName);
|
|
|
|
WriteParam(aMsg, aParam.mFontSize);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2015-01-31 07:17:12 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mStartOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mFontName) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mFontSize);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-06-21 04:13:11 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::WidgetQueryContentEvent::Input>
|
|
|
|
{
|
|
|
|
typedef mozilla::WidgetQueryContentEvent::Input paramType;
|
|
|
|
typedef mozilla::WidgetQueryContentEvent event;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mOffset);
|
|
|
|
WriteParam(aMsg, aParam.mLength);
|
|
|
|
WriteParam(aMsg, mozilla::ToRawSelectionType(aParam.mSelectionType));
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
mozilla::RawSelectionType rawSelectionType = 0;
|
|
|
|
bool ok = ReadParam(aMsg, aIter, &aResult->mOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLength) &&
|
|
|
|
ReadParam(aMsg, aIter, &rawSelectionType);
|
|
|
|
aResult->mSelectionType = mozilla::ToSelectionType(rawSelectionType);
|
|
|
|
return ok;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 08:07:42 +00:00
|
|
|
template<>
|
2013-10-01 07:23:00 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetQueryContentEvent>
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-01 07:23:00 +00:00
|
|
|
typedef mozilla::WidgetQueryContentEvent paramType;
|
2010-08-17 08:07:42 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-02 03:46:03 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetGUIEvent>(aParam));
|
2010-08-17 08:07:42 +00:00
|
|
|
WriteParam(aMsg, aParam.mSucceeded);
|
2014-04-25 23:52:12 +00:00
|
|
|
WriteParam(aMsg, aParam.mUseNativeLineBreak);
|
2015-01-31 07:17:12 +00:00
|
|
|
WriteParam(aMsg, aParam.mWithFontRanges);
|
2016-06-21 04:13:11 +00:00
|
|
|
WriteParam(aMsg, aParam.mInput);
|
2010-08-17 08:07:42 +00:00
|
|
|
WriteParam(aMsg, aParam.mReply.mOffset);
|
2015-04-14 05:27:37 +00:00
|
|
|
WriteParam(aMsg, aParam.mReply.mTentativeCaretOffset);
|
2010-08-17 08:07:42 +00:00
|
|
|
WriteParam(aMsg, aParam.mReply.mString);
|
|
|
|
WriteParam(aMsg, aParam.mReply.mRect);
|
|
|
|
WriteParam(aMsg, aParam.mReply.mReversed);
|
|
|
|
WriteParam(aMsg, aParam.mReply.mHasSelection);
|
2011-03-01 21:15:23 +00:00
|
|
|
WriteParam(aMsg, aParam.mReply.mWidgetIsHit);
|
2015-01-31 07:17:12 +00:00
|
|
|
WriteParam(aMsg, aParam.mReply.mFontRanges);
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-02 03:46:03 +00:00
|
|
|
return ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetGUIEvent*>(aResult)) &&
|
2010-08-17 08:07:42 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mSucceeded) &&
|
2014-04-25 23:52:12 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mUseNativeLineBreak) &&
|
2015-01-31 07:17:12 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mWithFontRanges) &&
|
2016-06-21 04:13:11 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mInput) &&
|
2010-08-17 08:07:42 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mReply.mOffset) &&
|
2015-04-14 05:27:37 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mReply.mTentativeCaretOffset) &&
|
2010-08-17 08:07:42 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mReply.mString) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mReply.mRect) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mReply.mReversed) &&
|
2011-03-22 18:18:17 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mReply.mHasSelection) &&
|
2015-01-31 07:17:12 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mReply.mWidgetIsHit) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mReply.mFontRanges);
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
2013-10-01 07:23:01 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetSelectionEvent>
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-01 07:23:01 +00:00
|
|
|
typedef mozilla::WidgetSelectionEvent paramType;
|
2010-08-17 08:07:42 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-02 03:46:03 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetGUIEvent>(aParam));
|
2010-08-17 08:07:42 +00:00
|
|
|
WriteParam(aMsg, aParam.mOffset);
|
|
|
|
WriteParam(aMsg, aParam.mLength);
|
|
|
|
WriteParam(aMsg, aParam.mReversed);
|
|
|
|
WriteParam(aMsg, aParam.mExpandToClusterBoundary);
|
|
|
|
WriteParam(aMsg, aParam.mSucceeded);
|
2014-04-25 23:52:12 +00:00
|
|
|
WriteParam(aMsg, aParam.mUseNativeLineBreak);
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2010-08-17 08:07:42 +00:00
|
|
|
{
|
2013-10-02 03:46:03 +00:00
|
|
|
return ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetGUIEvent*>(aResult)) &&
|
2010-08-17 08:07:42 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLength) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mReversed) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mExpandToClusterBoundary) &&
|
2014-04-25 23:52:12 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mSucceeded) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUseNativeLineBreak);
|
2010-08-17 08:07:42 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-09-24 03:28:15 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<nsIMEUpdatePreference>
|
|
|
|
{
|
|
|
|
typedef nsIMEUpdatePreference paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mWantUpdates);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2010-09-24 03:28:15 +00:00
|
|
|
{
|
2014-01-29 09:32:35 +00:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mWantUpdates);
|
2010-09-24 03:28:15 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-12-11 06:15:57 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::widget::NativeIMEContext>
|
|
|
|
{
|
|
|
|
typedef mozilla::widget::NativeIMEContext paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mRawNativeIMEContext);
|
|
|
|
WriteParam(aMsg, aParam.mOriginProcessID);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2015-12-11 06:15:57 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mRawNativeIMEContext) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOriginProcessID);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-07-17 04:30:01 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::widget::IMENotification::Point>
|
|
|
|
{
|
|
|
|
typedef mozilla::widget::IMENotification::Point paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mX);
|
|
|
|
WriteParam(aMsg, aParam.mY);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2015-07-17 04:30:01 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mY);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::widget::IMENotification::Rect>
|
|
|
|
{
|
|
|
|
typedef mozilla::widget::IMENotification::Rect paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mX);
|
|
|
|
WriteParam(aMsg, aParam.mY);
|
|
|
|
WriteParam(aMsg, aParam.mWidth);
|
|
|
|
WriteParam(aMsg, aParam.mHeight);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2015-07-17 04:30:01 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mWidth) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mHeight);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
2015-08-21 16:43:41 +00:00
|
|
|
struct ParamTraits<mozilla::widget::IMENotification::SelectionChangeDataBase>
|
2015-07-17 04:30:01 +00:00
|
|
|
{
|
2015-08-21 16:43:41 +00:00
|
|
|
typedef mozilla::widget::IMENotification::SelectionChangeDataBase paramType;
|
2015-07-17 04:30:01 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2015-07-22 03:40:32 +00:00
|
|
|
MOZ_RELEASE_ASSERT(aParam.mString);
|
2015-07-17 04:30:01 +00:00
|
|
|
WriteParam(aMsg, aParam.mOffset);
|
2015-07-22 03:40:32 +00:00
|
|
|
WriteParam(aMsg, *aParam.mString);
|
2015-07-17 04:30:01 +00:00
|
|
|
WriteParam(aMsg, aParam.mWritingMode);
|
|
|
|
WriteParam(aMsg, aParam.mReversed);
|
|
|
|
WriteParam(aMsg, aParam.mCausedByComposition);
|
|
|
|
WriteParam(aMsg, aParam.mCausedBySelectionEvent);
|
2015-10-26 22:21:37 +00:00
|
|
|
WriteParam(aMsg, aParam.mOccurredDuringComposition);
|
2015-07-17 04:30:01 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2015-07-17 04:30:01 +00:00
|
|
|
{
|
2015-07-22 03:40:32 +00:00
|
|
|
aResult->mString = new nsString();
|
2015-07-17 04:30:01 +00:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mOffset) &&
|
2015-07-22 03:40:32 +00:00
|
|
|
ReadParam(aMsg, aIter, aResult->mString) &&
|
2015-07-17 04:30:01 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mWritingMode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mReversed) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mCausedByComposition) &&
|
2015-10-26 22:21:37 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCausedBySelectionEvent) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOccurredDuringComposition);
|
2015-07-17 04:30:01 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::widget::IMENotification::TextChangeDataBase>
|
|
|
|
{
|
|
|
|
typedef mozilla::widget::IMENotification::TextChangeDataBase paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mStartOffset);
|
|
|
|
WriteParam(aMsg, aParam.mRemovedEndOffset);
|
|
|
|
WriteParam(aMsg, aParam.mAddedEndOffset);
|
2016-01-28 04:28:53 +00:00
|
|
|
WriteParam(aMsg, aParam.mCausedOnlyByComposition);
|
2016-01-28 04:28:53 +00:00
|
|
|
WriteParam(aMsg, aParam.mIncludingChangesDuringComposition);
|
2016-01-28 04:28:54 +00:00
|
|
|
WriteParam(aMsg, aParam.mIncludingChangesWithoutComposition);
|
2015-07-17 04:30:01 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2015-07-17 04:30:01 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mStartOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRemovedEndOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mAddedEndOffset) &&
|
2016-01-28 04:28:53 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCausedOnlyByComposition) &&
|
2016-01-28 04:28:54 +00:00
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
&aResult->mIncludingChangesDuringComposition) &&
|
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
&aResult->mIncludingChangesWithoutComposition);
|
2015-07-17 04:30:01 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::widget::IMENotification::MouseButtonEventData>
|
|
|
|
{
|
|
|
|
typedef mozilla::widget::IMENotification::MouseButtonEventData paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mEventMessage);
|
|
|
|
WriteParam(aMsg, aParam.mOffset);
|
|
|
|
WriteParam(aMsg, aParam.mCursorPos);
|
|
|
|
WriteParam(aMsg, aParam.mCharRect);
|
|
|
|
WriteParam(aMsg, aParam.mButton);
|
|
|
|
WriteParam(aMsg, aParam.mButtons);
|
|
|
|
WriteParam(aMsg, aParam.mModifiers);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2015-07-17 04:30:01 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mEventMessage) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mCursorPos) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mCharRect) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mButton) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mButtons) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mModifiers);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-09-11 13:46:17 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::widget::IMENotification>
|
|
|
|
{
|
|
|
|
typedef mozilla::widget::IMENotification paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg,
|
|
|
|
static_cast<mozilla::widget::IMEMessageType>(aParam.mMessage));
|
|
|
|
switch (aParam.mMessage) {
|
|
|
|
case mozilla::widget::NOTIFY_IME_OF_SELECTION_CHANGE:
|
2015-07-17 04:30:01 +00:00
|
|
|
WriteParam(aMsg, aParam.mSelectionChangeData);
|
2014-09-11 13:46:17 +00:00
|
|
|
return;
|
|
|
|
case mozilla::widget::NOTIFY_IME_OF_TEXT_CHANGE:
|
2015-07-17 04:30:01 +00:00
|
|
|
WriteParam(aMsg, aParam.mTextChangeData);
|
2014-09-11 13:46:17 +00:00
|
|
|
return;
|
|
|
|
case mozilla::widget::NOTIFY_IME_OF_MOUSE_BUTTON_EVENT:
|
2015-07-17 04:30:01 +00:00
|
|
|
WriteParam(aMsg, aParam.mMouseButtonEventData);
|
2014-09-11 13:46:17 +00:00
|
|
|
return;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2014-09-11 13:46:17 +00:00
|
|
|
{
|
|
|
|
mozilla::widget::IMEMessageType IMEMessage = 0;
|
|
|
|
if (!ReadParam(aMsg, aIter, &IMEMessage)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
aResult->mMessage = static_cast<mozilla::widget::IMEMessage>(IMEMessage);
|
|
|
|
switch (aResult->mMessage) {
|
|
|
|
case mozilla::widget::NOTIFY_IME_OF_SELECTION_CHANGE:
|
2015-07-17 04:30:01 +00:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mSelectionChangeData);
|
2014-09-11 13:46:17 +00:00
|
|
|
case mozilla::widget::NOTIFY_IME_OF_TEXT_CHANGE:
|
2015-07-17 04:30:01 +00:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mTextChangeData);
|
2014-09-11 13:46:17 +00:00
|
|
|
case mozilla::widget::NOTIFY_IME_OF_MOUSE_BUTTON_EVENT:
|
2015-07-17 04:30:01 +00:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mMouseButtonEventData);
|
2014-09-11 13:46:17 +00:00
|
|
|
default:
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-05-11 04:52:44 +00:00
|
|
|
template<>
|
2013-09-27 06:20:54 +00:00
|
|
|
struct ParamTraits<mozilla::WidgetPluginEvent>
|
2011-05-11 04:52:44 +00:00
|
|
|
{
|
2013-09-27 06:20:54 +00:00
|
|
|
typedef mozilla::WidgetPluginEvent paramType;
|
2011-05-11 04:52:44 +00:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2013-10-02 03:46:03 +00:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::WidgetGUIEvent>(aParam));
|
2016-03-30 09:07:50 +00:00
|
|
|
WriteParam(aMsg, aParam.mRetargetToFocusedDocument);
|
2011-05-11 04:52:44 +00:00
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2011-05-11 04:52:44 +00:00
|
|
|
{
|
2013-10-02 03:46:03 +00:00
|
|
|
return ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetGUIEvent*>(aResult)) &&
|
2016-03-30 09:07:50 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mRetargetToFocusedDocument);
|
2011-05-11 04:52:44 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-12-05 02:15:43 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::WritingMode>
|
|
|
|
{
|
|
|
|
typedef mozilla::WritingMode paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mWritingMode);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2014-12-05 02:15:43 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mWritingMode);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-06-05 09:28:19 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::ContentCache>
|
|
|
|
{
|
|
|
|
typedef mozilla::ContentCache paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2016-06-13 09:17:58 +00:00
|
|
|
WriteParam(aMsg, aParam.mCompositionStart);
|
2015-06-05 09:28:19 +00:00
|
|
|
WriteParam(aMsg, aParam.mText);
|
|
|
|
WriteParam(aMsg, aParam.mSelection.mAnchor);
|
|
|
|
WriteParam(aMsg, aParam.mSelection.mFocus);
|
|
|
|
WriteParam(aMsg, aParam.mSelection.mWritingMode);
|
2016-07-22 11:47:51 +00:00
|
|
|
WriteParam(aMsg, aParam.mSelection.mAnchorCharRects[0]);
|
|
|
|
WriteParam(aMsg, aParam.mSelection.mAnchorCharRects[1]);
|
|
|
|
WriteParam(aMsg, aParam.mSelection.mFocusCharRects[0]);
|
|
|
|
WriteParam(aMsg, aParam.mSelection.mFocusCharRects[1]);
|
2015-06-08 02:46:17 +00:00
|
|
|
WriteParam(aMsg, aParam.mSelection.mRect);
|
2015-06-17 01:03:58 +00:00
|
|
|
WriteParam(aMsg, aParam.mFirstCharRect);
|
2015-06-05 09:28:19 +00:00
|
|
|
WriteParam(aMsg, aParam.mCaret.mOffset);
|
|
|
|
WriteParam(aMsg, aParam.mCaret.mRect);
|
|
|
|
WriteParam(aMsg, aParam.mTextRectArray.mStart);
|
|
|
|
WriteParam(aMsg, aParam.mTextRectArray.mRects);
|
|
|
|
WriteParam(aMsg, aParam.mEditorRect);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2015-06-05 09:28:19 +00:00
|
|
|
{
|
2016-06-13 09:17:58 +00:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mCompositionStart) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mText) &&
|
2015-06-05 09:28:19 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mSelection.mAnchor) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mSelection.mFocus) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mSelection.mWritingMode) &&
|
2016-07-22 11:47:51 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mSelection.mAnchorCharRects[0]) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mSelection.mAnchorCharRects[1]) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mSelection.mFocusCharRects[0]) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mSelection.mFocusCharRects[1]) &&
|
2015-06-08 02:46:17 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mSelection.mRect) &&
|
2015-06-17 01:03:58 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mFirstCharRect) &&
|
2015-06-05 09:28:19 +00:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCaret.mOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mCaret.mRect) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTextRectArray.mStart) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTextRectArray.mRects) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mEditorRect);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-02-02 08:05:56 +00:00
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::widget::CandidateWindowPosition>
|
|
|
|
{
|
|
|
|
typedef mozilla::widget::CandidateWindowPosition paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mPoint);
|
|
|
|
WriteParam(aMsg, aParam.mRect);
|
|
|
|
WriteParam(aMsg, aParam.mExcludeRect);
|
|
|
|
}
|
|
|
|
|
2016-04-21 04:09:15 +00:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
2016-02-02 08:05:56 +00:00
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRect) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mExcludeRect);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-07-20 11:37:00 +00:00
|
|
|
// InputData.h
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::InputType>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::InputType,
|
|
|
|
mozilla::InputType::MULTITOUCH_INPUT,
|
|
|
|
mozilla::InputType::SENTINEL_INPUT>
|
|
|
|
{};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::InputData>
|
|
|
|
{
|
|
|
|
typedef mozilla::InputData paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mInputType);
|
|
|
|
WriteParam(aMsg, aParam.mTime);
|
|
|
|
WriteParam(aMsg, aParam.mTimeStamp);
|
|
|
|
WriteParam(aMsg, aParam.modifiers);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mInputType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTime) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTimeStamp) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->modifiers);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::SingleTouchData>
|
|
|
|
{
|
|
|
|
typedef mozilla::SingleTouchData paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, aParam.mIdentifier);
|
|
|
|
WriteParam(aMsg, aParam.mScreenPoint);
|
|
|
|
WriteParam(aMsg, aParam.mLocalScreenPoint);
|
|
|
|
WriteParam(aMsg, aParam.mRadius);
|
|
|
|
WriteParam(aMsg, aParam.mRotationAngle);
|
|
|
|
WriteParam(aMsg, aParam.mForce);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
return (ReadParam(aMsg, aIter, &aResult->mIdentifier) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mScreenPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalScreenPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRadius) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRotationAngle) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mForce));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::MultiTouchInput::MultiTouchType>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::MultiTouchInput::MultiTouchType,
|
|
|
|
mozilla::MultiTouchInput::MultiTouchType::MULTITOUCH_START,
|
|
|
|
mozilla::MultiTouchInput::MultiTouchType::MULTITOUCH_SENTINEL>
|
|
|
|
{};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::MultiTouchInput>
|
|
|
|
{
|
|
|
|
typedef mozilla::MultiTouchInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, static_cast<mozilla::InputData>(aParam));
|
|
|
|
WriteParam(aMsg, aParam.mType);
|
|
|
|
WriteParam(aMsg, aParam.mTouches);
|
|
|
|
WriteParam(aMsg, aParam.mHandledByAPZ);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTouches) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mHandledByAPZ);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::MouseInput::MouseType>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::MouseInput::MouseType,
|
|
|
|
mozilla::MouseInput::MouseType::MOUSE_NONE,
|
|
|
|
mozilla::MouseInput::MouseType::MOUSE_SENTINEL>
|
|
|
|
{};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::MouseInput::ButtonType>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::MouseInput::ButtonType,
|
|
|
|
mozilla::MouseInput::ButtonType::LEFT_BUTTON,
|
|
|
|
mozilla::MouseInput::ButtonType::BUTTON_SENTINEL>
|
|
|
|
{};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::MouseInput>
|
|
|
|
{
|
|
|
|
typedef mozilla::MouseInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, static_cast<mozilla::InputData>(aParam));
|
|
|
|
WriteParam(aMsg, aParam.mButtonType);
|
|
|
|
WriteParam(aMsg, aParam.mType);
|
|
|
|
WriteParam(aMsg, aParam.mInputSource);
|
|
|
|
WriteParam(aMsg, aParam.mButtons);
|
|
|
|
WriteParam(aMsg, aParam.mOrigin);
|
|
|
|
WriteParam(aMsg, aParam.mLocalOrigin);
|
|
|
|
WriteParam(aMsg, aParam.mHandledByAPZ);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mButtonType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mInputSource) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mButtons) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOrigin) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalOrigin) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mHandledByAPZ);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::PanGestureInput::PanGestureType>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::PanGestureInput::PanGestureType,
|
|
|
|
mozilla::PanGestureInput::PanGestureType::PANGESTURE_MAYSTART,
|
|
|
|
mozilla::PanGestureInput::PanGestureType::PANGESTURE_SENTINEL>
|
|
|
|
{};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::PanGestureInput>
|
|
|
|
{
|
|
|
|
typedef mozilla::PanGestureInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, static_cast<mozilla::InputData>(aParam));
|
|
|
|
WriteParam(aMsg, aParam.mType);
|
|
|
|
WriteParam(aMsg, aParam.mPanStartPoint);
|
|
|
|
WriteParam(aMsg, aParam.mPanDisplacement);
|
|
|
|
WriteParam(aMsg, aParam.mLocalPanStartPoint);
|
|
|
|
WriteParam(aMsg, aParam.mLocalPanDisplacement);
|
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaX);
|
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaY);
|
|
|
|
WriteParam(aMsg, aParam.mUserDeltaMultiplierX);
|
|
|
|
WriteParam(aMsg, aParam.mUserDeltaMultiplierY);
|
|
|
|
WriteParam(aMsg, aParam.mHandledByAPZ);
|
|
|
|
WriteParam(aMsg, aParam.mFollowedByMomentum);
|
|
|
|
WriteParam(aMsg, aParam.mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mPanStartPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mPanDisplacement) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalPanStartPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalPanDisplacement) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUserDeltaMultiplierX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUserDeltaMultiplierY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mHandledByAPZ) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mFollowedByMomentum) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::PinchGestureInput::PinchGestureType>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::PinchGestureInput::PinchGestureType,
|
|
|
|
mozilla::PinchGestureInput::PinchGestureType::PINCHGESTURE_START,
|
|
|
|
mozilla::PinchGestureInput::PinchGestureType::PINCHGESTURE_SENTINEL>
|
|
|
|
{};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::PinchGestureInput>
|
|
|
|
{
|
|
|
|
typedef mozilla::PinchGestureInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, static_cast<mozilla::InputData>(aParam));
|
|
|
|
WriteParam(aMsg, aParam.mType);
|
|
|
|
WriteParam(aMsg, aParam.mFocusPoint);
|
|
|
|
WriteParam(aMsg, aParam.mLocalFocusPoint);
|
|
|
|
WriteParam(aMsg, aParam.mCurrentSpan);
|
|
|
|
WriteParam(aMsg, aParam.mPreviousSpan);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mFocusPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalFocusPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mCurrentSpan) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mPreviousSpan);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::TapGestureInput::TapGestureType>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::TapGestureInput::TapGestureType,
|
|
|
|
mozilla::TapGestureInput::TapGestureType::TAPGESTURE_LONG,
|
|
|
|
mozilla::TapGestureInput::TapGestureType::TAPGESTURE_SENTINEL>
|
|
|
|
{};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::TapGestureInput>
|
|
|
|
{
|
|
|
|
typedef mozilla::TapGestureInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, static_cast<mozilla::InputData>(aParam));
|
|
|
|
WriteParam(aMsg, aParam.mType);
|
|
|
|
WriteParam(aMsg, aParam.mPoint);
|
|
|
|
WriteParam(aMsg, aParam.mLocalPoint);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalPoint);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::ScrollWheelInput::ScrollDeltaType>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::ScrollWheelInput::ScrollDeltaType,
|
|
|
|
mozilla::ScrollWheelInput::ScrollDeltaType::SCROLLDELTA_LINE,
|
|
|
|
mozilla::ScrollWheelInput::ScrollDeltaType::SCROLLDELTA_SENTINEL>
|
|
|
|
{};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::ScrollWheelInput::ScrollMode>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::ScrollWheelInput::ScrollMode,
|
|
|
|
mozilla::ScrollWheelInput::ScrollMode::SCROLLMODE_INSTANT,
|
|
|
|
mozilla::ScrollWheelInput::ScrollMode::SCROLLMODE_SENTINEL>
|
|
|
|
{};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::ScrollWheelInput>
|
|
|
|
{
|
|
|
|
typedef mozilla::ScrollWheelInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
|
|
|
WriteParam(aMsg, static_cast<mozilla::InputData>(aParam));
|
|
|
|
WriteParam(aMsg, aParam.mDeltaType);
|
|
|
|
WriteParam(aMsg, aParam.mScrollMode);
|
|
|
|
WriteParam(aMsg, aParam.mOrigin);
|
|
|
|
WriteParam(aMsg, aParam.mHandledByAPZ);
|
|
|
|
WriteParam(aMsg, aParam.mDeltaX);
|
|
|
|
WriteParam(aMsg, aParam.mDeltaY);
|
|
|
|
WriteParam(aMsg, aParam.mLocalOrigin);
|
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaX);
|
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaY);
|
|
|
|
WriteParam(aMsg, aParam.mScrollSeriesNumber);
|
|
|
|
WriteParam(aMsg, aParam.mUserDeltaMultiplierX);
|
|
|
|
WriteParam(aMsg, aParam.mUserDeltaMultiplierY);
|
|
|
|
WriteParam(aMsg, aParam.mMayHaveMomentum);
|
|
|
|
WriteParam(aMsg, aParam.mIsMomentum);
|
|
|
|
WriteParam(aMsg, aParam.mAllowToOverrideSystemScrollSpeed);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mScrollMode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOrigin) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mHandledByAPZ) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalOrigin) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mScrollSeriesNumber) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUserDeltaMultiplierX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUserDeltaMultiplierY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mMayHaveMomentum) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsMomentum) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mAllowToOverrideSystemScrollSpeed);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 08:07:42 +00:00
|
|
|
} // namespace IPC
|
|
|
|
|
|
|
|
#endif // nsGUIEventIPC_h__
|