PAPZCTreeManager.ipdl (3772B)
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 6 include "mozilla/GfxMessageUtils.h"; 7 include "mozilla/layers/LayersMessageUtils.h"; 8 include "ipc/nsGUIEventIPC.h"; 9 10 include protocol PCompositorBridge; 11 12 using mozilla::CSSRect from "Units.h"; 13 using mozilla::LayoutDeviceCoord from "Units.h"; 14 using mozilla::LayoutDevicePoint from "Units.h"; 15 using mozilla::ScreenPoint from "Units.h"; 16 using mozilla::layers::ZoomTarget from "mozilla/layers/DoubleTapToZoom.h"; 17 using mozilla::layers::DoubleTapToZoomMetrics from "mozilla/layers/DoubleTapToZoom.h"; 18 using mozilla::layers::ZoomConstraints from "mozilla/layers/ZoomConstraints.h"; 19 using mozilla::layers::ScrollableLayerGuid from "mozilla/layers/ScrollableLayerGuid.h"; 20 using mozilla::layers::ScrollableLayerGuid::ViewID from "mozilla/layers/ScrollableLayerGuid.h"; 21 using mozilla::layers::TouchBehaviorFlags from "mozilla/layers/LayersTypes.h"; 22 using mozilla::layers::AsyncDragMetrics from "mozilla/layers/AsyncDragMetrics.h"; 23 using mozilla::layers::GeckoContentController_TapType from "mozilla/layers/GeckoContentControllerTypes.h"; 24 using mozilla::layers::APZHandledResult from "mozilla/layers/APZInputBridge.h"; 25 using mozilla::layers::BrowserGestureResponse from "mozilla/layers/APZInputBridge.h"; 26 using class mozilla::layers::KeyboardMap from "mozilla/layers/KeyboardMap.h"; 27 using mozilla::wr::RenderRoot from "mozilla/webrender/WebRenderTypes.h"; 28 29 using mozilla::Modifiers from "mozilla/EventForwards.h"; 30 using mozilla::PinchGestureInput::PinchGestureType from "InputData.h"; 31 32 namespace mozilla { 33 namespace layers { 34 35 /** 36 * PAPZCTreeManager is a protocol for remoting an IAPZCTreeManager. PAPZCTreeManager 37 * lives on the PCompositorBridge protocol which either connects to the compositor 38 * thread in the main process, or to the compositor thread in the gpu processs. 39 * 40 * PAPZCTreeManagerParent lives in the compositor thread, while PAPZCTreeManagerChild 41 * lives in the main thread of the main or the content process. APZCTreeManagerParent 42 * and APZCTreeManagerChild implement this protocol. 43 */ 44 [ManualDealloc] 45 protocol PAPZCTreeManager 46 { 47 manager PCompositorBridge; 48 49 parent: 50 51 // These messages correspond to the methods 52 // on the IAPZCTreeManager interface 53 54 async ZoomToRect(ScrollableLayerGuid aGuid, ZoomTarget aZoomTarget, uint32_t Flags); 55 56 async ContentReceivedInputBlock(uint64_t aInputBlockId, bool PreventDefault); 57 58 async SetTargetAPZC(uint64_t aInputBlockId, ScrollableLayerGuid[] Targets); 59 60 async UpdateZoomConstraints(ScrollableLayerGuid aGuid, ZoomConstraints? aConstraints); 61 62 async SetKeyboardMap(KeyboardMap aKeyboardMap); 63 64 async SetDPI(float aDpiValue); 65 66 async SetAllowedTouchBehavior(uint64_t aInputBlockId, TouchBehaviorFlags[] aValues); 67 68 async StartScrollbarDrag(ScrollableLayerGuid aGuid, AsyncDragMetrics aDragMetrics); 69 70 async StartAutoscroll(ScrollableLayerGuid aGuid, ScreenPoint aAnchorLocation); 71 72 async StopAutoscroll(ScrollableLayerGuid aGuid); 73 74 async SetLongTapEnabled(bool aTapGestureEnabled); 75 76 async SetBrowserGestureResponse(uint64_t aInputBlockId, 77 BrowserGestureResponse aResponse); 78 79 async __delete__(); 80 81 child: 82 83 async NotifyPinchGesture(PinchGestureType aType, ScrollableLayerGuid aGuid, 84 LayoutDevicePoint aFocusPoint, LayoutDeviceCoord aSpanChange, 85 Modifiers aModifiers); 86 87 async CancelAutoscroll(ViewID aScrollId); 88 89 async NotifyScaleGestureComplete(ViewID aScrollId, float aScale); 90 }; 91 92 } // namespace gfx 93 } // namespace mozilla