Get gfx to build under BeOS (BeOS specific changes)

This commit is contained in:
duncan%be.com 1999-07-01 16:26:43 +00:00
Родитель a040e9d649
Коммит f1ccc9ea73
3 изменённых файлов: 30 добавлений и 5 удалений

Просмотреть файл

@ -24,7 +24,8 @@
#include "nsDeviceContextBeOS.h"
#include "nsGfxCIID.h"
#include "../ps/nsDeviceContextPS.h"
#include "nsGfxPSCID.h"
#include "nsIDeviceContextPS.h"
#include <ScrollBar.h>
#include <Screen.h>
@ -235,11 +236,29 @@ NS_IMETHODIMP nsDeviceContextBeOS::GetDeviceSurfaceDimensions(PRInt32 &aWidth, P
NS_IMETHODIMP nsDeviceContextBeOS::GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
nsIDeviceContext *&aContext)
{
static NS_DEFINE_CID(kCDeviceContextPS, NS_DEVICECONTEXTPS_CID);
// Create a Postscript device context
aContext = new nsDeviceContextPS();
((nsDeviceContextPS *)aContext)->SetSpec(aDevice);
NS_ADDREF(aDevice);
return((nsDeviceContextPS *) aContext)->Init((nsIDeviceContext*)aContext, (nsIDeviceContext*)this);
nsresult rv;
nsIDeviceContextPS *dcps;
rv = nsComponentManager::CreateInstance(kCDeviceContextPS,
nsnull,
nsIDeviceContextPS::GetIID(),
(void **)&dcps);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create PS Device context");
dcps->SetSpec(aDevice);
dcps->InitDeviceContextPS((nsIDeviceContext*)aContext,
(nsIDeviceContext*)this);
rv = dcps->QueryInterface(nsIDeviceContext::GetIID(),
(void **)&aContext);
NS_RELEASE(dcps);
return rv;
}
NS_IMETHODIMP nsDeviceContextBeOS::BeginDocument(void)

Просмотреть файл

@ -1278,3 +1278,8 @@ nsRenderingContextBeOS::CopyOffScreenBits(nsDrawingSurface aSrcSurf,
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextBeOS::RetrieveCurrentNativeGraphicData(PRUint32 * ngd)
{
return NS_OK;
}

Просмотреть файл

@ -145,6 +145,7 @@ public:
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);
protected:
virtual ~nsRenderingContextBeOS();