Bug 1224482 (part 5) - Avoid excessive mozilla:: prefixes in nsIWidget and its subclasses. r=kats.

A couple of typedefs make things a lot nicer.

--HG--
extra : rebase_source : ca9f02e31301601af1b0f975c5c111945af4d5e7
This commit is contained in:
Nicholas Nethercote 2015-11-13 01:37:02 -08:00
Родитель e48ef7f5e0
Коммит 1615245145
12 изменённых файлов: 108 добавлений и 108 удалений

Просмотреть файл

@ -129,11 +129,11 @@ public:
NS_IMETHOD SetTitle(const nsAString& aTitle) override
{ return NS_ERROR_UNEXPECTED; }
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset() override
virtual LayoutDeviceIntPoint WidgetToScreenOffset() override
{ return LayoutDeviceIntPoint::FromUnknownPoint(GetWindowPosition() + GetChromeDimensions()); }
void InitEvent(WidgetGUIEvent& aEvent,
mozilla::LayoutDeviceIntPoint* aPoint = nullptr);
LayoutDeviceIntPoint* aPoint = nullptr);
NS_IMETHOD DispatchEvent(WidgetGUIEvent* aEvent, nsEventStatus& aStatus) override;
nsEventStatus DispatchAPZAwareEvent(WidgetInputEvent* aEvent) override;
@ -212,7 +212,7 @@ public:
// Get the screen position of the application window.
nsIntPoint GetWindowPosition();
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD StartPluginIME(const mozilla::WidgetKeyboardEvent& aKeyboardEvent,
int32_t aPanelX, int32_t aPanelY,
@ -226,13 +226,13 @@ public:
const nsAString& aCharacters,
const nsAString& aUnmodifiedCharacters,
nsIObserver* aObserver) override;
virtual nsresult SynthesizeNativeMouseEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
uint32_t aModifierFlags,
nsIObserver* aObserver) override;
virtual nsresult SynthesizeNativeMouseMove(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseMove(LayoutDeviceIntPoint aPoint,
nsIObserver* aObserver) override;
virtual nsresult SynthesizeNativeMouseScrollEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseScrollEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
double aDeltaX,
double aDeltaY,
@ -275,9 +275,9 @@ private:
bool CacheEditorRect();
bool CacheCompositionRects(uint32_t& aStartOffset,
nsTArray<mozilla::LayoutDeviceIntRect>& aRectArray,
nsTArray<LayoutDeviceIntRect>& aRectArray,
uint32_t& aTargetCauseOffset);
bool GetCaretRect(mozilla::LayoutDeviceIntRect& aCaretRect, uint32_t aCaretOffset);
bool GetCaretRect(LayoutDeviceIntRect& aCaretRect, uint32_t aCaretOffset);
uint32_t GetCaretOffset();
nsIWidgetListener* GetCurrentWidgetListener();

Просмотреть файл

@ -64,7 +64,7 @@ public:
void OnSizeChanged(const mozilla::gfx::IntSize& aSize);
void InitEvent(mozilla::WidgetGUIEvent& event,
mozilla::LayoutDeviceIntPoint* aPoint = 0);
LayoutDeviceIntPoint* aPoint = 0);
//
// nsIWidget
@ -105,8 +105,8 @@ public:
virtual bool IsEnabled() const override;
NS_IMETHOD Invalidate(const nsIntRect &aRect) override;
NS_IMETHOD SetFocus(bool aRaise = false) override;
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) override;
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset() override;
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) override;
virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
nsEventStatus& aStatus) override;
nsEventStatus DispatchEvent(mozilla::WidgetGUIEvent* aEvent);

Просмотреть файл

