Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Attributes
nsScreenWin Class Reference

#include <nsScreenWin.h>

Inheritance diagram for nsScreenWin:
Inheritance graph
[legend]
Collaboration diagram for nsScreenWin:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsScreenWin (void *inScreen)
 ~nsScreenWin ()
void GetRect (out long left, out long top, out long width, out long height)
void GetAvailRect (out long left, out long top, out long width, out long height)

Public Attributes

readonly attribute long pixelDepth
readonly attribute long colorDepth

Private Attributes

PRBool mHasMultiMonitorAPIs
FARPROC mGetMonitorInfoProc
voidmScreen

Detailed Description

Definition at line 46 of file nsScreenWin.h.


Constructor & Destructor Documentation

nsScreenWin::nsScreenWin ( void inScreen)

Definition at line 65 of file nsScreenWin.cpp.

  : mScreen(inScreen), mHasMultiMonitorAPIs(PR_FALSE),
      mGetMonitorInfoProc(nsnull)
{
#ifdef DEBUG
  HDC hDCScreen = ::GetDC(nsnull);
  NS_ASSERTION(hDCScreen,"GetDC Failure");
  NS_ASSERTION ( ::GetDeviceCaps(hDCScreen, TECHNOLOGY) == DT_RASDISPLAY, "Not a display screen");
  ::ReleaseDC(nsnull,hDCScreen);
#endif
   
#if _MSC_VER >= 1200
  // figure out if we can call the multiple monitor APIs that are only
  // available on Win98/2000.
  HMODULE lib = GetModuleHandle("user32.dll");
  if ( lib ) {
    mGetMonitorInfoProc = GetProcAddress ( lib, GetMonitorInfoQuoted );
    if ( mGetMonitorInfoProc )
      mHasMultiMonitorAPIs = PR_TRUE;
  }
#endif

  // nothing else to do. I guess we could cache a bunch of information
  // here, but we want to ask the device at runtime in case anything
  // has changed.
}

Definition at line 93 of file nsScreenWin.cpp.

{
  // nothing to see here.
}

Member Function Documentation

void nsIScreen::GetAvailRect ( out long  left,
out long  top,
out long  width,
out long  height 
) [inherited]
void nsIScreen::GetRect ( out long  left,
out long  top,
out long  width,
out long  height 
) [inherited]

Member Data Documentation

readonly attribute long nsIScreen::colorDepth [inherited]

Definition at line 49 of file nsIScreen.idl.

Definition at line 60 of file nsScreenWin.h.

Definition at line 59 of file nsScreenWin.h.

Definition at line 62 of file nsScreenWin.h.

readonly attribute long nsIScreen::pixelDepth [inherited]

Definition at line 48 of file nsIScreen.idl.


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