diff options
Diffstat (limited to 'core/include/fxge')
-rw-r--r-- | core/include/fxge/fpf.h | 6 | ||||
-rw-r--r-- | core/include/fxge/fx_dib.h | 119 | ||||
-rw-r--r-- | core/include/fxge/fx_font.h | 50 | ||||
-rw-r--r-- | core/include/fxge/fx_ge.h | 18 | ||||
-rw-r--r-- | core/include/fxge/fx_ge_win32.h | 6 |
5 files changed, 101 insertions, 98 deletions
diff --git a/core/include/fxge/fpf.h b/core/include/fxge/fpf.h index 30c1c77bbe..710600c84f 100644 --- a/core/include/fxge/fpf.h +++ b/core/include/fxge/fpf.h @@ -20,7 +20,7 @@ public: IFPF_DeviceModule* FPF_GetDeviceModule(); #define FPF_MATCHFONT_REPLACEANSI 1 typedef struct FPF_HFONT_ { - FX_LPVOID pData; + void* pData; }* FPF_HFONT; class IFPF_Font { @@ -44,7 +44,7 @@ public: virtual int32_t GetHeight() const = 0; virtual int32_t GetItalicAngle() const = 0; - virtual FX_DWORD GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize) = 0; + virtual FX_DWORD GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD dwSize) = 0; protected: ~IFPF_Font() { } @@ -56,7 +56,7 @@ public: virtual void LoadSystemFonts() = 0; virtual void LoadPrivateFont(IFX_FileRead* pFontFile) = 0; virtual void LoadPrivateFont(FX_BSTR bsFileName) = 0; - virtual void LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer) = 0; + virtual void LoadPrivateFont(void* pBuffer, size_t szBuffer) = 0; virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, uint8_t charset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0) = 0; }; diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h index d798ca3511..50dd3e9eed 100644 --- a/core/include/fxge/fx_dib.h +++ b/core/include/fxge/fx_dib.h @@ -100,33 +100,33 @@ FX_ARGB ArgbEncode(int a, FX_COLORREF rgb); #define FXCMYK2GRAY(c,m,y,k) (((255-(c)) * (255-(k)) * 30 + (255-(m)) * (255-(k)) * 59 + (255-(y)) * (255-(k)) * 11) / 25500) #define FXDIB_ALPHA_MERGE(backdrop, source, source_alpha) (((backdrop) * (255-(source_alpha)) + (source)*(source_alpha))/255) #define FXDIB_ALPHA_UNION(dest, src) ((dest) + (src) - (dest)*(src)/255) -#define FXCMYK_GETDIB(p) ((((FX_LPBYTE)(p))[0] << 24 | (((FX_LPBYTE)(p))[1] << 16) | (((FX_LPBYTE)(p))[2] << 8) | ((FX_LPBYTE)(p))[3])) -#define FXCMYK_SETDIB(p, cmyk) ((FX_LPBYTE)(p))[0] = (uint8_t)((cmyk) >> 24), \ - ((FX_LPBYTE)(p))[1] = (uint8_t)((cmyk) >> 16), \ - ((FX_LPBYTE)(p))[2] = (uint8_t)((cmyk) >> 8), \ - ((FX_LPBYTE)(p))[3] = (uint8_t)(cmyk)) -#define FXARGB_GETDIB(p) ((((FX_LPBYTE)(p))[0]) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[2] << 16) | (((FX_LPBYTE)(p))[3] << 24)) -#define FXARGB_SETDIB(p, argb) ((FX_LPBYTE)(p))[0] = (uint8_t)(argb), \ - ((FX_LPBYTE)(p))[1] = (uint8_t)((argb) >> 8), \ - ((FX_LPBYTE)(p))[2] = (uint8_t)((argb) >> 16), \ - ((FX_LPBYTE)(p))[3] = (uint8_t)((argb) >> 24) -#define FXARGB_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \ - *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \ - *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)+2), \ - *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)(src)+3) -#define FXCMYK_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \ - *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \ - *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)+2), \ - *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)(src)+3) -#define FXARGB_SETRGBORDERDIB(p, argb) ((FX_LPBYTE)(p))[3] = (uint8_t)(argb>>24), \ - ((FX_LPBYTE)(p))[0] = (uint8_t)((argb) >> 16), \ - ((FX_LPBYTE)(p))[1] = (uint8_t)((argb) >> 8), \ - ((FX_LPBYTE)(p))[2] = (uint8_t)(argb) -#define FXARGB_GETRGBORDERDIB(p) (((FX_LPBYTE)(p))[2]) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[0] << 16) | (((FX_LPBYTE)(p))[3] << 24) -#define FXARGB_RGBORDERCOPY(dest, src) *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)(src)+3), \ - *(FX_LPBYTE)(dest) = *((FX_LPBYTE)(src)+2), \ - *((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \ - *((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)) +#define FXCMYK_GETDIB(p) ((((uint8_t*)(p))[0] << 24 | (((uint8_t*)(p))[1] << 16) | (((uint8_t*)(p))[2] << 8) | ((uint8_t*)(p))[3])) +#define FXCMYK_SETDIB(p, cmyk) ((uint8_t*)(p))[0] = (uint8_t)((cmyk) >> 24), \ + ((uint8_t*)(p))[1] = (uint8_t)((cmyk) >> 16), \ + ((uint8_t*)(p))[2] = (uint8_t)((cmyk) >> 8), \ + ((uint8_t*)(p))[3] = (uint8_t)(cmyk)) +#define FXARGB_GETDIB(p) ((((uint8_t*)(p))[0]) | (((uint8_t*)(p))[1] << 8) | (((uint8_t*)(p))[2] << 16) | (((uint8_t*)(p))[3] << 24)) +#define FXARGB_SETDIB(p, argb) ((uint8_t*)(p))[0] = (uint8_t)(argb), \ + ((uint8_t*)(p))[1] = (uint8_t)((argb) >> 8), \ + ((uint8_t*)(p))[2] = (uint8_t)((argb) >> 16), \ + ((uint8_t*)(p))[3] = (uint8_t)((argb) >> 24) +#define FXARGB_COPY(dest, src) *(uint8_t*)(dest) = *(uint8_t*)(src), \ + *((uint8_t*)(dest)+1) = *((uint8_t*)(src)+1), \ + *((uint8_t*)(dest)+2) = *((uint8_t*)(src)+2), \ + *((uint8_t*)(dest)+3) = *((uint8_t*)(src)+3) +#define FXCMYK_COPY(dest, src) *(uint8_t*)(dest) = *(uint8_t*)(src), \ + *((uint8_t*)(dest)+1) = *((uint8_t*)(src)+1), \ + *((uint8_t*)(dest)+2) = *((uint8_t*)(src)+2), \ + *((uint8_t*)(dest)+3) = *((uint8_t*)(src)+3) +#define FXARGB_SETRGBORDERDIB(p, argb) ((uint8_t*)(p))[3] = (uint8_t)(argb>>24), \ + ((uint8_t*)(p))[0] = (uint8_t)((argb) >> 16), \ + ((uint8_t*)(p))[1] = (uint8_t)((argb) >> 8), \ + ((uint8_t*)(p))[2] = (uint8_t)(argb) +#define FXARGB_GETRGBORDERDIB(p) (((uint8_t*)(p))[2]) | (((uint8_t*)(p))[1] << 8) | (((uint8_t*)(p))[0] << 16) | (((uint8_t*)(p))[3] << 24) +#define FXARGB_RGBORDERCOPY(dest, src) *((uint8_t*)(dest)+3) = *((uint8_t*)(src)+3), \ + *(uint8_t*)(dest) = *((uint8_t*)(src)+2), \ + *((uint8_t*)(dest)+1) = *((uint8_t*)(src)+1), \ + *((uint8_t*)(dest)+2) = *((uint8_t*)(src)) #define FXARGB_TODIB(argb) (argb) #define FXCMYK_TODIB(cmyk) ((uint8_t)((cmyk) >> 24) | ((uint8_t)((cmyk) >> 16)) << 8 | ((uint8_t)((cmyk) >> 8)) << 16 | ((uint8_t)(cmyk) << 24)) #define FXARGB_TOBGRORDERDIB(argb) ((uint8_t)(argb>>16) | ((uint8_t)(argb>>8)) << 8 | ((uint8_t)(argb)) << 16 | ((uint8_t)(argb>>24) << 24)) @@ -171,19 +171,19 @@ public: - virtual FX_LPBYTE GetBuffer() const + virtual uint8_t* GetBuffer() const { return NULL; } - virtual FX_LPCBYTE GetScanline(int line) const = 0; + virtual const uint8_t* GetScanline(int line) const = 0; virtual FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) const { return FALSE; } - virtual void DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp, + virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp, int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const = 0; virtual void SetDownSampleSize(int width, int height) const {} @@ -291,21 +291,21 @@ public: CFX_DIBitmap(const CFX_DIBitmap& src); - FX_BOOL Create(int width, int height, FXDIB_Format format, FX_LPBYTE pBuffer = NULL, int pitch = 0); + FX_BOOL Create(int width, int height, FXDIB_Format format, uint8_t* pBuffer = NULL, int pitch = 0); FX_BOOL Copy(const CFX_DIBSource* pSrc); - virtual FX_LPBYTE GetBuffer() const + virtual uint8_t* GetBuffer() const { return m_pBuffer; } - virtual FX_LPCBYTE GetScanline(int line) const + virtual const uint8_t* GetScanline(int line) const { return m_pBuffer ? m_pBuffer + line * m_Pitch : NULL; } - virtual void DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp, + virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp, int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const; void TakeOver(CFX_DIBitmap* pSrcBitmap); @@ -347,7 +347,7 @@ public: FX_BOOL DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_RECT* pRect = NULL); protected: - FX_LPBYTE m_pBuffer; + uint8_t* m_pBuffer; FX_BOOL m_bExtBuf; @@ -385,26 +385,26 @@ public: virtual FX_DWORD* GetDestPalette() = 0; - virtual void TranslateScanline(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf) const = 0; + virtual void TranslateScanline(uint8_t* dest_buf, const uint8_t* src_buf) const = 0; - virtual void TranslateDownSamples(FX_LPBYTE dest_buf, FX_LPCBYTE src_buf, int pixels, int Bpp) const = 0; + virtual void TranslateDownSamples(uint8_t* dest_buf, const uint8_t* src_buf, int pixels, int Bpp) const = 0; protected: - virtual FX_LPCBYTE GetScanline(int line) const; - virtual void DownSampleScanline(int line, FX_LPBYTE dest_scan, int dest_bpp, + virtual const uint8_t* GetScanline(int line) const; + virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp, int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const; const CFX_DIBSource* m_pSrc; FX_BOOL m_bAutoDropSrc; - FX_LPBYTE m_pScanline; + uint8_t* m_pScanline; }; class IFX_ScanlineComposer { public: virtual ~IFX_ScanlineComposer() { } - virtual void ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha = NULL) = 0; + virtual void ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha = NULL) = 0; virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette) = 0; }; @@ -419,20 +419,20 @@ public: FX_DWORD mask_color, int blend_type, FX_BOOL bClip, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, void* pIccTransform = NULL); - void CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan, - FX_LPCBYTE src_extra_alpha = NULL, FX_LPBYTE dst_extra_alpha = NULL); + void CompositeRgbBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan, + const uint8_t* src_extra_alpha = NULL, uint8_t* dst_extra_alpha = NULL); - void CompositePalBitmapLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width, FX_LPCBYTE clip_scan, - FX_LPCBYTE src_extra_alpha = NULL, FX_LPBYTE dst_extra_alpha = NULL); + void CompositePalBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan, + const uint8_t* src_extra_alpha = NULL, uint8_t* dst_extra_alpha = NULL); - void CompositeByteMaskLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int width, FX_LPCBYTE clip_scan, - FX_LPBYTE dst_extra_alpha = NULL); + void CompositeByteMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan, + uint8_t* dst_extra_alpha = NULL); - void CompositeBitMaskLine(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int src_left, int width, FX_LPCBYTE clip_scan, - FX_LPBYTE dst_extra_alpha = NULL); + void CompositeBitMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan, + uint8_t* dst_extra_alpha = NULL); protected: int m_Transparency; FXDIB_Format m_SrcFormat, @@ -446,7 +446,7 @@ protected: m_MaskBlack; int m_BlendType; void* m_pIccTransform; - FX_LPBYTE m_pCacheScanline; + uint8_t* m_pCacheScanline; int m_CacheSize; FX_BOOL m_bRgbByteOrder; }; @@ -467,11 +467,11 @@ public: virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette); - virtual void ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha); + virtual void ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha); protected: - void DoCompose(FX_LPBYTE dest_scan, FX_LPCBYTE src_scan, int dest_width, FX_LPCBYTE clip_scan, - FX_LPCBYTE src_extra_alpha = NULL, FX_LPBYTE dst_extra_alpha = NULL); + void DoCompose(uint8_t* dest_scan, const uint8_t* src_scan, int dest_width, const uint8_t* clip_scan, + const uint8_t* src_extra_alpha = NULL, uint8_t* dst_extra_alpha = NULL); CFX_DIBitmap* m_pBitmap; const CFX_ClipRgn* m_pClipRgn; FXDIB_Format m_SrcFormat; @@ -484,8 +484,11 @@ protected: void* m_pIccTransform; FX_BOOL m_bRgbByteOrder; int m_BlendType; - void ComposeScanlineV(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha = NULL); - FX_LPBYTE m_pScanlineV, m_pClipScanV, m_pAddClipScan, m_pScanlineAlphaV; + void ComposeScanlineV(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha = NULL); + uint8_t* m_pScanlineV; + uint8_t* m_pClipScanV; + uint8_t* m_pAddClipScan; + uint8_t* m_pScanlineAlphaV; }; class CFX_BitmapStorer : public IFX_ScanlineComposer { @@ -495,7 +498,7 @@ public: ~CFX_BitmapStorer(); - virtual void ComposeScanline(int line, FX_LPCBYTE scanline, FX_LPCBYTE scan_extra_alpha); + virtual void ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha); virtual FX_BOOL SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette); @@ -535,8 +538,8 @@ public: FX_RECT m_ClipRect; int m_LineIndex; int m_DestBPP; - FX_LPBYTE m_pScanline; - FX_LPBYTE m_pMaskScanline; + uint8_t* m_pScanline; + uint8_t* m_pMaskScanline; FXDIB_Format m_DestFormat; int32_t m_Status; diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h index 3d2d99cfd8..c950130d8f 100644 --- a/core/include/fxge/fx_font.h +++ b/core/include/fxge/fx_font.h @@ -58,7 +58,7 @@ public: FX_BOOL LoadSubst(const CFX_ByteString& face_name, FX_BOOL bTrueType, FX_DWORD flags, int weight, int italic_angle, int CharsetCP, FX_BOOL bVertical = FALSE); - FX_BOOL LoadEmbedded(FX_LPCBYTE data, FX_DWORD size); + FX_BOOL LoadEmbedded(const uint8_t* data, FX_DWORD size); FX_BOOL LoadFile(IFX_FileRead* pFile, int nFaceIndex = 0, int* pFaceCount = NULL);
@@ -126,9 +126,9 @@ public: } void AdjustMMParams(int glyph_index, int width, int weight); - FX_LPBYTE m_pFontDataAllocation; - FX_LPBYTE m_pFontData; - FX_LPBYTE m_pGsubData; + uint8_t* m_pFontDataAllocation; + uint8_t* m_pFontData; + uint8_t* m_pGsubData; FX_DWORD m_dwSize; CFX_BinaryBuf m_OtfFontData; void* m_hHandle; @@ -179,7 +179,7 @@ class IFX_FontEncodingEx : public IFX_FontEncoding {
public:
- virtual FX_DWORD GlyphIndexFromName(FX_LPCSTR pStrName) = 0;
+ virtual FX_DWORD GlyphIndexFromName(const FX_CHAR* pStrName) = 0;
virtual CFX_ByteString NameFromGlyphIndex(FX_DWORD dwGlyphIndex) = 0;
@@ -199,7 +199,7 @@ public: CFX_SubstFont(); - FX_LPVOID m_ExtHandle; + void* m_ExtHandle; CFX_ByteString m_Family; @@ -225,7 +225,7 @@ public: #define FX_FONT_FLAG_SYMBOLIC_DINGBATS 0x20 #define FX_FONT_FLAG_MULTIPLEMASTER 0x40 typedef struct { - FX_LPCBYTE m_pFontData; + const uint8_t* m_pFontData; FX_DWORD m_dwSize; } FoxitFonts; class CFX_FontMgr @@ -235,15 +235,15 @@ public: ~CFX_FontMgr(); void InitFTLibrary(); FXFT_Face GetCachedFace(const CFX_ByteString& face_name, - int weight, FX_BOOL bItalic, FX_LPBYTE& pFontData); + int weight, FX_BOOL bItalic, uint8_t*& pFontData); FXFT_Face AddCachedFace(const CFX_ByteString& face_name, - int weight, FX_BOOL bItalic, FX_LPBYTE pData, FX_DWORD size, int face_index); + int weight, FX_BOOL bItalic, uint8_t* pData, FX_DWORD size, int face_index); FXFT_Face GetCachedTTCFace(int ttc_size, FX_DWORD checksum, - int font_offset, FX_LPBYTE& pFontData); + int font_offset, uint8_t*& pFontData); FXFT_Face AddCachedTTCFace(int ttc_size, FX_DWORD checksum, - FX_LPBYTE pData, FX_DWORD size, int font_offset); - FXFT_Face GetFileFace(FX_LPCSTR filename, int face_index); - FXFT_Face GetFixedFace(FX_LPCBYTE pData, FX_DWORD size, int face_index); + uint8_t* pData, FX_DWORD size, int font_offset); + FXFT_Face GetFileFace(const FX_CHAR* filename, int face_index); + FXFT_Face GetFixedFace(const uint8_t* pData, FX_DWORD size, int face_index); void ReleaseFace(FXFT_Face face); void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo); FXFT_Face FindSubstFont(const CFX_ByteString& face_name, FX_BOOL bTrueType, FX_DWORD flags, @@ -251,7 +251,7 @@ public: void FreeCache(); - FX_BOOL GetStandardFont(FX_LPCBYTE& pFontData, FX_DWORD& size, int index); + FX_BOOL GetStandardFont(const uint8_t*& pFontData, FX_DWORD& size, int index); CFX_FontMapper* m_pBuiltinMapper; IFX_FontMapper* m_pExtMapper; CFX_MapByteStringToPtr m_FaceMap; @@ -334,13 +334,13 @@ public: virtual void Release() = 0; virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; - virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact) = 0; - virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family)
- {
- return NULL;
- }
- virtual void* GetFont(FX_LPCSTR face) = 0; - virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size) = 0; + virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact) = 0; + virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family) + { + return NULL; + } + virtual void* GetFont(const FX_CHAR* face) = 0; + virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size) = 0; virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) = 0; virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0; virtual int GetFaceIndex(void* hFont) @@ -363,10 +363,10 @@ public: void AddPath(FX_BSTR path); virtual void Release(); virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper); - virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact); - virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family);
- virtual void* GetFont(FX_LPCSTR face); - virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size); + virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact); + virtual void* MapFontByUnicode(FX_DWORD dwUnicode, int weight, FX_BOOL bItalic, int pitch_family); + virtual void* GetFont(const FX_CHAR* face); + virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size); virtual void DeleteFont(void* hFont); virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name); virtual FX_BOOL GetFontCharset(void* hFont, int& charset); diff --git a/core/include/fxge/fx_ge.h b/core/include/fxge/fx_ge.h index a880166c39..46ff0c30f8 100644 --- a/core/include/fxge/fx_ge.h +++ b/core/include/fxge/fx_ge.h @@ -41,7 +41,7 @@ public: return m_pFontMgr; } void SetTextGamma(FX_FLOAT gammaValue); - FX_LPCBYTE GetTextGammaTable(); + const uint8_t* GetTextGammaTable(); void SetExtFontMapper(IFX_FontMapper* pFontMapper); void SetCodecModule(CCodec_ModuleMgr* pCodecModule) @@ -423,12 +423,12 @@ public: FX_DWORD color, FX_DWORD flags = 0, int alpha_flag = 0, void* pIccTransform = NULL); FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color, - const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle, + const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle, int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL); - FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause); + FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause); - void CancelDIBits(FX_LPVOID handle); + void CancelDIBits(void* handle); FX_BOOL DrawNormalText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, CFX_FontCache* pCache, @@ -601,15 +601,15 @@ public: int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL) = 0; virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color, - const CFX_AffineMatrix* pMatrix, FX_DWORD flags, FX_LPVOID& handle, + const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle, int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL) = 0; - virtual FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPause) + virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) { return FALSE; } - virtual void CancelDIBits(FX_LPVOID handle) {} + virtual void CancelDIBits(void* handle) {} virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color, @@ -634,7 +634,7 @@ class IFX_PSOutput { public: virtual void Release() = 0; - virtual void OutputPS(FX_LPCSTR string, int len) = 0; + virtual void OutputPS(const FX_CHAR* string, int len) = 0; protected: ~IFX_PSOutput() { } @@ -726,7 +726,7 @@ private: void FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_Font* pFont, const FXTEXT_CHARPOS& charpos, int& ps_fontnum, int &ps_glyphindex); - void WritePSBinary(FX_LPCBYTE data, int len); + void WritePSBinary(const uint8_t* data, int len); }; #endif // CORE_INCLUDE_FXGE_FX_GE_H_ diff --git a/core/include/fxge/fx_ge_win32.h b/core/include/fxge/fx_ge_win32.h index 3972090326..57f30f7d35 100644 --- a/core/include/fxge/fx_ge_win32.h +++ b/core/include/fxge/fx_ge_win32.h @@ -21,7 +21,7 @@ typedef struct WINDIB_Open_Args_ { size_t memory_size; - FX_LPCWSTR path_name; + const FX_WCHAR* path_name; } WINDIB_Open_Args_; class CFX_WindowsDIB : public CFX_DIBitmap { @@ -35,9 +35,9 @@ public: static CFX_DIBitmap* LoadFromDDB(HDC hDC, HBITMAP hBitmap, FX_DWORD* pPalette = NULL, FX_DWORD size = 256); - static CFX_DIBitmap* LoadFromFile(FX_LPCWSTR filename); + static CFX_DIBitmap* LoadFromFile(const FX_WCHAR* filename); - static CFX_DIBitmap* LoadFromFile(FX_LPCSTR filename) + static CFX_DIBitmap* LoadFromFile(const FX_CHAR* filename) { return LoadFromFile(CFX_WideString::FromLocal(filename).c_str()); } |