Bug 1123844: Add MOZ_OVERRIDE annotations (and a few 'virtual' annotations) where appropriate, for headers used in widget/gtk. r=karlt

This commit is contained in:
Daniel Holbert 2015-01-20 13:39:44 -08:00
Родитель b9ad37e5ba
Коммит 95a73f1e45
13 изменённых файлов: 201 добавлений и 187 удалений

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

@ -32,20 +32,21 @@ public:
CreateOffscreenSurface(const IntSize& size,
gfxContentType contentType) MOZ_OVERRIDE;
mozilla::TemporaryRef<mozilla::gfx::ScaledFont>
GetScaledFontForFont(mozilla::gfx::DrawTarget* aTarget, gfxFont *aFont);
virtual mozilla::TemporaryRef<mozilla::gfx::ScaledFont>
GetScaledFontForFont(mozilla::gfx::DrawTarget* aTarget, gfxFont *aFont) MOZ_OVERRIDE;
nsresult GetFontList(nsIAtom *aLangGroup,
const nsACString& aGenericFamily,
nsTArray<nsString>& aListOfFonts);
virtual nsresult GetFontList(nsIAtom *aLangGroup,
const nsACString& aGenericFamily,
nsTArray<nsString>& aListOfFonts) MOZ_OVERRIDE;
nsresult UpdateFontList();
virtual nsresult UpdateFontList() MOZ_OVERRIDE;
nsresult GetStandardFamilyName(const nsAString& aFontName, nsAString& aFamilyName);
virtual nsresult GetStandardFamilyName(const nsAString& aFontName,
nsAString& aFamilyName) MOZ_OVERRIDE;
gfxFontGroup *CreateFontGroup(const mozilla::FontFamilyList& aFontFamilyList,
const gfxFontStyle *aStyle,
gfxUserFontSet *aUserFontSet);
virtual gfxFontGroup* CreateFontGroup(const mozilla::FontFamilyList& aFontFamilyList,
const gfxFontStyle *aStyle,
gfxUserFontSet *aUserFontSet) MOZ_OVERRIDE;
/**
* Look up a local platform font using the full font face name (needed to
@ -54,7 +55,7 @@ public:
virtual gfxFontEntry* LookupLocalFont(const nsAString& aFontName,
uint16_t aWeight,
int16_t aStretch,
bool aItalic);
bool aItalic) MOZ_OVERRIDE;
/**
* Activate a platform font (needed to support @font-face src url() )
@ -65,14 +66,14 @@ public:
int16_t aStretch,
bool aItalic,
const uint8_t* aFontData,
uint32_t aLength);
uint32_t aLength) MOZ_OVERRIDE;
/**
* Check whether format is supported on a platform or not (if unclear,
* returns true).
*/
virtual bool IsFontFormatSupported(nsIURI *aFontURI,
uint32_t aFormatFlags);
uint32_t aFormatFlags) MOZ_OVERRIDE;
#if (MOZ_WIDGET_GTK == 2)
static void SetGdkDrawable(cairo_surface_t *target,
@ -104,15 +105,16 @@ public:
#endif
}
virtual gfxImageFormat GetOffscreenFormat();
virtual gfxImageFormat GetOffscreenFormat() MOZ_OVERRIDE;
virtual int GetScreenDepth() const;
virtual int GetScreenDepth() const MOZ_OVERRIDE;
protected:
static gfxFontconfigUtils *sFontconfigUtils;
private:
virtual void GetPlatformCMSOutputProfile(void *&mem, size_t &size);
virtual void GetPlatformCMSOutputProfile(void *&mem,
size_t &size) MOZ_OVERRIDE;
#ifdef MOZ_X11
static bool sUseXRender;

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

@ -51,10 +51,11 @@ public:
virtual ~gfxXlibSurface();
virtual already_AddRefed<gfxASurface>
CreateSimilarSurface(gfxContentType aType, const gfxIntSize& aSize);
CreateSimilarSurface(gfxContentType aType,
const gfxIntSize& aSize) MOZ_OVERRIDE;
virtual void Finish() MOZ_OVERRIDE;
virtual const gfxIntSize GetSize() const;
virtual const gfxIntSize GetSize() const MOZ_OVERRIDE;
Display* XDisplay() { return mDisplay; }
Screen* XScreen();
@ -80,7 +81,7 @@ public:
// This surface is a wrapper around X pixmaps, which are stored in the X
// server, not the main application.
virtual gfxMemoryLocation GetMemoryLocation() const;
virtual gfxMemoryLocation GetMemoryLocation() const MOZ_OVERRIDE;
#if defined(GL_PROVIDER_GLX)
GLXPixmap GetGLXPixmap();

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