@ -378,9 +378,9 @@ public:
NS_IMETHOD Enable(bool aState) override;
virtual bool IsEnabled() const override;
NS_IMETHOD SetFocus(bool aRaise) override;
NS_IMETHOD GetBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetClientBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetClientBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) override;
// Returns the "backing scale factor" of the view's window, which is the
// ratio of pixels in the window's backing store to Cocoa points. Prior to
@ -402,7 +402,7 @@ public:
virtual void* GetNativeData(uint32_t aDataType) override;
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations) override;
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset() override;
virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
virtual bool ShowsResizeIndicator(nsIntRect* aResizerRect) override;
static bool ConvertStatus(nsEventStatus aStatus)
@ -456,15 +456,15 @@ public:
const nsAString& aUnmodifiedCharacters,
nsIObserver* aObserver) override;
virtual nsresult SynthesizeNativeMouseEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
uint32_t aModifierFlags,
nsIObserver* aObserver) override;
virtual nsresult SynthesizeNativeMouseMove(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseMove(LayoutDeviceIntPoint aPoint,
nsIObserver* aObserver) override
{ return SynthesizeNativeMouseEvent(aPoint, NSMouseMoved, 0, aObserver); }
virtual nsresult SynthesizeNativeMouseScrollEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseScrollEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
double aDeltaX,
double aDeltaY,
@ -551,7 +551,7 @@ public:
bool IsPluginFocused() { return mPluginFocused; }
virtual mozilla::LayoutDeviceIntPoint GetClientOffset() override;
virtual LayoutDeviceIntPoint GetClientOffset() override;
void DispatchAPZWheelInputEvent(mozilla::InputData& aEvent, bool aCanTriggerSwipe);

Просмотреть файл

@ -270,10 +270,10 @@ public:
NS_IMETHOD SetModal(bool aState) override;
virtual bool IsVisible() const override;
NS_IMETHOD SetFocus(bool aState=false) override;
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset() override;
virtual mozilla::LayoutDeviceIntPoint GetClientOffset() override;
virtual mozilla::LayoutDeviceIntSize
ClientToWindowSize(const mozilla::LayoutDeviceIntSize& aClientSize) override;
virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
virtual LayoutDeviceIntPoint GetClientOffset() override;
virtual LayoutDeviceIntSize
ClientToWindowSize(const LayoutDeviceIntSize& aClientSize) override;
virtual void* GetNativeData(uint32_t aDataType) override;
@ -307,8 +307,8 @@ public:
NS_IMETHOD Resize(double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD GetClientBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetClientBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) override;
void ReportMoveEvent();
void ReportSizeEvent();
NS_IMETHOD SetCursor(nsCursor aCursor) override;
@ -340,11 +340,11 @@ public:
virtual void SetWindowAnimationType(WindowAnimationType aType) override;
virtual void SetDrawsTitle(bool aDrawTitle) override;
virtual void SetUseBrightTitlebarForeground(bool aBrightForeground) override;
NS_IMETHOD SetNonClientMargins(mozilla::LayoutDeviceIntMargin &margins) override;
NS_IMETHOD SetNonClientMargins(LayoutDeviceIntMargin& aMargins) override;
NS_IMETHOD SetWindowTitlebarColor(nscolor aColor, bool aActive) override;
virtual void SetDrawsInTitlebar(bool aState) override;
virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) override;
virtual nsresult SynthesizeNativeMouseEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
uint32_t aModifierFlags,
nsIObserver* aObserver) override;

Просмотреть файл

