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"
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
, int32_t aY
,
29 bool nsIWidgetListener::WindowResized(nsIWidget
* aWidget
, int32_t aWidth
,
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
) {}
47 void nsIWidgetListener::MacFullscreenMenubarOverlapChanged(
48 mozilla::DesktopCoord aOverlapAmount
) {}
50 bool nsIWidgetListener::ZLevelChanged(bool aImmediate
, nsWindowZ
* aPlacement
,
51 nsIWidget
* aRequestBelow
,
52 nsIWidget
** aActualBelow
) {
56 void nsIWidgetListener::OcclusionStateChanged(bool aIsFullyOccluded
) {}
58 void nsIWidgetListener::WindowActivated() {}
60 void nsIWidgetListener::WindowDeactivated() {}
62 void nsIWidgetListener::OSToolbarButtonPressed() {}
64 bool nsIWidgetListener::RequestWindowClose(nsIWidget
* aWidget
) { return false; }
66 void nsIWidgetListener::WillPaintWindow(nsIWidget
* aWidget
) {}
68 bool nsIWidgetListener::PaintWindow(nsIWidget
* aWidget
,
69 LayoutDeviceIntRegion aRegion
) {
73 void nsIWidgetListener::DidPaintWindow() {}
75 void nsIWidgetListener::DidCompositeWindow(
76 mozilla::layers::TransactionId aTransactionId
,
77 const TimeStamp
& aCompositeStart
, const TimeStamp
& aCompositeEnd
) {}
79 void nsIWidgetListener::RequestRepaint() {}
81 bool nsIWidgetListener::ShouldNotBeVisible() {
82 // Returns false to assume that nothing should happen in most cases.
86 nsEventStatus
nsIWidgetListener::HandleEvent(WidgetGUIEvent
* aEvent
,
87 bool aUseAttachedEvents
) {
88 return nsEventStatus_eIgnore
;