summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/include/fxcrt/fx_stream.h4
-rw-r--r--core/include/fxcrt/fx_system.h1
-rw-r--r--core/include/fxge/fpf.h4
-rw-r--r--xfa/include/fxjse/fxjse.h26
-rw-r--r--xfa/src/fxfa/src/common/xfa_fm2jsapi.h4
5 files changed, 25 insertions, 14 deletions
diff --git a/core/include/fxcrt/fx_stream.h b/core/include/fxcrt/fx_stream.h
index c23c71d15b..dc162f064f 100644
--- a/core/include/fxcrt/fx_stream.h
+++ b/core/include/fxcrt/fx_stream.h
@@ -16,7 +16,9 @@ FX_BOOL FX_GetNextFile(void* handle, CFX_ByteString& filename, FX_BOOL& bFolder)
FX_BOOL FX_GetNextFile(void* handle, CFX_WideString& filename, FX_BOOL& bFolder);
void FX_CloseFolder(void* handle);
FX_WCHAR FX_GetFolderSeparator();
-FX_DEFINEHANDLE(FX_HFILE)
+typedef struct FX_HFILE_ {
+ FX_LPVOID pData;
+}* FX_HFILE;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
#define FX_FILESIZE FX_INT32
#else
diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h
index d030bf70d6..ce86d5ad5c 100644
--- a/core/include/fxcrt/fx_system.h
+++ b/core/include/fxcrt/fx_system.h
@@ -110,7 +110,6 @@ typedef wchar_t* FX_LPWSTR;
typedef wchar_t const* FX_LPCWSTR;
typedef FX_DWORD FX_UINT32;
typedef FX_UINT64 FX_QWORD;
-#define FX_DEFINEHANDLE(name) typedef struct _##name {FX_LPVOID pData;} * name;
#if defined(DEBUG) && !defined(_DEBUG)
#define _DEBUG
#endif
diff --git a/core/include/fxge/fpf.h b/core/include/fxge/fpf.h
index 28d028cfbb..9fb38f8043 100644
--- a/core/include/fxge/fpf.h
+++ b/core/include/fxge/fpf.h
@@ -18,7 +18,9 @@ public:
};
IFPF_DeviceModule* FPF_GetDeviceModule();
#define FPF_MATCHFONT_REPLACEANSI 1
-FX_DEFINEHANDLE(FPF_HFONT);
+typedef struct FPF_HFONT_ {
+ FX_LPVOID pData;
+}* FPF_HFONT;
class IFPF_Font
{
public:
diff --git a/xfa/include/fxjse/fxjse.h b/xfa/include/fxjse/fxjse.h
index 0bd44347a4..aeec9af0a0 100644
--- a/xfa/include/fxjse/fxjse.h
+++ b/xfa/include/fxjse/fxjse.h
@@ -6,16 +6,22 @@
#ifndef _FXJSE_H_
#define _FXJSE_H_
-#ifdef __cplusplus
-#define FXJSE_DEFINEINHERITHANDLE(name, subtypename) typedef struct _##subtypename : public _##name {} * subtypename;
-#else
-#define FXJSE_DEFINEINHERITHANDLE(name, subtypename) typedef name subtypename;
-#endif
-FX_DEFINEHANDLE(FXJSE_HRUNTIME);
-FX_DEFINEHANDLE(FXJSE_HCONTEXT);
-FX_DEFINEHANDLE(FXJSE_HCLASS);
-FX_DEFINEHANDLE(FXJSE_HVALUE);
-FXJSE_DEFINEINHERITHANDLE(FXJSE_HVALUE, FXJSE_HOBJECT);
+
+typedef struct FXJSE_HRUNTIME_ {
+ FX_LPVOID pData;
+}* FXJSE_HRUNTIME;
+typedef struct FXJSE_HCONTEXT_ {
+ FX_LPVOID pData;
+}* FXJSE_HCONTEXT;
+typedef struct FXJSE_HCLASS_ {
+ FX_LPVOID pData;
+}* FXJSE_HCLASS;
+typedef struct FXJSE_HVALUE_ {
+ FX_LPVOID pData;
+}* FXJSE_HVALUE;
+typedef struct FXJSE_HOBJECT_ : public FXJSE_HVALUE_ {
+}* FXJSE_HOBJECT;
+
typedef double FXJSE_DOUBLE;
void FXJSE_Initialize();
void FXJSE_Finalize();
diff --git a/xfa/src/fxfa/src/common/xfa_fm2jsapi.h b/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
index 499ceca4e3..cdb4fe94f6 100644
--- a/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
+++ b/xfa/src/fxfa/src/common/xfa_fm2jsapi.h
@@ -11,7 +11,9 @@
extern "C"
{
#endif
-FX_DEFINEHANDLE(XFA_HFM2JSCONTEXT)
+typedef struct XFA_HFM2JSCONTEXT_ {
+ FX_LPVOID* pData;
+}* XFA_HFM2JSCONTEXT;
FX_INT32 XFA_FM2JS_Translate(FX_WSTR wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError);
XFA_HFM2JSCONTEXT XFA_FM2JS_ContextCreate();
void XFA_FM2JS_ContextInitialize(XFA_HFM2JSCONTEXT hFM2JSContext, FXJSE_HRUNTIME hScriptRuntime,