Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsCairoGfxFactory.cpp File Reference
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsCOMPtr.h"
#include "nsGfxCIID.h"
#include "nsScriptableRegion.h"
#include "gfxImageFrame.h"
#include "nsCairoFontMetrics.h"
#include "nsCairoDeviceContext.h"
#include "nsCairoRenderingContext.h"
#include "nsCairoImage.h"
#include "nsCairoRegion.h"
#include "nsCairoScreen.h"
#include "nsCairoScreenManager.h"
#include "nsCairoBlender.h"

Go to the source code of this file.

Functions

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

Variables

static const nsModuleComponentInfo components []

Function Documentation

Definition at line 151 of file nsCairoGfxFactory.cpp.

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

Definition at line 69 of file nsCairoGfxFactory.cpp.

{
  nsresult rv;

  nsIScriptableRegion *inst = nsnull;

  if ( !aResult )
  {
    rv = NS_ERROR_NULL_POINTER;
    return rv;
  }
  *aResult = nsnull;
  if (aOuter)
  {
    rv = NS_ERROR_NO_AGGREGATION;
    return rv;
  }
  // create an nsRegionGtk and get the scriptable region from it
  nsCOMPtr <nsIRegion> rgn;
  NS_NEWXPCOM(rgn, nsCairoRegion);
  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 110 of file nsCairoGfxFactory.cpp.