@ -19,34 +19,34 @@ public:
// We only declare the subset of nsIGfxInfo that we actually implement. The
// rest is brought forward from GfxInfoBase.
NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID);
NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID);
NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled) MOZ_OVERRIDE;
NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled) MOZ_OVERRIDE;
NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion) MOZ_OVERRIDE;
NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) MOZ_OVERRIDE;
NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate) MOZ_OVERRIDE;
NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active) MOZ_OVERRIDE;
using GfxInfoBase::GetFeatureStatus;
using GfxInfoBase::GetFeatureSuggestedDriverVersion;
using GfxInfoBase::GetWebGLParameter;
virtual nsresult Init();
virtual nsresult Init() MOZ_OVERRIDE;
NS_IMETHOD_(void) GetData();
NS_IMETHOD_(void) GetData() MOZ_OVERRIDE;
#ifdef DEBUG
NS_DECL_ISUPPORTS_INHERITED
@ -60,8 +60,8 @@ protected:
int32_t *aStatus,
nsAString & aSuggestedDriverVersion,
const nsTArray<GfxDriverInfo>& aDriverInfo,
OperatingSystem* aOS = nullptr);
virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo();
OperatingSystem* aOS = nullptr) MOZ_OVERRIDE;
virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo() MOZ_OVERRIDE;
private:
nsCString mVendor;

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

@ -30,7 +30,8 @@ public:
static WakeLockListener* GetSingleton(bool aCreate = true);
static void Shutdown();
nsresult Callback(const nsAString& topic, const nsAString& state);
virtual nsresult Callback(const nsAString& topic,
const nsAString& state) MOZ_OVERRIDE;
private:
WakeLockListener();

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

@ -34,13 +34,15 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD GetSurfaceForPrinter(gfxASurface **surface);
NS_IMETHOD GetSurfaceForPrinter(gfxASurface **surface) MOZ_OVERRIDE;
NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview);
NS_IMETHOD BeginDocument(const nsAString& aTitle, char16_t * aPrintToFileName, int32_t aStartPage, int32_t aEndPage);
NS_IMETHOD EndDocument();
NS_IMETHOD BeginPage() { return NS_OK; }
NS_IMETHOD EndPage() { return NS_OK; }
NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS,
bool aIsPrintPreview) MOZ_OVERRIDE;
NS_IMETHOD BeginDocument(const nsAString& aTitle, char16_t * aPrintToFileName,
int32_t aStartPage, int32_t aEndPage) MOZ_OVERRIDE;
NS_IMETHOD EndDocument() MOZ_OVERRIDE;
NS_IMETHOD BeginPage() MOZ_OVERRIDE { return NS_OK; }
NS_IMETHOD EndPage() MOZ_OVERRIDE { return NS_OK; }
NS_IMETHOD GetPath (const char **aPath);
static nsresult GetPrintMethod(const char *aPrinter, PrintMethod &aMethod);

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

@ -62,17 +62,18 @@ public:
NS_IMETHOD InvokeDragSession (nsIDOMNode *aDOMNode,
nsISupportsArray * anArrayTransferables,
nsIScriptableRegion * aRegion,
uint32_t aActionType);
NS_IMETHOD StartDragSession();
NS_IMETHOD EndDragSession(bool aDoneDrag);
uint32_t aActionType) MOZ_OVERRIDE;
NS_IMETHOD StartDragSession() MOZ_OVERRIDE;
NS_IMETHOD EndDragSession(bool aDoneDrag) MOZ_OVERRIDE;
// nsIDragSession
NS_IMETHOD SetCanDrop (bool aCanDrop);
NS_IMETHOD GetCanDrop (bool *aCanDrop);
NS_IMETHOD GetNumDropItems (uint32_t * aNumItems);
NS_IMETHOD SetCanDrop (bool aCanDrop) MOZ_OVERRIDE;
NS_IMETHOD GetCanDrop (bool *aCanDrop) MOZ_OVERRIDE;
NS_IMETHOD GetNumDropItems (uint32_t * aNumItems) MOZ_OVERRIDE;
NS_IMETHOD GetData (nsITransferable * aTransferable,
uint32_t aItemIndex);
NS_IMETHOD IsDataFlavorSupported (const char *aDataFlavor, bool *_retval);
uint32_t aItemIndex) MOZ_OVERRIDE;
NS_IMETHOD IsDataFlavorSupported (const char *aDataFlavor,
bool *_retval) MOZ_OVERRIDE;
// Methods called from nsWindow to handle responding to GTK drag
// destination signals

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

