summaryrefslogtreecommitdiff
path: root/core/src/fxge/apple
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge/apple')
-rw-r--r--core/src/fxge/apple/apple_int.h14
-rw-r--r--core/src/fxge/apple/fx_mac_imp.cpp10
-rw-r--r--core/src/fxge/apple/fx_quartz_device.cpp8
3 files changed, 16 insertions, 16 deletions
diff --git a/core/src/fxge/apple/apple_int.h b/core/src/fxge/apple/apple_int.h
index 6cd880603a..1e620a3a4f 100644
--- a/core/src/fxge/apple/apple_int.h
+++ b/core/src/fxge/apple/apple_int.h
@@ -48,7 +48,7 @@ public:
void* createGraphics(CFX_DIBitmap* bitmap);
void destroyGraphics(void* graphics);
- void* CreateFont(FX_LPCBYTE pFontData, FX_DWORD dwFontSize);
+ void* CreateFont(const uint8_t* pFontData, FX_DWORD dwFontSize);
void DestroyFont(void* pFont);
void setGraphicsTextMatrix(void* graphics, CFX_AffineMatrix* matrix);
FX_BOOL drawGraphicsString(void* graphics,
@@ -141,17 +141,17 @@ public:
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
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)
{
return FALSE;
}
- 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,
int alpha_flag = 0, void* pIccTransform = NULL);
@@ -239,10 +239,10 @@ private:
int _tableCount;
int _totalSize;
};
-uint32_t FX_GetHashCode( FX_LPCSTR pStr);
-FX_DWORD FX_IOSGetMatchFamilyNameHashcode(FX_LPCSTR pFontName);
+uint32_t FX_GetHashCode( const FX_CHAR* pStr);
+FX_DWORD FX_IOSGetMatchFamilyNameHashcode(const FX_CHAR* pFontName);
uint32_t FX_IOSGetFamilyNamesCount();
-FX_LPCSTR FX_IOSGetFamilyName( uint32_t uIndex);
+const FX_CHAR* FX_IOSGetFamilyName( uint32_t uIndex);
#endif
#endif // CORE_SRC_FXGE_APPLE_APPLE_INT_H_
diff --git a/core/src/fxge/apple/fx_mac_imp.cpp b/core/src/fxge/apple/fx_mac_imp.cpp
index 5acedc0bd9..41b8632965 100644
--- a/core/src/fxge/apple/fx_mac_imp.cpp
+++ b/core/src/fxge/apple/fx_mac_imp.cpp
@@ -8,8 +8,8 @@
#include "apple_int.h"
#if _FX_OS_ == _FX_MACOSX_
static const struct {
- FX_LPCSTR m_pName;
- FX_LPCSTR m_pSubstName;
+ const FX_CHAR* m_pName;
+ const FX_CHAR* m_pSubstName;
}
Base14Substs[] = {
{"Courier", "Courier New"},
@@ -28,7 +28,7 @@ Base14Substs[] = {
class CFX_MacFontInfo : public CFX_FolderFontInfo
{
public:
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact);
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact);
};
#define JAPAN_GOTHIC "Hiragino Kaku Gothic Pro W6"
#define JAPAN_MINCHO "Hiragino Mincho Pro W6"
@@ -44,7 +44,7 @@ static void GetJapanesePreference(CFX_ByteString& face, int weight, int picth_fa
face = JAPAN_MINCHO;
}
}
-void* CFX_MacFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR cstr_face, FX_BOOL& bExact)
+void* CFX_MacFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* cstr_face, FX_BOOL& bExact)
{
CFX_ByteString face = cstr_face;
int iBaseFont;
@@ -57,7 +57,7 @@ void* CFX_MacFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pit
if (iBaseFont < 12) {
return GetFont(face);
}
- FX_LPVOID p;
+ void* p;
if (m_FontList.Lookup(face, p)) {
return p;
}
diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp
index fa63d22028..7ecce7e0ef 100644
--- a/core/src/fxge/apple/fx_quartz_device.cpp
+++ b/core/src/fxge/apple/fx_quartz_device.cpp
@@ -48,7 +48,7 @@ void CQuartz2D::destroyGraphics(void* graphics)
CGContextRelease((CGContextRef) graphics);
}
}
-void* CQuartz2D::CreateFont(FX_LPCBYTE pFontData, FX_DWORD dwFontSize)
+void* CQuartz2D::CreateFont(const uint8_t* pFontData, FX_DWORD dwFontSize)
{
CGDataProviderRef pDataProvider = CGDataProviderCreateWithData(NULL, pFontData, (size_t)dwFontSize, NULL);
if (NULL == pDataProvider) {
@@ -541,7 +541,7 @@ FX_BOOL CFX_QuartzDeviceDriver::GetDIBits(CFX_DIBitmap* bitmap,
CGImageRelease(image);
if (bitmap->HasAlpha()) {
for (int row = 0; row < bitmap->GetHeight(); row ++) {
- FX_LPBYTE pScanline = (FX_LPBYTE)bitmap->GetScanline(row);
+ uint8_t* pScanline = (uint8_t*)bitmap->GetScanline(row);
for (int col = 0; col < bitmap->GetWidth(); col ++) {
if (pScanline[3] > 0) {
pScanline[0] = (pScanline[0] * 255.f / pScanline[3] + .5f);
@@ -654,7 +654,7 @@ FX_BOOL CFX_QuartzDeviceDriver::SetDIBits(const CFX_DIBSource* pBitmap,
}
}
for (int row = 0; row < pBitmap1->GetHeight(); row ++) {
- FX_LPBYTE pScanline = (FX_LPBYTE)pBitmap1->GetScanline(row);
+ uint8_t* pScanline = (uint8_t*)pBitmap1->GetScanline(row);
for (int col = 0; col < pBitmap1->GetWidth(); col ++) {
pScanline[0] = (uint8_t)(pScanline[0] * pScanline[3] / 255.f + .5f);
pScanline[1] = (uint8_t)(pScanline[1] * pScanline[3] / 255.f + .5f);
@@ -779,7 +779,7 @@ FX_BOOL CFX_QuartzDeviceDriver::StretchDIBits(const CFX_DIBSource* pBitmap,
}
}
for (int row = 0; row < pBitmap1->GetHeight(); row ++) {
- FX_LPBYTE pScanline = (FX_LPBYTE)pBitmap1->GetScanline(row);
+ uint8_t* pScanline = (uint8_t*)pBitmap1->GetScanline(row);
for (int col = 0; col < pBitmap1->GetWidth(); col ++) {
pScanline[0] = (uint8_t)(pScanline[0] * pScanline[3] / 255.f + .5f);
pScanline[1] = (uint8_t)(pScanline[1] * pScanline[3] / 255.f + .5f);