tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

PAPZInputBridge.ipdl (4260B)


      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 "ipc/nsGUIEventIPC.h";
      7 
      8 using mozilla::LayoutDeviceIntPoint from "Units.h";
      9 using mozilla::LayoutDevicePoint from "Units.h";
     10 using mozilla::layers::GeckoContentController_TapType from "mozilla/layers/GeckoContentControllerTypes.h";
     11 using mozilla::layers::DoubleTapToZoomMetrics from "mozilla/layers/DoubleTapToZoom.h";
     12 using struct mozilla::layers::ScrollableLayerGuid from "mozilla/layers/ScrollableLayerGuid.h";
     13 using struct mozilla::layers::APZEventResult from "mozilla/layers/APZInputBridge.h";
     14 using struct mozilla::layers::APZHandledResult from "mozilla/layers/APZInputBridge.h";
     15 
     16 using mozilla::EventMessage from "mozilla/EventForwards.h";
     17 using mozilla::Modifiers from "mozilla/EventForwards.h";
     18 using class mozilla::MultiTouchInput from "InputData.h";
     19 using class mozilla::MouseInput from "InputData.h";
     20 using class mozilla::PanGestureInput from "InputData.h";
     21 using class mozilla::PinchGestureInput from "InputData.h";
     22 using class mozilla::TapGestureInput from "InputData.h";
     23 using class mozilla::ScrollWheelInput from "InputData.h";
     24 using class mozilla::KeyboardInput from "InputData.h";
     25 
     26 using mozilla::layers::LayersId from "mozilla/layers/LayersTypes.h";
     27 
     28 namespace mozilla {
     29 namespace layers {
     30 
     31 /**
     32  * This protocol is used to send input events from the UI process to the
     33  * GPU process for handling by APZ. There is one instance per top-level
     34  * compositor, or in other words, one instance per concrete APZCTreeManager
     35  * instance. The child side lives on the controller thread in the UI process,
     36  * ie the main thread on most platforms, but the Android UI thread on Android.
     37  * The parent side lives on the main thread in the GPU process. If there is no
     38  * GPU process, then this protocol is not instantiated.
     39  */
     40 [ParentProc=GPU, ChildProc=Parent]
     41 sync protocol PAPZInputBridge
     42 {
     43 parent:
     44   // The following messages are used to
     45   // implement the ReceiveInputEvent methods
     46 
     47   sync ReceiveMultiTouchInputEvent(MultiTouchInput aEvent, bool aWantsCallback)
     48       returns(APZEventResult aOutResult, MultiTouchInput aOutEvent);
     49 
     50   sync ReceiveMouseInputEvent(MouseInput aEvent, bool aWantsCallback)
     51     returns (APZEventResult aOutResult,
     52              MouseInput     aOutEvent);
     53 
     54   sync ReceivePanGestureInputEvent(PanGestureInput aEvent, bool aWantsCallback)
     55     returns (APZEventResult  aOutResult,
     56              PanGestureInput aOutEvent);
     57 
     58   sync ReceivePinchGestureInputEvent(PinchGestureInput aEvent,
     59                                      bool aWantsCallback)
     60     returns (APZEventResult    aOutResult,
     61              PinchGestureInput aOutEvent);
     62 
     63   sync ReceiveTapGestureInputEvent(TapGestureInput aEvent, bool aWantsCallback)
     64     returns (APZEventResult  aOutResult,
     65              TapGestureInput aOutEvent);
     66 
     67   sync ReceiveScrollWheelInputEvent(ScrollWheelInput aEvent,
     68                                     bool aWantsCallback)
     69     returns (APZEventResult   aOutResult,
     70              ScrollWheelInput aOutEvent);
     71 
     72   sync ReceiveKeyboardInputEvent(KeyboardInput aEvent, bool aWantsCallback)
     73     returns (APZEventResult aOutResult,
     74              KeyboardInput  aOutEvent);
     75 
     76   async UpdateWheelTransaction(LayoutDeviceIntPoint aRefPoint,
     77                                EventMessage aEventMessage,
     78                                ScrollableLayerGuid? aTargetGuid);
     79 
     80   sync ProcessUnhandledEvent(LayoutDeviceIntPoint aRefPoint)
     81     returns (LayoutDeviceIntPoint   aOutRefPoint,
     82              ScrollableLayerGuid    aOutTargetGuid,
     83              uint64_t               aOutFocusSequenceNumber,
     84              LayersId               aOutLayersId);
     85 
     86 child:
     87   async CallInputBlockCallback(uint64_t aInputBlockId,
     88                                APZHandledResult aHandledResult);
     89 
     90   async HandleTap(GeckoContentController_TapType aType, LayoutDevicePoint point,
     91                   Modifiers aModifiers, ScrollableLayerGuid aGuid,
     92                   uint64_t aInputBlockId, DoubleTapToZoomMetrics? aDoubleTapToZoomMetrics);
     93 };
     94 
     95 } // namespace gfx
     96 } // namespace mozilla