Back to index

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

#include <nsScreenManagerMac.h>

Inheritance diagram for nsScreenManagerMac:
Inheritance graph
Collaboration diagram for nsScreenManagerMac:
Collaboration graph

List of all members.

Public Member Functions

 nsScreenManagerMac ()
virtual ~nsScreenManagerMac ()
nsIScreen screenForRect (in long left, in long top, in long width, in long height)

Public Attributes

readonly attribute nsIScreen primaryScreen
readonly attribute unsigned long numberOfScreens

Private Member Functions

nsIScreenCreateNewScreenObject (GDHandle inDevice)

Private Attributes

nsAutoVoidArray mScreenList

Detailed Description

Definition at line 51 of file nsScreenManagerMac.h.

Constructor & Destructor Documentation

Definition at line 54 of file nsScreenManagerMac.cpp.

  // 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 62 of file nsScreenManagerMac.cpp.

  // walk our list of cached screens and delete them.
  for ( int i = 0; i < mScreenList.Count(); ++i ) {
    ScreenListItem* item = NS_REINTERPRET_CAST(ScreenListItem*, mScreenList[i]);
    delete item;

Member Function Documentation

nsIScreen * nsScreenManagerMac::CreateNewScreenObject ( GDHandle  inDevice) [private]

Definition at line 82 of file nsScreenManagerMac.cpp.

  nsIScreen* retScreen = nsnull;
  // look through our screen list, hoping to find it. If it's not there,
  // add it and return the new one.
  for ( int i = 0; i < mScreenList.Count(); ++i ) {
    ScreenListItem* curr = NS_REINTERPRET_CAST(ScreenListItem*, mScreenList[i]);
    if ( inDevice == curr->mGD ) {
      NS_IF_ADDREF(retScreen = curr->mScreen.get());
      return retScreen;
  } // for each screen.
  // didn't find it in the list, so add it and return that item.
  retScreen = new nsScreenMac ( inDevice );
  ScreenListItem* listItem = new ScreenListItem ( inDevice, retScreen );
  mScreenList.AppendElement ( listItem );
  return retScreen;

Here is the call graph for this function:

nsIScreen nsIScreenManager::screenForRect ( in long  left,
in long  top,
in long  width,
in long  height 
) [inherited]

Member Data Documentation

nsAutoVoidArray nsScreenManagerMac::mScreenList [private]

Definition at line 64 of file nsScreenManagerMac.h.

readonly attribute unsigned long nsIScreenManager::numberOfScreens [inherited]

Definition at line 59 of file nsIScreenManager.idl.

Definition at line 56 of file nsIScreenManager.idl.

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