зеркало из https://github.com/mozilla/pjs.git
Implemented SetTitle using nsString::ToCString. Will need to revisit when UNICODE window titles are supported.
This commit is contained in:
Родитель
e407cc2ba0
Коммит
cd77623454
|
@ -232,6 +232,21 @@ NS_IMETHODIMP nsMacWindow::Resize(PRUint32 aWidth, PRUint32 aHeight, PRBool aRep
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Set this window's title
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsMacWindow::SetTitle(const nsString& aTitle)
|
||||
{
|
||||
Str255 title;
|
||||
title[0] = aTitle.Length();
|
||||
aTitle.ToCString((char*)title + 1, sizeof(title) - 1);
|
||||
::SetWTitle(mWindowPtr, title);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Handle OS events
|
||||
|
|
|
@ -77,6 +77,8 @@ public:
|
|||
NS_IMETHOD Move(PRUint32 aX, PRUint32 aY);
|
||||
NS_IMETHOD Resize(PRUint32 aWidth,PRUint32 aHeight, PRBool aRepaint);
|
||||
|
||||
NS_IMETHOD SetTitle(const nsString& aTitle);
|
||||
|
||||
virtual PRBool HandleOSEvent(
|
||||
EventRecord& aOSEvent);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче