Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsGfxFactoryGTK.cpp File Reference
#include "gfx-config.h"
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsCOMPtr.h"
#include "nsGfxCIID.h"
#include "nsBlender.h"
#include "nsRenderingContextGTK.h"
#include "nsDeviceContextGTK.h"
#include "nsDeviceContextSpecG.h"
#include "nsDeviceContextSpecFactoryG.h"
#include "nsScreenManagerGtk.h"
#include "nsScriptableRegion.h"
#include "nsImageGTK.h"
#include "nsPrintOptionsGTK.h"
#include "nsFontList.h"
#include "nsRegionGTK.h"
#include "nsGCCache.h"
#include "nsFontMetricsUtils.h"
#include "nsPrintSession.h"
#include "gfxImageFrame.h"

Go to the source code of this file.

Functions

static nsresult nsFontMetricsConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
static nsresult nsFontEnumeratorConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
static NS_IMETHODIMP nsScriptableRegionConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
 nsGfxGTKModuleCtor (nsIModule *self)
 nsGfxGTKModuleDtor (nsIModule *self)

Variables

static const nsModuleComponentInfo components []

Function Documentation

static nsresult nsFontEnumeratorConstructor ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]

Definition at line 153 of file nsGfxFactoryGTK.cpp.

{
  nsIFontEnumerator *result;

  if (!aResult)
    return NS_ERROR_NULL_POINTER;

  *aResult = nsnull;

  if (aOuter)
    return NS_ERROR_NO_AGGREGATION;

#ifdef MOZ_ENABLE_PANGO
  if (NS_IsPangoEnabled()) {
    result = new nsFontEnumeratorPango();
    if (!result)
      return NS_ERROR_OUT_OF_MEMORY;
  } else {
#endif
#ifdef MOZ_ENABLE_XFT
  if (NS_IsXftEnabled()) {
    result = new nsFontEnumeratorXft();
    if (!result)
      return NS_ERROR_OUT_OF_MEMORY;
  } else {
#endif
#ifdef MOZ_ENABLE_COREXFONTS
    result = new nsFontEnumeratorGTK();
    if (!result)
      return NS_ERROR_OUT_OF_MEMORY;
#endif
#ifdef MOZ_ENABLE_XFT
  }
#endif
#ifdef MOZ_ENABLE_PANGO
  }
#endif

  NS_ADDREF(result);
  nsresult rv = result->QueryInterface(aIID, aResult);
  NS_RELEASE(result);

  return rv;
}

Here is the call graph for this function:

static nsresult nsFontMetricsConstructor ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]

Definition at line 107 of file nsGfxFactoryGTK.cpp.

{
  nsIFontMetrics *result;

  if (!aResult)
    return NS_ERROR_NULL_POINTER;

  *aResult = nsnull;

  if (aOuter)
    return NS_ERROR_NO_AGGREGATION;

#ifdef MOZ_ENABLE_PANGO
  if (NS_IsPangoEnabled()) {
    result = new nsFontMetricsPango();
    if (!result)
      return NS_ERROR_OUT_OF_MEMORY;
  } else {
#endif
#ifdef MOZ_ENABLE_XFT
  if (NS_IsXftEnabled()) {
    result = new nsFontMetricsXft();
    if (!result)
      return NS_ERROR_OUT_OF_MEMORY;
  } else {
#endif
#ifdef MOZ_ENABLE_COREXFONTS
    result = new nsFontMetricsGTK();
    if (!result)
      return NS_ERROR_OUT_OF_MEMORY;
#endif
#ifdef MOZ_ENABLE_XFT
  }
#endif
#ifdef MOZ_ENABLE_PANGO
  }
#endif

  NS_ADDREF(result);
  nsresult rv = result->QueryInterface(aIID, aResult);
  NS_RELEASE(result);

  return rv;
}

Here is the call graph for this function:

Definition at line 337 of file nsGfxFactoryGTK.cpp.

{
  nsImageGTK::Startup();
  return NS_OK;
}

Here is the call graph for this function:

Definition at line 344 of file nsGfxFactoryGTK.cpp.

Here is the call graph for this function:

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

Definition at line 198 of file nsGfxFactoryGTK.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 nsRegionGtk and get the scriptable region from it
  nsCOMPtr <nsIRegion> rgn;
  NS_NEWXPCOM(rgn, nsRegionGTK);
  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 239 of file nsGfxFactoryGTK.cpp.