Back to index

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

#include <nsScreenPh.h>

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

List of all members.

Public Member Functions

 nsScreenPh ()
virtual ~nsScreenPh ()
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

PRInt32 mWidth
PRInt32 mHeight
PRInt32 mPixelDepth

Detailed Description

Definition at line 45 of file nsScreenPh.h.


Constructor & Destructor Documentation

Definition at line 43 of file nsScreenPh.cpp.

                           {
  PhSysInfo_t       SysInfo;
  PhRect_t          rect;
  char              *p;
  int               inp_grp;
  PhRid_t           rid;
  PhRegion_t        region;
  
       p = NULL;

       /* Initialize the data members */
       /* Get the Screen Size and Depth*/
       p = getenv("PHIG");
       if( p ) inp_grp = atoi(p);
       else inp_grp = 1;

       PhQueryRids( 0, 0, inp_grp, Ph_INPUTGROUP_REGION, 0, 0, 0, &rid, 1 );
       PhRegionQuery( rid, &region, &rect, NULL, 0 );
       inp_grp = region.input_group;
       PhWindowQueryVisible( Ph_QUERY_IG_POINTER, 0, inp_grp, &rect );
       mWidth  = rect.lr.x - rect.ul.x + 1;
       mHeight = rect.lr.y - rect.ul.y + 1;  

       /* Get the System Info for the RID */
       if( PhQuerySystemInfo(rid, NULL, &SysInfo ) ) {
              /* Make sure the "color_bits" field is valid */
              if( SysInfo.gfx.valid_fields & Ph_GFX_COLOR_BITS ) mPixelDepth = SysInfo.gfx.color_bits;
              }
       }
nsScreenPh::~nsScreenPh ( ) [virtual]

Definition at line 73 of file nsScreenPh.cpp.

{ }

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 56 of file nsScreenPh.h.

Definition at line 57 of file nsScreenPh.h.

Definition at line 55 of file nsScreenPh.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: