Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsGfxUtils.h File Reference
#include "nsCarbonHelpers.h"
#include <LowMem.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nsGraphicsUtils
class  StPortSetter
class  StOriginSetter
class  StGWorldPortSetter
class  StTextStyleSetter
class  StPixelLocker
 
Utility class for saving, locking, and restoring pixel state More...
class  StHandleOwner
 
Utility class stack-based handle ownership More...
class  StHandleLocker
 
Utility class for saving, locking, and restoring handle state Ok with null handle More...
class  StColorSpaceReleaser
 Stack based utility class for releasing a Quartz color space. More...

Functions

PRBool CurrentPortIsWMPort ()
 
Used to assert that we're not clobbering a bad port
PRBool ValidateDrawingState ()

Function Documentation


Used to assert that we're not clobbering a bad port

Definition at line 55 of file nsGfxUtils.h.

{
  return PR_FALSE;
}

Here is the caller graph for this function:

Definition at line 67 of file nsGfxUtils.h.

{
  CGrafPtr    curPort;
  GDHandle    curDevice;
  
  GetGWorld(&curPort, &curDevice);
  
  // if we have a window, but we're set to the WM port, things are bad
  if (CurrentPortIsWMPort() && (FrontWindow() != nil))
    return false;


  // see if the device is in the device list. If not, it probably means that
  // it's the device for an offscreen GWorld. In that case, the current port
  // should be set to that GWorld too.
  {
    GDHandle    thisDevice = GetDeviceList();
    while (thisDevice)
    {
      if (thisDevice == curDevice)
         break;
    
      thisDevice = GetNextDevice(thisDevice);
    }

    if ((thisDevice == nil) && !IsPortOffscreen(curPort))    // nil device is OK only with GWorld
      return false;
  }

  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function: