Backing these out due to dependence on nspr/xpcom.

This commit is contained in:
warren%netscape.com 2000-03-06 00:40:03 +00:00
Родитель debed198de
Коммит b18cccef79
4 изменённых файлов: 108 добавлений и 15 удалений

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

@ -39,7 +39,7 @@ public:
GdkWindow *mDialog;
}; // class nsSplashScreenGtk
NS_IMPL_THREADSAFE_ISUPPORTS0(nsSplashScreenGtk)
NS_IMPL_ISUPPORTS0(nsSplashScreenGtk)
nsSplashScreenGtk::nsSplashScreenGtk()
{

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

@ -30,8 +30,6 @@
class nsSplashScreenMac : public nsISplashScreen {
public:
NS_DECL_ISUPPORTS
nsSplashScreenMac()
: mDialog( 0 ), mPicHandle( 0 ), mRefCnt( 0 ) {
}
@ -42,12 +40,45 @@ public:
NS_IMETHOD Show();
NS_IMETHOD Hide();
// nsISupports methods
NS_IMETHOD_(nsrefcnt) AddRef() {
mRefCnt++;
return mRefCnt;
}
NS_IMETHOD_(nsrefcnt) Release() {
--mRefCnt;
if ( !mRefCnt ) {
delete this;
return 0;
}
return mRefCnt;
}
NS_IMETHOD QueryInterface( const nsIID &iid, void**p ) {
nsresult rv = NS_OK;
if ( p ) {
*p = 0;
if ( iid.Equals( NS_GET_IID( nsISplashScreen ) ) ) {
nsISplashScreen *result = this;
*p = result;
NS_ADDREF( result );
} else if ( iid.Equals( NS_GET_IID( nsISupports ) ) ) {
nsISupports *result = NS_STATIC_CAST( nsISupports*, this );
*p = result;
NS_ADDREF( result );
} else {
rv = NS_NOINTERFACE;
}
} else {
rv = NS_ERROR_NULL_POINTER;
}
return rv;
}
DialogPtr mDialog;
PicHandle mPicHandle;
nsrefcnt mRefCnt;
}; // class nsSplashScreenMac
NS_IMPL_THREADSAFE_ISUPPORTS1(nsSplashScreenMac, nsISplashScreen)
NS_IMETHODIMP
nsSplashScreenMac::Show() {
mDialog = ::GetNewDialog( rSplashDialog, nil, (WindowPtr)-1L );

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

@ -31,8 +31,6 @@
class nsSplashScreenPh : public nsISplashScreen {
public:
NS_DECL_ISUPPORTS
nsSplashScreenPh()
: mDialog( 0 ), mRefCnt( 0 ) {
@ -50,10 +48,43 @@ public:
NS_IMETHOD Show();
NS_IMETHOD Hide();
PtWidget_t *mDialog;
}; // class nsSplashScreenPh
// nsISupports methods
NS_IMETHOD_(nsrefcnt) AddRef() {
mRefCnt++;
return mRefCnt;
}
NS_IMETHOD_(nsrefcnt) Release() {
--mRefCnt;
if ( !mRefCnt ) {
delete this;
return 0;
}
return mRefCnt;
}
NS_IMETHOD QueryInterface( const nsIID &iid, void**p ) {
nsresult rv = NS_OK;
if ( p ) {
*p = 0;
if ( iid.Equals( NS_GET_IID( nsISplashScreen ) ) ) {
nsISplashScreen *result = this;
*p = result;
NS_ADDREF( result );
} else if ( iid.Equals( NS_GET_IID( nsISupports ) ) ) {
nsISupports *result = NS_STATIC_CAST( nsISupports*, this );
*p = result;
NS_ADDREF( result );
} else {
rv = NS_NOINTERFACE;
}
} else {
rv = NS_ERROR_NULL_POINTER;
}
return rv;
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsSplashScreenPh, nsISplashScreen)
PtWidget_t *mDialog;
nsrefcnt mRefCnt;
}; // class nsSplashScreenPh
NS_IMETHODIMP
nsSplashScreenPh::Show()

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

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
@ -30,14 +30,46 @@
class nsSplashScreenWin : public nsISplashScreen {
public:
NS_DECL_ISUPPORTS
nsSplashScreenWin();
~nsSplashScreenWin();
NS_IMETHOD Show();
NS_IMETHOD Hide();
// nsISupports methods
NS_IMETHOD_(nsrefcnt) AddRef() {
mRefCnt++;
return mRefCnt;
}
NS_IMETHOD_(nsrefcnt) Release() {
--mRefCnt;
if ( !mRefCnt ) {
delete this;
return 0;
}
return mRefCnt;
}
NS_IMETHOD QueryInterface( const nsIID &iid, void**p ) {
nsresult rv = NS_OK;
if ( p ) {
*p = 0;
if ( iid.Equals( NS_GET_IID( nsISplashScreen ) ) ) {
nsISplashScreen *result = this;
*p = result;
NS_ADDREF( result );
} else if ( iid.Equals( NS_GET_IID( nsISupports ) ) ) {
nsISupports *result = NS_STATIC_CAST( nsISupports*, this );
*p = result;
NS_ADDREF( result );
} else {
rv = NS_NOINTERFACE;
}
} else {
rv = NS_ERROR_NULL_POINTER;
}
return rv;
}
void SetDialog( HWND dlg );
static void CheckConsole();
static nsSplashScreenWin* GetPointer( HWND dlg );
@ -47,10 +79,9 @@ public:
static DWORD WINAPI ThreadProc( LPVOID );
HWND mDlg;
nsrefcnt mRefCnt;
}; // class nsSplashScreenWin
NS_IMPL_THREADSAFE_ISUPPORTS1(nsSplashScreenWin, nsISplashScreen)
nsSplashScreenWin::nsSplashScreenWin()
: mRefCnt( 0 ), mDlg( 0 ) {
}