@ -24,22 +24,24 @@ public:
NS_DECL_ISUPPORTS
// nsIFilePicker (less what's in nsBaseFilePicker)
NS_IMETHOD Open(nsIFilePickerShownCallback *aCallback);
NS_IMETHODIMP AppendFilters(int32_t aFilterMask);
NS_IMETHODIMP AppendFilter(const nsAString& aTitle, const nsAString& aFilter);
NS_IMETHODIMP SetDefaultString(const nsAString& aString);
NS_IMETHODIMP GetDefaultString(nsAString& aString);
NS_IMETHODIMP SetDefaultExtension(const nsAString& aExtension);
NS_IMETHODIMP GetDefaultExtension(nsAString& aExtension);
NS_IMETHODIMP GetFilterIndex(int32_t *aFilterIndex);
NS_IMETHODIMP SetFilterIndex(int32_t aFilterIndex);
NS_IMETHODIMP GetFile(nsIFile **aFile);
NS_IMETHODIMP GetFileURL(nsIURI **aFileURL);
NS_IMETHODIMP GetFiles(nsISimpleEnumerator **aFiles);
NS_IMETHODIMP Show(int16_t *aReturn);
NS_IMETHOD Open(nsIFilePickerShownCallback *aCallback) MOZ_OVERRIDE;
NS_IMETHODIMP AppendFilters(int32_t aFilterMask) MOZ_OVERRIDE;
NS_IMETHODIMP AppendFilter(const nsAString& aTitle,
const nsAString& aFilter) MOZ_OVERRIDE;
NS_IMETHODIMP SetDefaultString(const nsAString& aString) MOZ_OVERRIDE;
NS_IMETHODIMP GetDefaultString(nsAString& aString) MOZ_OVERRIDE;
NS_IMETHODIMP SetDefaultExtension(const nsAString& aExtension) MOZ_OVERRIDE;
NS_IMETHODIMP GetDefaultExtension(nsAString& aExtension) MOZ_OVERRIDE;
NS_IMETHODIMP GetFilterIndex(int32_t *aFilterIndex) MOZ_OVERRIDE;
NS_IMETHODIMP SetFilterIndex(int32_t aFilterIndex) MOZ_OVERRIDE;
NS_IMETHODIMP GetFile(nsIFile **aFile) MOZ_OVERRIDE;
NS_IMETHODIMP GetFileURL(nsIURI **aFileURL) MOZ_OVERRIDE;
NS_IMETHODIMP GetFiles(nsISimpleEnumerator **aFiles) MOZ_OVERRIDE;
NS_IMETHODIMP Show(int16_t *aReturn) MOZ_OVERRIDE;
// nsBaseFilePicker
virtual void InitNative(nsIWidget *aParent, const nsAString& aTitle);
virtual void InitNative(nsIWidget *aParent,
const nsAString& aTitle) MOZ_OVERRIDE;
static void Shutdown();

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

@ -27,7 +27,7 @@ class nsIdleServiceGTK : public nsIdleService
public:
NS_DECL_ISUPPORTS_INHERITED
bool PollIdleTime(uint32_t* aIdleTime);
virtual bool PollIdleTime(uint32_t* aIdleTime) MOZ_OVERRIDE;
static already_AddRefed<nsIdleServiceGTK> GetInstance()
{
@ -46,7 +46,7 @@ private:
protected:
nsIdleServiceGTK();
bool UsePollMode();
virtual bool UsePollMode() MOZ_OVERRIDE;
};
#endif // nsIdleServiceGTK_h__

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

