1 /* -*- Mode: C++; tab-width: 4; 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 #ifndef nsWindowBase_h_
7 #define nsWindowBase_h_
9 #include "nsBaseWidget.h"
12 * nsWindowBase - Base class of common methods other classes need to access
13 * in both win32 and winrt window classes.
16 class nsWindowBase
: public nsBaseWidget
20 * Return the HWND or null for this widget.
22 virtual HWND
GetWindowHandle() MOZ_FINAL
{
23 return static_cast<HWND
>(GetNativeData(NS_NATIVE_WINDOW
));
27 * Init a standard gecko event for this widget.
29 virtual void InitEvent(nsGUIEvent
& aEvent
, nsIntPoint
* aPoint
= nullptr) = 0;
32 * Dispatch a gecko event for this widget.
34 virtual bool DispatchWindowEvent(nsGUIEvent
* aEvent
) = 0;
37 #endif // nsWindowBase_h_