Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsGfxFactoryBeOS.cpp File Reference
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsCOMPtr.h"
#include "nsGfxCIID.h"
#include "nsBlender.h"
#include "nsFontMetricsBeOS.h"
#include "nsRenderingContextBeOS.h"
#include "nsDeviceContextSpecB.h"
#include "nsDeviceContextSpecFactoryB.h"
#include "nsScreenManagerBeOS.h"
#include "nsScriptableRegion.h"
#include "nsDeviceContextBeOS.h"
#include "nsPrintOptionsBeOS.h"
#include "nsImageBeOS.h"
#include "nsFontList.h"
#include "nsPrintSession.h"
#include "gfxImageFrame.h"

Go to the source code of this file.

Functions

static NS_IMETHODIMP nsScriptableRegionConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)

Variables

static const nsModuleComponentInfo components []

Function Documentation

static NS_IMETHODIMP nsScriptableRegionConstructor ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]

Definition at line 79 of file nsGfxFactoryBeOS.cpp.

{ 
  nsresult rv; 
 
  nsIScriptableRegion *inst; 
 
  if ( !aResult ) 
  { 
    rv = NS_ERROR_NULL_POINTER; 
    return rv; 
  } 
  *aResult = nsnull; 
  if (aOuter) 
  { 
    rv = NS_ERROR_NO_AGGREGATION; 
    return rv; 
  } 
  // create an nsRegionBeOS and get the scriptable region from it 
  nsCOMPtr <nsIRegion> rgn; 
  NS_NEWXPCOM(rgn, nsRegionBeOS); 
  nsCOMPtr<nsIScriptableRegion> scriptableRgn;
  if (rgn != nsnull) 
  { 
    scriptableRgn = new nsScriptableRegion(rgn); 
    inst = scriptableRgn; 
  } 
  if (!inst) 
  { 
    rv = NS_ERROR_OUT_OF_MEMORY; 
    return rv; 
  } 
  NS_ADDREF(inst); 
  // release our variable above now that we have created our owning
  // reference - we don't want this to go out of scope early!
  scriptableRgn = nsnull;
  rv = inst->QueryInterface(aIID, aResult); 
  NS_RELEASE(inst); 
 
  return rv; 
} 

Here is the call graph for this function:


Variable Documentation

Definition at line 120 of file nsGfxFactoryBeOS.cpp.