зеркало из https://github.com/mozilla/pjs.git
Combined raptorgfx.dll and raptorgfxwin.dll into one DLL
This commit is contained in:
Родитель
d31bf96f8f
Коммит
ef1dfe9b6c
|
@ -20,7 +20,7 @@ IGNORE_MANIFEST=1
|
|||
|
||||
DIRS = windows
|
||||
|
||||
LIBRARY_NAME=gmgfx
|
||||
LIBRARY_NAME=raptorgfx_s
|
||||
MODULE=raptor
|
||||
REQUIRES=util img xpcom raptor netlib
|
||||
|
||||
|
@ -51,31 +51,16 @@ LINCS=-I$(PUBLIC)\util -I$(PUBLIC)\img \
|
|||
-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor \
|
||||
-I$(PUBLIC)\netlib
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = raptorgfx
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
$(DEFINES) \
|
||||
$(NULL)
|
||||
|
||||
# These are the libraries we need to link with to create the dll
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\img3240.lib \
|
||||
$(DIST)\lib\util.lib \
|
||||
$(DIST)\lib\libplc21.lib \
|
||||
$(DIST)\lib\netlib.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
libs:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
|
||||
libs:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\$(DLLNAME).dll
|
||||
rm -f $(DIST)\lib\$(DLLNAME).lib
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
rm -f $(PDBFILE).pdb
|
||||
|
|
|
@ -39,7 +39,7 @@ static int ComponentValue(const char* aColorSpec, int dpc)
|
|||
// bina's original code. However, it is pickyer with respect to what a
|
||||
// legal color is and will only return true for perfectly legal color
|
||||
// values.
|
||||
NS_GFX PRBool NS_HexToRGB(const char* aColorSpec, nscolor* aResult)
|
||||
extern "C" NS_GFX_(PRBool) NS_HexToRGB(const char* aColorSpec, nscolor* aResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aColorSpec, "null ptr");
|
||||
if (nsnull == aColorSpec) {
|
||||
|
@ -97,7 +97,7 @@ NS_GFX PRBool NS_HexToRGB(const char* aColorSpec, nscolor* aResult)
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
PRBool NS_ColorNameToRGB(const char* aColorName, nscolor* aResult)
|
||||
extern "C" NS_GFX_(PRBool) NS_ColorNameToRGB(const char* aColorName, nscolor* aResult)
|
||||
{
|
||||
PRInt32 id = nsColorNames::LookupName(aColorName);
|
||||
if (id >= 0) {
|
||||
|
|
|
@ -43,10 +43,10 @@ typedef PRUint32 nscolor;
|
|||
|
||||
// Translate a hex string to a color. Return true if it parses ok,
|
||||
// otherwise return false.
|
||||
extern NS_GFX PRBool NS_HexToRGB(const char* aBuf, nscolor* aResult);
|
||||
extern "C" NS_GFX_(PRBool) NS_HexToRGB(const char* aBuf, nscolor* aResult);
|
||||
|
||||
// Translate a color name to a color. Return true if it parses ok,
|
||||
// otherwise return false.
|
||||
extern NS_GFX PRBool NS_ColorNameToRGB(const char* aBuf, nscolor* aResult);
|
||||
extern "C" NS_GFX_(PRBool) NS_ColorNameToRGB(const char* aBuf, nscolor* aResult);
|
||||
|
||||
#endif /* nsColor_h___ */
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "nsIDeviceContext.h"
|
||||
|
||||
class NS_EXPORT DeviceContextImpl : public nsIDeviceContext
|
||||
class DeviceContextImpl : public nsIDeviceContext
|
||||
{
|
||||
public:
|
||||
DeviceContextImpl();
|
||||
|
|
|
@ -122,7 +122,7 @@ void FontCacheImpl::Flush()
|
|||
mFontMetrics.Clear();
|
||||
}
|
||||
|
||||
NS_GFX nsresult
|
||||
extern "C" NS_GFX_(nsresult)
|
||||
NS_NewFontCache(nsIFontCache **aInstancePtrResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
virtual void Flush() = 0;
|
||||
};
|
||||
|
||||
extern NS_GFX nsresult
|
||||
extern "C" NS_GFX_(nsresult)
|
||||
NS_NewFontCache(nsIFontCache **aInstancePtrResult);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
};
|
||||
|
||||
/// Factory method for creating an image group
|
||||
extern NS_GFX nsresult
|
||||
extern "C" NS_GFX_(nsresult)
|
||||
NS_NewImageGroup(nsIImageGroup **aInstancePtrResult);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsIImageManager_h___
|
||||
#define nsIImageManager_h___
|
||||
|
||||
#include <stdio.h>
|
||||
#include "nsISupports.h"
|
||||
#include "nscore.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
nsImageType_kUnknown = 0,
|
||||
nsImageType_kGIF = 1,
|
||||
nsImageType_kXBM = 2,
|
||||
nsImageType_kJPEG = 3,
|
||||
nsImageType_kPPM = 4,
|
||||
nsImageType_kPNG = 5
|
||||
} nsImageType;
|
||||
|
||||
// IID for the nsIImageManager interface
|
||||
#define NS_IIMAGEMANAGER_IID \
|
||||
{ 0x9f327100, 0xad5a, 0x11d1, \
|
||||
{ 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } }
|
||||
|
||||
/**
|
||||
*
|
||||
* Image manager. There is only a single instance, returned when invoking
|
||||
* the factory instantiation method. A user of the image library should
|
||||
* hold on to the singleton image manager.
|
||||
*/
|
||||
class nsIImageManager : public nsISupports
|
||||
{
|
||||
public:
|
||||
/// Initialization method to be called before use
|
||||
virtual nsresult Init() = 0;
|
||||
|
||||
/// Set the size (in bytes) image cache maintained by the image manager
|
||||
virtual void SetCacheSize(PRInt32 aCacheSize) = 0;
|
||||
|
||||
/// @return the current size of the image cache (in bytes)
|
||||
virtual PRInt32 GetCacheSize(void) = 0;
|
||||
|
||||
/**
|
||||
* Attempts to release some memory by freeing an image from the image
|
||||
* cache. This may not always be possible either because all images
|
||||
* in the cache are in use or because the cache is empty.
|
||||
*
|
||||
* @return the new approximate size of the imagelib cache.
|
||||
*/
|
||||
virtual PRInt32 ShrinkCache(void) = 0;
|
||||
|
||||
/**
|
||||
* Determine the type of the image, based on the first few bytes of data.
|
||||
*
|
||||
* @param buf - a buffer of image data
|
||||
* @param length - the length of the buffer
|
||||
*
|
||||
* @return the type of the image, if known
|
||||
*/
|
||||
virtual nsImageType GetImageType(const char *buf, PRInt32 length) = 0;
|
||||
};
|
||||
|
||||
/// Factory method to get a reference to the singleton image manager
|
||||
extern NS_GFX nsresult
|
||||
NS_NewImageManager(nsIImageManager **aInstancePtrResult);
|
||||
|
||||
#endif
|
|
@ -231,7 +231,7 @@ ImageGroupImpl::Interrupt(void)
|
|||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
extern "C" NS_GFX_(nsresult)
|
||||
NS_NewImageGroup(nsIImageGroup **aInstancePtrResult)
|
||||
{
|
||||
nsresult result;
|
||||
|
|
|
@ -116,7 +116,7 @@ ImageManagerImpl::GetImageType(const char *buf, PRInt32 length)
|
|||
}
|
||||
}
|
||||
|
||||
NS_GFX nsresult
|
||||
extern "C" NS_GFX_(nsresult)
|
||||
NS_NewImageManager(nsIImageManager **aInstancePtrResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
|
||||
|
|
|
@ -22,10 +22,9 @@
|
|||
#include "ilISystemServices.h"
|
||||
#include "nscore.h"
|
||||
|
||||
extern NS_GFX nsresult NS_NewImageNetContext(ilINetContext **aInstancePtrResult);
|
||||
extern NS_GFX nsresult NS_NewImageURL(ilIURL **aInstancePtrResult,
|
||||
const char *aURL);
|
||||
extern "C" NS_GFX_(nsresult) NS_NewImageNetContext(ilINetContext **aInstancePtrResult);
|
||||
extern "C" NS_GFX_(nsresult) NS_NewImageURL(ilIURL **aInstancePtrResult, const char *aURL);
|
||||
|
||||
extern NS_GFX nsresult NS_NewImageRenderer(ilIImageRenderer **aInstancePtrResult);
|
||||
extern "C" NS_GFX_(nsresult) NS_NewImageRenderer(ilIImageRenderer **aInstancePtrResult);
|
||||
|
||||
extern NS_GFX nsresult NS_NewImageSystemServices(ilISystemServices **aInstancePtrResult);
|
||||
extern "C" NS_GFX_(nsresult) NS_NewImageSystemServices(ilISystemServices **aInstancePtrResult);
|
||||
|
|
|
@ -470,7 +470,7 @@ ImageNetContextImpl::RequestDone(ImageConsumer *aConsumer)
|
|||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
extern "C" NS_GFX_(nsresult)
|
||||
NS_NewImageNetContext(ilINetContext **aInstancePtrResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
|
||||
|
|
|
@ -264,7 +264,7 @@ ImageRendererImpl::GetIconDimensions(void* aDisplayContext,
|
|||
nsIRenderingContext *rc = (nsIRenderingContext *)aDisplayContext;
|
||||
}
|
||||
|
||||
nsresult
|
||||
extern "C" NS_GFX_(nsresult)
|
||||
NS_NewImageRenderer(ilIImageRenderer **aInstancePtrResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
|
||||
|
|
|
@ -113,7 +113,7 @@ ImageSystemServicesImpl::ClearTimeout(void *aTimerID)
|
|||
NS_RELEASE(timer);
|
||||
}
|
||||
|
||||
nsresult
|
||||
extern "C" NS_GFX_(nsresult)
|
||||
NS_NewImageSystemServices(ilISystemServices **aInstancePtrResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
|
||||
|
|
|
@ -162,7 +162,7 @@ ImageURLImpl::SetBackgroundLoad(PRBool aBgload)
|
|||
{
|
||||
}
|
||||
|
||||
nsresult
|
||||
extern "C" NS_GFX_(nsresult)
|
||||
NS_NewImageURL(ilIURL **aInstancePtrResult, const char *aURL)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
|
||||
|
|
|
@ -25,7 +25,7 @@ DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
|||
|
||||
MODULE=raptor
|
||||
|
||||
DEFINES =-D_IMPL_NS_GFXNONXP -DWIN32_LEAN_AND_MEAN
|
||||
DEFINES=-D_IMPL_NS_GFX -D_IMPL_NS_GFXNONXP -DWIN32_LEAN_AND_MEAN
|
||||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\nsDeviceContextWin.obj \
|
||||
|
@ -44,19 +44,35 @@ LINCS= \
|
|||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
-D_IMPL_NS_GFXNONXP \
|
||||
$(DEFINES) \
|
||||
$(NULL)
|
||||
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\img3240.lib \
|
||||
$(DIST)\lib\util.lib \
|
||||
$(DIST)\lib\libplc21.lib \
|
||||
$(DIST)\lib\netlib.lib \
|
||||
$(DIST)\lib\raptorgfx_s.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
LLFLAGS = \
|
||||
$(LLFLAGS) \
|
||||
/INCLUDE:_NS_HexToRGB@8 \
|
||||
/INCLUDE:_NS_ColorNameToRGB@8 \
|
||||
/INCLUDE:_NS_NewImageGroup@4 \
|
||||
/INCLUDE:_NS_NewImageRenderer@4 \
|
||||
/INCLUDE:_NS_NewImageSystemServices@4 \
|
||||
/INCLUDE:_NS_NewImageManager@4
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\$(DLLNAME).dll
|
||||
rm -f $(DIST)\lib\$(DLLNAME).lib
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ LINCS=-I$(XPDIST)\public\raptor -I$(XPDIST)\public\xpcom -I..\src
|
|||
|
||||
LLIBS= \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\libplc21.lib \
|
||||
|
|
|
@ -30,7 +30,7 @@ LINCS=-I$(XPDIST)\public\raptor -I$(XPDIST)\public\xpcom -I..\src
|
|||
|
||||
LLIBS= \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\libplc21.lib
|
||||
|
|
|
@ -25,7 +25,7 @@ PROGRAMS = $(PROG1) $(PROG2)
|
|||
LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I..\src
|
||||
LLIBS= \
|
||||
$(DIST)\lib\raptorlayout_s.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\jsdom.lib \
|
||||
|
|
|
@ -44,7 +44,7 @@ MISCDEP = \
|
|||
$(DIST)\lib\raptorevents_s.lib \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(DIST)\lib\raptorhtmlpars.lib \
|
||||
$(DIST)\lib\jsdom.lib \
|
||||
$(DIST)\lib\libplc21.lib \
|
||||
|
@ -71,7 +71,7 @@ LLIBS= \
|
|||
$(DIST)\lib\raptorevents_s.lib \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(DIST)\lib\raptorhtmlpars.lib \
|
||||
$(DIST)\lib\jsdom.lib \
|
||||
$(DIST)\lib\netlib.lib \
|
||||
|
|
|
@ -49,7 +49,7 @@ LLIBS= \
|
|||
$(DIST)\lib\nglhtmlcon_s.lib \
|
||||
$(DIST)\lib\raptorhtmlstyle_s.lib \
|
||||
$(DIST)\lib\raptorlayout_s.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorevents_s.lib \
|
||||
$(DIST)\lib\img3240.lib \
|
||||
|
|
|
@ -48,7 +48,7 @@ LCFLAGS = \
|
|||
LLIBS= \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
|
|
@ -53,7 +53,7 @@ LCFLAGS = \
|
|||
LLIBS= \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(DIST)\lib\raptorhtml.lib \
|
||||
$(DIST)\lib\img3240.lib \
|
||||
$(DIST)\lib\util.lib \
|
||||
|
|
|
@ -31,7 +31,7 @@ OBJS = \
|
|||
|
||||
LLIBS= \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(DIST)\lib\raptorweb.lib \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(LIBNSPR) \
|
||||
|
|
|
@ -53,7 +53,7 @@ LINCS= \
|
|||
|
||||
MYLIBS= \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(DIST)\lib\raptorhtml.lib \
|
||||
$(DIST)\lib\raptorweb.lib \
|
||||
$(DIST)\lib\raptorhtmlpars.lib \
|
||||
|
|
|
@ -26,7 +26,7 @@ RESFILE = widget.res
|
|||
MISCDEP = \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib
|
||||
$(DIST)\lib\raptorgfxwin.lib
|
||||
|
||||
MODULE=raptor
|
||||
|
||||
|
@ -68,7 +68,7 @@ LLIBS= \
|
|||
comctl32.lib \
|
||||
comdlg32.lib \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ MYLIBS= \
|
|||
$(DIST)\lib\xpcom32.lib \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(NULL)
|
||||
|
||||
LLIBS= $(MYLIBS) \
|
||||
|
|
|
@ -33,7 +33,7 @@ MYLIBS= \
|
|||
$(DIST)\lib\xpcom32.lib \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\raptorgfx.lib \
|
||||
$(DIST)\lib\raptorgfxwin.lib \
|
||||
$(NULL)
|
||||
|
||||
LLIBS= $(MYLIBS) \
|
||||
|
|
Загрузка…
Ссылка в новой задаче