/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
void* GetNativeData(uint32_t aDataType) override { // Headless widgets have no native data. return nullptr;
}
nsresult Create(nsIWidget* aParent, const LayoutDeviceIntRect& aRect,
widget::InitData* aInitData = nullptr) override; using nsBaseWidget::Create; // for Create signature not overridden here
private:
~HeadlessWidget(); bool mEnabled; bool mVisible; bool mDestroyed; bool mAlwaysOnTop;
HeadlessCompositorWidget* mCompositorWidget;
nsSizeMode mSizeMode; // The size mode before entering fullscreen mode.
nsSizeMode mLastSizeMode; // The last size mode set while the window was visible.
nsSizeMode mEffectiveSizeMode;
mozilla::ScreenCoord mLastPinchSpan;
InputContext mInputContext;
mozilla::UniquePtr<mozilla::MultiTouchInput> mSynthesizedTouchInput; // In headless there is no window manager to track window bounds // across size mode changes, so we must track it to emulate.
LayoutDeviceIntRect mRestoreBounds; void ApplySizeModeSideEffects(); // Move while maintaining size mode. void MoveInternal(int32_t aX, int32_t aY); // Resize while maintaining size mode. void ResizeInternal(int32_t aWidth, int32_t aHeight, bool aRepaint); // Similarly, we must track the active window ourselves in order // to dispatch (de)activation events properly. void RaiseWindow(); // The top level widgets are tracked for window ordering. They are // stored in order of activation where the last element is always the // currently active widget. static StaticAutoPtr<nsTArray<HeadlessWidget*>> sActiveWindows; // Get the most recently activated widget or null if there are none. static already_AddRefed<HeadlessWidget> GetActiveWindow();
};
} // namespace widget
} // namespace mozilla
#endif
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.