@ -20,7 +20,7 @@ class nsImageToPixbuf MOZ_FINAL : public nsIImageToPixbuf {
public:
NS_DECL_ISUPPORTS
NS_IMETHOD_(GdkPixbuf*) ConvertImageToPixbuf(imgIContainer* aImage);
NS_IMETHOD_(GdkPixbuf*) ConvertImageToPixbuf(imgIContainer* aImage) MOZ_OVERRIDE;
// Friendlier version of ConvertImageToPixbuf for callers inside of
// widget

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

@ -27,42 +27,45 @@ public:
NS_IMETHOD DrawWidgetBackground(nsRenderingContext* aContext,
nsIFrame* aFrame, uint8_t aWidgetType,
const nsRect& aRect,
const nsRect& aDirtyRect);
const nsRect& aDirtyRect) MOZ_OVERRIDE;
NS_IMETHOD GetWidgetBorder(nsDeviceContext* aContext, nsIFrame* aFrame,
uint8_t aWidgetType, nsIntMargin* aResult);
uint8_t aWidgetType,
nsIntMargin* aResult) MOZ_OVERRIDE;
virtual bool GetWidgetPadding(nsDeviceContext* aContext,
nsIFrame* aFrame,
uint8_t aWidgetType,
nsIntMargin* aResult);
nsIFrame* aFrame,
uint8_t aWidgetType,
nsIntMargin* aResult) MOZ_OVERRIDE;
virtual bool GetWidgetOverflow(nsDeviceContext* aContext,
nsIFrame* aFrame,
uint8_t aWidgetType,
nsRect* aOverflowRect);
nsIFrame* aFrame,
uint8_t aWidgetType,
nsRect* aOverflowRect) MOZ_OVERRIDE;
NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext,
nsIFrame* aFrame, uint8_t aWidgetType,
nsIntSize* aResult, bool* aIsOverridable);
nsIntSize* aResult,
bool* aIsOverridable) MOZ_OVERRIDE;
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, uint8_t aWidgetType,
nsIAtom* aAttribute, bool* aShouldRepaint);
nsIAtom* aAttribute,
bool* aShouldRepaint) MOZ_OVERRIDE;
NS_IMETHOD ThemeChanged();
NS_IMETHOD ThemeChanged() MOZ_OVERRIDE;
NS_IMETHOD_(bool) ThemeSupportsWidget(nsPresContext* aPresContext,
nsIFrame* aFrame,
uint8_t aWidgetType);
nsIFrame* aFrame,
uint8_t aWidgetType) MOZ_OVERRIDE;
NS_IMETHOD_(bool) WidgetIsContainer(uint8_t aWidgetType);
NS_IMETHOD_(bool) WidgetIsContainer(uint8_t aWidgetType) MOZ_OVERRIDE;
NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
bool ThemeNeedsComboboxDropmarker();
virtual bool ThemeNeedsComboboxDropmarker() MOZ_OVERRIDE;
virtual Transparency GetWidgetTransparency(nsIFrame* aFrame,
uint8_t aWidgetType);
uint8_t aWidgetType) MOZ_OVERRIDE;
nsNativeThemeGTK();

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

@ -29,11 +29,11 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHODIMP Init();
NS_IMETHODIMP Init() MOZ_OVERRIDE;
NS_IMETHODIMP Show(nsIDOMWindow *aParent, nsIPrintSettings *aSettings,
nsIWebBrowserPrint *aWebBrowserPrint);
nsIWebBrowserPrint *aWebBrowserPrint) MOZ_OVERRIDE;
NS_IMETHODIMP ShowPageSetup(nsIDOMWindow *aParent,
nsIPrintSettings *aSettings);
nsIPrintSettings *aSettings) MOZ_OVERRIDE;
};
#endif

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

