1/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2/* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6include "mozilla/GfxMessageUtils.h"; 7include "mozilla/layers/LayersMessageUtils.h"; 8include "ipc/nsGUIEventIPC.h"; 9 10include protocol PCompositorBridge; 11 12using CSSRect from "Units.h"; 13using LayoutDeviceCoord from "Units.h"; 14using mozilla::LayoutDevicePoint from "Units.h"; 15using ScreenPoint from "Units.h"; 16using ZoomTarget from "mozilla/layers/DoubleTapToZoom.h"; 17using mozilla::layers::ZoomConstraints from "mozilla/layers/ZoomConstraints.h"; 18using mozilla::layers::ScrollableLayerGuid from "mozilla/layers/ScrollableLayerGuid.h"; 19using mozilla::layers::ScrollableLayerGuid::ViewID from "mozilla/layers/ScrollableLayerGuid.h"; 20using mozilla::layers::TouchBehaviorFlags from "mozilla/layers/LayersTypes.h"; 21using mozilla::layers::AsyncDragMetrics from "mozilla/layers/AsyncDragMetrics.h"; 22using mozilla::layers::GeckoContentController_TapType from "mozilla/layers/GeckoContentControllerTypes.h"; 23using mozilla::layers::APZHandledResult from "mozilla/layers/APZInputBridge.h"; 24using class mozilla::layers::KeyboardMap from "mozilla/layers/KeyboardMap.h"; 25using mozilla::wr::RenderRoot from "mozilla/webrender/WebRenderTypes.h"; 26 27using mozilla::Modifiers from "mozilla/EventForwards.h"; 28using mozilla::PinchGestureInput::PinchGestureType from "InputData.h"; 29 30namespace mozilla { 31namespace layers { 32 33/** 34 * PAPZCTreeManager is a protocol for remoting an IAPZCTreeManager. PAPZCTreeManager 35 * lives on the PCompositorBridge protocol which either connects to the compositor 36 * thread in the main process, or to the compositor thread in the gpu processs. 37 * 38 * PAPZCTreeManagerParent lives in the compositor thread, while PAPZCTreeManagerChild 39 * lives in the main thread of the main or the content process. APZCTreeManagerParent 40 * and APZCTreeManagerChild implement this protocol. 41 */ 42[ManualDealloc] 43protocol PAPZCTreeManager 44{ 45manager PCompositorBridge; 46 47parent: 48 49 // These messages correspond to the methods 50 // on the IAPZCTreeManager interface 51 52 async ZoomToRect(ScrollableLayerGuid aGuid, ZoomTarget aZoomTarget, uint32_t Flags); 53 54 async ContentReceivedInputBlock(uint64_t aInputBlockId, bool PreventDefault); 55 56 async SetTargetAPZC(uint64_t aInputBlockId, ScrollableLayerGuid[] Targets); 57 58 async UpdateZoomConstraints(ScrollableLayerGuid aGuid, ZoomConstraints? aConstraints); 59 60 async SetKeyboardMap(KeyboardMap aKeyboardMap); 61 62 async SetDPI(float aDpiValue); 63 64 async SetAllowedTouchBehavior(uint64_t aInputBlockId, TouchBehaviorFlags[] aValues); 65 66 async StartScrollbarDrag(ScrollableLayerGuid aGuid, AsyncDragMetrics aDragMetrics); 67 68 async StartAutoscroll(ScrollableLayerGuid aGuid, ScreenPoint aAnchorLocation); 69 70 async StopAutoscroll(ScrollableLayerGuid aGuid); 71 72 async SetLongTapEnabled(bool aTapGestureEnabled); 73 74 async __delete__(); 75 76child: 77 78 async HandleTap(GeckoContentController_TapType aType, LayoutDevicePoint point, Modifiers aModifiers, 79 ScrollableLayerGuid aGuid, uint64_t aInputBlockId); 80 81 async NotifyPinchGesture(PinchGestureType aType, ScrollableLayerGuid aGuid, 82 LayoutDevicePoint aFocusPoint, LayoutDeviceCoord aSpanChange, 83 Modifiers aModifiers); 84 85 async CancelAutoscroll(ViewID aScrollId); 86}; 87 88} // namespace gfx 89} // namespace mozilla 90