Bug 1716846 [wpt PR 29402] - Update wpt metadata, a=testonly
[gecko.git] / widget / nsIWidgetListener.cpp
blobb7f9fb335632fb5bf3a2af441a2f5f9cdaecdaf4
1 /* -*- Mode: C++; tab-width: 2; 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/. */
6 #include "nsIWidgetListener.h"
8 #include "nsRegion.h"
9 #include "nsView.h"
10 #include "nsIWidget.h"
11 #include "nsIAppWindow.h"
13 #include "mozilla/BasicEvents.h"
14 #include "mozilla/PresShell.h"
16 using namespace mozilla;
18 nsIAppWindow* nsIWidgetListener::GetAppWindow() { return nullptr; }
20 nsView* nsIWidgetListener::GetView() { return nullptr; }
22 PresShell* nsIWidgetListener::GetPresShell() { return nullptr; }
24 bool nsIWidgetListener::WindowMoved(nsIWidget* aWidget, int32_t aX,
25 int32_t aY) {
26 return false;
29 bool nsIWidgetListener::WindowResized(nsIWidget* aWidget, int32_t aWidth,
30 int32_t aHeight) {
31 return false;
34 void nsIWidgetListener::SizeModeChanged(nsSizeMode aSizeMode) {}
36 void nsIWidgetListener::SafeAreaInsetsChanged(const mozilla::ScreenIntMargin&) {
39 void nsIWidgetListener::UIResolutionChanged() {}
41 #if defined(MOZ_WIDGET_ANDROID)
42 void nsIWidgetListener::DynamicToolbarMaxHeightChanged(ScreenIntCoord aHeight) {
44 void nsIWidgetListener::DynamicToolbarOffsetChanged(ScreenIntCoord aOffset) {}
45 #endif
47 void nsIWidgetListener::FullscreenWillChange(bool aInFullscreen) {}
49 void nsIWidgetListener::FullscreenChanged(bool aInFullscreen) {}
51 void nsIWidgetListener::MacFullscreenMenubarOverlapChanged(
52 mozilla::DesktopCoord aOverlapAmount) {}
54 bool nsIWidgetListener::ZLevelChanged(bool aImmediate, nsWindowZ* aPlacement,
55 nsIWidget* aRequestBelow,
56 nsIWidget** aActualBelow) {
57 return false;
60 void nsIWidgetListener::OcclusionStateChanged(bool aIsFullyOccluded) {}
62 void nsIWidgetListener::WindowActivated() {}
64 void nsIWidgetListener::WindowDeactivated() {}
66 void nsIWidgetListener::OSToolbarButtonPressed() {}
68 bool nsIWidgetListener::RequestWindowClose(nsIWidget* aWidget) { return false; }
70 void nsIWidgetListener::WillPaintWindow(nsIWidget* aWidget) {}
72 bool nsIWidgetListener::PaintWindow(nsIWidget* aWidget,
73 LayoutDeviceIntRegion aRegion) {
74 return false;
77 void nsIWidgetListener::DidPaintWindow() {}
79 void nsIWidgetListener::DidCompositeWindow(
80 mozilla::layers::TransactionId aTransactionId,
81 const TimeStamp& aCompositeStart, const TimeStamp& aCompositeEnd) {}
83 void nsIWidgetListener::RequestRepaint() {}
85 bool nsIWidgetListener::ShouldNotBeVisible() {
86 // Returns false to assume that nothing should happen in most cases.
87 return false;
90 nsEventStatus nsIWidgetListener::HandleEvent(WidgetGUIEvent* aEvent,
91 bool aUseAttachedEvents) {
92 return nsEventStatus_eIgnore;