@ -48,70 +48,70 @@ public:
// If not printing the selection, this is stored in the GtkPrintSettings. Printing the
// selection is stored as a protected boolean (mPrintSelectionOnly).
NS_IMETHOD GetPrintRange(int16_t *aPrintRange);
NS_IMETHOD SetPrintRange(int16_t aPrintRange);
NS_IMETHOD GetPrintRange(int16_t *aPrintRange) MOZ_OVERRIDE;
NS_IMETHOD SetPrintRange(int16_t aPrintRange) MOZ_OVERRIDE;
// The page range is stored as as single range in the GtkPrintSettings object.
NS_IMETHOD GetStartPageRange(int32_t *aStartPageRange);
NS_IMETHOD SetStartPageRange(int32_t aStartPageRange);
NS_IMETHOD GetEndPageRange(int32_t *aEndPageRange);
NS_IMETHOD SetEndPageRange(int32_t aEndPageRange);
NS_IMETHOD GetStartPageRange(int32_t *aStartPageRange) MOZ_OVERRIDE;
NS_IMETHOD SetStartPageRange(int32_t aStartPageRange) MOZ_OVERRIDE;
NS_IMETHOD GetEndPageRange(int32_t *aEndPageRange) MOZ_OVERRIDE;
NS_IMETHOD SetEndPageRange(int32_t aEndPageRange) MOZ_OVERRIDE;
// Reversed, color, orientation and file name are all stored in the GtkPrintSettings.
// Orientation is also stored in the GtkPageSetup and its setting takes priority when getting the orientation.
NS_IMETHOD GetPrintReversed(bool *aPrintReversed);
NS_IMETHOD SetPrintReversed(bool aPrintReversed);
NS_IMETHOD GetPrintReversed(bool *aPrintReversed) MOZ_OVERRIDE;
NS_IMETHOD SetPrintReversed(bool aPrintReversed) MOZ_OVERRIDE;
NS_IMETHOD GetPrintInColor(bool *aPrintInColor);
NS_IMETHOD SetPrintInColor(bool aPrintInColor);
NS_IMETHOD GetPrintInColor(bool *aPrintInColor) MOZ_OVERRIDE;
NS_IMETHOD SetPrintInColor(bool aPrintInColor) MOZ_OVERRIDE;
NS_IMETHOD GetOrientation(int32_t *aOrientation);
NS_IMETHOD SetOrientation(int32_t aOrientation);
NS_IMETHOD GetOrientation(int32_t *aOrientation) MOZ_OVERRIDE;
NS_IMETHOD SetOrientation(int32_t aOrientation) MOZ_OVERRIDE;
NS_IMETHOD GetToFileName(char16_t * *aToFileName);
NS_IMETHOD SetToFileName(const char16_t * aToFileName);
NS_IMETHOD GetToFileName(char16_t * *aToFileName) MOZ_OVERRIDE;
NS_IMETHOD SetToFileName(const char16_t * aToFileName) MOZ_OVERRIDE;
// Gets/Sets the printer name in the GtkPrintSettings. If no printer name is specified there,
// you will get back the name of the current internal GtkPrinter.
NS_IMETHOD GetPrinterName(char16_t * *aPrinter);
NS_IMETHOD SetPrinterName(const char16_t * aPrinter);
NS_IMETHOD GetPrinterName(char16_t * *aPrinter) MOZ_OVERRIDE;
NS_IMETHOD SetPrinterName(const char16_t * aPrinter) MOZ_OVERRIDE;
// Number of copies is stored/gotten from the GtkPrintSettings.
NS_IMETHOD GetNumCopies(int32_t *aNumCopies);
NS_IMETHOD SetNumCopies(int32_t aNumCopies);
NS_IMETHOD GetNumCopies(int32_t *aNumCopies) MOZ_OVERRIDE;
NS_IMETHOD SetNumCopies(int32_t aNumCopies) MOZ_OVERRIDE;
NS_IMETHOD GetScaling(double *aScaling);
NS_IMETHOD SetScaling(double aScaling);
NS_IMETHOD GetScaling(double *aScaling) MOZ_OVERRIDE;
NS_IMETHOD SetScaling(double aScaling) MOZ_OVERRIDE;
// A name recognised by GTK is strongly advised here, as this is used to create a GtkPaperSize.
NS_IMETHOD GetPaperName(char16_t * *aPaperName);
NS_IMETHOD SetPaperName(const char16_t * aPaperName);
NS_IMETHOD GetPaperName(char16_t * *aPaperName) MOZ_OVERRIDE;
NS_IMETHOD SetPaperName(const char16_t * aPaperName) MOZ_OVERRIDE;
NS_IMETHOD SetUnwriteableMarginInTwips(nsIntMargin& aUnwriteableMargin);
NS_IMETHOD SetUnwriteableMarginTop(double aUnwriteableMarginTop);
NS_IMETHOD SetUnwriteableMarginLeft(double aUnwriteableMarginLeft);
NS_IMETHOD SetUnwriteableMarginBottom(double aUnwriteableMarginBottom);
NS_IMETHOD SetUnwriteableMarginRight(double aUnwriteableMarginRight);
NS_IMETHOD SetUnwriteableMarginInTwips(nsIntMargin& aUnwriteableMargin) MOZ_OVERRIDE;
NS_IMETHOD SetUnwriteableMarginTop(double aUnwriteableMarginTop) MOZ_OVERRIDE;
NS_IMETHOD SetUnwriteableMarginLeft(double aUnwriteableMarginLeft) MOZ_OVERRIDE;
NS_IMETHOD SetUnwriteableMarginBottom(double aUnwriteableMarginBottom) MOZ_OVERRIDE;
NS_IMETHOD SetUnwriteableMarginRight(double aUnwriteableMarginRight) MOZ_OVERRIDE;
NS_IMETHOD GetPaperWidth(double *aPaperWidth);
NS_IMETHOD SetPaperWidth(double aPaperWidth);
NS_IMETHOD GetPaperWidth(double *aPaperWidth) MOZ_OVERRIDE;
NS_IMETHOD SetPaperWidth(double aPaperWidth) MOZ_OVERRIDE;
NS_IMETHOD GetPaperHeight(double *aPaperHeight);
NS_IMETHOD SetPaperHeight(double aPaperHeight);
NS_IMETHOD GetPaperHeight(double *aPaperHeight) MOZ_OVERRIDE;
NS_IMETHOD SetPaperHeight(double aPaperHeight) MOZ_OVERRIDE;
NS_IMETHOD SetPaperSizeUnit(int16_t aPaperSizeUnit);
NS_IMETHOD SetPaperSizeUnit(int16_t aPaperSizeUnit) MOZ_OVERRIDE;
NS_IMETHOD GetEffectivePageSize(double *aWidth, double *aHeight);
NS_IMETHOD GetEffectivePageSize(double *aWidth, double *aHeight) MOZ_OVERRIDE;
NS_IMETHOD SetupSilentPrinting();
NS_IMETHOD SetupSilentPrinting() MOZ_OVERRIDE;
NS_IMETHOD GetPageRanges(nsTArray<int32_t> &aPages);
NS_IMETHOD GetPageRanges(nsTArray<int32_t> &aPages) MOZ_OVERRIDE;
NS_IMETHOD GetResolution(int32_t *aResolution);
NS_IMETHOD SetResolution(int32_t aResolution);
NS_IMETHOD GetResolution(int32_t *aResolution) MOZ_OVERRIDE;
NS_IMETHOD SetResolution(int32_t aResolution) MOZ_OVERRIDE;
NS_IMETHOD GetDuplex(int32_t *aDuplex);
NS_IMETHOD SetDuplex(int32_t aDuplex);
NS_IMETHOD GetDuplex(int32_t *aDuplex) MOZ_OVERRIDE;
NS_IMETHOD SetDuplex(int32_t aDuplex) MOZ_OVERRIDE;
protected:
virtual ~nsPrintSettingsGTK();
@ -119,8 +119,8 @@ protected:
nsPrintSettingsGTK(const nsPrintSettingsGTK& src);
nsPrintSettingsGTK& operator=(const nsPrintSettingsGTK& rhs);
virtual nsresult _Clone(nsIPrintSettings **_retval);
virtual nsresult _Assign(nsIPrintSettings *aPS);
virtual nsresult _Clone(nsIPrintSettings **_retval) MOZ_OVERRIDE;
virtual nsresult _Assign(nsIPrintSettings *aPS) MOZ_OVERRIDE;
GtkUnit GetGTKUnit(int16_t aGeckoUnit);
void SaveNewPageSize();

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

