Additional signature changes for XPCOM

This commit is contained in:
rods%netscape.com 1998-09-29 16:32:04 +00:00
Родитель c8eeac02cd
Коммит 4e068d8491
4 изменённых файлов: 68 добавлений и 11 удалений

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

@ -104,7 +104,7 @@ NS_METHOD nsDialog::Create(nsNativeWidget aParent,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
return NS_ERORR_FAILURE;
return NS_ERROR_FAILURE;
}
//-------------------------------------------------------------------------

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

@ -241,7 +241,7 @@ PRBool nsFileWidget::Show()
//
//-------------------------------------------------------------------------
NS_METHOD nsFileWidget::GetFilterListArray(nsString& aFilterList)
void nsFileWidget::GetFilterListArray(nsString& aFilterList)
{
aFilterList.SetLength(0);
for (PRUint32 i = 0; i < mNumberOfFilters; i++) {

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

@ -19,6 +19,7 @@
#include "nsWindow.h"
#include "nsIFontMetrics.h"
#include "nsIFontCache.h"
#include "nsFont.h"
#include "nsGUIEvent.h"
#include "nsIRenderingContext.h"
#include "nsIDeviceContext.h"
@ -95,6 +96,8 @@ nsWindow::nsWindow():
mLowerLeft = PR_FALSE;
mCursor = eCursor_standard;
mClientData = nsnull;
mPreferredWidth = 0;
mPreferredHeight = 0;
}
//-------------------------------------------------------------------------
@ -112,12 +115,19 @@ nsWindow::~nsWindow()
}
}
//-------------------------------------------------------------------------
void nsWindow::ConvertToDeviceCoordinates(nscoord &aX, nscoord &aY)
{
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsWindow::WidgetToScreen(const nsRect& aOldRect, nsRect& aNewRect)
{
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsWindow::ScreenToWidget(const nsRect& aOldRect, nsRect& aNewRect)
{
}
@ -608,7 +618,7 @@ nsIEnumerator* nsWindow::GetChildren()
// Add a child to the list of children
//
//-------------------------------------------------------------------------
NS_METHOD nsWindow::AddChild(nsIWidget* aChild)
void nsWindow::AddChild(nsIWidget* aChild)
{
return NS_OK;
}
@ -619,7 +629,7 @@ NS_METHOD nsWindow::AddChild(nsIWidget* aChild)
// Remove a child from the list of children
//
//-------------------------------------------------------------------------
NS_METHOD nsWindow::RemoveChild(nsIWidget* aChild)
void nsWindow::RemoveChild(nsIWidget* aChild)
{
return NS_OK;
}
@ -642,6 +652,13 @@ NS_METHOD nsWindow::Show(PRBool bState)
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsWindow::IsVisible(PRBool & aState)
{
aState = mShown;
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Move this component
@ -740,10 +757,9 @@ NS_METHOD nsWindow::SetFocus(void)
// Get this component dimension
//
//-------------------------------------------------------------------------
NS_METHOD nsWindow::SetBounds(const nsRect &aRect)
void nsWindow::SetBounds(const nsRect &aRect)
{
mBounds = aRect;
return NS_OK;
}
//-------------------------------------------------------------------------
@ -819,8 +835,8 @@ NS_METHOD nsWindow::SetBackgroundColor(const nscolor &aColor)
//-------------------------------------------------------------------------
nsIFontMetrics* nsWindow::GetFont(void)
{
NS_NOTYETIMPLEMENTED("GetFont not yet implemented"); // to be implemented
return nsnull;
NS_NOTYETIMPLEMENTED("GetFont not yet implemented"); // to be implemented
return nsnull;
}
@ -868,6 +884,14 @@ NS_METHOD nsWindow::SetFont(const nsFont &aFont)
printf("****** Error: FontCache is NULL!\n");
return NS_ERROR_FAILURE;
}
// XXX Temporary, should not be caching the font
if (mFont == nsnull) {
mFont = new nsFont(aFont);
} else {
*mFont = aFont;
}
return NS_OK;
}
@ -1543,4 +1567,22 @@ extern "C" void nsWindow_ResizeWidget(Widget w)
win->SetResized(PR_TRUE);
}
NS_METHOD nsWindow::SetMenuBar(nsIMenuBar * aMenuBar)
{
return NS_ERROR_FAILURE;
}
NS_METHOD nsWindow::GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight)
{
aWidth = mPreferredWidth;
aHeight = mPreferredHeight;
return NS_ERROR_FAILURE;
}
NS_METHOD nsWindow::SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight)
{
mPreferredWidth = aWidth;
mPreferredHeight = aHeight;
return NS_OK;
}

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

@ -35,6 +35,8 @@
#include "nsXtManageWidget.h"
class nsFont;
#define NSRGB_2_COLOREF(color) \
RGB(NS_GET_R(color),NS_GET_G(color),NS_GET_B(color))
@ -55,7 +57,7 @@ public:
// nsISupports
NS_DECL_ISUPPORTS
NS_IMETHOD ConvertToDeviceCoordinates(nscoord &aX, nscoord &aY) {};
virtual void ConvertToDeviceCoordinates(nscoord &aX, nscoord &aY);
@ -80,9 +82,11 @@ public:
NS_IMETHOD Destroy();
virtual nsIWidget* GetParent(void);
virtual nsIEnumerator* GetChildren();
NS_IMETHOD AddChild(nsIWidget* aChild);
NS_IMETHOD RemoveChild(nsIWidget* aChild);
virtual void AddChild(nsIWidget* aChild);
virtual void RemoveChild(nsIWidget* aChild);
NS_IMETHOD Show(PRBool bState);
NS_IMETHOD IsVisible(PRBool & aState);
NS_IMETHOD Move(PRUint32 aX, PRUint32 aY);
NS_IMETHOD Resize(PRUint32 aWidth,
PRUint32 aHeight,
@ -122,6 +126,9 @@ public:
NS_IMETHOD AddEventListener(nsIEventListener * aListener);
NS_IMETHOD BeginResizingChildren(void);
NS_IMETHOD EndResizingChildren(void);
NS_IMETHOD SetMenuBar(nsIMenuBar * aMenuBar);
NS_IMETHOD GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight);
NS_IMETHOD SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight);
virtual PRBool IsChild() { return(PR_FALSE); };
@ -205,6 +212,14 @@ protected:
PRBool mDisplayed;
void* mClientData;
// XXX Temporary, should not be caching the font
nsFont * mFont;
PRInt32 mPreferredWidth;
PRInt32 mPreferredHeight;
// Resize event management
nsRect mResizeRect;
int mResized;