//
// Automatically generated by ipdlc.
// Edit at your own risk
//

#ifndef PAPZCTreeManagerParent_h
#define PAPZCTreeManagerParent_h

#include "mozilla/layers/PAPZCTreeManager.h"
#ifdef DEBUG
#include "prenv.h"
#endif  // DEBUG

#include "mozilla/Tainting.h"
#include "mozilla/ipc/MessageChannel.h"
#include "mozilla/ipc/ProtocolUtils.h"
// Headers for things that cannot be forward declared
#include "InputData.h"
#include "Units.h"
#include "mozilla/EventForwards.h"
#include "mozilla/layers/APZInputBridge.h"
#include "mozilla/layers/AsyncDragMetrics.h"
#include "mozilla/layers/DoubleTapToZoom.h"
#include "mozilla/layers/GeckoContentControllerTypes.h"
#include "mozilla/layers/LayersTypes.h"
#include "mozilla/layers/ScrollableLayerGuid.h"
#include "mozilla/layers/ZoomConstraints.h"
#include "mozilla/webrender/WebRenderTypes.h"

namespace mozilla {
namespace layers {
class PCompositorBridgeParent;
} // namespace layers
} // namespace mozilla
namespace mozilla {
namespace layers {
class PCompositorBridgeChild;
} // namespace layers
} // namespace mozilla

namespace mozilla {
namespace layers {
class PCompositorBridgeParent;
} // namespace layers
} // namespace mozilla

namespace mozilla {
namespace layers {
class KeyboardMap;
} // namespace layers
} // namespace mozilla

namespace mozilla {
namespace layers {


class PAPZCTreeManagerParent :
    public mozilla::ipc::IProtocol
{
private:
    friend class ::mozilla::layers::PCompositorBridgeParent;
public:
    static constexpr ::mozilla::ipc::ProtocolId kProtocolId = PAPZCTreeManagerMsgStart;
protected:
    typedef ::mozilla::layers::APZHandledResult APZHandledResult;
    typedef mozilla::ipc::ActorId ActorId;
    typedef ::mozilla::layers::AsyncDragMetrics AsyncDragMetrics;
    typedef ::mozilla::layers::BrowserGestureResponse BrowserGestureResponse;
    typedef ::mozilla::ipc::ByteBuf ByteBuf;
    typedef ::mozilla::CSSRect CSSRect;
    typedef ::mozilla::layers::DoubleTapToZoomMetrics DoubleTapToZoomMetrics;
    template<class FooSide> using Endpoint = mozilla::ipc::Endpoint<FooSide>;
    typedef ::mozilla::ipc::FileDescriptor FileDescriptor;
    typedef ::mozilla::layers::GeckoContentController_TapType GeckoContentController_TapType;
    typedef ::mozilla::layers::KeyboardMap KeyboardMap;
    typedef ::mozilla::LayoutDeviceCoord LayoutDeviceCoord;
    typedef ::mozilla::LayoutDevicePoint LayoutDevicePoint;
    template<class FooSide> using ManagedEndpoint = mozilla::ipc::ManagedEndpoint<FooSide>;
    typedef ::mozilla::Modifiers Modifiers;
    typedef ::mozilla::layers::PCompositorBridgeChild PCompositorBridgeChild;
    typedef ::mozilla::layers::PCompositorBridgeParent PCompositorBridgeParent;
    typedef ::mozilla::PinchGestureInput::PinchGestureType PinchGestureType;
    typedef base::ProcessId ProcessId;
    typedef mozilla::ipc::ProtocolId ProtocolId;
    typedef ::mozilla::wr::RenderRoot RenderRoot;
    typedef mozilla::ipc::ResponseRejectReason ResponseRejectReason;
    typedef ::mozilla::ScreenPoint ScreenPoint;
    typedef ::mozilla::layers::ScrollableLayerGuid ScrollableLayerGuid;
    typedef ::mozilla::ipc::Shmem Shmem;
    typedef ::mozilla::layers::TouchBehaviorFlags TouchBehaviorFlags;
    template<class T> using UniquePtr = mozilla::UniquePtr<T>;
    typedef ::mozilla::layers::ScrollableLayerGuid::ViewID ViewID;
    typedef ::mozilla::layers::ZoomConstraints ZoomConstraints;
    typedef ::mozilla::layers::ZoomTarget ZoomTarget;
    typedef ::int16_t int16_t;
    typedef ::int32_t int32_t;
    typedef ::int64_t int64_t;
    typedef ::int8_t int8_t;
    typedef ::intptr_t intptr_t;
    typedef ::nsCString nsCString;
    typedef ::nsString nsString;
    typedef ::nsresult nsresult;
    typedef ::uint16_t uint16_t;
    typedef ::uint32_t uint32_t;
    typedef ::uint64_t uint64_t;
    typedef ::uint8_t uint8_t;
    typedef ::uintptr_t uintptr_t;

protected:
    virtual mozilla::ipc::IPCResult
    Recv__delete__();
public:
    typedef mozilla::ipc::IProtocol IProtocol;
    typedef IPC::Message Message;
    typedef base::ProcessHandle ProcessHandle;
    typedef mozilla::ipc::MessageChannel MessageChannel;

public:
    MOZ_IMPLICIT PAPZCTreeManagerParent();

    virtual ~PAPZCTreeManagerParent();

protected:
    void
    ActorAlloc() final;
    void
    ActorDealloc() final;
public:
    ::base::ProcessId
    OtherPid() const;
    ::GeckoChildID
    OtherChildID() const;
    ::mozilla::ipc::EndpointProcInfo
    OtherEndpointProcInfo() const;

    PCompositorBridgeParent*
    Manager() const;

    mozilla::Span<mozilla::ipc::ProtocolId const>
    ManagedProtocolIds() const final;

    UntypedManagedContainer*
    GetManagedActors(mozilla::ipc::ProtocolId aProtocol) final;

    [[nodiscard]] bool
    SendNotifyPinchGesture(
            const PinchGestureType& aType,
            const ScrollableLayerGuid& aGuid,
            const LayoutDevicePoint& aFocusPoint,
            const LayoutDeviceCoord& aSpanChange,
            const Modifiers& aModifiers);

    [[nodiscard]] bool
    SendCancelAutoscroll(const ViewID& aScrollId);

    [[nodiscard]] bool
    SendNotifyScaleGestureComplete(
            const ViewID& aScrollId,
            const float& aScale);

    void
    DeallocManagee(
            mozilla::ipc::ProtocolId aProtocolId,
            IProtocol* aListener) override;

    Result
    OnMessageReceived(const Message& msg__) override;

    Result
    OnMessageReceived(
            const Message& msg__,
            UniquePtr<Message>& reply__) override;

private:
    bool mAwaitingManagedEndpointBind = false;

};


} // namespace layers
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::PAPZCTreeManagerParent*>
{
    typedef ::mozilla::layers::PAPZCTreeManagerParent* paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

#endif // ifndef PAPZCTreeManagerParent_h