@ -78,7 +78,7 @@ public:
{
return NS_OK;
}
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset();
virtual LayoutDeviceIntPoint WidgetToScreenOffset();
void DispatchTouchInputViaAPZ(mozilla::MultiTouchInput& aInput);
void DispatchTouchEventForAPZ(const mozilla::MultiTouchInput& aInput,
const ScrollableLayerGuid& aGuid,
@ -123,7 +123,7 @@ public:
virtual uint32_t GetGLFrameBufferFormat() override;
virtual mozilla::LayoutDeviceIntRect GetNaturalBounds() override;
virtual LayoutDeviceIntRect GetNaturalBounds() override;
virtual bool NeedsPaint();
virtual Composer2D* GetComposer2D() override;

Просмотреть файл

@ -131,10 +131,10 @@ public:
NS_IMETHOD SetSizeMode(nsSizeMode aMode) override;
NS_IMETHOD Enable(bool aState) override;
NS_IMETHOD SetFocus(bool aRaise = false) override;
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetClientBounds(mozilla::LayoutDeviceIntRect &aRect) override;
virtual mozilla::LayoutDeviceIntSize GetClientSize() override;
virtual mozilla::LayoutDeviceIntPoint GetClientOffset() override;
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetClientBounds(LayoutDeviceIntRect& aRect) override;
virtual LayoutDeviceIntSize GetClientSize() override;
virtual LayoutDeviceIntPoint GetClientOffset() override;
NS_IMETHOD SetCursor(nsCursor aCursor) override;
NS_IMETHOD SetCursor(imgIContainer* aCursor,
uint32_t aHotspotX, uint32_t aHotspotY) override;
@ -144,7 +144,7 @@ public:
NS_IMETHOD SetTitle(const nsAString& aTitle) override;
NS_IMETHOD SetIcon(const nsAString& aIconSpec) override;
NS_IMETHOD SetWindowClass(const nsAString& xulWinType) override;
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset() override;
virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
NS_IMETHOD EnableDragDrop(bool aEnable) override;
NS_IMETHOD CaptureMouse(bool aCapture) override;
NS_IMETHOD CaptureRollupEvents(nsIRollupListener *aListener,
@ -227,7 +227,7 @@ private:
void NativeShow (bool aAction);
void SetHasMappedToplevel(bool aState);
mozilla::LayoutDeviceIntSize GetSafeWindowSize(mozilla::LayoutDeviceIntSize aSize);
LayoutDeviceIntSize GetSafeWindowSize(LayoutDeviceIntSize aSize);
void EnsureGrabs (void);
void GrabPointer (guint32 aTime);
@ -269,7 +269,7 @@ public:
bool IsDestroyed() { return mIsDestroyed; }
void DispatchDragEvent(mozilla::EventMessage aMsg,
const mozilla::LayoutDeviceIntPoint& aRefPoint,
const LayoutDeviceIntPoint& aRefPoint,
guint aTime);
static void UpdateDragStatus (GdkDragContext *aDragContext,
nsIDragService *aDragService);
@ -317,16 +317,16 @@ public:
#endif
NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent) override;
virtual nsresult SynthesizeNativeMouseEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
uint32_t aModifierFlags,
nsIObserver* aObserver) override;
virtual nsresult SynthesizeNativeMouseMove(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseMove(LayoutDeviceIntPoint aPoint,
nsIObserver* aObserver) override
{ return SynthesizeNativeMouseEvent(aPoint, GDK_MOTION_NOTIFY, 0, aObserver); }
virtual nsresult SynthesizeNativeMouseScrollEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseScrollEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
double aDeltaX,
double aDeltaY,
@ -346,8 +346,8 @@ public:
// From GDK
int GdkCoordToDevicePixels(gint coord);
mozilla::LayoutDeviceIntPoint GdkPointToDevicePixels(GdkPoint point);
mozilla::LayoutDeviceIntPoint GdkEventCoordsToDevicePixels(gdouble x, gdouble y);
LayoutDeviceIntPoint GdkPointToDevicePixels(GdkPoint point);
LayoutDeviceIntPoint GdkEventCoordsToDevicePixels(gdouble x, gdouble y);
nsIntRect GdkRectToDevicePixels(GdkRectangle rect);
protected:

Просмотреть файл

@ -187,15 +187,13 @@ public:
NS_IMETHOD MoveClient(double aX, double aY) override;
NS_IMETHOD ResizeClient(double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD ResizeClient(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD GetBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetClientBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetRestoredBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetNonClientMargins(
mozilla::LayoutDeviceIntMargin &margins) override;
NS_IMETHOD SetNonClientMargins(
mozilla::LayoutDeviceIntMargin &margins) override;
virtual mozilla::LayoutDeviceIntPoint GetClientOffset() override;
NS_IMETHOD GetBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetClientBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetRestoredBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetNonClientMargins(LayoutDeviceIntMargin& aMargins) override;
NS_IMETHOD SetNonClientMargins(LayoutDeviceIntMargin& aMargins) override;
virtual LayoutDeviceIntPoint GetClientOffset() override;
NS_IMETHOD EnableDragDrop(bool aEnable) override;
NS_IMETHOD GetAttention(int32_t aCycleCount) override;
virtual bool HasPendingInputEvent() override;
@ -226,7 +224,7 @@ public:
virtual bool ComputeShouldAccelerate();
NS_IMETHOD GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState) override { return NS_ERROR_NOT_IMPLEMENTED; }
virtual nsIMEUpdatePreference GetIMEUpdatePreference() override { return nsIMEUpdatePreference(); }
NS_IMETHOD OnDefaultButtonLoaded(const mozilla::LayoutDeviceIntRect& aButtonRect) override { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD OnDefaultButtonLoaded(const LayoutDeviceIntRect& aButtonRect) override { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD OverrideSystemMouseScrollSpeed(double aOriginalDeltaX,
double aOriginalDeltaY,
double& aOverriddenDeltaX,
@ -282,8 +280,8 @@ public:
nsPopupLevel PopupLevel() { return mPopupLevel; }
virtual mozilla::LayoutDeviceIntSize
ClientToWindowSize(const mozilla::LayoutDeviceIntSize& aClientSize) override
virtual LayoutDeviceIntSize
ClientToWindowSize(const LayoutDeviceIntSize& aClientSize) override
{
return aClientSize;
}
@ -383,7 +381,7 @@ protected:
return NS_ERROR_UNEXPECTED;
}
virtual nsresult SynthesizeNativeMouseEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
uint32_t aModifierFlags,
nsIObserver* aObserver) override
@ -392,14 +390,14 @@ protected:
return NS_ERROR_UNEXPECTED;
}
virtual nsresult SynthesizeNativeMouseMove(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseMove(LayoutDeviceIntPoint aPoint,
nsIObserver* aObserver) override
{
mozilla::widget::AutoObserverNotifier notifier(aObserver, "mouseevent");
return NS_ERROR_UNEXPECTED;
}
virtual nsresult SynthesizeNativeMouseScrollEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseScrollEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
double aDeltaX,
double aDeltaY,

Просмотреть файл

@ -332,6 +332,10 @@ class nsIWidget : public nsISupports {
typedef mozilla::widget::SizeConstraints SizeConstraints;
typedef mozilla::widget::TextEventDispatcher TextEventDispatcher;
typedef mozilla::CompositorVsyncDispatcher CompositorVsyncDispatcher;
typedef mozilla::LayoutDeviceIntMargin LayoutDeviceIntMargin;
typedef mozilla::LayoutDeviceIntPoint LayoutDeviceIntPoint;
typedef mozilla::LayoutDeviceIntRect LayoutDeviceIntRect;
typedef mozilla::LayoutDeviceIntSize LayoutDeviceIntSize;
// Used in UpdateThemeGeometries.
struct ThemeGeometry {
@ -808,9 +812,9 @@ class nsIWidget : public nsISupports {
* @param aRect On return it holds the x, y, width and height of
* this widget.
*/
NS_IMETHOD GetBounds(mozilla::LayoutDeviceIntRect &aRect) = 0;
NS_IMETHOD GetBoundsUntyped(nsIntRect &aRect) {
mozilla::LayoutDeviceIntRect tmp;
NS_IMETHOD GetBounds(LayoutDeviceIntRect& aRect) = 0;
NS_IMETHOD GetBoundsUntyped(nsIntRect& aRect) {
LayoutDeviceIntRect tmp;
nsresult rv = GetBounds(tmp);
aRect = tmp.ToUnknownRect();
return rv;
@ -826,9 +830,9 @@ class nsIWidget : public nsISupports {
* @param aRect On return it holds the x, y, width and height of
* this widget.
*/
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) = 0;
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect) {
mozilla::LayoutDeviceIntRect tmp;
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) = 0;
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect& aRect) {
LayoutDeviceIntRect tmp;
nsresult rv = GetScreenBounds(tmp);
aRect = tmp.ToUnknownRect();
return rv;
@ -846,7 +850,7 @@ class nsIWidget : public nsISupports {
* @param aRect On return it holds the x, y, width and height of
* this widget.
*/
NS_IMETHOD GetRestoredBounds(mozilla::LayoutDeviceIntRect &aRect) = 0;
NS_IMETHOD GetRestoredBounds(mozilla::LayoutDeviceIntRect& aRect) = 0;
/**
* Get this widget's client area bounds, if the window has a 3D border
@ -860,9 +864,9 @@ class nsIWidget : public nsISupports {
* @param aRect On return it holds the x. y, width and height of
* the client area of this widget.
*/
NS_IMETHOD GetClientBounds(mozilla::LayoutDeviceIntRect &aRect) = 0;
NS_IMETHOD GetClientBoundsUntyped(nsIntRect &aRect) {
mozilla::LayoutDeviceIntRect tmp;
NS_IMETHOD GetClientBounds(mozilla::LayoutDeviceIntRect& aRect) = 0;
NS_IMETHOD GetClientBoundsUntyped(nsIntRect& aRect) {
LayoutDeviceIntRect tmp;
nsresult rv = GetClientBounds(tmp);
aRect = tmp.ToUnknownRect();
return rv;
@ -871,7 +875,7 @@ class nsIWidget : public nsISupports {
/**
* Get the non-client area dimensions of the window.
*/
NS_IMETHOD GetNonClientMargins(mozilla::LayoutDeviceIntMargin &margins) = 0;
NS_IMETHOD GetNonClientMargins(LayoutDeviceIntMargin& aMargins) = 0;
/**
* Sets the non-client area dimensions of the window. Pass -1 to restore
@ -885,22 +889,22 @@ class nsIWidget : public nsISupports {
* dimensions between zero and size < system default.
*
*/
NS_IMETHOD SetNonClientMargins(mozilla::LayoutDeviceIntMargin &margins) = 0;
NS_IMETHOD SetNonClientMargins(LayoutDeviceIntMargin& aMargins) = 0;
/**
* Get the client offset from the window origin.
*
* @return the x and y of the offset.
*/
virtual mozilla::LayoutDeviceIntPoint GetClientOffset() = 0;
virtual LayoutDeviceIntPoint GetClientOffset() = 0;
/**
* Equivalent to GetClientBounds but only returns the size.
*/
virtual mozilla::LayoutDeviceIntSize GetClientSize() {
virtual LayoutDeviceIntSize GetClientSize() {
// Depending on the backend, overloading this method may be useful if
// requesting the client offset is expensive.
mozilla::LayoutDeviceIntRect rect;
LayoutDeviceIntRect rect;
GetClientBounds(rect);
return rect.Size();
}
@ -996,7 +1000,7 @@ class nsIWidget : public nsISupports {
nsCOMPtr<nsIWidget> mChild;
uintptr_t mWindowID; // e10s specific, the unique plugin port id
bool mVisible; // e10s specific, widget visibility
mozilla::LayoutDeviceIntRect mBounds;
LayoutDeviceIntRect mBounds;
nsTArray<nsIntRect> mClipRegion;
};
@ -1358,15 +1362,15 @@ class nsIWidget : public nsISupports {
*
* @return screen coordinates stored in the x,y members
*/
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset() = 0;
virtual LayoutDeviceIntPoint WidgetToScreenOffset() = 0;
/**
* Given the specified client size, return the corresponding window size,
* which includes the area for the borders and titlebar. This method
* should work even when the window is not yet visible.
*/
virtual mozilla::LayoutDeviceIntSize ClientToWindowSize(
const mozilla::LayoutDeviceIntSize& aClientSize) = 0;
virtual LayoutDeviceIntSize ClientToWindowSize(
const LayoutDeviceIntSize& aClientSize) = 0;
/**
* Dispatches an event to the widget
@ -1569,7 +1573,7 @@ class nsIWidget : public nsISupports {
* @param aObserver the observer that will get notified once the events
* have been dispatched.
*/
virtual nsresult SynthesizeNativeMouseEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
uint32_t aModifierFlags,
nsIObserver* aObserver) = 0;
@ -1580,7 +1584,7 @@ class nsIWidget : public nsISupports {
* @param aObserver the observer that will get notified once the events
* have been dispatched.
*/
virtual nsresult SynthesizeNativeMouseMove(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseMove(LayoutDeviceIntPoint aPoint,
nsIObserver* aObserver) = 0;
/**
@ -1606,7 +1610,7 @@ class nsIWidget : public nsISupports {
* @param aObserver The observer that will get notified once the
* events have been dispatched.
*/
virtual nsresult SynthesizeNativeMouseScrollEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseScrollEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
double aDeltaX,
double aDeltaY,
@ -1844,7 +1848,7 @@ public:
* Call this method when a dialog is opened which has a default button.
* The button's rectangle should be supplied in aButtonRect.
*/
NS_IMETHOD OnDefaultButtonLoaded(const mozilla::LayoutDeviceIntRect& aButtonRect) = 0;
NS_IMETHOD OnDefaultButtonLoaded(const LayoutDeviceIntRect& aButtonRect) = 0;
/**
* Compute the overridden system mouse scroll speed on the root content of
@ -1936,7 +1940,7 @@ public:
if (!IsVisible()) {
return false;
}
mozilla::LayoutDeviceIntRect bounds;
LayoutDeviceIntRect bounds;
nsresult rv = GetBounds(bounds);
NS_ENSURE_SUCCESS(rv, false);
return !bounds.IsEmpty();
@ -1954,8 +1958,8 @@ public:
* about this. If you're not an agent of the compositor, you
* probably shouldn't call this method.
*/
virtual mozilla::LayoutDeviceIntRect GetNaturalBounds() {
mozilla::LayoutDeviceIntRect bounds;
virtual LayoutDeviceIntRect GetNaturalBounds() {
LayoutDeviceIntRect bounds;
GetBounds(bounds);
return bounds;
}

Просмотреть файл

@ -119,7 +119,7 @@ public:
{
return NS_OK;
}
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset();
virtual LayoutDeviceIntPoint WidgetToScreenOffset();
NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
nsEventStatus& aStatus);
NS_IMETHOD CaptureRollupEvents(nsIRollupListener *aListener,
@ -178,7 +178,7 @@ private:
void DispatchDeactivateEvent(void);
void DispatchActivateEventOnTopLevelWindow(void);
void DispatchDeactivateEventOnTopLevelWindow(void);
void DispatchResizeEvent(mozilla::LayoutDeviceIntRect &aRect,
void DispatchResizeEvent(LayoutDeviceIntRect &aRect,
nsEventStatus &aStatus);
// Remember the last sizemode so that we can restore it when
@ -203,7 +203,7 @@ public:
nsIWidget *aWidget,
bool aActivate);
NS_IMETHOD SetSizeMode(nsSizeMode aMode);
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD SetHasTransparentBackground(bool aTransparent);
NS_IMETHOD GetHasTransparentBackground(bool& aTransparent);
NS_IMETHOD HideWindowChrome(bool aShouldHide);

Просмотреть файл

@ -47,7 +47,7 @@ public:
return mVisible;
}
NS_IMETHOD SetFocus(bool aState=false) override;
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset() override;
virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
virtual void SetBackgroundColor(const nscolor &aColor) override;
virtual void* GetNativeData(uint32_t aDataType) override;
@ -61,7 +61,7 @@ public:
void EnteredFullScreen(bool aFullScreen);
NS_IMETHOD Resize(double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) override;
void ReportMoveEvent();
void ReportSizeEvent();
void ReportSizeModeEvent(nsSizeMode aMode);

Просмотреть файл

@ -81,7 +81,7 @@ public:
// nsWindowBase
virtual void InitEvent(mozilla::WidgetGUIEvent& aEvent,
mozilla::LayoutDeviceIntPoint* aPoint = nullptr) override;
LayoutDeviceIntPoint* aPoint = nullptr) override;
virtual bool DispatchWindowEvent(mozilla::WidgetGUIEvent* aEvent) override;
virtual bool DispatchKeyboardEvent(mozilla::WidgetKeyboardEvent* aEvent) override;
virtual bool DispatchWheelEvent(mozilla::WidgetWheelEvent* aEvent) override;
@ -116,12 +116,12 @@ public:
NS_IMETHOD Enable(bool aState);
virtual bool IsEnabled() const;
NS_IMETHOD SetFocus(bool aRaise);
NS_IMETHOD GetBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetRestoredBounds(mozilla::LayoutDeviceIntRect &aRect) override;
NS_IMETHOD GetClientBounds(mozilla::LayoutDeviceIntRect &aRect) override;
virtual mozilla::LayoutDeviceIntPoint GetClientOffset() override;
void SetBackgroundColor(const nscolor &aColor);
NS_IMETHOD GetBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetRestoredBounds(LayoutDeviceIntRect& aRect) override;
NS_IMETHOD GetClientBounds(LayoutDeviceIntRect& aRect) override;
virtual LayoutDeviceIntPoint GetClientOffset() override;
void SetBackgroundColor(const nscolor& aColor);
NS_IMETHOD SetCursor(imgIContainer* aCursor,
uint32_t aHotspotX, uint32_t aHotspotY);
NS_IMETHOD SetCursor(nsCursor aCursor);
@ -142,8 +142,8 @@ public:
virtual void FreeNativeData(void * data, uint32_t aDataType);
NS_IMETHOD SetTitle(const nsAString& aTitle);
NS_IMETHOD SetIcon(const nsAString& aIconSpec);
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset();
virtual mozilla::LayoutDeviceIntSize ClientToWindowSize(const mozilla::LayoutDeviceIntSize& aClientSize) override;
virtual LayoutDeviceIntPoint WidgetToScreenOffset();
virtual LayoutDeviceIntSize ClientToWindowSize(const LayoutDeviceIntSize& aClientSize) override;
NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
nsEventStatus& aStatus);
NS_IMETHOD EnableDragDrop(bool aEnable);
@ -156,7 +156,7 @@ public:
LayersBackend aBackendHint = mozilla::layers::LayersBackend::LAYERS_NONE,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr);
NS_IMETHOD OnDefaultButtonLoaded(const mozilla::LayoutDeviceIntRect& aButtonRect) override;
NS_IMETHOD OnDefaultButtonLoaded(const LayoutDeviceIntRect& aButtonRect) override;
NS_IMETHOD OverrideSystemMouseScrollSpeed(double aOriginalDeltaX,
double aOriginalDeltaY,
double& aOverriddenDeltaX,
@ -168,16 +168,16 @@ public:
const nsAString& aCharacters,
const nsAString& aUnmodifiedCharacters,
nsIObserver* aObserver) override;
virtual nsresult SynthesizeNativeMouseEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
uint32_t aModifierFlags,
nsIObserver* aObserver) override;
virtual nsresult SynthesizeNativeMouseMove(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseMove(LayoutDeviceIntPoint aPoint,
nsIObserver* aObserver) override
{ return SynthesizeNativeMouseEvent(aPoint, MOUSEEVENTF_MOVE, 0, aObserver); }
virtual nsresult SynthesizeNativeMouseScrollEvent(mozilla::LayoutDeviceIntPoint aPoint,
virtual nsresult SynthesizeNativeMouseScrollEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
double aDeltaX,
double aDeltaY,
@ -195,10 +195,8 @@ public:
virtual void UpdateOpaqueRegion(const nsIntRegion& aOpaqueRegion);
#endif // MOZ_XUL
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
NS_IMETHOD GetNonClientMargins(
mozilla::LayoutDeviceIntMargin &margins) override;
NS_IMETHOD SetNonClientMargins(
mozilla::LayoutDeviceIntMargin &margins) override;
NS_IMETHOD GetNonClientMargins(LayoutDeviceIntMargin& aMargins) override;
NS_IMETHOD SetNonClientMargins(LayoutDeviceIntMargin& aMargins) override;
void SetDrawsInTitlebar(bool aState);
already_AddRefed<mozilla::gfx::DrawTarget> StartRemoteDrawing() override;
virtual void EndRemoteDrawing() override;
@ -517,11 +515,11 @@ protected:
// Non-client margin settings
// Pre-calculated outward offset applied to default frames
mozilla::LayoutDeviceIntMargin mNonClientOffset;
LayoutDeviceIntMargin mNonClientOffset;
// Margins set by the owner
mozilla::LayoutDeviceIntMargin mNonClientMargins;
LayoutDeviceIntMargin mNonClientMargins;
// Margins we'd like to set once chrome is reshown:
mozilla::LayoutDeviceIntMargin mFutureMarginsOnceChromeShows;
LayoutDeviceIntMargin mFutureMarginsOnceChromeShows;
// Indicates we need to apply margins once toggling chrome into showing:
bool mFutureMarginsToUse;

Просмотреть файл

@ -43,7 +43,7 @@ public:
* @param aPoint message position in physical coordinates.
*/
virtual void InitEvent(mozilla::WidgetGUIEvent& aEvent,
mozilla::LayoutDeviceIntPoint* aPoint = nullptr) = 0;
LayoutDeviceIntPoint* aPoint = nullptr) = 0;
/*
* Dispatch a gecko event for this widget.