@ -80,10 +80,10 @@ public:
void CommonCreate(nsIWidget *aParent, bool aListenForResizes);
virtual nsresult DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
nsEventStatus& aStatus);
nsEventStatus& aStatus) MOZ_OVERRIDE;
// called when we are destroyed
void OnDestroy(void);
virtual void OnDestroy(void) MOZ_OVERRIDE;
// called to check and see if a widget's dimensions are sane
bool AreBoundsSane(void);
@ -93,61 +93,62 @@ public:
nsNativeWidget aNativeParent,
const nsIntRect &aRect,
nsDeviceContext *aContext,
nsWidgetInitData *aInitData);
NS_IMETHOD Destroy(void);
virtual nsIWidget *GetParent();
virtual float GetDPI();
virtual nsresult SetParent(nsIWidget* aNewParent);
NS_IMETHOD SetModal(bool aModal);
virtual bool IsVisible() const;
nsWidgetInitData *aInitData) MOZ_OVERRIDE;
NS_IMETHOD Destroy(void) MOZ_OVERRIDE;
virtual nsIWidget *GetParent() MOZ_OVERRIDE;
virtual float GetDPI() MOZ_OVERRIDE;
virtual nsresult SetParent(nsIWidget* aNewParent) MOZ_OVERRIDE;
NS_IMETHOD SetModal(bool aModal) MOZ_OVERRIDE;
virtual bool IsVisible() const MOZ_OVERRIDE;
NS_IMETHOD ConstrainPosition(bool aAllowSlop,
int32_t *aX,
int32_t *aY);
virtual void SetSizeConstraints(const SizeConstraints& aConstraints);
int32_t *aY) MOZ_OVERRIDE;
virtual void SetSizeConstraints(const SizeConstraints& aConstraints) MOZ_OVERRIDE;
NS_IMETHOD Move(double aX,
double aY);
NS_IMETHOD Show (bool aState);
double aY) MOZ_OVERRIDE;
NS_IMETHOD Show (bool aState) MOZ_OVERRIDE;
NS_IMETHOD Resize (double aWidth,
double aHeight,
bool aRepaint);
bool aRepaint) MOZ_OVERRIDE;
NS_IMETHOD Resize (double aX,
double aY,
double aWidth,
double aHeight,
bool aRepaint);
virtual bool IsEnabled() const;
bool aRepaint) MOZ_OVERRIDE;
virtual bool IsEnabled() const MOZ_OVERRIDE;
NS_IMETHOD PlaceBehind(nsTopLevelWidgetZPlacement aPlacement,
nsIWidget *aWidget,
bool aActivate);
void SetZIndex(int32_t aZIndex);
NS_IMETHOD SetSizeMode(int32_t aMode);
NS_IMETHOD Enable(bool aState);
NS_IMETHOD SetFocus(bool aRaise = false);
NS_IMETHOD GetScreenBounds(nsIntRect &aRect);
NS_IMETHOD GetClientBounds(nsIntRect &aRect);
virtual nsIntPoint GetClientOffset();
NS_IMETHOD SetCursor(nsCursor aCursor);
bool aActivate) MOZ_OVERRIDE;
void SetZIndex(int32_t aZIndex) MOZ_OVERRIDE;
NS_IMETHOD SetSizeMode(int32_t aMode) MOZ_OVERRIDE;
NS_IMETHOD Enable(bool aState) MOZ_OVERRIDE;
NS_IMETHOD SetFocus(bool aRaise = false) MOZ_OVERRIDE;
NS_IMETHOD GetScreenBounds(nsIntRect &aRect) MOZ_OVERRIDE;
NS_IMETHOD GetClientBounds(nsIntRect &aRect) MOZ_OVERRIDE;
virtual nsIntPoint GetClientOffset() MOZ_OVERRIDE;
NS_IMETHOD SetCursor(nsCursor aCursor) MOZ_OVERRIDE;
NS_IMETHOD SetCursor(imgIContainer* aCursor,
uint32_t aHotspotX, uint32_t aHotspotY);
NS_IMETHOD Invalidate(const nsIntRect &aRect);
virtual void* GetNativeData(uint32_t aDataType);
NS_IMETHOD SetTitle(const nsAString& aTitle);
NS_IMETHOD SetIcon(const nsAString& aIconSpec);
NS_IMETHOD SetWindowClass(const nsAString& xulWinType);
virtual nsIntPoint WidgetToScreenOffset();
NS_IMETHOD EnableDragDrop(bool aEnable);
NS_IMETHOD CaptureMouse(bool aCapture);
uint32_t aHotspotX, uint32_t aHotspotY) MOZ_OVERRIDE;
NS_IMETHOD Invalidate(const nsIntRect &aRect) MOZ_OVERRIDE;
virtual void* GetNativeData(uint32_t aDataType) MOZ_OVERRIDE;
NS_IMETHOD SetTitle(const nsAString& aTitle) MOZ_OVERRIDE;
NS_IMETHOD SetIcon(const nsAString& aIconSpec) MOZ_OVERRIDE;
NS_IMETHOD SetWindowClass(const nsAString& xulWinType) MOZ_OVERRIDE;
virtual nsIntPoint WidgetToScreenOffset() MOZ_OVERRIDE;
NS_IMETHOD EnableDragDrop(bool aEnable) MOZ_OVERRIDE;
NS_IMETHOD CaptureMouse(bool aCapture) MOZ_OVERRIDE;
NS_IMETHOD CaptureRollupEvents(nsIRollupListener *aListener,
bool aDoCapture);
NS_IMETHOD GetAttention(int32_t aCycleCount);
bool aDoCapture) MOZ_OVERRIDE;
NS_IMETHOD GetAttention(int32_t aCycleCount) MOZ_OVERRIDE;
virtual nsresult SetWindowClipRegion(const nsTArray<nsIntRect>& aRects,
bool aIntersectWithExisting) MOZ_OVERRIDE;
virtual bool HasPendingInputEvent();
virtual bool HasPendingInputEvent() MOZ_OVERRIDE;
NS_IMETHOD MakeFullScreen(bool aFullScreen, nsIScreen* aTargetScreen = nullptr);
NS_IMETHOD HideWindowChrome(bool aShouldHide);
NS_IMETHOD MakeFullScreen(bool aFullScreen,
nsIScreen* aTargetScreen = nullptr) MOZ_OVERRIDE;
NS_IMETHOD HideWindowChrome(bool aShouldHide) MOZ_OVERRIDE;
/**
* GetLastUserInputTime returns a timestamp for the most recent user input
@ -238,8 +239,8 @@ public:
NS_IMETHOD BeginResizeDrag(mozilla::WidgetGUIEvent* aEvent,
int32_t aHorizontal,
int32_t aVertical);
NS_IMETHOD BeginMoveDrag(mozilla::WidgetMouseEvent* aEvent);
int32_t aVertical) MOZ_OVERRIDE;
NS_IMETHOD BeginMoveDrag(mozilla::WidgetMouseEvent* aEvent) MOZ_OVERRIDE;
MozContainer* GetMozContainer() { return mContainer; }
// GetMozContainerWidget returns the MozContainer even for undestroyed
@ -260,9 +261,9 @@ public:
NS_IMETHOD NotifyIME(const IMENotification& aIMENotification) MOZ_OVERRIDE;
NS_IMETHOD_(void) SetInputContext(const InputContext& aContext,
const InputContextAction& aAction);
NS_IMETHOD_(InputContext) GetInputContext();
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
const InputContextAction& aAction) MOZ_OVERRIDE;
NS_IMETHOD_(InputContext) GetInputContext() MOZ_OVERRIDE;
virtual nsIMEUpdatePreference GetIMEUpdatePreference() MOZ_OVERRIDE;
bool ExecuteNativeKeyBindingRemapped(
NativeKeyBindingsType aType,
const mozilla::WidgetKeyboardEvent& aEvent,
@ -275,16 +276,17 @@ public:
const mozilla::WidgetKeyboardEvent& aEvent,
DoCommandCallback aCallback,
void* aCallbackData) MOZ_OVERRIDE;
NS_IMETHOD GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState);
NS_IMETHOD GetToggledKeyState(uint32_t aKeyCode,
bool* aLEDState) MOZ_OVERRIDE;
// These methods are for toplevel windows only.
void ResizeTransparencyBitmap();
void ApplyTransparencyBitmap();
void ClearTransparencyBitmap();
virtual void SetTransparencyMode(nsTransparencyMode aMode);
virtual nsTransparencyMode GetTransparencyMode();
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations);
virtual void SetTransparencyMode(nsTransparencyMode aMode) MOZ_OVERRIDE;
virtual nsTransparencyMode GetTransparencyMode() MOZ_OVERRIDE;
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations) MOZ_OVERRIDE;
nsresult UpdateTranslucentWindowAlphaInternal(const nsIntRect& aRect,
uint8_t* aAlphas, int32_t aStride);
virtual gfxASurface *GetThebesSurface();
@ -293,13 +295,13 @@ public:
static already_AddRefed<gfxASurface> GetSurfaceForGdkDrawable(GdkDrawable* aDrawable,
const nsIntSize& aSize);
#endif
NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent);
NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent) MOZ_OVERRIDE;
virtual nsresult SynthesizeNativeMouseEvent(nsIntPoint aPoint,
uint32_t aNativeMessage,
uint32_t aModifierFlags);
uint32_t aModifierFlags) MOZ_OVERRIDE;
virtual nsresult SynthesizeNativeMouseMove(nsIntPoint aPoint)
virtual nsresult SynthesizeNativeMouseMove(nsIntPoint aPoint) MOZ_OVERRIDE
{ return SynthesizeNativeMouseEvent(aPoint, GDK_MOTION_NOTIFY, 0); }
protected: