1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/base/PositionedEventTargeting.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,32 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef mozilla_PositionedEventTargeting_h 1.9 +#define mozilla_PositionedEventTargeting_h 1.10 + 1.11 +#include <stdint.h> 1.12 +#include "mozilla/EventForwards.h" 1.13 + 1.14 +class nsIFrame; 1.15 +struct nsPoint; 1.16 + 1.17 +namespace mozilla { 1.18 + 1.19 +enum { 1.20 + INPUT_IGNORE_ROOT_SCROLL_FRAME = 0x01 1.21 +}; 1.22 +/** 1.23 + * Finds the target frame for a pointer event given the event type and location. 1.24 + * This can look for frames within a rectangle surrounding the actual location 1.25 + * that are suitable targets, to account for inaccurate pointing devices. 1.26 + */ 1.27 +nsIFrame* 1.28 +FindFrameTargetedByInputEvent(const WidgetGUIEvent* aEvent, 1.29 + nsIFrame* aRootFrame, 1.30 + const nsPoint& aPointRelativeToRootFrame, 1.31 + uint32_t aFlags = 0); 1.32 + 1.33 +} 1.34 + 1.35 +#endif /* mozilla_PositionedEventTargeting_h */