Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes
nsSplashScreenOS2 Class Reference
Inheritance diagram for nsSplashScreenOS2:
Inheritance graph
[legend]
Collaboration diagram for nsSplashScreenOS2:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsSplashScreenOS2 ()
 ~nsSplashScreenOS2 ()
NS_IMETHOD Show ()
NS_IMETHOD Hide ()
 NS_IMETHOD_ (nsrefcnt) AddRef()
 NS_IMETHOD_ (nsrefcnt) Release()
NS_IMETHOD QueryInterface (const nsIID &iid, void **p)
void SetDialog (HWND dlg)
void LoadBitmap ()

Static Public Member Functions

static nsSplashScreenOS2GetPointer (HWND dlg)

Public Attributes

HWND mDlg
HBITMAP mBitmap
nsrefcnt mRefCnt
HDC hdcMemory
HPS hpsMemory
LONG mBitmapCX
LONG mBitmapCY

Detailed Description

Definition at line 169 of file nsNativeAppSupportOS2.cpp.


Constructor & Destructor Documentation

Definition at line 436 of file nsNativeAppSupportOS2.cpp.

    : mDlg( 0 ), mBitmap( 0 ), mRefCnt( 0 ),
      hdcMemory( 0 ), hpsMemory( 0 ), mBitmapCX(0), mBitmapCY(0) {
}

Definition at line 441 of file nsNativeAppSupportOS2.cpp.

                                      {
#if MOZ_DEBUG_DDE
    printf( "splash screen dtor called\n" );
#endif
    // Make sure dialog is gone.
    Hide();
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 651 of file nsNativeAppSupportOS2.cpp.

                                                           {
    // Get result from dialog user data.
    PVOID data = WinQueryWindowPtr( dlg, QWL_USER );
    return (nsSplashScreenOS2*)data;
}

Implements nsISplashScreen.

Definition at line 457 of file nsNativeAppSupportOS2.cpp.

                        {
    if ( mDlg ) {
        // Dismiss the dialog.
        WinPostMsg(mDlg, WM_CLOSE, 0, 0);
        mDlg = 0;
        GpiSetBitmap(hpsMemory, NULLHANDLE);
        if (mBitmap) {
            GpiDeleteBitmap(mBitmap);
            mBitmap = 0;
        }
        if (hdcMemory) {
            DevCloseDC(hdcMemory);
            hdcMemory = 0;
        }
        if (hpsMemory) {
           GpiDestroyPS(hpsMemory);
           hpsMemory = 0;
        }
    }
    return NS_OK;
}

Here is the caller graph for this function:

Definition at line 558 of file nsNativeAppSupportOS2.cpp.

                              {
    hdcMemory = DevOpenDC((HAB)0, OD_MEMORY, "*", 0L, NULL, 0L);
    SIZEL sizel = {0, 0};
    hpsMemory = GpiCreatePS((HAB)0, hdcMemory, &sizel,
                            PU_PELS | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC );

    // Check for '<program-name>.bmp" in same directory as executable.
    PPIB ppib;
    PTIB ptib;
    char fileName[CCHMAXPATH];
    DosGetInfoBlocks( &ptib, &ppib);
    DosQueryModuleName( ppib->pib_hmte, CCHMAXPATH, fileName);
    int fileNameLen = strlen(fileName);
    if (fileNameLen >=3) {
        fileName[ fileNameLen - 3 ] = 0;
        strcat( fileName, "bmp" );
        // Try to load bitmap from that file.
        mBitmap = LoadAndSetBitmapFromFile(hpsMemory, fileName);
    }
    if (!mBitmap) {
        mBitmap = GpiLoadBitmap(hpsMemory, NULL, IDB_SPLASH, 0L, 0L);
        GpiSetBitmap(hpsMemory, mBitmap);
    }
    BITMAPINFOHEADER bitmap;
    bitmap.cbFix = sizeof(BITMAPINFOHEADER);
    GpiQueryBitmapParameters(mBitmap, &bitmap);
    mBitmapCX = bitmap.cx;
    mBitmapCY = bitmap.cy;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 178 of file nsNativeAppSupportOS2.cpp.

                                   {
        mRefCnt++;
        return mRefCnt;
    }

Definition at line 182 of file nsNativeAppSupportOS2.cpp.

                                    {
        --mRefCnt;
        if ( !mRefCnt ) {
            delete this;
            return 0;
        }
        return mRefCnt;
    }

Definition at line 190 of file nsNativeAppSupportOS2.cpp.

                                                           {
        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;
    }

Here is the call graph for this function:

Definition at line 644 of file nsNativeAppSupportOS2.cpp.

                                            {
    // Save dialog handle.
    mDlg = dlg;
    // Store this pointer in the dialog.
    WinSetWindowPtr( mDlg, QWL_USER, this );
}

Here is the caller graph for this function:

Implements nsISplashScreen.

Definition at line 450 of file nsNativeAppSupportOS2.cpp.

                        {
    //Spawn new thread to display real splash screen.
    _beginthread( ThreadProc, NULL, 16384, (void *)this );
    return NS_OK;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 218 of file nsNativeAppSupportOS2.cpp.

Definition at line 219 of file nsNativeAppSupportOS2.cpp.

Definition at line 216 of file nsNativeAppSupportOS2.cpp.

Definition at line 220 of file nsNativeAppSupportOS2.cpp.

Definition at line 221 of file nsNativeAppSupportOS2.cpp.

Definition at line 215 of file nsNativeAppSupportOS2.cpp.

Definition at line 217 of file nsNativeAppSupportOS2.cpp.


The documentation for this class was generated from the following file: