[OS/2] Bug 395491: Fix files copied over from gfx for compilation, step 1 to remove NS_GFX macros to fix build break. Tested as working by abwillis1 and daveryeo.

This commit is contained in:
mozilla@weilbacher.org 2007-09-09 02:07:20 -07:00
Родитель 3afd28207c
Коммит d42b2587b2
5 изменённых файлов: 25 добавлений и 29 удалений

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

@ -135,7 +135,7 @@ void OS2Uni::FreeUconvObjects()
/**********************************************************
WideCharToMultiByte
**********************************************************/
NS_GFX_(nsresult)
nsresult
WideCharToMultiByte(int aCodePage, const PRUnichar* aSrc,
PRInt32 aSrcLength, nsAutoCharBuffer& aResult,
PRInt32& aResultLength)
@ -159,7 +159,7 @@ WideCharToMultiByte(int aCodePage, const PRUnichar* aSrc,
/**********************************************************
MultiByteToWideChar
**********************************************************/
NS_GFX_(nsresult)
nsresult
MultiByteToWideChar(int aCodePage, const char* aSrc,
PRInt32 aSrcLength, nsAutoChar16Buffer& aResult,
PRInt32& aResultLength)

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

@ -44,13 +44,12 @@
#include "nsICharsetConverterManager.h"
#include "gfxCore.h"
enum ConverterRequest {
eConv_Encoder,
eConv_Decoder
};
class NS_GFX OS2Uni {
class OS2Uni {
public:
static nsISupports* GetUconvObject(int CodePage, ConverterRequest aReq);
static void FreeUconvObjects();
@ -58,16 +57,15 @@ private:
static nsICharsetConverterManager* gCharsetManager;
};
#define CHAR_BUFFER_SIZE 1024
typedef nsAutoBuffer<char, CHAR_BUFFER_SIZE> nsAutoCharBuffer;
typedef nsAutoBuffer<PRUnichar, CHAR_BUFFER_SIZE> nsAutoChar16Buffer;
NS_GFX_(nsresult) WideCharToMultiByte(int aCodePage, const PRUnichar* aSrc,
PRInt32 aSrcLength, nsAutoCharBuffer& aResult,
PRInt32& aResultLength);
NS_GFX_(nsresult) MultiByteToWideChar(int aCodePage, const char* aSrc,
PRInt32 aSrcLength, nsAutoChar16Buffer& aResult,
PRInt32& aResultLength);
nsresult WideCharToMultiByte(int aCodePage, const PRUnichar* aSrc,
PRInt32 aSrcLength, nsAutoCharBuffer& aResult,
PRInt32& aResultLength);
nsresult MultiByteToWideChar(int aCodePage, const char* aSrc,
PRInt32 aSrcLength, nsAutoChar16Buffer& aResult,
PRInt32& aResultLength);
#endif

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

@ -42,7 +42,7 @@
#include <os2.h>
#include "gfxCore.h"
class NS_GFX nsPaletteOS2 {
class nsPaletteOS2 {
public:
static void FreeGlobalPalette();
static void InitializeGlobalPalette();

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

@ -50,7 +50,7 @@ static HMODULE hmodRes;
#define SHIFT_PTR(ptr,offset) ( *((LONG*)&ptr) += offset )
class NS_GFX PRTQUEUE
class PRTQUEUE
{
public:
PRTQUEUE (const PRQINFO3* pPQI3) { InitWithPQI3 (pPQI3); }
@ -354,7 +354,7 @@ BOOL PRINTDLG::ShowProperties(ULONG printerNdx)
/* Job management */
/****************************************************************************/
NS_GFX_(HDC) PrnOpenDC( PRTQUEUE *pInfo, PSZ pszApplicationName, int copies, int destination, char *file )
HDC PrnOpenDC( PRTQUEUE *pInfo, PSZ pszApplicationName, int copies, int destination, char *file )
{
HDC hdc = 0;
PSZ pszLogAddress;
@ -405,7 +405,7 @@ NS_GFX_(HDC) PrnOpenDC( PRTQUEUE *pInfo, PSZ pszApplicationName, int copies, int
}
/* find the selected form */
NS_GFX_(BOOL) PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo)
BOOL PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo)
{
BOOL rc = FALSE;
@ -440,19 +440,19 @@ NS_GFX_(BOOL) PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo)
/* Library-level data and functions -Printing */
/****************************************************************************/
NS_GFX_(BOOL) PrnInitialize( HMODULE hmodResources)
BOOL PrnInitialize( HMODULE hmodResources)
{
hmodRes = hmodResources;
return TRUE;
}
NS_GFX_(BOOL) PrnTerminate()
BOOL PrnTerminate()
{
/* nop for now, may do something eventually */
return TRUE;
}
NS_GFX_(BOOL) PrnClosePrinter( PRTQUEUE *pPrintQueue)
BOOL PrnClosePrinter( PRTQUEUE *pPrintQueue)
{
BOOL rc = FALSE;

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

@ -54,15 +54,15 @@
// OS/2 Printing - was in libprint
//---------------------------------------------------------------------------
// Library init and term; job properties per queue are cached during run.
NS_GFX_(BOOL) PrnInitialize(HMODULE hmodResources);
NS_GFX_(BOOL) PrnTerminate(void);
BOOL PrnInitialize(HMODULE hmodResources);
BOOL PrnTerminate(void);
// opaque type to describe a print queue (printer)
class NS_GFX PRTQUEUE;
class PRTQUEUE;
#define MAX_PRINT_QUEUES (128)
class NS_GFX PRINTDLG
class PRINTDLG
{
public:
PRINTDLG();
@ -84,17 +84,15 @@ private:
// Release app. resources associated with a printer
NS_GFX_(BOOL) PrnClosePrinter( PRTQUEUE *pPrintQueue);
BOOL PrnClosePrinter( PRTQUEUE *pPrintQueue);
// Get a DC for the selected printer. Must supply the application name.
NS_GFX_(HDC) PrnOpenDC( PRTQUEUE *pPrintQueue, PSZ pszApplicationName, int copies, int destination, char *file);
HDC PrnOpenDC( PRTQUEUE *pPrintQueue, PSZ pszApplicationName, int copies, int destination, char *file);
// Get the hardcopy caps for the selected form
NS_GFX_(BOOL) PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo);
BOOL PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo);
// Abort the current job started with PrnStartJob().
NS_GFX_(BOOL) PrnAbortJob( HDC hdc);
BOOL PrnAbortJob( HDC hdc);
#endif