Revert "FX_BOOL considered harmful, part 2."
authorTom Sepez <tsepez@chromium.org>
Thu, 23 Jul 2015 20:36:00 +0000 (13:36 -0700)
committerTom Sepez <tsepez@chromium.org>
Thu, 23 Jul 2015 20:36:00 +0000 (13:36 -0700)
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9.
Reason for revert: build failure.

TBR=thestig@chromium.org

Review URL: https://codereview.chromium.org/1255693002 .

299 files changed:
core/include/fdrm/fx_crypt.h
core/include/fpdfapi/fpdf_module.h
core/include/fpdfapi/fpdf_objects.h
core/include/fpdfapi/fpdf_page.h
core/include/fpdfapi/fpdf_pageobj.h
core/include/fpdfapi/fpdf_parser.h
core/include/fpdfapi/fpdf_render.h
core/include/fpdfapi/fpdf_resource.h
core/include/fpdfapi/fpdf_serial.h
core/include/fpdfdoc/fpdf_ap.h
core/include/fpdfdoc/fpdf_doc.h
core/include/fpdfdoc/fpdf_tagged.h
core/include/fpdfdoc/fpdf_vt.h
core/include/fpdftext/fpdf_text.h
core/include/fxcodec/fx_codec.h
core/include/fxcodec/fx_codec_provider.h
core/include/fxcrt/fx_arb.h
core/include/fxcrt/fx_basic.h
core/include/fxcrt/fx_coordinates.h
core/include/fxcrt/fx_ext.h
core/include/fxcrt/fx_stream.h
core/include/fxcrt/fx_string.h
core/include/fxcrt/fx_system.h
core/include/fxcrt/fx_ucd.h
core/include/fxcrt/fx_xml.h
core/include/fxge/fpf.h
core/include/fxge/fx_dib.h
core/include/fxge/fx_font.h
core/include/fxge/fx_ge.h
core/include/fxge/fx_ge_apple.h
core/include/fxge/fx_ge_win32.h
core/include/thirdparties/libjpeg/jmorecfg.h
core/include/thirdparties/libjpeg/jpegint.h
core/include/thirdparties/libjpeg/jpeglib.h
core/src/fdrm/crypto/fx_crypt.cpp
core/src/fdrm/crypto/fx_crypt_aes.cpp
core/src/fdrm/crypto/fx_crypt_sha.cpp
core/src/fpdfapi/fpdf_basic_module.cpp
core/src/fpdfapi/fpdf_edit/editint.h
core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
core/src/fpdfapi/fpdf_font/font_int.h
core/src/fpdfapi/fpdf_font/fpdf_font.cpp
core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
core/src/fpdfapi/fpdf_font/ttgsubtable.h
core/src/fpdfapi/fpdf_page/fpdf_page.cpp
core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
core/src/fpdfapi/fpdf_page/pageint.h
core/src/fpdfapi/fpdf_parser/filters_int.h
core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
core/src/fpdfapi/fpdf_render/fpdf_render.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
core/src/fpdfapi/fpdf_render/render_int.h
core/src/fpdfdoc/doc_action.cpp
core/src/fpdfdoc/doc_annot.cpp
core/src/fpdfdoc/doc_ap.cpp
core/src/fpdfdoc/doc_basic.cpp
core/src/fpdfdoc/doc_form.cpp
core/src/fpdfdoc/doc_formcontrol.cpp
core/src/fpdfdoc/doc_formfield.cpp
core/src/fpdfdoc/doc_metadata.cpp
core/src/fpdfdoc/doc_ocg.cpp
core/src/fpdfdoc/doc_tagged.cpp
core/src/fpdfdoc/doc_utils.cpp
core/src/fpdfdoc/doc_utils.h
core/src/fpdfdoc/doc_viewerPreferences.cpp
core/src/fpdfdoc/doc_vt.cpp
core/src/fpdfdoc/pdf_vt.h
core/src/fpdfdoc/tagged_int.h
core/src/fpdftext/fpdf_text.cpp
core/src/fpdftext/fpdf_text_int.cpp
core/src/fpdftext/fpdf_text_search.cpp
core/src/fpdftext/text_int.h
core/src/fpdftext/txtproc.h
core/src/fxcodec/codec/codec_int.h
core/src/fxcodec/codec/fx_codec.cpp
core/src/fxcodec/codec/fx_codec_fax.cpp
core/src/fxcodec/codec/fx_codec_flate.cpp
core/src/fxcodec/codec/fx_codec_icc.cpp
core/src/fxcodec/codec/fx_codec_jbig.cpp
core/src/fxcodec/codec/fx_codec_jpeg.cpp
core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
core/src/fxcodec/jbig2/JBig2_BitStream.h
core/src/fxcodec/jbig2/JBig2_Context.cpp
core/src/fxcodec/jbig2/JBig2_Context.h
core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h
core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp
core/src/fxcodec/jbig2/JBig2_HuffmanTable.h
core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h
core/src/fxcodec/jbig2/JBig2_Image.cpp
core/src/fxcodec/jbig2/JBig2_Image.h
core/src/fxcodec/jbig2/JBig2_Page.h
core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp
core/src/fxcodec/jbig2/JBig2_SymbolDict.h
core/src/fxcrt/extension.h
core/src/fxcrt/fx_arabic.cpp
core/src/fxcrt/fx_arabic.h
core/src/fxcrt/fx_basic_array.cpp
core/src/fxcrt/fx_basic_bstring.cpp
core/src/fxcrt/fx_basic_buffer.cpp
core/src/fxcrt/fx_basic_coords.cpp
core/src/fxcrt/fx_basic_gcc.cpp
core/src/fxcrt/fx_basic_maps.cpp
core/src/fxcrt/fx_basic_util.cpp
core/src/fxcrt/fx_basic_wstring.cpp
core/src/fxcrt/fx_extension.cpp
core/src/fxcrt/fx_unicode.cpp
core/src/fxcrt/fx_xml_parser.cpp
core/src/fxcrt/fxcrt_platforms.cpp
core/src/fxcrt/fxcrt_platforms.h
core/src/fxcrt/fxcrt_posix.cpp
core/src/fxcrt/fxcrt_posix.h
core/src/fxcrt/fxcrt_windows.cpp
core/src/fxcrt/fxcrt_windows.h
core/src/fxcrt/xml_int.h
core/src/fxge/agg/include/fx_agg_driver.h
core/src/fxge/agg/src/fx_agg_driver.cpp
core/src/fxge/android/fpf_skiafont.cpp
core/src/fxge/android/fpf_skiafont.h
core/src/fxge/android/fpf_skiafontmgr.cpp
core/src/fxge/android/fpf_skiafontmgr.h
core/src/fxge/android/fx_android_font.cpp
core/src/fxge/android/fx_android_font.h
core/src/fxge/apple/apple_int.h
core/src/fxge/apple/fx_apple_platform.cpp
core/src/fxge/apple/fx_mac_imp.cpp
core/src/fxge/apple/fx_quartz_device.cpp
core/src/fxge/dib/dib_int.h
core/src/fxge/dib/fx_dib_composite.cpp
core/src/fxge/dib/fx_dib_convert.cpp
core/src/fxge/dib/fx_dib_engine.cpp
core/src/fxge/dib/fx_dib_main.cpp
core/src/fxge/dib/fx_dib_transform.cpp
core/src/fxge/ge/fx_ge_device.cpp
core/src/fxge/ge/fx_ge_font.cpp
core/src/fxge/ge/fx_ge_fontmap.cpp
core/src/fxge/ge/fx_ge_linux.cpp
core/src/fxge/ge/fx_ge_path.cpp
core/src/fxge/ge/fx_ge_ps.cpp
core/src/fxge/ge/fx_ge_text.cpp
core/src/fxge/ge/text_int.h
core/src/fxge/skia/fx_skia_blitter_new.cpp
core/src/fxge/skia/fx_skia_blitter_new.h
core/src/fxge/skia/fx_skia_device.cpp
core/src/fxge/skia/fx_skia_device.h
core/src/fxge/win32/dwrite_int.h
core/src/fxge/win32/fx_win32_device.cpp
core/src/fxge/win32/fx_win32_dib.cpp
core/src/fxge/win32/fx_win32_dwrite.cpp
core/src/fxge/win32/fx_win32_gdipext.cpp
core/src/fxge/win32/fx_win32_print.cpp
core/src/fxge/win32/win32_int.h
fpdfsdk/include/formfiller/FFL_CheckBox.h
fpdfsdk/include/formfiller/FFL_ComboBox.h
fpdfsdk/include/formfiller/FFL_FormFiller.h
fpdfsdk/include/formfiller/FFL_IFormFiller.h
fpdfsdk/include/formfiller/FFL_ListBox.h
fpdfsdk/include/formfiller/FFL_Notify.h
fpdfsdk/include/formfiller/FFL_PushButton.h
fpdfsdk/include/formfiller/FFL_RadioButton.h
fpdfsdk/include/formfiller/FFL_TextField.h
fpdfsdk/include/formfiller/FFL_Utils.h
fpdfsdk/include/fsdk_actionhandler.h
fpdfsdk/include/fsdk_annothandler.h
fpdfsdk/include/fsdk_baseannot.h
fpdfsdk/include/fsdk_baseform.h
fpdfsdk/include/fsdk_define.h
fpdfsdk/include/fsdk_mgr.h
fpdfsdk/include/fsdk_rendercontext.h
fpdfsdk/include/fx_systemhandler.h
fpdfsdk/include/fxedit/fx_edit.h
fpdfsdk/include/fxedit/fxet_edit.h
fpdfsdk/include/fxedit/fxet_list.h
fpdfsdk/include/javascript/Document.h
fpdfsdk/include/javascript/Field.h
fpdfsdk/include/javascript/IJavaScript.h
fpdfsdk/include/javascript/Icon.h
fpdfsdk/include/javascript/JS_Context.h
fpdfsdk/include/javascript/JS_Define.h
fpdfsdk/include/javascript/JS_EventHandler.h
fpdfsdk/include/javascript/JS_GlobalData.h
fpdfsdk/include/javascript/JS_Object.h
fpdfsdk/include/javascript/JS_Runtime.h
fpdfsdk/include/javascript/JS_Value.h
fpdfsdk/include/javascript/PublicMethods.h
fpdfsdk/include/javascript/app.h
fpdfsdk/include/javascript/color.h
fpdfsdk/include/javascript/console.h
fpdfsdk/include/javascript/event.h
fpdfsdk/include/javascript/global.h
fpdfsdk/include/javascript/report.h
fpdfsdk/include/javascript/util.h
fpdfsdk/include/pdfwindow/PWL_Button.h
fpdfsdk/include/pdfwindow/PWL_Caret.h
fpdfsdk/include/pdfwindow/PWL_ComboBox.h
fpdfsdk/include/pdfwindow/PWL_Edit.h
fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
fpdfsdk/include/pdfwindow/PWL_FontMap.h
fpdfsdk/include/pdfwindow/PWL_Icon.h
fpdfsdk/include/pdfwindow/PWL_IconList.h
fpdfsdk/include/pdfwindow/PWL_ListBox.h
fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
fpdfsdk/include/pdfwindow/PWL_Note.h
fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
fpdfsdk/include/pdfwindow/PWL_Signature.h
fpdfsdk/include/pdfwindow/PWL_SpecialButton.h
fpdfsdk/include/pdfwindow/PWL_Utils.h
fpdfsdk/include/pdfwindow/PWL_Wnd.h
fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
fpdfsdk/src/formfiller/FFL_CheckBox.cpp
fpdfsdk/src/formfiller/FFL_ComboBox.cpp
fpdfsdk/src/formfiller/FFL_FormFiller.cpp
fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
fpdfsdk/src/formfiller/FFL_ListBox.cpp
fpdfsdk/src/formfiller/FFL_Notify.cpp
fpdfsdk/src/formfiller/FFL_PushButton.cpp
fpdfsdk/src/formfiller/FFL_RadioButton.cpp
fpdfsdk/src/formfiller/FFL_TextField.cpp
fpdfsdk/src/formfiller/FFL_Utils.cpp
fpdfsdk/src/fpdf_dataavail.cpp
fpdfsdk/src/fpdf_ext.cpp
fpdfsdk/src/fpdf_flatten.cpp
fpdfsdk/src/fpdf_progressive.cpp
fpdfsdk/src/fpdf_sysfontinfo.cpp
fpdfsdk/src/fpdf_transformpage.cpp
fpdfsdk/src/fpdfdoc.cpp
fpdfsdk/src/fpdfeditimg.cpp
fpdfsdk/src/fpdfeditpage.cpp
fpdfsdk/src/fpdfformfill.cpp
fpdfsdk/src/fpdfppo.cpp
fpdfsdk/src/fpdfsave.cpp
fpdfsdk/src/fpdftext.cpp
fpdfsdk/src/fpdfview.cpp
fpdfsdk/src/fsdk_actionhandler.cpp
fpdfsdk/src/fsdk_annothandler.cpp
fpdfsdk/src/fsdk_baseannot.cpp
fpdfsdk/src/fsdk_baseform.cpp
fpdfsdk/src/fsdk_mgr.cpp
fpdfsdk/src/fsdk_rendercontext.cpp
fpdfsdk/src/fxedit/fxet_ap.cpp
fpdfsdk/src/fxedit/fxet_edit.cpp
fpdfsdk/src/fxedit/fxet_list.cpp
fpdfsdk/src/fxedit/fxet_pageobjs.cpp
fpdfsdk/src/javascript/Document.cpp
fpdfsdk/src/javascript/Field.cpp
fpdfsdk/src/javascript/Icon.cpp
fpdfsdk/src/javascript/JS_Context.cpp
fpdfsdk/src/javascript/JS_EventHandler.cpp
fpdfsdk/src/javascript/JS_GlobalData.cpp
fpdfsdk/src/javascript/JS_Runtime.cpp
fpdfsdk/src/javascript/JS_Value.cpp
fpdfsdk/src/javascript/PublicMethods.cpp
fpdfsdk/src/javascript/app.cpp
fpdfsdk/src/javascript/color.cpp
fpdfsdk/src/javascript/console.cpp
fpdfsdk/src/javascript/event.cpp
fpdfsdk/src/javascript/global.cpp
fpdfsdk/src/javascript/report.cpp
fpdfsdk/src/javascript/util.cpp
fpdfsdk/src/jsapi/fxjs_v8.cpp
fpdfsdk/src/pdfwindow/PWL_Button.cpp
fpdfsdk/src/pdfwindow/PWL_Caret.cpp
fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
fpdfsdk/src/pdfwindow/PWL_Edit.cpp
fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
fpdfsdk/src/pdfwindow/PWL_Icon.cpp
fpdfsdk/src/pdfwindow/PWL_IconList.cpp
fpdfsdk/src/pdfwindow/PWL_Label.cpp
fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
fpdfsdk/src/pdfwindow/PWL_Note.cpp
fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
fpdfsdk/src/pdfwindow/PWL_Signature.cpp
fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
fpdfsdk/src/pdfwindow/PWL_Utils.cpp
fpdfsdk/src/pdfwindow/PWL_Wnd.cpp

index f4f9b9e..f820999 100644 (file)
@@ -16,7 +16,7 @@ extern "C" {
 void CRYPT_ArcFourCryptBlock(uint8_t* data, FX_DWORD size, const uint8_t* key, FX_DWORD keylen);
 void CRYPT_ArcFourSetup(void* context, const uint8_t* key, FX_DWORD length);
 void CRYPT_ArcFourCrypt(void* context, uint8_t* data, FX_DWORD size);
-void CRYPT_AESSetKey(void* context, FX_DWORD blocklen, const uint8_t* key, FX_DWORD keylen, bool bEncrypt);
+void CRYPT_AESSetKey(void* context, FX_DWORD blocklen, const uint8_t* key, FX_DWORD keylen, FX_BOOL bEncrypt);
 void CRYPT_AESSetIV(void* context, const uint8_t* iv);
 void CRYPT_AESDecrypt(void* context, uint8_t* dest, const uint8_t* src, FX_DWORD size);
 void CRYPT_AESEncrypt(void* context, uint8_t* dest, const uint8_t* src, FX_DWORD size);
@@ -40,7 +40,7 @@ void CRYPT_SHA512Start(void* context);
 void CRYPT_SHA512Update(void* context, const uint8_t* data, FX_DWORD size);
 void CRYPT_SHA512Finish(void* context, uint8_t digest[64]);
 void CRYPT_SHA512Generate(const uint8_t* data, FX_DWORD size, uint8_t digest[64]);
-void CRYPT_SetPubKeyDecryptor(bool (*func)(const uint8_t* pData, FX_DWORD size, uint8_t* data_buf, FX_DWORD& data_len));
+void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(const uint8_t* pData, FX_DWORD size, uint8_t* data_buf, FX_DWORD& data_len));
 
 #ifdef __cplusplus
 };
index b6f8de0..5877e11 100644 (file)
@@ -60,9 +60,9 @@ public:
 
     void InitRenderModule();
 
-    void SetDownloadCallback(bool (*callback)(const FX_CHAR* module_name));
+    void SetDownloadCallback(FX_BOOL (*callback)(const FX_CHAR* module_name));
 
-    bool DownloadModule(const FX_CHAR* module_name);
+    FX_BOOL DownloadModule(const FX_CHAR* module_name);
 
     void NotifyModuleAvailable(const FX_CHAR* module_name);
 
@@ -110,7 +110,7 @@ private:
     nonstd::unique_ptr<IPDF_RenderModule> m_pRenderModule;
     nonstd::unique_ptr<IPDF_PageModule> m_pPageModule;
 
-    bool (*m_pDownloadCallback)(const FX_CHAR* module_name);
+    FX_BOOL (*m_pDownloadCallback)(const FX_CHAR* module_name);
 
     CFX_MapByteStringToPtr m_SecurityHandlerMap;
 
index 8d954ff..45b7cc6 100644 (file)
@@ -57,9 +57,9 @@ public:
         return m_GenNum;
     }
 
-    bool                             IsIdentical(CPDF_Object* pObj) const;
+    FX_BOOL                             IsIdentical(CPDF_Object* pObj) const;
 
-    CPDF_Object*                        Clone(bool bDirect = false) const;
+    CPDF_Object*                        Clone(FX_BOOL bDirect = FALSE) const;
 
     CPDF_Object*                        CloneRef(CPDF_IndirectObjects* pObjs) const;
 
@@ -88,9 +88,9 @@ public:
 
     int                                 GetDirectType() const;
 
-    bool                             IsModified() const
+    FX_BOOL                             IsModified() const
     {
-        return false;
+        return FALSE;
     }
 protected:
     CPDF_Object(FX_DWORD type) : m_Type(type), m_ObjNum(0), m_GenNum(0) { }
@@ -108,27 +108,27 @@ protected:
     friend class                       CPDF_SyntaxParser;
 private:
     CPDF_Object(const CPDF_Object& src) {}
-    CPDF_Object* CloneInternal(bool bDirect, CFX_MapPtrToPtr* visited) const;
+    CPDF_Object* CloneInternal(FX_BOOL bDirect, CFX_MapPtrToPtr* visited) const;
 };
 class CPDF_Boolean : public CPDF_Object
 {
 public:
 
-    static CPDF_Boolean*       Create(bool value)
+    static CPDF_Boolean*       Create(FX_BOOL value)
     {
         return new CPDF_Boolean(value);
     }
 
     CPDF_Boolean() : CPDF_Object(PDFOBJ_BOOLEAN), m_bValue(false) { }
-    CPDF_Boolean(bool value) : CPDF_Object(PDFOBJ_BOOLEAN), m_bValue(value) { }
+    CPDF_Boolean(FX_BOOL value) : CPDF_Object(PDFOBJ_BOOLEAN), m_bValue(value) { }
 
-    bool                                       Identical(CPDF_Boolean* pOther) const
+    FX_BOOL                                    Identical(CPDF_Boolean* pOther) const
     {
         return m_bValue == pOther->m_bValue;
     }
 protected:
 
-    bool                                       m_bValue;
+    FX_BOOL                                    m_bValue;
     friend class                       CPDF_Object;
 };
 class CPDF_Number : public CPDF_Object
@@ -150,14 +150,14 @@ public:
         return new CPDF_Number(str);
     }
 
-    static CPDF_Number*                Create(bool bInteger, void* pData)
+    static CPDF_Number*                Create(FX_BOOL bInteger, void* pData)
     {
         return new CPDF_Number(bInteger, pData);
     }
 
     CPDF_Number() : CPDF_Object(PDFOBJ_NUMBER), m_bInteger(false), m_Integer(0) { }
 
-    CPDF_Number(bool bInteger, void* pData);
+    CPDF_Number(FX_BOOL bInteger, void* pData);
 
     CPDF_Number(int value);
 
@@ -165,13 +165,13 @@ public:
 
     CPDF_Number(const CFX_ByteStringC& str);
 
-    bool                                       Identical(CPDF_Number* pOther) const;
+    FX_BOOL                                    Identical(CPDF_Number* pOther) const;
 
     CFX_ByteString                     GetString() const;
 
     void                                       SetString(const CFX_ByteStringC& str);
 
-    bool                                       IsInteger() const
+    FX_BOOL                                    IsInteger() const
     {
         return m_bInteger;
     }
@@ -199,7 +199,7 @@ public:
     }
 protected:
 
-    bool                                       m_bInteger;
+    FX_BOOL                                    m_bInteger;
 
     union {
 
@@ -213,7 +213,7 @@ class CPDF_String : public CPDF_Object
 {
 public:
 
-    static CPDF_String*                Create(const CFX_ByteString& str, bool bHex = false)
+    static CPDF_String*                Create(const CFX_ByteString& str, FX_BOOL bHex = FALSE)
     {
         return new CPDF_String(str, bHex);
     }
@@ -223,9 +223,9 @@ public:
         return new CPDF_String(str);
     }
 
-    CPDF_String() : CPDF_Object(PDFOBJ_STRING), m_bHex(false) { }
+    CPDF_String() : CPDF_Object(PDFOBJ_STRING), m_bHex(FALSE) { }
 
-    CPDF_String(const CFX_ByteString& str, bool bHex = false)
+    CPDF_String(const CFX_ByteString& str, FX_BOOL bHex = FALSE)
         : CPDF_Object(PDFOBJ_STRING), m_String(str), m_bHex(bHex) {
     }
 
@@ -236,12 +236,12 @@ public:
         return m_String;
     }
 
-    bool                                       Identical(CPDF_String* pOther) const
+    FX_BOOL                                    Identical(CPDF_String* pOther) const
     {
         return m_String == pOther->m_String;
     }
 
-    bool                                       IsHex() const
+    FX_BOOL                                    IsHex() const
     {
         return m_bHex;
     }
@@ -249,7 +249,7 @@ protected:
 
     CFX_ByteString                     m_String;
 
-    bool                                       m_bHex;
+    FX_BOOL                                    m_bHex;
     friend class                       CPDF_Object;
 };
 class CPDF_Name : public CPDF_Object
@@ -280,7 +280,7 @@ public:
         return m_Name;
     }
 
-    bool                                       Identical(CPDF_Name* pOther) const
+    FX_BOOL                                    Identical(CPDF_Name* pOther) const
     {
         return m_Name == pOther->m_Name;
     }
@@ -378,7 +378,7 @@ public:
         AddNumber(value);
     }
 
-    bool                                       Identical(CPDF_Array* pOther) const;
+    FX_BOOL                                    Identical(CPDF_Array* pOther) const;
 protected:
 
     ~CPDF_Array();
@@ -419,7 +419,7 @@ public:
 
     int                                                GetInteger(const CFX_ByteStringC& key, int default_int) const;
 
-    bool                                       GetBoolean(const CFX_ByteStringC& key, bool bDefault = false) const;
+    FX_BOOL                                    GetBoolean(const CFX_ByteStringC& key, FX_BOOL bDefault = FALSE) const;
 
     FX_FLOAT                           GetNumber(const CFX_ByteStringC& key) const;
 
@@ -439,7 +439,7 @@ public:
     }
 
 
-    bool                                       KeyExist(const CFX_ByteStringC& key) const;
+    FX_BOOL                                    KeyExist(const CFX_ByteStringC& key) const;
 
     FX_POSITION                                GetStartPos() const;
 
@@ -478,7 +478,7 @@ public:
 
     void                                       SetAtMatrix(const CFX_ByteStringC& key, const CFX_AffineMatrix& matrix);
 
-    void                                       SetAtBoolean(const CFX_ByteStringC& key, bool bValue);
+    void                                       SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue);
 
 
 
@@ -487,7 +487,7 @@ public:
 
     void                                       ReplaceKey(const CFX_ByteStringC& oldkey, const CFX_ByteStringC& newkey);
 
-    bool                                       Identical(CPDF_Dictionary* pDict) const;
+    FX_BOOL                                    Identical(CPDF_Dictionary* pDict) const;
 
     int                                                GetCount() const
     {
@@ -519,15 +519,15 @@ public:
         return m_pDict;
     }
 
-    void                                       SetData(const uint8_t* pData, FX_DWORD size, bool bCompressed, bool bKeepBuf);
+    void                                       SetData(const uint8_t* pData, FX_DWORD size, FX_BOOL bCompressed, FX_BOOL bKeepBuf);
 
     void                                       InitStream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict);
 
     void                                       InitStream(IFX_FileRead *pFile, CPDF_Dictionary* pDict);
 
-    bool                                       Identical(CPDF_Stream* pOther) const;
+    FX_BOOL                                    Identical(CPDF_Stream* pOther) const;
 
-    CPDF_StreamFilter*         GetStreamFilter(bool bRaw = false) const;
+    CPDF_StreamFilter*         GetStreamFilter(FX_BOOL bRaw = FALSE) const;
 
 
 
@@ -536,15 +536,15 @@ public:
         return m_dwSize;
     }
 
-    bool                                       ReadRawData(FX_FILESIZE start_pos, uint8_t* pBuf, FX_DWORD buf_size) const;
+    FX_BOOL                                    ReadRawData(FX_FILESIZE start_pos, uint8_t* pBuf, FX_DWORD buf_size) const;
 
 
-    bool                                       IsMemoryBased() const
+    FX_BOOL                                    IsMemoryBased() const
     {
         return m_GenNum == (FX_DWORD) - 1;
     }
 
-    CPDF_Stream*                       Clone(bool bDirect, FPDF_LPFCloneStreamCallback lpfCallback, void* pUserData) const;
+    CPDF_Stream*                       Clone(FX_BOOL bDirect, FPDF_LPFCloneStreamCallback lpfCallback, void* pUserData) const;
 protected:
 
     ~CPDF_Stream();
@@ -579,8 +579,8 @@ public:
 
     ~CPDF_StreamAcc();
 
-    void                                       LoadAllData(const CPDF_Stream* pStream, bool bRawAccess = false,
-                                        FX_DWORD estimated_size = 0, bool bImageAcc = false);
+    void                                       LoadAllData(const CPDF_Stream* pStream, FX_BOOL bRawAccess = FALSE,
+                                        FX_DWORD estimated_size = 0, FX_BOOL bImageAcc = FALSE);
 
     const CPDF_Stream*         GetStream() const
     {
@@ -613,7 +613,7 @@ protected:
 
     FX_DWORD                           m_dwSize;
 
-    bool                                       m_bNewBuf;
+    FX_BOOL                                    m_bNewBuf;
 
     CFX_ByteString                     m_ImageDecoder;
 
@@ -691,7 +691,7 @@ public:
 
     void                                       SetRef(CPDF_IndirectObjects* pDoc, FX_DWORD objnum);
 
-    bool                                       Identical(CPDF_Reference* pOther) const
+    FX_BOOL                                    Identical(CPDF_Reference* pOther) const
     {
         return m_RefObjNum == pOther->m_RefObjNum;
     }
index d76920a..7aed626 100644 (file)
@@ -31,7 +31,7 @@ class CPDF_PageObjects
 {
 public:
 
-    CPDF_PageObjects(bool bReleaseMembers = true);
+    CPDF_PageObjects(FX_BOOL bReleaseMembers = TRUE);
 
     ~CPDF_PageObjects();
 
@@ -45,7 +45,7 @@ public:
         return m_ParseState;
     }
 
-    bool                               IsParsed() const
+    FX_BOOL                            IsParsed() const
     {
         return m_ParseState == PDF_CONTENT_PARSED;
     }
@@ -97,7 +97,7 @@ public:
 
     void                               Transform(const CFX_AffineMatrix& matrix);
 
-    bool                               BackgroundAlphaNeeded() const
+    FX_BOOL                            BackgroundAlphaNeeded() const
     {
         return m_bBackgroundAlphaNeeded;
     }
@@ -125,15 +125,15 @@ protected:
 
     CFX_PtrList                        m_ObjectList;
 
-    bool                               m_bBackgroundAlphaNeeded;
+    FX_BOOL                            m_bBackgroundAlphaNeeded;
 
-    bool                               m_bReleaseMembers;
+    FX_BOOL                            m_bReleaseMembers;
     void                               LoadTransInfo();
     void                ClearCacheObjects();
 
     CPDF_ContentParser*        m_pParser;
 
-    bool                               m_ParseState;
+    FX_BOOL                            m_ParseState;
 };
 class CPDF_Page : public CPDF_PageObjects, public CFX_PrivateData
 {
@@ -143,11 +143,11 @@ public:
 
     ~CPDF_Page();
 
-    void                               Load(CPDF_Document* pDocument, CPDF_Dictionary* pPageDict, bool bPageCache = true);
+    void                               Load(CPDF_Document* pDocument, CPDF_Dictionary* pPageDict, FX_BOOL bPageCache = TRUE);
 
-    void                               StartParse(CPDF_ParseOptions* pOptions = NULL, bool bReParse = false);
+    void                               StartParse(CPDF_ParseOptions* pOptions = NULL, FX_BOOL bReParse = FALSE);
 
-    void                               ParseContent(CPDF_ParseOptions* pOptions = NULL, bool bReParse = false);
+    void                               ParseContent(CPDF_ParseOptions* pOptions = NULL, FX_BOOL bReParse = FALSE);
 
     void                               GetDisplayMatrix(CFX_AffineMatrix& matrix, int xPos, int yPos,
                                          int xSize, int ySize, int iRotate) const;
@@ -200,13 +200,13 @@ public:
 
     CPDF_ParseOptions();
 
-    bool                               m_bTextOnly;
+    FX_BOOL                            m_bTextOnly;
 
-    bool                               m_bMarkedContent;
+    FX_BOOL                            m_bMarkedContent;
 
-    bool                               m_bSeparateForm;
+    FX_BOOL                            m_bSeparateForm;
 
-    bool                               m_bDecodeInlineImage;
+    FX_BOOL                            m_bDecodeInlineImage;
 };
 class CPDF_Form : public CPDF_PageObjects
 {
@@ -229,7 +229,7 @@ class CPDF_PageContentGenerate
 public:
     CPDF_PageContentGenerate(CPDF_Page* pPage);
     ~CPDF_PageContentGenerate();
-    bool InsertPageObject(CPDF_PageObject* pPageObject);
+    FX_BOOL InsertPageObject(CPDF_PageObject* pPageObject);
     void GenerateContent();
     void TransformContent(CFX_Matrix& matrix);
 protected:
index c140de6..73540a3 100644 (file)
@@ -88,7 +88,7 @@ public:
         m_pObject->AppendRect(left, bottom, right, top);
     }
 
-    bool                               IsRect() const
+    FX_BOOL                            IsRect() const
     {
         return m_pObject->IsRect();
     }
@@ -147,7 +147,7 @@ public:
 
     CFX_FloatRect              GetClipBox() const;
 
-    void                               AppendPath(CPDF_Path path, int type, bool bAutoMerge);
+    void                               AppendPath(CPDF_Path path, int type, FX_BOOL bAutoMerge);
 
     void                               DeletePath(int layer_index);
 
@@ -292,15 +292,15 @@ public:
 
     int                                        m_RenderIntent;
 
-    bool                               m_StrokeAdjust;
+    FX_BOOL                            m_StrokeAdjust;
 
-    bool                               m_AlphaSource;
+    FX_BOOL                            m_AlphaSource;
 
-    bool                               m_TextKnockout;
+    FX_BOOL                            m_TextKnockout;
 
-    bool                               m_StrokeOP;
+    FX_BOOL                            m_StrokeOP;
 
-    bool                               m_FillOP;
+    FX_BOOL                            m_FillOP;
 
     int                                        m_OPMode;
 
@@ -325,7 +325,7 @@ public:
         return m_pObject ? m_pObject->m_BlendType : FXDIB_BLEND_NORMAL;
     }
 
-    int                                        GetAlpha(bool bStroke) const
+    int                                        GetAlpha(FX_BOOL bStroke) const
     {
         return m_pObject ? FXSYS_round((bStroke ? m_pObject->m_StrokeAlpha : m_pObject->m_FillAlpha) * 255) : 255;
     }
@@ -362,7 +362,7 @@ public:
         return m_pParam;
     }
 
-    inline bool                HasMCID() const;
+    inline FX_BOOL             HasMCID() const;
 
     inline void                        SetName(const CFX_ByteString& name)
     {
@@ -402,7 +402,7 @@ public:
 
     int                                        GetMCID() const;
 
-    void                               AddMark(const CFX_ByteString& name, CPDF_Dictionary* pDict, bool bDictNeedClone);
+    void                               AddMark(const CFX_ByteString& name, CPDF_Dictionary* pDict, FX_BOOL bDictNeedClone);
 
     void                               DeleteLastMark();
 private:
@@ -418,9 +418,9 @@ public:
         return m_pObject ? m_pObject->GetMCID() : -1;
     }
 
-    bool                               HasMark(const CFX_ByteStringC& mark) const;
+    FX_BOOL                            HasMark(const CFX_ByteStringC& mark) const;
 
-    bool                               LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const;
+    FX_BOOL                            LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const;
 };
 
 #define PDFPAGE_TEXT     1
@@ -461,7 +461,7 @@ public:
 
     void                               RemoveClipPath();
 
-    void                               AppendClipPath(CPDF_Path path, int type, bool bAutoMerge);
+    void                               AppendClipPath(CPDF_Path path, int type, FX_BOOL bAutoMerge);
 
     void                               CopyClipPath(CPDF_PageObject* pObj);
 
@@ -629,7 +629,7 @@ public:
 
     int                                        m_FillType;
 
-    bool                               m_bStroke;
+    FX_BOOL                            m_bStroke;
 
     CFX_AffineMatrix   m_Matrix;
 
index 7a43947..a856433 100644 (file)
@@ -86,9 +86,9 @@ public:
 
     int                                                GetPageIndex(FX_DWORD objnum);
 
-    FX_DWORD                           GetUserPermissions(bool bCheckRevision = false) const;
+    FX_DWORD                           GetUserPermissions(FX_BOOL bCheckRevision = FALSE) const;
 
-    bool                                       IsOwner() const;
+    FX_BOOL                                    IsOwner() const;
 
 
 
@@ -112,14 +112,14 @@ public:
     void                                       ClearRenderFont();
 
 
-    bool                                       IsFormStream(FX_DWORD objnum, bool& bForm) const;
+    FX_BOOL                                    IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) const;
 
     // |pFontDict| must not be null.
     CPDF_Font* LoadFont(CPDF_Dictionary* pFontDict);
 
     CPDF_ColorSpace*           LoadColorSpace(CPDF_Object* pCSObj, CPDF_Dictionary* pResources = NULL);
 
-    CPDF_Pattern*                      LoadPattern(CPDF_Object* pObj, bool bShading, const CFX_AffineMatrix* matrix = NULL);
+    CPDF_Pattern*                      LoadPattern(CPDF_Object* pObj, FX_BOOL bShading, const CFX_AffineMatrix* matrix = NULL);
 
     CPDF_Image*                                LoadImageF(CPDF_Object* pObj);
 
@@ -129,17 +129,17 @@ public:
 
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 
-    CPDF_Font*                         AddWindowsFont(LOGFONTA* pLogFont, bool bVert, bool bTranslateName = false);
-    CPDF_Font*                         AddWindowsFont(LOGFONTW* pLogFont, bool bVert, bool bTranslateName = false);
+    CPDF_Font*                         AddWindowsFont(LOGFONTA* pLogFont, FX_BOOL bVert, FX_BOOL bTranslateName = FALSE);
+    CPDF_Font*                         AddWindowsFont(LOGFONTW* pLogFont, FX_BOOL bVert, FX_BOOL bTranslateName = FALSE);
 #endif
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
-    CPDF_Font*              AddMacFont(CTFontRef pFont, bool bVert, bool bTranslateName = false);
+    CPDF_Font*              AddMacFont(CTFontRef pFont, FX_BOOL bVert, FX_BOOL bTranslateName = FALSE);
 #endif
 
     CPDF_Font*                         AddStandardFont(const FX_CHAR* font, CPDF_FontEncoding* pEncoding);
 
 
-    CPDF_Font*                         AddFont(CFX_Font* pFont, int charset, bool bVert);
+    CPDF_Font*                         AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert);
 
     void                                       CreateNewDoc();
 
@@ -161,7 +161,7 @@ protected:
     CFX_ByteString                     m_ID2;
 
 
-    bool                                       m_bLinearized;
+    FX_BOOL                                    m_bLinearized;
 
     FX_DWORD                           m_dwFirstPageNo;
 
@@ -172,8 +172,8 @@ protected:
     int                                                _GetPageCount() const;
     CPDF_Dictionary*           _FindPDFPage(CPDF_Dictionary* pPages, int iPage, int nPagesToGo, int level);
     int                                                _FindPageIndex(CPDF_Dictionary* pNode, FX_DWORD& skip_count, FX_DWORD objnum, int& index, int level = 0);
-    bool                                       IsContentUsedElsewhere(FX_DWORD objnum, CPDF_Dictionary* pPageDict);
-    bool                                       CheckOCGVisible(CPDF_Dictionary* pOCG, bool bPrinting);
+    FX_BOOL                                    IsContentUsedElsewhere(FX_DWORD objnum, CPDF_Dictionary* pPageDict);
+    FX_BOOL                                    CheckOCGVisible(CPDF_Dictionary* pOCG, FX_BOOL bPrinting);
     CPDF_DocPageData*          GetValidatePageData();
     CPDF_DocRenderData*                GetValidateRenderData();
     friend class                       CPDF_Creator;
@@ -204,14 +204,14 @@ public:
 
     CFX_ByteStringC            GetWord();
 
-    bool                               SearchToken(const CFX_ByteStringC& token);
+    FX_BOOL                            SearchToken(const CFX_ByteStringC& token);
 
-    bool                               SkipWord(const CFX_ByteStringC& token);
+    FX_BOOL                            SkipWord(const CFX_ByteStringC& token);
 
-    bool                               FindTagPair(const CFX_ByteStringC& start_token, const CFX_ByteStringC& end_token,
+    FX_BOOL                            FindTagPair(const CFX_ByteStringC& start_token, const CFX_ByteStringC& end_token,
                                     FX_DWORD& start_pos, FX_DWORD& end_pos);
 
-    bool                               FindTagParam(const CFX_ByteStringC& token, int nParams);
+    FX_BOOL                            FindTagParam(const CFX_ByteStringC& token, int nParams);
 
     FX_DWORD                   GetPos()
     {
@@ -252,7 +252,7 @@ public:
         m_Pos = pos;
     }
 
-    CPDF_Object*               GetObject(CPDF_IndirectObjects* pObjList, FX_DWORD objnum, FX_DWORD gennum, struct PARSE_CONTEXT* pContext = NULL, bool bDecrypt = true);
+    CPDF_Object*               GetObject(CPDF_IndirectObjects* pObjList, FX_DWORD objnum, FX_DWORD gennum, struct PARSE_CONTEXT* pContext = NULL, FX_BOOL bDecrypt = TRUE);
 
 
     CPDF_Object*               GetObjectByStrict(CPDF_IndirectObjects* pObjList, FX_DWORD objnum, FX_DWORD gennum, struct PARSE_CONTEXT* pContext = NULL);
@@ -271,9 +271,9 @@ public:
 
     void                               ToNextWord();
 
-    bool                               SearchWord(const CFX_ByteStringC& word, bool bWholeWord, bool bForward, FX_FILESIZE limit);
+    FX_BOOL                            SearchWord(const CFX_ByteStringC& word, FX_BOOL bWholeWord, FX_BOOL bForward, FX_FILESIZE limit);
 
-    int                                        SearchMultiWord(const CFX_ByteStringC& words, bool bWholeWord, FX_FILESIZE limit);
+    int                                        SearchMultiWord(const CFX_ByteStringC& words, FX_BOOL bWholeWord, FX_FILESIZE limit);
 
     FX_FILESIZE                        FindTag(const CFX_ByteStringC& tag, FX_FILESIZE limit);
 
@@ -282,27 +282,27 @@ public:
         m_pCryptoHandler = pCryptoHandler;
     }
 
-    bool                               IsEncrypted()
+    FX_BOOL                            IsEncrypted()
     {
         return m_pCryptoHandler != NULL;
     }
 
-    bool                               GetCharAt(FX_FILESIZE pos, uint8_t& ch);
+    FX_BOOL                            GetCharAt(FX_FILESIZE pos, uint8_t& ch);
 
-    bool                               ReadBlock(uint8_t* pBuf, FX_DWORD size);
+    FX_BOOL                            ReadBlock(uint8_t* pBuf, FX_DWORD size);
 
-    CFX_ByteString             GetNextWord(bool& bIsNumber);
+    CFX_ByteString             GetNextWord(FX_BOOL& bIsNumber);
 protected:
     static const int kParserMaxRecursionDepth = 64;
     static int s_CurrentRecursionDepth;
 
-    virtual bool                               GetNextChar(uint8_t& ch);
+    virtual FX_BOOL                            GetNextChar(uint8_t& ch);
 
-    bool                               GetCharAtBackward(FX_FILESIZE pos, uint8_t& ch);
+    FX_BOOL                            GetCharAtBackward(FX_FILESIZE pos, uint8_t& ch);
 
     void                               GetNextWord();
 
-    bool                               IsWholeWord(FX_FILESIZE startpos, FX_FILESIZE limit, const uint8_t* tag, FX_DWORD taglen);
+    FX_BOOL                            IsWholeWord(FX_FILESIZE startpos, FX_FILESIZE limit, const uint8_t* tag, FX_DWORD taglen);
 
     CFX_ByteString             ReadString();
 
@@ -312,7 +312,7 @@ protected:
 
     FX_FILESIZE                        m_Pos;
 
-    bool                               m_bFileStream;
+    FX_BOOL                            m_bFileStream;
 
     int                                        m_MetadataObjnum;
 
@@ -334,7 +334,7 @@ protected:
 
     FX_DWORD                   m_WordSize;
 
-    bool                               m_bIsNumber;
+    FX_BOOL                            m_bIsNumber;
 
     FX_FILESIZE                        m_dwWordPos;
     friend class               CPDF_Parser;
@@ -345,7 +345,7 @@ protected:
 #define PDFPARSE_NOSTREAM      2
 struct PARSE_CONTEXT {
 
-    bool               m_Flags;
+    FX_BOOL            m_Flags;
 
     FX_FILESIZE        m_DictStart;
 
@@ -369,15 +369,15 @@ public:
     CPDF_Parser();
     ~CPDF_Parser();
 
-    FX_DWORD                   StartParse(const FX_CHAR* filename, bool bReParse = false);
-    FX_DWORD                   StartParse(const FX_WCHAR* filename, bool bReParse = false);
-    FX_DWORD                   StartParse(IFX_FileRead* pFile, bool bReParse = false, bool bOwnFileRead = true);
+    FX_DWORD                   StartParse(const FX_CHAR* filename, FX_BOOL bReParse = FALSE);
+    FX_DWORD                   StartParse(const FX_WCHAR* filename, FX_BOOL bReParse = FALSE);
+    FX_DWORD                   StartParse(IFX_FileRead* pFile, FX_BOOL bReParse = FALSE, FX_BOOL bOwnFileRead = TRUE);
 
-    void                               CloseParser(bool bReParse = false);
+    void                               CloseParser(FX_BOOL bReParse = FALSE);
 
-    FX_DWORD   GetPermissions(bool bCheckRevision = false);
+    FX_DWORD   GetPermissions(FX_BOOL bCheckRevision = FALSE);
 
-    bool               IsOwner();
+    FX_BOOL            IsOwner();
 
     void                               SetPassword(const FX_CHAR* password)
     {
@@ -399,7 +399,7 @@ public:
         return m_Syntax.m_pCryptoHandler;
     }
 
-    void                               SetSecurityHandler(CPDF_SecurityHandler* pSecurityHandler, bool bForced = false);
+    void                               SetSecurityHandler(CPDF_SecurityHandler* pSecurityHandler, FX_BOOL bForced = FALSE);
 
     CFX_ByteString             GetRecipient()
     {
@@ -435,7 +435,7 @@ public:
         return m_pEncryptDict;
     }
 
-    bool                               IsEncrypted()
+    FX_BOOL                            IsEncrypted()
     {
         return GetEncryptDict() != NULL;
     }
@@ -443,7 +443,7 @@ public:
 
     CPDF_Object*               ParseIndirectObject(CPDF_IndirectObjects* pObjList, FX_DWORD objnum, PARSE_CONTEXT* pContext = NULL) ;
     FX_DWORD                   GetLastObjNum();
-    bool                               IsFormStream(FX_DWORD objnum, bool& bForm);
+    FX_BOOL                            IsFormStream(FX_DWORD objnum, FX_BOOL& bForm);
 
     FX_FILESIZE                        GetObjectOffset(FX_DWORD objnum);
 
@@ -456,12 +456,12 @@ public:
 
     void                               GetIndirectBinary(FX_DWORD objnum, uint8_t*& pBuffer, FX_DWORD& size);
 
-    bool                               GetFileStreamOption()
+    FX_BOOL                            GetFileStreamOption()
     {
         return m_Syntax.m_bFileStream;
     }
 
-    void                               SetFileStreamOption(bool b)
+    void                               SetFileStreamOption(FX_BOOL b)
     {
         m_Syntax.m_bFileStream = b;
     }
@@ -476,7 +476,7 @@ public:
         return m_FileVersion;
     }
 
-    bool                               IsXRefStream() const
+    FX_BOOL                            IsXRefStream() const
     {
         return m_bXRefStream;
     }
@@ -486,7 +486,7 @@ public:
     CPDF_Object*               ParseIndirectObjectAtByStrict(CPDF_IndirectObjects* pObjList, FX_FILESIZE pos, FX_DWORD objnum,
             struct PARSE_CONTEXT* pContext, FX_FILESIZE *pResultPos);
 
-    FX_DWORD                   StartAsynParse(IFX_FileRead* pFile, bool bReParse = false, bool bOwnFileRead = true);
+    FX_DWORD                   StartAsynParse(IFX_FileRead* pFile, FX_BOOL bReParse = FALSE, FX_BOOL bOwnFileRead = TRUE);
 
     FX_DWORD                   GetFirstPageNo()
     {
@@ -496,30 +496,30 @@ protected:
     CPDF_Document*             m_pDocument;
 
     CPDF_SyntaxParser  m_Syntax;
-    bool                               m_bOwnFileRead;
+    FX_BOOL                            m_bOwnFileRead;
     CPDF_Object*               ParseDirect(CPDF_Object* pObj);
 
-    bool                               LoadAllCrossRefV4(FX_FILESIZE pos);
+    FX_BOOL                            LoadAllCrossRefV4(FX_FILESIZE pos);
 
-    bool                               LoadAllCrossRefV5(FX_FILESIZE pos);
+    FX_BOOL                            LoadAllCrossRefV5(FX_FILESIZE pos);
 
-    bool                               LoadCrossRefV4(FX_FILESIZE pos, FX_FILESIZE streampos, bool bSkip, bool bFirst);
+    FX_BOOL                            LoadCrossRefV4(FX_FILESIZE pos, FX_FILESIZE streampos, FX_BOOL bSkip, FX_BOOL bFirst);
 
-    bool                               LoadCrossRefV5(FX_FILESIZE pos, FX_FILESIZE& prev, bool bMainXRef);
+    FX_BOOL                            LoadCrossRefV5(FX_FILESIZE pos, FX_FILESIZE& prev, FX_BOOL bMainXRef);
 
     CPDF_Dictionary*   LoadTrailerV4();
 
-    bool                               RebuildCrossRef();
+    FX_BOOL                            RebuildCrossRef();
 
     FX_DWORD                   SetEncryptHandler();
 
     void                               ReleaseEncryptHandler();
 
-    bool                               LoadLinearizedAllCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCount);
+    FX_BOOL                            LoadLinearizedAllCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCount);
 
-    bool                               LoadLinearizedCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCount);
+    FX_BOOL                            LoadLinearizedCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCount);
 
-    bool                               LoadLinearizedAllCrossRefV5(FX_FILESIZE pos);
+    FX_BOOL                            LoadLinearizedAllCrossRefV5(FX_FILESIZE pos);
 
     FX_DWORD                   LoadLinearizedMainXRefTable();
 
@@ -527,7 +527,7 @@ protected:
 
     CPDF_StreamAcc*            GetObjectStream(FX_DWORD number);
 
-    bool                               IsLinearizedFile(IFX_FileRead* pFileAccess, FX_DWORD offset);
+    FX_BOOL                            IsLinearizedFile(IFX_FileRead* pFileAccess, FX_DWORD offset);
 
 
 
@@ -540,12 +540,12 @@ protected:
 
     FX_FILESIZE                        m_LastXRefOffset;
 
-    bool                               m_bXRefStream;
+    FX_BOOL                            m_bXRefStream;
 
 
     CPDF_SecurityHandler*      m_pSecurityHandler;
 
-    bool                                       m_bForceUseSecurityHandler;
+    FX_BOOL                                    m_bForceUseSecurityHandler;
 
     CFX_ByteString                     m_bsRecipient;
 
@@ -562,7 +562,7 @@ protected:
     CFX_WordArray              m_ObjVersion;
     CFX_ArrayTemplate<CPDF_Dictionary *>       m_Trailers;
 
-    bool                               m_bVersionUpdated;
+    FX_BOOL                            m_bVersionUpdated;
 
     CPDF_Object*               m_pLinearized;
 
@@ -582,17 +582,17 @@ public:
 
     virtual ~CPDF_SecurityHandler() {}
 
-    virtual bool               OnInit(CPDF_Parser* pParser, CPDF_Dictionary* pEncryptDict) = 0;
+    virtual FX_BOOL            OnInit(CPDF_Parser* pParser, CPDF_Dictionary* pEncryptDict) = 0;
 
     virtual FX_DWORD   GetPermissions() = 0;
 
-    virtual bool               IsOwner() = 0;
+    virtual FX_BOOL            IsOwner() = 0;
 
-    virtual bool               GetCryptInfo(int& cipher, const uint8_t*& buffer, int& keylen) = 0;
+    virtual FX_BOOL            GetCryptInfo(int& cipher, const uint8_t*& buffer, int& keylen) = 0;
 
-    virtual bool               IsMetadataEncrypted()
+    virtual FX_BOOL            IsMetadataEncrypted()
     {
-        return true;
+        return TRUE;
     }
 
     virtual CPDF_CryptoHandler*        CreateCryptoHandler() = 0;
@@ -609,14 +609,14 @@ public:
     CPDF_StandardSecurityHandler();
 
     virtual ~CPDF_StandardSecurityHandler();
-    virtual bool               OnInit(CPDF_Parser* pParser, CPDF_Dictionary* pEncryptDict);
+    virtual FX_BOOL            OnInit(CPDF_Parser* pParser, CPDF_Dictionary* pEncryptDict);
     virtual FX_DWORD   GetPermissions();
-    virtual bool               IsOwner()
+    virtual FX_BOOL            IsOwner()
     {
         return m_bOwner;
     }
-    virtual bool               GetCryptInfo(int& cipher, const uint8_t*& buffer, int& keylen);
-    virtual bool               IsMetadataEncrypted();
+    virtual FX_BOOL            GetCryptInfo(int& cipher, const uint8_t*& buffer, int& keylen);
+    virtual FX_BOOL            IsMetadataEncrypted();
     virtual CPDF_CryptoHandler*        CreateCryptoHandler();
     virtual CPDF_StandardSecurityHandler* GetStandardHandler()
     {
@@ -641,8 +641,8 @@ public:
         return m_Revision;
     }
 
-    int                                        CheckPassword(const uint8_t* password, FX_DWORD pass_size, bool bOwner, uint8_t* key);
-    int                                        CheckPassword(const uint8_t* password, FX_DWORD pass_size, bool bOwner, uint8_t* key, int key_len);
+    int                                        CheckPassword(const uint8_t* password, FX_DWORD pass_size, FX_BOOL bOwner, uint8_t* key);
+    int                                        CheckPassword(const uint8_t* password, FX_DWORD pass_size, FX_BOOL bOwner, uint8_t* key, int key_len);
 private:
 
     int                                        m_Version;
@@ -653,22 +653,22 @@ private:
 
     CPDF_Dictionary*   m_pEncryptDict;
 
-    bool                               LoadDict(CPDF_Dictionary* pEncryptDict);
-    bool                               LoadDict(CPDF_Dictionary* pEncryptDict, FX_DWORD type, int& cipher, int& key_len);
+    FX_BOOL                            LoadDict(CPDF_Dictionary* pEncryptDict);
+    FX_BOOL                            LoadDict(CPDF_Dictionary* pEncryptDict, FX_DWORD type, int& cipher, int& key_len);
 
-    bool                               CheckUserPassword(const uint8_t* password, FX_DWORD pass_size,
-                                          bool bIgnoreEncryptMeta, uint8_t* key, int32_t key_len);
+    FX_BOOL                            CheckUserPassword(const uint8_t* password, FX_DWORD pass_size,
+                                          FX_BOOL bIgnoreEncryptMeta, uint8_t* key, int32_t key_len);
 
-    bool                               CheckOwnerPassword(const uint8_t* password, FX_DWORD pass_size, uint8_t* key, int32_t key_len);
-    bool                               AES256_CheckPassword(const uint8_t* password, FX_DWORD size, bool bOwner, uint8_t* key);
-    void                               AES256_SetPassword(CPDF_Dictionary* pEncryptDict, const uint8_t* password, FX_DWORD size, bool bOwner, const uint8_t* key);
-    void                               AES256_SetPerms(CPDF_Dictionary* pEncryptDict, FX_DWORD permission, bool bEncryptMetadata, const uint8_t* key);
+    FX_BOOL                            CheckOwnerPassword(const uint8_t* password, FX_DWORD pass_size, uint8_t* key, int32_t key_len);
+    FX_BOOL                            AES256_CheckPassword(const uint8_t* password, FX_DWORD size, FX_BOOL bOwner, uint8_t* key);
+    void                               AES256_SetPassword(CPDF_Dictionary* pEncryptDict, const uint8_t* password, FX_DWORD size, FX_BOOL bOwner, const uint8_t* key);
+    void                               AES256_SetPerms(CPDF_Dictionary* pEncryptDict, FX_DWORD permission, FX_BOOL bEncryptMetadata, const uint8_t* key);
     void                               OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_Array* pIdArray,
                                  const uint8_t* user_pass, FX_DWORD user_size,
-                                 const uint8_t* owner_pass, FX_DWORD owner_size, bool bDefault, FX_DWORD type);
-    bool                               CheckSecurity(int32_t key_len);
+                                 const uint8_t* owner_pass, FX_DWORD owner_size, FX_BOOL bDefault, FX_DWORD type);
+    FX_BOOL                            CheckSecurity(int32_t key_len);
 
-    bool                               m_bOwner;
+    FX_BOOL                            m_bOwner;
 
     FX_DWORD                   m_Permissions;
 
@@ -684,20 +684,20 @@ public:
 
     virtual ~CPDF_CryptoHandler() {}
 
-    virtual bool               Init(CPDF_Dictionary* pEncryptDict, CPDF_SecurityHandler* pSecurityHandler) = 0;
+    virtual FX_BOOL            Init(CPDF_Dictionary* pEncryptDict, CPDF_SecurityHandler* pSecurityHandler) = 0;
 
     virtual FX_DWORD   DecryptGetSize(FX_DWORD src_size) = 0;
 
     virtual void*      DecryptStart(FX_DWORD objnum, FX_DWORD gennum) = 0;
 
-    virtual bool               DecryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf) = 0;
+    virtual FX_BOOL            DecryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf) = 0;
 
-    virtual bool               DecryptFinish(void* context, CFX_BinaryBuf& dest_buf) = 0;
+    virtual FX_BOOL            DecryptFinish(void* context, CFX_BinaryBuf& dest_buf) = 0;
 
 
     virtual FX_DWORD   EncryptGetSize(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size) = 0;
 
-    virtual bool               EncryptContent(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size,
+    virtual FX_BOOL            EncryptContent(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size,
                                        uint8_t* dest_buf, FX_DWORD& dest_size) = 0;
 
     void                               Decrypt(FX_DWORD objnum, FX_DWORD version, CFX_ByteString& str);
@@ -710,22 +710,22 @@ public:
 
     virtual ~CPDF_StandardCryptoHandler();
 
-    bool                               Init(int cipher, const uint8_t* key, int keylen);
-    virtual bool               Init(CPDF_Dictionary* pEncryptDict, CPDF_SecurityHandler* pSecurityHandler);
+    FX_BOOL                            Init(int cipher, const uint8_t* key, int keylen);
+    virtual FX_BOOL            Init(CPDF_Dictionary* pEncryptDict, CPDF_SecurityHandler* pSecurityHandler);
     virtual FX_DWORD   DecryptGetSize(FX_DWORD src_size);
     virtual void*      DecryptStart(FX_DWORD objnum, FX_DWORD gennum);
-    virtual bool               DecryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
-    virtual bool               DecryptFinish(void* context, CFX_BinaryBuf& dest_buf);
+    virtual FX_BOOL            DecryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf);
+    virtual FX_BOOL            DecryptFinish(void* context, CFX_BinaryBuf& dest_buf);
     virtual FX_DWORD   EncryptGetSize(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size);
-    virtual bool               EncryptContent(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size,
+    virtual FX_BOOL            EncryptContent(FX_DWORD objnum, FX_DWORD version, const uint8_t* src_buf, FX_DWORD src_size,
                                        uint8_t* dest_buf, FX_DWORD& dest_size);
 protected:
 
-    virtual void               CryptBlock(bool bEncrypt, FX_DWORD objnum, FX_DWORD gennum, const uint8_t* src_buf, FX_DWORD src_size,
+    virtual void               CryptBlock(FX_BOOL bEncrypt, FX_DWORD objnum, FX_DWORD gennum, const uint8_t* src_buf, FX_DWORD src_size,
                                    uint8_t* dest_buf, FX_DWORD& dest_size);
-    virtual void*      CryptStart(FX_DWORD objnum, FX_DWORD gennum, bool bEncrypt);
-    virtual bool               CryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf, bool bEncrypt);
-    virtual bool               CryptFinish(void* context, CFX_BinaryBuf& dest_buf, bool bEncrypt);
+    virtual void*      CryptStart(FX_DWORD objnum, FX_DWORD gennum, FX_BOOL bEncrypt);
+    virtual FX_BOOL            CryptStream(void* context, const uint8_t* src_buf, FX_DWORD src_size, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt);
+    virtual FX_BOOL            CryptFinish(void* context, CFX_BinaryBuf& dest_buf, FX_BOOL bEncrypt);
 
     uint8_t                            m_EncryptKey[32];
 
@@ -755,7 +755,7 @@ public:
 CFX_ByteString PDF_NameDecode(const CFX_ByteStringC& orig);
 CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig);
 CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig);
-CFX_ByteString PDF_EncodeString(const CFX_ByteString& src, bool bHex = false);
+CFX_ByteString PDF_EncodeString(const CFX_ByteString& src, FX_BOOL bHex = FALSE);
 CFX_WideString PDF_DecodeText(const uint8_t* pData, FX_DWORD size, CFX_CharMap* pCharMap = NULL);
 inline CFX_WideString PDF_DecodeText(const CFX_ByteString& bstr, CFX_CharMap* pCharMap = NULL) {
     return PDF_DecodeText((const uint8_t*)bstr.c_str(), bstr.GetLength(), pCharMap);
@@ -769,12 +769,12 @@ class CFDF_Document : public CPDF_IndirectObjects
 {
 public:
     static CFDF_Document* CreateNewDoc();
-    static CFDF_Document* ParseFile(IFX_FileRead *pFile, bool bOwnFile = false);
+    static CFDF_Document* ParseFile(IFX_FileRead *pFile, FX_BOOL bOwnFile = FALSE);
     static CFDF_Document* ParseMemory(const uint8_t* pData, FX_DWORD size);
 
     ~CFDF_Document();
 
-    bool                                       WriteBuf(CFX_ByteTextBuf& buf) const;
+    FX_BOOL                                    WriteBuf(CFX_ByteTextBuf& buf) const;
 
     CPDF_Dictionary*           GetRoot() const
     {
@@ -785,10 +785,10 @@ public:
 protected:
 
     CFDF_Document();
-    void       ParseStream(IFX_FileRead *pFile, bool bOwnFile);
+    void       ParseStream(IFX_FileRead *pFile, FX_BOOL bOwnFile);
     CPDF_Dictionary*           m_pRootDict;
     IFX_FileRead*                      m_pFile;
-    bool                                       m_bOwnFile;
+    FX_BOOL                                    m_bOwnFile;
 };
 
 CFX_WideString FPDF_FileSpec_GetWin32Path(const CPDF_Object* pFileSpec);
@@ -816,7 +816,7 @@ class IFX_FileAvail
 {
 public:
     virtual ~IFX_FileAvail() { }
-    virtual bool                       IsDataAvail( FX_FILESIZE offset, FX_DWORD size) = 0;
+    virtual FX_BOOL                    IsDataAvail( FX_FILESIZE offset, FX_DWORD size) = 0;
 };
 class IFX_DownloadHints
 {
@@ -839,10 +839,10 @@ public:
     IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; }
     IFX_FileRead* GetFileRead() const { return m_pFileRead; }
 
-    virtual bool                       IsDocAvail(IFX_DownloadHints* pHints) = 0;
+    virtual FX_BOOL                    IsDocAvail(IFX_DownloadHints* pHints) = 0;
     virtual void                       SetDocument(CPDF_Document* pDoc) = 0;
-    virtual bool                       IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0;
-    virtual bool                       IsLinearized() = 0;
+    virtual FX_BOOL                    IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0;
+    virtual FX_BOOL                    IsLinearized() = 0;
     virtual int32_t            IsFormAvail(IFX_DownloadHints *pHints) = 0;
     virtual int32_t            IsLinearizedPDF() = 0;
     virtual void                               GetLinearizedMainXRefInfo(FX_FILESIZE *pPos, FX_DWORD *pSize) = 0;
@@ -859,7 +859,7 @@ public:
 
     void AddObjNum(FX_DWORD dwObjNum);
 
-    bool Find(FX_DWORD dwObjNum);
+    FX_BOOL Find(FX_DWORD dwObjNum);
 
     void RemoveAll()
     {
@@ -867,7 +867,7 @@ public:
     }
 protected:
 
-    bool BinarySearch(FX_DWORD value, int &iNext);
+    FX_BOOL BinarySearch(FX_DWORD value, int &iNext);
 protected:
 
     CFX_DWordArray                     m_number_array;
index 37e8a54..f359009 100644 (file)
@@ -33,9 +33,9 @@ public:
 
     virtual ~IPDF_OCContext() {}
 
-    virtual bool       CheckOCGVisible(const CPDF_Dictionary* pOCG) = 0;
+    virtual FX_BOOL    CheckOCGVisible(const CPDF_Dictionary* pOCG) = 0;
 
-    bool CheckObjectVisible(const CPDF_PageObject* pObj);
+    FX_BOOL CheckObjectVisible(const CPDF_PageObject* pObj);
 };
 #define RENDER_COLOR_NORMAL            0
 #define RENDER_COLOR_GRAY              1
@@ -89,10 +89,10 @@ public:
 
     CPDF_RenderContext();
 
-    void                       Create(CPDF_Page* pPage, bool bFirstLayer = true);
+    void                       Create(CPDF_Page* pPage, FX_BOOL bFirstLayer = TRUE);
 
     void                       Create(CPDF_Document* pDoc = NULL, CPDF_PageRenderCache* pPageCache = NULL,
-                           CPDF_Dictionary* pPageResources = NULL, bool bFirstLayer = true);
+                           CPDF_Dictionary* pPageResources = NULL, FX_BOOL bFirstLayer = TRUE);
 
     ~CPDF_RenderContext();
 
@@ -126,7 +126,7 @@ protected:
 
     CFX_ArrayTemplate<struct _PDF_RenderItem>  m_ContentList;
 
-    bool                                       m_bFirstLayer;
+    FX_BOOL                                    m_bFirstLayer;
 
     void                       Render(CFX_RenderDevice* pDevice, const CPDF_PageObject* pStopObj,
                            const CPDF_RenderOptions* pOptions, const CFX_AffineMatrix* pFinalMatrix);
@@ -192,17 +192,17 @@ public:
                                    const CPDF_RenderOptions* pOptions = NULL
                                );
 
-    static bool        DrawTextPath(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,
+    static FX_BOOL     DrawTextPath(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,
                                  CPDF_Font* pFont, FX_FLOAT font_size,
                                  const CFX_AffineMatrix* pText2User, const CFX_AffineMatrix* pUser2Device,
                                  const CFX_GraphStateData* pGraphState,
                                  FX_ARGB fill_argb, FX_ARGB stroke_argb, CFX_PathData* pClippingPath, int nFlag = 0);
 
-    static bool        DrawNormalText(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,
+    static FX_BOOL     DrawNormalText(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,
                                    CPDF_Font* pFont, FX_FLOAT font_size, const CFX_AffineMatrix* pText2Device,
                                    FX_ARGB fill_argb, const CPDF_RenderOptions* pOptions);
 
-    static bool        DrawType3Text(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,
+    static FX_BOOL     DrawType3Text(CFX_RenderDevice* pDevice, int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharPos,
                                   CPDF_Font* pFont, FX_FLOAT font_size, const CFX_AffineMatrix* pText2Device,
                                   FX_ARGB fill_argb);
 };
@@ -215,7 +215,7 @@ public:
         m_nTimeCount = 0;
         m_nCacheSize = 0;
         m_pCurImageCache = NULL;
-        m_bCurFindCache = false;
+        m_bCurFindCache = FALSE;
         m_pCurImageCaches = NULL;
     }
     ~CPDF_PageRenderCache()
@@ -238,7 +238,7 @@ public:
     }
 
     void                               GetCachedBitmap(CPDF_Stream* pStream, CFX_DIBSource*& pBitmap, CFX_DIBSource*& pMask, FX_DWORD& MatteColor,
-                                        bool bStdCS = false, FX_DWORD GroupFamily = 0, bool bLoadMask = false,
+                                        FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE,
                                         CPDF_RenderStatus* pRenderStatus = NULL, int32_t downsampleWidth = 0, int32_t downsampleHeight = 0);
 
     void                               ResetBitmap(CPDF_Stream* pStream, const CFX_DIBitmap* pBitmap);
@@ -249,11 +249,11 @@ public:
     }
     CFX_MapPtrToPtr            m_ImageCaches;
 public:
-    bool                               StartGetCachedBitmap(CPDF_Stream* pStream, bool bStdCS = false, FX_DWORD GroupFamily = 0,
-            bool bLoadMask = false, CPDF_RenderStatus* pRenderStatus = NULL,
+    FX_BOOL                            StartGetCachedBitmap(CPDF_Stream* pStream, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0,
+            FX_BOOL bLoadMask = FALSE, CPDF_RenderStatus* pRenderStatus = NULL,
             int32_t downsampleWidth = 0, int32_t downsampleHeight = 0);
 
-    bool                               Continue(IFX_Pause* pPause);
+    FX_BOOL                            Continue(IFX_Pause* pPause);
     CPDF_ImageCache*   m_pCurImageCache;
     CFX_PtrArray*       m_pCurImageCaches;
 protected:
@@ -262,7 +262,7 @@ protected:
 
     FX_DWORD                   m_nTimeCount;
     FX_DWORD                   m_nCacheSize;
-    bool                               m_bCurFindCache;
+    FX_BOOL                            m_bCurFindCache;
 };
 class CPDF_RenderConfig
 {
index c60737d..5c8cc85 100644 (file)
@@ -116,7 +116,7 @@ public:
         return m_Flags;
     }
 
-    virtual bool                       IsVertWriting()const;
+    virtual FX_BOOL                    IsVertWriting()const;
 
 
 
@@ -142,14 +142,14 @@ public:
     }
 
 
-    bool                                       IsEmbedded() const
+    FX_BOOL                                    IsEmbedded() const
     {
         return m_FontType == PDFFONT_TYPE3 || m_pFontFile != NULL;
     }
 
-    virtual bool                       IsUnicodeCompatible() const
+    virtual FX_BOOL                    IsUnicodeCompatible() const
     {
-        return false;
+        return FALSE;
     }
 
     CPDF_StreamAcc*                    GetFontFile() const
@@ -162,7 +162,7 @@ public:
         return m_pFontDict;
     }
 
-    bool                                       IsStandardFont() const;
+    FX_BOOL                                    IsStandardFont() const;
 
     FXFT_Face                          GetFace() const
     {
@@ -199,7 +199,7 @@ public:
 
 
 
-    virtual int                                GlyphFromCharCode(FX_DWORD charcode, bool *pVertGlyph = NULL) = 0;
+    virtual int                                GlyphFromCharCode(FX_DWORD charcode, FX_BOOL *pVertGlyph = NULL) = 0;
     virtual int                                GlyphFromCharCodeExt(FX_DWORD charcode)
     {
         return GlyphFromCharCode(charcode);
@@ -265,11 +265,11 @@ public:
 protected:
     explicit CPDF_Font(int fonttype);
 
-    bool                                       Initialize();
+    FX_BOOL                                    Initialize();
 
-    bool                                       Load();
+    FX_BOOL                                    Load();
 
-    virtual bool                       _Load() = 0;
+    virtual FX_BOOL                    _Load() = 0;
 
     virtual FX_WCHAR           _UnicodeFromCharCode(FX_DWORD charcode) const = 0;
 
@@ -278,7 +278,7 @@ protected:
     void                                       LoadUnicodeMap();
 
     void                                       LoadPDFEncoding(CPDF_Object* pEncoding, int& iBaseEncoding,
-                                            CFX_ByteString*& pCharNames, bool bEmbedded, bool bTrueType);
+                                            CFX_ByteString*& pCharNames, FX_BOOL bEmbedded, FX_BOOL bTrueType);
 
     void                                       LoadFontDescriptor(CPDF_Dictionary*);
 
@@ -298,7 +298,7 @@ protected:
 
     CPDF_ToUnicodeMap*         m_pToUnicodeMap;
 
-    bool                                       m_bToUnicodeLoaded;
+    FX_BOOL                                    m_bToUnicodeLoaded;
 
 
 
@@ -338,7 +338,7 @@ public:
 
     void                                       LoadEncoding(CPDF_Object* pEncoding);
 
-    bool                                       IsIdentical(CPDF_FontEncoding* pAnother) const;
+    FX_BOOL                                    IsIdentical(CPDF_FontEncoding* pAnother) const;
 
     FX_WCHAR                           UnicodeFromCharCode(uint8_t charcode) const
     {
@@ -370,11 +370,11 @@ public:
     }
     int GetCharWidthF(FX_DWORD charcode, int level = 0) override;
     void GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level = 0) override;
-    int GlyphFromCharCode(FX_DWORD charcode, bool *pVertGlyph = NULL) override;
-    bool IsUnicodeCompatible() const override;
+    int GlyphFromCharCode(FX_DWORD charcode, FX_BOOL *pVertGlyph = NULL) override;
+    FX_BOOL IsUnicodeCompatible() const override;
 
 protected:
-    bool LoadCommon();
+    FX_BOOL LoadCommon();
 
     void LoadSubstFont();
 
@@ -401,7 +401,7 @@ protected:
     int m_BaseEncoding;
     FX_WORD m_CharWidth[256];
     FX_SMALL_RECT m_CharBBox[256];
-    bool m_bUseFontWidth;
+    FX_BOOL m_bUseFontWidth;
 };
 
 class CPDF_Type1Font : public CPDF_SimpleFont
@@ -416,7 +416,7 @@ public:
     }
     virtual int                                GlyphFromCharCodeExt(FX_DWORD charcode);
 protected:
-    virtual bool                       _Load();
+    virtual FX_BOOL                    _Load();
 
     int                                                m_Base14Font;
     virtual void                       LoadGlyphMap();
@@ -427,7 +427,7 @@ public:
 
     CPDF_TrueTypeFont();
 protected:
-    virtual bool                       _Load();
+    virtual FX_BOOL                    _Load();
     virtual void                       LoadGlyphMap();
 };
 class CPDF_Type3Char
@@ -438,11 +438,11 @@ public:
 
     ~CPDF_Type3Char();
 
-    bool LoadBitmap(CPDF_RenderContext* pContext);
+    FX_BOOL LoadBitmap(CPDF_RenderContext* pContext);
 
-    bool                                       m_bColored;
+    FX_BOOL                                    m_bColored;
 
-    bool                                       m_bPageRequired;
+    FX_BOOL                                    m_bPageRequired;
 
 
 
@@ -484,7 +484,7 @@ protected:
     CFX_AffineMatrix m_FontMatrix;
 
 private:
-    bool _Load() override;
+    FX_BOOL _Load() override;
     void LoadGlyphMap() override {}
 
     int m_CharWidthL[256];
@@ -511,13 +511,13 @@ public:
 
     ~CPDF_CIDFont() override;
 
-    bool LoadGB2312();
-    int GlyphFromCharCode(FX_DWORD charcode, bool *pVertGlyph = NULL) override;
+    FX_BOOL LoadGB2312();
+    int GlyphFromCharCode(FX_DWORD charcode, FX_BOOL *pVertGlyph = NULL) override;
     int GetCharWidthF(FX_DWORD charcode, int level = 0) override;
     void GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level = 0) override;
     FX_WORD CIDFromCharCode(FX_DWORD charcode) const;
 
-    bool IsTrueType() const
+    FX_BOOL IsTrueType() const
     {
         return !m_bType1;
     }
@@ -533,19 +533,19 @@ public:
     }
 
     const uint8_t* GetCIDTransform(FX_WORD CID) const;
-    bool IsVertWriting() const override;
+    FX_BOOL IsVertWriting() const override;
     short GetVertWidth(FX_WORD CID) const;
     void GetVertOrigin(FX_WORD CID, short& vx, short& vy) const;
-    bool IsUnicodeCompatible() const override;
-    virtual bool IsFontStyleFromCharCode(FX_DWORD charcode) const;
+    FX_BOOL IsUnicodeCompatible() const override;
+    virtual FX_BOOL IsFontStyleFromCharCode(FX_DWORD charcode) const;
 
 protected:
     friend class CPDF_Font;
 
-    bool _Load() override;
+    FX_BOOL _Load() override;
     FX_WCHAR _UnicodeFromCharCode(FX_DWORD charcode) const override;
     FX_DWORD _CharCodeFromUnicode(FX_WCHAR Unicode) const override;
-    int GetGlyphIndex(FX_DWORD unicodeb, bool *pVertGlyph);
+    int GetGlyphIndex(FX_DWORD unicodeb, FX_BOOL *pVertGlyph);
     void LoadMetricsArray(CPDF_Array* pArray, CFX_DWordArray& result, int nElements);
     void LoadSubstFont();
 
@@ -553,9 +553,9 @@ protected:
     CPDF_CMap* m_pAllocatedCMap;
     CPDF_CID2UnicodeMap* m_pCID2UnicodeMap;
     int m_Charset;
-    bool m_bType1;
+    FX_BOOL m_bType1;
     CPDF_StreamAcc* m_pCIDToGIDMap;
-    bool m_bCIDIsGID;
+    FX_BOOL m_bCIDIsGID;
     FX_WORD m_DefaultWidth;
     FX_WORD* m_pAnsiWidths;
     FX_SMALL_RECT m_CharBBox[256];
@@ -563,7 +563,7 @@ protected:
     short m_DefaultVY;
     short m_DefaultW1;
     CFX_DWordArray m_VertMetrics;
-    bool m_bAdobeCourierStd;
+    FX_BOOL m_bAdobeCourierStd;
     CFX_CTTGSUBTable* m_pTTGSUBTable;
 };
 
@@ -612,27 +612,27 @@ public:
         max = 1.0f;
     }
 
-    bool                                       sRGB() const;
+    FX_BOOL                                    sRGB() const;
 
 
 
-    virtual bool                       GetRGB(FX_FLOAT* pBuf, FX_FLOAT& R, FX_FLOAT& G, FX_FLOAT& B) const = 0;
+    virtual FX_BOOL                    GetRGB(FX_FLOAT* pBuf, FX_FLOAT& R, FX_FLOAT& G, FX_FLOAT& B) const = 0;
 
-    virtual bool                       SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B) const
+    virtual FX_BOOL                    SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B) const
     {
-        return false;
+        return FALSE;
     }
 
 
 
 
-    bool                                       GetCMYK(FX_FLOAT* pBuf, FX_FLOAT& c, FX_FLOAT& m, FX_FLOAT& y, FX_FLOAT& k) const;
+    FX_BOOL                                    GetCMYK(FX_FLOAT* pBuf, FX_FLOAT& c, FX_FLOAT& m, FX_FLOAT& y, FX_FLOAT& k) const;
 
-    bool                                       SetCMYK(FX_FLOAT* pBuf, FX_FLOAT c, FX_FLOAT m, FX_FLOAT y, FX_FLOAT k) const;
+    FX_BOOL                                    SetCMYK(FX_FLOAT* pBuf, FX_FLOAT c, FX_FLOAT m, FX_FLOAT y, FX_FLOAT k) const;
 
 
     virtual void                       TranslateImageLine(uint8_t* dest_buf, const uint8_t* src_buf, int pixels,
-            int image_width, int image_height, bool bTransMask = false) const;
+            int image_width, int image_height, FX_BOOL bTransMask = FALSE) const;
 
     CPDF_Array*&                       GetArray()
     {
@@ -646,7 +646,7 @@ public:
         return NULL;
     }
 
-    virtual void                       EnableStdConversion(bool bEnabled);
+    virtual void                       EnableStdConversion(FX_BOOL bEnabled);
 
     CPDF_Document* const m_pDocument;
 
@@ -659,17 +659,17 @@ protected:
           m_dwStdConversion(0) {
     }
     virtual ~CPDF_ColorSpace() {}
-    virtual bool                       v_Load(CPDF_Document* pDoc, CPDF_Array* pArray)
+    virtual FX_BOOL                    v_Load(CPDF_Document* pDoc, CPDF_Array* pArray)
     {
-        return true;
+        return TRUE;
     }
-    virtual bool                       v_GetCMYK(FX_FLOAT* pBuf, FX_FLOAT& c, FX_FLOAT& m, FX_FLOAT& y, FX_FLOAT& k) const
+    virtual FX_BOOL                    v_GetCMYK(FX_FLOAT* pBuf, FX_FLOAT& c, FX_FLOAT& m, FX_FLOAT& y, FX_FLOAT& k) const
     {
-        return false;
+        return FALSE;
     }
-    virtual bool                       v_SetCMYK(FX_FLOAT* pBuf, FX_FLOAT c, FX_FLOAT m, FX_FLOAT y, FX_FLOAT k) const
+    virtual FX_BOOL                    v_SetCMYK(FX_FLOAT* pBuf, FX_FLOAT c, FX_FLOAT m, FX_FLOAT y, FX_FLOAT k) const
     {
-        return false;
+        return FALSE;
     }
 
     int                                                m_Family;
@@ -692,14 +692,14 @@ public:
 
     ~CPDF_Color();
 
-    bool                                       IsNull() const
+    FX_BOOL                                    IsNull() const
     {
         return m_pBuffer == NULL;
     }
 
-    bool                                       IsEqual(const CPDF_Color& other) const;
+    FX_BOOL                                    IsEqual(const CPDF_Color& other) const;
 
-    bool                                       IsPattern() const
+    FX_BOOL                                    IsPattern() const
     {
         return m_pCS && m_pCS->GetFamily() == PDFCS_PATTERN;
     }
@@ -712,7 +712,7 @@ public:
 
     void                                       SetValue(CPDF_Pattern* pPattern, FX_FLOAT* comp, int ncomps);
 
-    bool                                       GetRGB(int& R, int& G, int& B) const;
+    FX_BOOL                                    GetRGB(int& R, int& G, int& B) const;
 
     CPDF_Pattern*                      GetPattern() const;
 
@@ -734,7 +734,7 @@ class CPDF_Pattern
 public:
 
     virtual ~CPDF_Pattern();
-    void    SetForceClear(bool bForceClear) { m_bForceClear = bForceClear; }
+    void    SetForceClear(FX_BOOL bForceClear) { m_bForceClear = bForceClear; }
 
     CPDF_Object*                m_pPatternObj;
 
@@ -747,7 +747,7 @@ public:
 
 protected:
     CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix);
-    bool     m_bForceClear;
+    FX_BOOL     m_bForceClear;
 };
 
 class CPDF_TilingPattern : public CPDF_Pattern
@@ -758,11 +758,11 @@ public:
 
     virtual ~CPDF_TilingPattern();
 
-    bool                               Load();
+    FX_BOOL                            Load();
 
 
 
-    bool                               m_bColored;
+    FX_BOOL                            m_bColored;
 
     CFX_FloatRect              m_BBox;
 
@@ -778,17 +778,17 @@ class CPDF_ShadingPattern : public CPDF_Pattern
 {
 public:
 
-    CPDF_ShadingPattern(CPDF_Document* pDoc, CPDF_Object* pPatternObj, bool bShading, const CFX_AffineMatrix* parentMatrix);
+    CPDF_ShadingPattern(CPDF_Document* pDoc, CPDF_Object* pPatternObj, FX_BOOL bShading, const CFX_AffineMatrix* parentMatrix);
 
     virtual ~CPDF_ShadingPattern();
 
     CPDF_Object*               m_pShadingObj;
 
-    bool                               m_bShadingObj;
+    FX_BOOL                            m_bShadingObj;
 
-    bool                               Load();
+    FX_BOOL                            Load();
 
-    bool                               Reload();
+    FX_BOOL                            Reload();
 
     int                                        m_ShadingType;
 
@@ -810,7 +810,7 @@ class CPDF_MeshStream
 {
 public:
 
-    bool                               Load(CPDF_Stream* pShadingStream, CPDF_Function** pFuncs, int nFuncs, CPDF_ColorSpace* pCS);
+    FX_BOOL                            Load(CPDF_Stream* pShadingStream, CPDF_Function** pFuncs, int nFuncs, CPDF_ColorSpace* pCS);
 
     FX_DWORD                   GetFlag();
 
@@ -820,7 +820,7 @@ public:
 
     FX_DWORD                   GetVertex(CPDF_MeshVertex& vertex, CFX_AffineMatrix* pObject2Bitmap);
 
-    bool                               GetVertexRow(CPDF_MeshVertex* vertex, int count, CFX_AffineMatrix* pObject2Bitmap);
+    FX_BOOL                            GetVertexRow(CPDF_MeshVertex* vertex, int count, CFX_AffineMatrix* pObject2Bitmap);
     CPDF_Function**    m_pFuncs;
     CPDF_ColorSpace*   m_pCS;
     FX_DWORD                   m_nFuncs, m_nCoordBits, m_nCompBits, m_nFlagBits, m_nComps;
@@ -854,13 +854,13 @@ public:
 
     ~CPDF_Image();
 
-    bool                                       LoadImageF(CPDF_Stream* pImageStream, bool bInline);
+    FX_BOOL                                    LoadImageF(CPDF_Stream* pImageStream, FX_BOOL bInline);
 
     void                                       Release();
 
     CPDF_Image*                                Clone();
 
-    bool                                       IsInline()
+    FX_BOOL                                    IsInline()
     {
         return m_bInline;
     }
@@ -908,17 +908,17 @@ public:
     }
 
 
-    bool                                       IsMask() const
+    FX_BOOL                                    IsMask() const
     {
         return m_bIsMask;
     }
 
-    bool                                       IsInterpol() const
+    FX_BOOL                                    IsInterpol() const
     {
         return m_bInterpolate;
     }
 
-    CFX_DIBSource*                     LoadDIBSource(CFX_DIBSource** ppMask = NULL, FX_DWORD* pMatteColor = NULL, bool bStdCS = false, FX_DWORD GroupFamily = 0, bool bLoadMask = false) const;
+    CFX_DIBSource*                     LoadDIBSource(CFX_DIBSource** ppMask = NULL, FX_DWORD* pMatteColor = NULL, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE) const;
 
 
 
@@ -931,8 +931,8 @@ public:
     void                                       ResetCache(CPDF_Page* pPage, const CFX_DIBitmap* pDIBitmap);
 
 public:
-    bool                                       StartLoadDIBSource(CPDF_Dictionary* pFormResource, CPDF_Dictionary* pPageResource, bool bStdCS = false, FX_DWORD GroupFamily = 0, bool bLoadMask = false);
-    bool                                       Continue(IFX_Pause* pPause);
+    FX_BOOL                                    StartLoadDIBSource(CPDF_Dictionary* pFormResource, CPDF_Dictionary* pPageResource, FX_BOOL bStdCS = FALSE, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE);
+    FX_BOOL                                    Continue(IFX_Pause* pPause);
     CFX_DIBSource*                     DetachBitmap();
     CFX_DIBSource*                     DetachMask();
     CFX_DIBSource*                     m_pDIBSource;
@@ -941,16 +941,16 @@ public:
 private:
 
     CPDF_Stream*                       m_pStream;
-    bool                                       m_bInline;
+    FX_BOOL                                    m_bInline;
     CPDF_Dictionary*           m_pInlineDict;
 
     int32_t                            m_Height;
 
     int32_t                            m_Width;
 
-    bool                                       m_bIsMask;
+    FX_BOOL                                    m_bIsMask;
 
-    bool                                       m_bInterpolate;
+    FX_BOOL                                    m_bInterpolate;
 
     CPDF_Document*                     m_pDocument;
 
index 06cf213..1877ef8 100644 (file)
@@ -117,35 +117,35 @@ public:
 
     void                               RemoveSecurity();
 
-    bool                               Create(const FX_WCHAR* filename, FX_DWORD flags = 0);
+    FX_BOOL                            Create(const FX_WCHAR* filename, FX_DWORD flags = 0);
 
-    bool                               Create(const FX_CHAR* filename, FX_DWORD flags = 0);
+    FX_BOOL                            Create(const FX_CHAR* filename, FX_DWORD flags = 0);
 
-    bool                               Create(IFX_StreamWrite* pFile, FX_DWORD flags = 0);
+    FX_BOOL                            Create(IFX_StreamWrite* pFile, FX_DWORD flags = 0);
 
     int32_t                    Continue(IFX_Pause *pPause = NULL);
 
-    bool                               SetFileVersion(int32_t fileVersion = 17);
+    FX_BOOL                            SetFileVersion(int32_t fileVersion = 17);
 protected:
 
     CPDF_Document*             m_pDocument;
 
     CPDF_Parser*               m_pParser;
 
-    bool                               m_bCompress;
+    FX_BOOL                            m_bCompress;
 
-    bool                               m_bSecurityChanged;
+    FX_BOOL                            m_bSecurityChanged;
 
     CPDF_Dictionary*   m_pEncryptDict;
     FX_DWORD                   m_dwEnryptObjNum;
-    bool                               m_bEncryptCloned;
+    FX_BOOL                            m_bEncryptCloned;
 
-    bool                               m_bStandardSecurity;
+    FX_BOOL                            m_bStandardSecurity;
 
     CPDF_CryptoHandler*        m_pCryptoHandler;
-    bool                               m_bNewCrypto;
+    FX_BOOL                            m_bNewCrypto;
 
-    bool                               m_bEncryptMetadata;
+    FX_BOOL                            m_bEncryptMetadata;
 
     CPDF_Object*               m_pMetadata;
 
@@ -154,7 +154,7 @@ protected:
     int32_t                    m_ObjectStreamSize;
 
     FX_DWORD                   m_dwLastObjNum;
-    bool                               Create(FX_DWORD flags);
+    FX_BOOL                            Create(FX_DWORD flags);
     void                               ResetStandardSecurity();
     void                               Clear();
     int32_t                    WriteDoc_Stage1(IFX_Pause *pPause);
@@ -170,14 +170,14 @@ protected:
     void                               AppendNewObjNum(FX_DWORD objbum);
     int32_t                    WriteOldIndirectObject(FX_DWORD objnum);
     int32_t                    WriteOldObjs(IFX_Pause *pPause);
-    int32_t                    WriteNewObjs(bool bIncremental, IFX_Pause *pPause);
+    int32_t                    WriteNewObjs(FX_BOOL bIncremental, IFX_Pause *pPause);
     int32_t                    WriteIndirectObj(const CPDF_Object* pObj);
-    int32_t                    WriteDirectObj(FX_DWORD objnum, const CPDF_Object* pObj, bool bEncrypt = true);
+    int32_t                    WriteDirectObj(FX_DWORD objnum, const CPDF_Object* pObj, FX_BOOL bEncrypt = TRUE);
     int32_t                    WriteIndirectObjectToStream(const CPDF_Object* pObj);
     int32_t                    WriteIndirectObj(FX_DWORD objnum, const CPDF_Object* pObj);
     int32_t                    WriteIndirectObjectToStream(FX_DWORD objnum, const uint8_t* pBuffer, FX_DWORD dwSize);
     int32_t                    AppendObjectNumberToXRef(FX_DWORD objnum);
-    void                               InitID(bool bDefault = true);
+    void                               InitID(FX_BOOL bDefault = TRUE);
     int32_t                    WriteStream(const CPDF_Object* pStream, FX_DWORD objnum, CPDF_CryptoHandler* pCrypto);
 
     int32_t                    m_iStage;
index eb0ca44..7cfaed4 100644 (file)
@@ -60,7 +60,7 @@ public:
 
     int32_t                                            GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex);
 
-    bool                                                       IsLatinWord(FX_WORD word);
+    FX_BOOL                                                    IsLatinWord(FX_WORD word);
 
     int32_t                                            GetDefaultFontIndex();
 private:
@@ -76,20 +76,20 @@ class CPVT_GenerateAP
 {
 public:
 
-    static bool                                                        GenerateTextFieldAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
+    static FX_BOOL                                                     GenerateTextFieldAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
 
-    static bool                                                        GenerateComboBoxAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
+    static FX_BOOL                                                     GenerateComboBoxAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
 
-    static bool                                                        GenerateListBoxAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
+    static FX_BOOL                                                     GenerateListBoxAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
 
     static CFX_ByteString                                      GenerateEditAP(IPVT_FontMap * pFontMap, IPDF_VariableText_Iterator * pIterator,
-            const CPDF_Point & ptOffset, bool bContinuous, FX_WORD SubWord = 0, const CPVT_WordRange * pVisible = NULL);
+            const CPDF_Point & ptOffset, FX_BOOL bContinuous, FX_WORD SubWord = 0, const CPVT_WordRange * pVisible = NULL);
 
     static CFX_ByteString                                      GenerateBorderAP(const CPDF_Rect & rect, FX_FLOAT fWidth,
             const CPVT_Color & color, const CPVT_Color & crLeftTop, const CPVT_Color & crRightBottom,
             int32_t nStyle, const CPVT_Dash & dash);
 
-    static CFX_ByteString                                      GenerateColorAP(const CPVT_Color & color, const bool & bFillOrStroke);
+    static CFX_ByteString                                      GenerateColorAP(const CPVT_Color & color, const FX_BOOL & bFillOrStroke);
 };
 
 #endif  // CORE_INCLUDE_FPDFDOC_FPDF_AP_H_
index 36d9d29..fc9d3bc 100644 (file)
@@ -164,26 +164,26 @@ public:
         return m_eUsageType;
     }
 
-    bool                       CheckOCGVisible(const CPDF_Dictionary *pOCGDict);
+    FX_BOOL                    CheckOCGVisible(const CPDF_Dictionary *pOCGDict);
 
     void                       ResetOCContext();
 protected:
 
-    bool                       LoadOCGStateFromConfig(const CFX_ByteStringC& csConfig, const CPDF_Dictionary *pOCGDict, bool &bValidConfig) const;
+    FX_BOOL                    LoadOCGStateFromConfig(const CFX_ByteStringC& csConfig, const CPDF_Dictionary *pOCGDict, FX_BOOL &bValidConfig) const;
 
-    bool                       LoadOCGState(const CPDF_Dictionary *pOCGDict) const;
+    FX_BOOL                    LoadOCGState(const CPDF_Dictionary *pOCGDict) const;
 
-    bool                       GetOCGVisible(const CPDF_Dictionary *pOCGDict);
+    FX_BOOL                    GetOCGVisible(const CPDF_Dictionary *pOCGDict);
 
-    bool                       GetOCGVE(CPDF_Array *pExpression, bool bFromConfig, int nLevel = 0);
+    FX_BOOL                    GetOCGVE(CPDF_Array *pExpression, FX_BOOL bFromConfig, int nLevel = 0);
 
-    bool                       LoadOCMDState(const CPDF_Dictionary *pOCMDDict, bool bFromConfig);
+    FX_BOOL                    LoadOCMDState(const CPDF_Dictionary *pOCMDDict, FX_BOOL bFromConfig);
 
     CPDF_Document              *m_pDocument;
 
     UsageType                  m_eUsageType;
 
-    std::map<const CPDF_Dictionary*, bool> m_OCGStates;
+    std::map<const CPDF_Dictionary*, FX_BOOL> m_OCGStates;
 };
 class CPDF_LWinParam
 {
@@ -295,7 +295,7 @@ public:
 
     CFX_WideString             GetFilePath() const;
 
-    bool                               GetNewWindow() const
+    FX_BOOL                            GetNewWindow() const
     {
         return m_pDict->GetBoolean("NewWindow");
     }
@@ -304,7 +304,7 @@ public:
 
     CFX_ByteString             GetURI(CPDF_Document* pDoc) const;
 
-    bool                               GetMouseMap() const
+    FX_BOOL                            GetMouseMap() const
     {
         return m_pDict->GetBoolean("IsMap");
     }
@@ -314,9 +314,9 @@ public:
         return this;
     }
 
-    bool                               GetHideStatus() const
+    FX_BOOL                            GetHideStatus() const
     {
-        return m_pDict->GetBoolean("H", true);
+        return m_pDict->GetBoolean("H", TRUE);
     }
 
     CFX_ByteString             GetNamedAction() const
@@ -345,17 +345,17 @@ public:
         return m_pDict->GetNumber("Volume");
     }
 
-    bool                               IsSynchronous() const
+    FX_BOOL                            IsSynchronous() const
     {
         return m_pDict->GetBoolean("Synchronous");
     }
 
-    bool                               IsRepeat() const
+    FX_BOOL                            IsRepeat() const
     {
         return m_pDict->GetBoolean("Repeat");
     }
 
-    bool                               IsMixPlay() const
+    FX_BOOL                            IsMixPlay() const
     {
         return m_pDict->GetBoolean("Mix");
     }
@@ -405,7 +405,7 @@ public:
         DocumentPrinted
     };
 
-    bool                               ActionExist(AActionType eType) const;
+    FX_BOOL                            ActionExist(AActionType eType) const;
 
     CPDF_Action                        GetAction(AActionType eType) const;
 
@@ -455,13 +455,13 @@ public:
         return m_pObj;
     }
 
-    bool                       IsURL() const;
+    FX_BOOL                    IsURL() const;
 
-    bool                       GetFileName(CFX_WideString &wsFileName) const;
+    FX_BOOL                    GetFileName(CFX_WideString &wsFileName) const;
 
     CPDF_Stream*       GetFileStream() const;
 
-    void                       SetFileName(const CFX_WideStringC& wsFileName, bool bURL = false);
+    void                       SetFileName(const CFX_WideStringC& wsFileName, FX_BOOL bURL = FALSE);
 protected:
 
     CPDF_Object                *m_pObj;
@@ -543,13 +543,13 @@ class CPDF_Annot : public CFX_PrivateData
 
     CPDF_Dictionary* GetAnnotDict();
 
-    bool DrawAppearance(const CPDF_Page* pPage,
+    FX_BOOL DrawAppearance(const CPDF_Page* pPage,
                            CFX_RenderDevice* pDevice,
                            const CFX_AffineMatrix* pUser2Device,
                            AppearanceMode mode,
                            const CPDF_RenderOptions* pOptions);
 
-    bool DrawInContext(const CPDF_Page* pPage,
+    FX_BOOL DrawInContext(const CPDF_Page* pPage,
                           const CPDF_RenderContext* pContext,
                           const CFX_AffineMatrix* pUser2Device,
                           AppearanceMode mode);
@@ -585,25 +585,25 @@ public:
     void       GetAnnotRect(const CPDF_Dictionary* pAnnotDict, const CFX_Matrix* pUser2Device, CPDF_Rect &rtAnnot) const;
 
     void                               DisplayAnnots(const CPDF_Page* pPage, CFX_RenderDevice* pDevice,
-                                      CFX_AffineMatrix* pMatrix, bool bShowWidget,
+                                      CFX_AffineMatrix* pMatrix, FX_BOOL bShowWidget,
                                       CPDF_RenderOptions* pOptions);
 
     void                               DisplayAnnots(const CPDF_Page* pPage, CPDF_RenderContext* pContext,
-                                      bool bPrinting, CFX_AffineMatrix* pMatrix, bool bShowWidget,
+                                      FX_BOOL bPrinting, CFX_AffineMatrix* pMatrix, FX_BOOL bShowWidget,
                                       CPDF_RenderOptions* pOptions)
     {
         DisplayAnnots(pPage, NULL, pContext, bPrinting, pMatrix, bShowWidget ? 3 : 1, pOptions, NULL);
     }
 
     void                               DisplayAnnots(const CPDF_Page* pPage, CPDF_RenderContext* pContext,
-                                      bool bPrinting, CFX_AffineMatrix* pMatrix, bool bShowWidget,
+                                      FX_BOOL bPrinting, CFX_AffineMatrix* pMatrix, FX_BOOL bShowWidget,
                                       CPDF_RenderOptions* pOptions, FX_RECT *pClipRect)
     {
         DisplayAnnots(pPage, NULL, pContext, bPrinting, pMatrix, bShowWidget ? 3 : 1, pOptions, pClipRect);
     }
 
     void                               DisplayAnnots(const CPDF_Page* pPage, CFX_RenderDevice* pDevice, CPDF_RenderContext* pContext,
-                                      bool bPrinting, CFX_AffineMatrix* pMatrix, FX_DWORD dwAnnotFlags,
+                                      FX_BOOL bPrinting, CFX_AffineMatrix* pMatrix, FX_DWORD dwAnnotFlags,
                                       CPDF_RenderOptions* pOptions, FX_RECT* pClipRect);
 
 
@@ -636,8 +636,8 @@ protected:
     CFX_PtrArray               m_Borders;
 
     void                               DisplayPass(const CPDF_Page* pPage, CFX_RenderDevice* pDevice,
-                                    CPDF_RenderContext* pContext, bool bPrinting, CFX_AffineMatrix* pMatrix,
-                                    bool bWidget, CPDF_RenderOptions* pOptions, FX_RECT* clip_rect);
+                                    CPDF_RenderContext* pContext, FX_BOOL bPrinting, CFX_AffineMatrix* pMatrix,
+                                    FX_BOOL bWidget, CPDF_RenderOptions* pOptions, FX_RECT* clip_rect);
     friend class               CPDF_Annot;
 };
 #define COLORTYPE_TRANSPARENT  0
@@ -678,7 +678,7 @@ public:
 
 
 
-    bool                               HasFont();
+    FX_BOOL                            HasFont();
 
     CFX_ByteString             GetFontString();
 
@@ -687,18 +687,18 @@ public:
 
 
 
-    bool                               HasColor(bool bStrokingOperation = false);
+    FX_BOOL                            HasColor(FX_BOOL bStrokingOperation = FALSE);
 
-    CFX_ByteString             GetColorString(bool bStrokingOperation = false);
+    CFX_ByteString             GetColorString(FX_BOOL bStrokingOperation = FALSE);
 
-    void                               GetColor(int& iColorType, FX_FLOAT fc[4], bool bStrokingOperation = false);
+    void                               GetColor(int& iColorType, FX_FLOAT fc[4], FX_BOOL bStrokingOperation = FALSE);
 
-    void                               GetColor(FX_ARGB& color, int& iColorType, bool bStrokingOperation = false);
+    void                               GetColor(FX_ARGB& color, int& iColorType, FX_BOOL bStrokingOperation = FALSE);
 
 
 
 
-    bool                               HasTextMatrix();
+    FX_BOOL                            HasTextMatrix();
 
     CFX_ByteString             GetTextMatrixString();
 
@@ -720,15 +720,15 @@ class CPDF_InterForm : public CFX_PrivateData
 {
 public:
 
-    CPDF_InterForm(CPDF_Document* pDocument, bool bUpdateAP);
+    CPDF_InterForm(CPDF_Document* pDocument, FX_BOOL bUpdateAP);
 
     ~CPDF_InterForm();
 
 
 
-    static void                                EnableUpdateAP(bool bUpdateAP);
+    static void                                EnableUpdateAP(FX_BOOL bUpdateAP);
 
-    static bool                        UpdatingAPEnabled();
+    static FX_BOOL                     UpdatingAPEnabled();
 
 
     static CFX_ByteString      GenerateNewResourceName(const CPDF_Dictionary* pResDict, const FX_CHAR* csType, int iMinLen = 2, const FX_CHAR* csPrefix = "");
@@ -756,11 +756,11 @@ public:
 
 
 
-    bool                                       ValidateFieldName(CFX_WideString& csNewFieldName, int iType);
+    FX_BOOL                                    ValidateFieldName(CFX_WideString& csNewFieldName, int iType);
 
-    bool                                       ValidateFieldName(const CPDF_FormField* pField, CFX_WideString& csNewFieldName);
+    FX_BOOL                                    ValidateFieldName(const CPDF_FormField* pField, CFX_WideString& csNewFieldName);
 
-    bool                                       ValidateFieldName(const CPDF_FormControl* pControl, CFX_WideString& csNewFieldName);
+    FX_BOOL                                    ValidateFieldName(const CPDF_FormControl* pControl, CFX_WideString& csNewFieldName);
 
 
 
@@ -771,7 +771,7 @@ public:
 
     void                                       GetAllFieldNames(CFX_WideStringArray& allFieldNames);
 
-    bool                                       IsValidFormField(const void* pField);
+    FX_BOOL                                    IsValidFormField(const void* pField);
 
     CPDF_FormField*                    GetFieldByDict(CPDF_Dictionary* pFieldDict) const;
 
@@ -782,7 +782,7 @@ public:
 
     CPDF_FormControl*          GetControl(FX_DWORD index, CFX_WideString csFieldName = L"");
 
-    bool                                       IsValidFormControl(const void* pControl);
+    FX_BOOL                                    IsValidFormControl(const void* pControl);
 
     int                                                CountPageControls(CPDF_Page* pPage) const;
 
@@ -817,9 +817,9 @@ public:
 
 
 
-    bool                                       NeedConstructAP();
+    FX_BOOL                                    NeedConstructAP();
 
-    void                                       NeedConstructAP(bool bNeedAP);
+    void                                       NeedConstructAP(FX_BOOL bNeedAP);
 
 
 
@@ -845,11 +845,11 @@ public:
 
     CPDF_Font*                         GetNativeFormFont(CFX_ByteString& csNameTag);
 
-    bool                                       FindFormFont(const CPDF_Font* pFont, CFX_ByteString& csNameTag);
+    FX_BOOL                                    FindFormFont(const CPDF_Font* pFont, CFX_ByteString& csNameTag);
 
-    bool                                       FindFormFont(CFX_ByteString csFontName, CPDF_Font*& pFont, CFX_ByteString& csNameTag);
+    FX_BOOL                                    FindFormFont(CFX_ByteString csFontName, CPDF_Font*& pFont, CFX_ByteString& csNameTag);
 
-    inline bool                        FindFormFont(CFX_WideString csFontName, CPDF_Font*& pFont, CFX_ByteString& csNameTag)
+    inline FX_BOOL                     FindFormFont(CFX_WideString csFontName, CPDF_Font*& pFont, CFX_ByteString& csNameTag)
     {
         return FindFormFont(PDF_EncodeText(csFontName), pFont, csNameTag);
     }
@@ -882,20 +882,20 @@ public:
 
 
 
-    CPDF_FormField*                    CheckRequiredFields(const CFX_PtrArray *fields = NULL, bool bIncludeOrExclude = true) const;
+    CPDF_FormField*                    CheckRequiredFields(const CFX_PtrArray *fields = NULL, FX_BOOL bIncludeOrExclude = TRUE) const;
 
-    CFDF_Document*                     ExportToFDF(const CFX_WideStringC& pdf_path, bool bSimpleFileSpec = false) const;
+    CFDF_Document*                     ExportToFDF(const CFX_WideStringC& pdf_path, FX_BOOL bSimpleFileSpec = FALSE) const;
 
-    CFDF_Document*                     ExportToFDF(const CFX_WideStringC& pdf_path, CFX_PtrArray& fields, bool bIncludeOrExclude = true, bool bSimpleFileSpec = false) const;
+    CFDF_Document*                     ExportToFDF(const CFX_WideStringC& pdf_path, CFX_PtrArray& fields, FX_BOOL bIncludeOrExclude = TRUE, FX_BOOL bSimpleFileSpec = FALSE) const;
 
-    bool                                       ImportFromFDF(const CFDF_Document* pFDFDoc, bool bNotify = false);
+    FX_BOOL                                    ImportFromFDF(const CFDF_Document* pFDFDoc, FX_BOOL bNotify = FALSE);
 
 
 
 
-    bool                                       ResetForm(const CFX_PtrArray& fields, bool bIncludeOrExclude = true, bool bNotify = false);
+    FX_BOOL                                    ResetForm(const CFX_PtrArray& fields, FX_BOOL bIncludeOrExclude = TRUE, FX_BOOL bNotify = FALSE);
 
-    bool                                       ResetForm(bool bNotify = false);
+    FX_BOOL                                    ResetForm(FX_BOOL bNotify = FALSE);
 
     void                                       ReloadForm();
 
@@ -907,27 +907,27 @@ public:
     void                                       SetFormNotify(const CPDF_FormNotify* pNotify);
 
 
-    int                                                GetPageWithWidget(int iCurPage, bool bNext);
+    int                                                GetPageWithWidget(int iCurPage, FX_BOOL bNext);
 
 
 
-    bool                                       IsUpdated()
+    FX_BOOL                                    IsUpdated()
     {
         return m_bUpdated;
     }
 
     void                                       ClearUpdatedFlag()
     {
-        m_bUpdated = false;
+        m_bUpdated = FALSE;
     }
 
 
-    bool                                       HasXFAForm() const;
+    FX_BOOL                                    HasXFAForm() const;
 
     void                                       FixPageFields(const CPDF_Page* pPage);
 protected:
 
-    static bool                        m_bUpdateAP;
+    static FX_BOOL                     m_bUpdateAP;
 
     void                                       LoadField(CPDF_Dictionary* pFieldDict, int nLevel = 0);
 
@@ -937,9 +937,9 @@ protected:
 
     CPDF_FormControl*          AddControl(const CPDF_FormField* pField, const CPDF_Dictionary* pWidgetDict);
 
-    void                                       FDF_ImportField(CPDF_Dictionary* pField, const CFX_WideString& parent_name, bool bNotify = false, int nLevel = 0);
+    void                                       FDF_ImportField(CPDF_Dictionary* pField, const CFX_WideString& parent_name, FX_BOOL bNotify = FALSE, int nLevel = 0);
 
-    bool                                       ValidateFieldName(CFX_WideString& csNewFieldName, int iType, const CPDF_FormField* pExcludedField, const CPDF_FormControl* pExcludedControl);
+    FX_BOOL                                    ValidateFieldName(CFX_WideString& csNewFieldName, int iType, const CPDF_FormField* pExcludedField, const CPDF_FormControl* pExcludedControl);
 
     int                                                CompareFieldName(const CFX_WideString& name1, const CFX_WideString& name2);
 
@@ -947,7 +947,7 @@ protected:
 
     CPDF_Document*                     m_pDocument;
 
-    bool                                       m_bGenerateAP;
+    FX_BOOL                                    m_bGenerateAP;
 
     CPDF_Dictionary*           m_pFormDict;
 
@@ -959,7 +959,7 @@ protected:
 
     CPDF_FormNotify*           m_pFormNotify;
 
-    bool                                       m_bUpdated;
+    FX_BOOL                                    m_bUpdated;
     friend class CPDF_FormControl;
     friend class CPDF_FormField;
 };
@@ -1018,7 +1018,7 @@ public:
         m_pDict = pDict;
     }
 
-    bool                                       ResetField(bool bNotify = false);
+    FX_BOOL                                    ResetField(FX_BOOL bNotify = FALSE);
 
 
 
@@ -1075,7 +1075,7 @@ public:
 
     CFX_WideString                     GetDefaultValue();
 
-    bool                                       SetValue(const CFX_WideString& value, bool bNotify = false);
+    FX_BOOL                                    SetValue(const CFX_WideString& value, FX_BOOL bNotify = FALSE);
 
 
 
@@ -1090,13 +1090,13 @@ public:
 
     int                                                GetSelectedIndex(int index);
 
-    bool                                       ClearSelection(bool bNotify = false);
+    FX_BOOL                                    ClearSelection(FX_BOOL bNotify = FALSE);
 
-    bool                                       IsItemSelected(int index);
+    FX_BOOL                                    IsItemSelected(int index);
 
-    bool                                       SetItemSelection(int index, bool bSelected, bool bNotify = false);
+    FX_BOOL                                    SetItemSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify = FALSE);
 
-    bool                                       IsItemDefaultSelected(int index);
+    FX_BOOL                                    IsItemDefaultSelected(int index);
 
     int                                                GetDefaultSelectedItem();
 
@@ -1116,7 +1116,7 @@ public:
 
 
 
-    bool                                       CheckControl(int iControlIndex, bool bChecked, bool bNotify = false);
+    FX_BOOL                                    CheckControl(int iControlIndex, FX_BOOL bChecked, FX_BOOL bNotify = FALSE);
 
 
 
@@ -1130,11 +1130,11 @@ public:
 
     int                                                GetSelectedOptionIndex(int index);
 
-    bool                                       IsOptionSelected(int iOptIndex);
+    FX_BOOL                                    IsOptionSelected(int iOptIndex);
 
-    bool                                       SelectOption(int iOptIndex, bool bSelected, bool bNotify = false);
+    FX_BOOL                                    SelectOption(int iOptIndex, FX_BOOL bSelected, FX_BOOL bNotify = FALSE);
 
-    bool                                       ClearSelectedOptions(bool bNotify = false);
+    FX_BOOL                                    ClearSelectedOptions(FX_BOOL bNotify = FALSE);
 
 
 
@@ -1169,9 +1169,9 @@ protected:
 
 
 
-    CFX_WideString                     GetValue(bool bDefault);
+    CFX_WideString                     GetValue(FX_BOOL bDefault);
 
-    bool                                       SetValue(const CFX_WideString& value, bool bDefault, bool bNotify);
+    FX_BOOL                                    SetValue(const CFX_WideString& value, FX_BOOL bDefault, FX_BOOL bNotify);
 
 
     void                                       SyncFieldFlags();
@@ -1186,9 +1186,9 @@ protected:
 
 
 
-    CFX_WideString                     GetCheckValue(bool bDefault);
+    CFX_WideString                     GetCheckValue(FX_BOOL bDefault);
 
-    bool                                       SetCheckValue(const CFX_WideString& value, bool bDefault, bool bNotify);
+    FX_BOOL                                    SetCheckValue(const CFX_WideString& value, FX_BOOL bDefault, FX_BOOL bNotify);
 
 
     FX_FLOAT                           m_FontSize;
@@ -1225,7 +1225,7 @@ public:
 
 
 
-    bool                                       IsProportionalScale();
+    FX_BOOL                                    IsProportionalScale();
 
 
 
@@ -1235,7 +1235,7 @@ public:
 
 
 
-    bool                                       GetFittingBounds();
+    FX_BOOL                                    GetFittingBounds();
 
 
     CPDF_Dictionary*           m_pDict;
@@ -1283,9 +1283,9 @@ public:
 
     CFX_WideString                     GetExportValue();
 
-    bool                                       IsChecked();
+    FX_BOOL                                    IsChecked();
 
-    bool                                       IsDefaultChecked();
+    FX_BOOL                                    IsDefaultChecked();
 
 
 
@@ -1303,7 +1303,7 @@ public:
 
 
 
-    bool                                       HasMKEntry(CFX_ByteString csEntry);
+    FX_BOOL                                    HasMKEntry(CFX_ByteString csEntry);
 
 
 
@@ -1434,7 +1434,7 @@ protected:
 
     void                                       SetOnStateName(const CFX_ByteString& csOn);
 
-    void                                       CheckControl(bool bChecked);
+    void                                       CheckControl(FX_BOOL bChecked);
 
     FX_ARGB                                    GetColor(int& iColorType, CFX_ByteString csEntry);
 
@@ -1446,7 +1446,7 @@ protected:
 
     CPDF_Stream*                       GetIcon(CFX_ByteString csEntry);
 
-    CPDF_ApSettings                    GetMK(bool bCreate);
+    CPDF_ApSettings                    GetMK(FX_BOOL bCreate);
 
     CPDF_InterForm*                    m_pForm;
 
@@ -1507,7 +1507,7 @@ public:
         return 0;
     }
 };
-bool           FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
+FX_BOOL                FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
 class CPDF_PageLabel
 {
 public:
@@ -1559,9 +1559,9 @@ public:
     ~CPDF_ViewerPreferences();
 
 
-    bool IsDirectionR2L() const;
+    FX_BOOL IsDirectionR2L() const;
 
-    bool PrintScaling() const;
+    FX_BOOL PrintScaling() const;
 
     int32_t NumCopies() const;
 
@@ -1586,7 +1586,7 @@ public:
         return m_pDict;
     }
 
-    bool                                       HasMKEntry(const CFX_ByteStringC& csEntry);
+    FX_BOOL                                    HasMKEntry(const CFX_ByteStringC& csEntry);
 
 
 
index 9761e01..706f5c0 100644 (file)
@@ -85,17 +85,17 @@ public:
 
     virtual CFX_PtrArray*              GetObjectArray() = 0;
 
-    virtual CPDF_Object*               GetAttr(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, bool bInheritable = false, FX_FLOAT fLevel = 0.0F) = 0;
+    virtual CPDF_Object*               GetAttr(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_BOOL bInheritable = FALSE, FX_FLOAT fLevel = 0.0F) = 0;
 
 
 
-    virtual CFX_ByteString             GetName(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, const CFX_ByteStringC& default_value, bool bInheritable = false, int subindex = -1) = 0;
+    virtual CFX_ByteString             GetName(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, const CFX_ByteStringC& default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
 
-    virtual FX_ARGB                            GetColor(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_ARGB default_value, bool bInheritable = false, int subindex = -1) = 0;
+    virtual FX_ARGB                            GetColor(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_ARGB default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
 
-    virtual FX_FLOAT                   GetNumber(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_FLOAT default_value, bool bInheritable = false, int subindex = -1) = 0;
+    virtual FX_FLOAT                   GetNumber(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_FLOAT default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
 
-    virtual int                                        GetInteger(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, int default_value, bool bInheritable = false, int subindex = -1) = 0;
+    virtual int                                        GetInteger(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, int default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0;
 
 };
 
index 7f89e8d..4baba41 100644 (file)
@@ -39,12 +39,12 @@ struct CPVT_WordPlace {
         nSecIndex = nLineIndex = nWordIndex = -1;
     }
 
-    bool operator == (const CPVT_WordPlace & wp) const
+    FX_BOOL operator == (const CPVT_WordPlace & wp) const
     {
         return wp.nSecIndex == nSecIndex && wp.nLineIndex == nLineIndex && wp.nWordIndex == nWordIndex;
     }
 
-    bool operator != (const CPVT_WordPlace & wp) const
+    FX_BOOL operator != (const CPVT_WordPlace & wp) const
     {
         return wp.nSecIndex != nSecIndex || wp.nLineIndex != nLineIndex || wp.nWordIndex != nWordIndex;
     }
@@ -142,12 +142,12 @@ struct CPVT_WordRange {
         SwapWordPlace();
     }
 
-    bool IsExist() const
+    FX_BOOL IsExist() const
     {
         return BeginPos != EndPos;
     }
 
-    bool operator != (const CPVT_WordRange & wr) const
+    FX_BOOL operator != (const CPVT_WordRange & wr) const
     {
         return wr.BeginPos != BeginPos || wr.EndPos != EndPos;
     }
@@ -290,7 +290,7 @@ public:
 
     virtual int32_t                                            GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex) = 0;
 
-    virtual bool                                                       IsLatinWord(FX_WORD word) = 0;
+    virtual FX_BOOL                                                    IsLatinWord(FX_WORD word) = 0;
 
     virtual int32_t                                            GetDefaultFontIndex() = 0;
 };
@@ -299,27 +299,27 @@ class IPDF_VariableText_Iterator
 public:
     virtual ~IPDF_VariableText_Iterator() { }
 
-    virtual bool                                                       NextWord() = 0;
+    virtual FX_BOOL                                                    NextWord() = 0;
 
-    virtual bool                                                       PrevWord() = 0;
+    virtual FX_BOOL                                                    PrevWord() = 0;
 
-    virtual bool                                                       NextLine() = 0;
+    virtual FX_BOOL                                                    NextLine() = 0;
 
-    virtual bool                                                       PrevLine() = 0;
+    virtual FX_BOOL                                                    PrevLine() = 0;
 
-    virtual bool                                                       NextSection() = 0;
+    virtual FX_BOOL                                                    NextSection() = 0;
 
-    virtual bool                                                       PrevSection() = 0;
+    virtual FX_BOOL                                                    PrevSection() = 0;
 
-    virtual bool                                                       GetWord(CPVT_Word & word) const = 0;
+    virtual FX_BOOL                                                    GetWord(CPVT_Word & word) const = 0;
 
-    virtual bool                                                       SetWord(const CPVT_Word & word) = 0;
+    virtual FX_BOOL                                                    SetWord(const CPVT_Word & word) = 0;
 
-    virtual bool                                                       GetLine(CPVT_Line & line) const = 0;
+    virtual FX_BOOL                                                    GetLine(CPVT_Line & line) const = 0;
 
-    virtual bool                                                       GetSection(CPVT_Section & section) const = 0;
+    virtual FX_BOOL                                                    GetSection(CPVT_Section & section) const = 0;
 
-    virtual    bool                                                    SetSection(const CPVT_Section & section) = 0;
+    virtual    FX_BOOL                                                 SetSection(const CPVT_Section & section) = 0;
 
     virtual void                                                       SetAt(int32_t nWordIndex) = 0;
 
@@ -352,23 +352,23 @@ public:
 
     virtual void                                                       SetHorzScale(int32_t nHorzScale = 100) = 0;
 
-    virtual void                                                       SetMultiLine(bool bMultiLine = true) = 0;
+    virtual void                                                       SetMultiLine(FX_BOOL bMultiLine = TRUE) = 0;
 
-    virtual void                                                       SetAutoReturn(bool bAuto = true) = 0;
+    virtual void                                                       SetAutoReturn(FX_BOOL bAuto = TRUE) = 0;
 
-    virtual void                                                       SetAutoFontSize(bool bAuto = true) = 0;
+    virtual void                                                       SetAutoFontSize(FX_BOOL bAuto = TRUE) = 0;
 
     virtual void                                                       SetFontSize(FX_FLOAT fFontSize) = 0;
 
     virtual void                                                       SetLineLeading(FX_FLOAT fLineLeading) = 0;
 
-    virtual void                                                       SetRichText(bool bRichText) = 0;
+    virtual void                                                       SetRichText(FX_BOOL bRichText) = 0;
 
     virtual void                                                       Initialize() = 0;
 
-    virtual bool                                                       IsValid() const = 0;
+    virtual FX_BOOL                                                    IsValid() const = 0;
 
-    virtual bool                                                       IsRichText() const = 0;
+    virtual FX_BOOL                                                    IsRichText() const = 0;
 
     virtual void                                                       RearrangeAll() = 0;
 
@@ -410,7 +410,7 @@ public:
 
     virtual int32_t                                            GetLimitChar() const = 0;
 
-    virtual bool                                                       IsMultiLine() const = 0;
+    virtual FX_BOOL                                                    IsMultiLine() const = 0;
 
     virtual int32_t                                            GetHorzScale() const = 0;
 
@@ -440,7 +440,7 @@ public:
 
     virtual void                                                       UpdateWordPlace(CPVT_WordPlace & place) const = 0;
 
-    virtual CPVT_WordPlace                                     AjustLineHeader(const CPVT_WordPlace & place, bool bPrevOrNext) const = 0;
+    virtual CPVT_WordPlace                                     AjustLineHeader(const CPVT_WordPlace & place, FX_BOOL bPrevOrNext) const = 0;
 
     virtual int32_t                                            WordPlaceToWordIndex(const CPVT_WordPlace & place) const = 0;
 
index 8b54f2d..04922c4 100644 (file)
@@ -61,9 +61,9 @@ class CPDFText_ParseOptions
 public:
 
     CPDFText_ParseOptions();
-    bool                       m_bGetCharCodeOnly;
-    bool                       m_bNormalizeObjs;
-    bool                       m_bOutputHyphen;
+    FX_BOOL                    m_bGetCharCodeOnly;
+    FX_BOOL                    m_bNormalizeObjs;
+    FX_BOOL                    m_bOutputHyphen;
 };
 class IPDF_TextPage
 {
@@ -75,12 +75,12 @@ public:
     static IPDF_TextPage*      CreateTextPage(const CPDF_PageObjects* pObjs, int flags = 0);
     static IPDF_TextPage*      CreateReflowTextPage(IPDF_ReflowedPage* pRefPage);
 
-    virtual void                       NormalizeObjects(bool bNormalize) = 0;
+    virtual void                       NormalizeObjects(FX_BOOL bNormalize) = 0;
 
-    virtual bool                       ParseTextPage() = 0;
+    virtual FX_BOOL                    ParseTextPage() = 0;
 
 
-    virtual bool                       IsParsered() const = 0;
+    virtual FX_BOOL                    IsParsered() const = 0;
 public:
 
     virtual int CharIndexFromTextIndex(int TextIndex) const = 0;
@@ -109,11 +109,11 @@ public:
 
     virtual    void                    GetRect(int rectIndex, FX_FLOAT& left, FX_FLOAT& top, FX_FLOAT& right, FX_FLOAT &bottom) const = 0;
 
-    virtual bool                       GetBaselineRotate(int rectIndex, int& Rotate) = 0;
+    virtual FX_BOOL                    GetBaselineRotate(int rectIndex, int& Rotate) = 0;
 
-    virtual bool                       GetBaselineRotate(const CFX_FloatRect& rect, int& Rotate) = 0;
+    virtual FX_BOOL                    GetBaselineRotate(const CFX_FloatRect& rect, int& Rotate) = 0;
 
-    virtual    int                             CountBoundedSegments(FX_FLOAT left, FX_FLOAT top, FX_FLOAT right, FX_FLOAT bottom, bool bContains = false) = 0;
+    virtual    int                             CountBoundedSegments(FX_FLOAT left, FX_FLOAT top, FX_FLOAT right, FX_FLOAT bottom, FX_BOOL bContains = FALSE) = 0;
 
     virtual    void                    GetBoundedSegment(int index, int& start, int& count) const = 0;
 
@@ -134,11 +134,11 @@ public:
     static     IPDF_TextPageFind*      CreatePageFind(const IPDF_TextPage* pTextPage);
 public:
 
-    virtual    bool                            FindFirst(const CFX_WideString& findwhat, int flags, int startPos = 0) = 0;
+    virtual    FX_BOOL                         FindFirst(const CFX_WideString& findwhat, int flags, int startPos = 0) = 0;
 
-    virtual    bool                            FindNext() = 0;
+    virtual    FX_BOOL                         FindNext() = 0;
 
-    virtual    bool                            FindPrev() = 0;
+    virtual    FX_BOOL                         FindPrev() = 0;
 
     virtual void                               GetRectArray(CFX_RectArray& rects) const = 0;
 
@@ -154,7 +154,7 @@ public:
 
     static     IPDF_LinkExtract*       CreateLinkExtract();
 
-    virtual bool                               ExtractLinks(const IPDF_TextPage* pTextPage) = 0;
+    virtual FX_BOOL                            ExtractLinks(const IPDF_TextPage* pTextPage) = 0;
 public:
 
     virtual int                                        CountLinks() const = 0;
index 5539008..e3d69e5 100644 (file)
@@ -51,9 +51,9 @@ class ICodec_BasicModule
 public:
 
     virtual ~ICodec_BasicModule() {}
-    virtual bool       RunLengthEncode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf,
+    virtual FX_BOOL    RunLengthEncode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf,
                                     FX_DWORD& dest_size) = 0;
-    virtual bool       A85Encode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf,
+    virtual FX_BOOL    A85Encode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf,
                               FX_DWORD& dest_size) = 0;
     virtual ICodec_ScanlineDecoder*    CreateRunLengthDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
             int nComps, int bpc) = 0;
@@ -70,7 +70,7 @@ public:
 
     virtual uint8_t*   GetScanline(int line) = 0;
 
-    virtual bool               SkipToScanline(int line, IFX_Pause* pPause) = 0;
+    virtual FX_BOOL            SkipToScanline(int line, IFX_Pause* pPause) = 0;
 
     virtual int                        GetWidth() = 0;
 
@@ -80,7 +80,7 @@ public:
 
     virtual int                        GetBPC() = 0;
 
-    virtual bool               IsColorTransformed() = 0;
+    virtual FX_BOOL            IsColorTransformed() = 0;
 
     virtual void               ClearImageData() = 0;
 };
@@ -91,13 +91,13 @@ public:
     virtual ~ICodec_FlateModule() {}
     virtual ICodec_ScanlineDecoder*    CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
             int nComps, int bpc, int predictor, int Colors, int BitsPerComponent, int Columns) = 0;
-    virtual FX_DWORD   FlateOrLZWDecode(bool bLZW, const uint8_t* src_buf, FX_DWORD src_size, bool bEarlyChange,
+    virtual FX_DWORD   FlateOrLZWDecode(FX_BOOL bLZW, const uint8_t* src_buf, FX_DWORD src_size, FX_BOOL bEarlyChange,
                                          int predictor, int Colors, int BitsPerComponent, int Columns,
                                          FX_DWORD estimated_size, uint8_t*& dest_buf, FX_DWORD& dest_size) = 0;
-    virtual bool               Encode(const uint8_t* src_buf, FX_DWORD src_size,
+    virtual FX_BOOL            Encode(const uint8_t* src_buf, FX_DWORD src_size,
                                int predictor, int Colors, int BitsPerComponent, int Columns,
                                uint8_t*& dest_buf, FX_DWORD& dest_size) = 0;
-    virtual bool               Encode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size) = 0;
+    virtual FX_BOOL            Encode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_buf, FX_DWORD& dest_size) = 0;
 };
 class ICodec_FaxModule
 {
@@ -106,10 +106,10 @@ public:
     virtual ~ICodec_FaxModule() {}
 
     virtual ICodec_ScanlineDecoder*    CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height,
-            int K, bool EndOfLine, bool EncodedByteAlign, bool BlackIs1, int Columns, int Rows) = 0;
+            int K, FX_BOOL EndOfLine, FX_BOOL EncodedByteAlign, FX_BOOL BlackIs1, int Columns, int Rows) = 0;
 
 
-    virtual bool               Encode(const uint8_t* src_buf, int width, int height, int pitch,
+    virtual FX_BOOL            Encode(const uint8_t* src_buf, int width, int height, int pitch,
                                uint8_t*& dest_buf, FX_DWORD& dest_size) = 0;
 };
 class ICodec_JpegModule
@@ -121,13 +121,13 @@ public:
     virtual void               SetPovider(IFX_JpegProvider* pJP) = 0;
 
     virtual ICodec_ScanlineDecoder*    CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size,
-            int width, int height, int nComps, bool ColorTransform) = 0;
+            int width, int height, int nComps, FX_BOOL ColorTransform) = 0;
 
-    virtual bool               LoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int& width, int& height,
-                                 int& num_components, int& bits_per_components, bool& color_transform,
+    virtual FX_BOOL            LoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int& width, int& height,
+                                 int& num_components, int& bits_per_components, FX_BOOL& color_transform,
                                  uint8_t** icc_buf_ptr = NULL, FX_DWORD* icc_length = NULL) = 0;
 
-    virtual bool               Encode(const class CFX_DIBSource* pSource, uint8_t*& dest_buf, FX_STRSIZE& dest_size, int quality = 75,
+    virtual FX_BOOL            Encode(const class CFX_DIBSource* pSource, uint8_t*& dest_buf, FX_STRSIZE& dest_size, int quality = 75,
                                const uint8_t* icc_buf = NULL, FX_DWORD icc_length = 0) = 0;
 
     virtual void*              Start() = 0;
@@ -142,7 +142,7 @@ public:
     virtual int                        StartScanline(void* pContext, int down_scale) = 0;
 
 
-    virtual bool               ReadScanline(void* pContext, uint8_t* dest_buf) = 0;
+    virtual FX_BOOL            ReadScanline(void* pContext, uint8_t* dest_buf) = 0;
 
 
     virtual FX_DWORD   GetAvailInput(void* pContext, uint8_t** avail_buf_ptr = NULL) = 0;
@@ -153,13 +153,13 @@ public:
 
     virtual ~ICodec_JpxModule() {}
 
-    virtual void*      CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, bool useColorSpace = false) = 0;
+    virtual void*      CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, FX_BOOL useColorSpace = FALSE) = 0;
 
     virtual void               GetImageInfo(void* ctx, FX_DWORD& width, FX_DWORD& height,
                                      FX_DWORD& codestream_nComps, FX_DWORD& output_nComps) = 0;
 
-    virtual bool               Decode(void* ctx, uint8_t* dest_data, int pitch,
-                               bool bTranslateColor, uint8_t* offsets) = 0;
+    virtual FX_BOOL            Decode(void* ctx, uint8_t* dest_data, int pitch,
+                               FX_BOOL bTranslateColor, uint8_t* offsets) = 0;
 
     virtual void               DestroyDecoder(void* ctx) = 0;
 };
@@ -169,10 +169,10 @@ public:
 
     virtual ~ICodec_Jbig2Module() {}
 
-    virtual bool               Decode(FX_DWORD width, FX_DWORD height, const uint8_t* src_buf, FX_DWORD src_size,
+    virtual FX_BOOL            Decode(FX_DWORD width, FX_DWORD height, const uint8_t* src_buf, FX_DWORD src_size,
                                const uint8_t* global_data, FX_DWORD global_size, uint8_t* dest_buf, FX_DWORD dest_pitch)  = 0;
 
-    virtual bool               Decode(IFX_FileRead* file_ptr, FX_DWORD& width, FX_DWORD& height,
+    virtual FX_BOOL            Decode(IFX_FileRead* file_ptr, FX_DWORD& width, FX_DWORD& height,
                                FX_DWORD& pitch, uint8_t*& dest_buf) = 0;
     virtual void*                              CreateJbig2Context() = 0;
 
@@ -251,6 +251,6 @@ public:
 };
 void AdobeCMYK_to_sRGB(FX_FLOAT c, FX_FLOAT m, FX_FLOAT y, FX_FLOAT k, FX_FLOAT& R, FX_FLOAT& G, FX_FLOAT& B);
 void AdobeCMYK_to_sRGB1(uint8_t c, uint8_t m, uint8_t y, uint8_t k, uint8_t& R, uint8_t& G, uint8_t& B);
-bool MD5ComputeID(const void* buf, FX_DWORD dwSize, uint8_t ID[16]);
+FX_BOOL MD5ComputeID(const void* buf, FX_DWORD dwSize, uint8_t ID[16]);
 
 #endif  // CORE_INCLUDE_FXCODEC_FX_CODEC_H_
index ac69f9a..0b238b7 100644 (file)
@@ -14,25 +14,25 @@ class IFX_JpegProvider
 public:
     virtual void               Release() = 0;
 
-    virtual void*              CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height, int nComps, bool ColorTransform) = 0;
+    virtual void*              CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, int height, int nComps, FX_BOOL ColorTransform) = 0;
 
 
     virtual void               DestroyDecoder(void* pDecoder) = 0;
 
     virtual void               DownScale(void* pDecoder, int dest_width, int dest_height) = 0;
 
-    virtual bool               Rewind(void* pDecoder) = 0;
+    virtual FX_BOOL            Rewind(void* pDecoder) = 0;
 
     virtual uint8_t*   GetNextLine(void* pDecoder) = 0;
 
     virtual FX_DWORD   GetSrcOffset(void* pDecoder) = 0;
 
 
-    virtual bool               LoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int& width, int& height,
-                                 int& num_components, int& bits_per_components, bool& color_transform,
+    virtual FX_BOOL            LoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int& width, int& height,
+                                 int& num_components, int& bits_per_components, FX_BOOL& color_transform,
                                  uint8_t** icc_buf_ptr = NULL, FX_DWORD* icc_length = NULL) = 0;
 
-    virtual bool               Encode(const class CFX_DIBSource* pSource, uint8_t*& dest_buf, FX_STRSIZE& dest_size, int quality = 75,
+    virtual FX_BOOL            Encode(const class CFX_DIBSource* pSource, uint8_t*& dest_buf, FX_STRSIZE& dest_size, int quality = 75,
                                const uint8_t* icc_buf = NULL, FX_DWORD icc_length = 0) = 0;
 
     virtual void*              Start() = 0;
@@ -47,7 +47,7 @@ public:
     virtual int                        StartScanline(void* pContext, int down_scale) = 0;
 
 
-    virtual bool               ReadScanline(void* pContext, uint8_t* dest_buf) = 0;
+    virtual FX_BOOL            ReadScanline(void* pContext, uint8_t* dest_buf) = 0;
 
 
     virtual FX_DWORD   GetAvailInput(void* pContext, uint8_t** avail_buf_ptr = NULL) = 0;
index 5c41738..7ce21e5 100644 (file)
@@ -15,9 +15,9 @@ public:
     static IFX_BidiChar* Create();
     virtual ~IFX_BidiChar() {}
 
-    virtual void SetPolicy(bool bSeparateNeutral = true) = 0;
-    virtual bool AppendChar(FX_WCHAR wch) = 0;
-    virtual bool EndChar() = 0;
+    virtual void SetPolicy(FX_BOOL bSeparateNeutral = TRUE) = 0;
+    virtual FX_BOOL AppendChar(FX_WCHAR wch) = 0;
+    virtual FX_BOOL EndChar() = 0;
     virtual int32_t GetBidiInfo(int32_t &iStart, int32_t &iCount) = 0;
     virtual void Reset() = 0;
 };
index c272eb5..d575df6 100644 (file)
@@ -218,9 +218,9 @@ public:
 
     CFX_ArchiveLoader&         operator >> (CFX_WideString& wstr);
 
-    bool                                       IsEOF();
+    FX_BOOL                                    IsEOF();
 
-    bool                                       Read(void* pBuf, FX_DWORD dwSize);
+    FX_BOOL                                    Read(void* pBuf, FX_DWORD dwSize);
 protected:
 
     FX_DWORD                           m_LoadingPos;
@@ -239,7 +239,7 @@ public:
 
     virtual void Clear();
 
-    bool Flush();
+    FX_BOOL Flush();
 
     int32_t AppendBlock(const void* pBuf, size_t size);
 
@@ -252,7 +252,7 @@ public:
 
 protected:
 
-    virtual bool DoWork(const void* pBuf, size_t size) = 0;
+    virtual FX_BOOL DoWork(const void* pBuf, size_t size) = 0;
 
     FX_STRSIZE m_BufSize;
 
@@ -269,18 +269,18 @@ public:
 
     void Clear() override;
 
-    bool AttachFile(IFX_StreamWrite *pFile, bool bTakeover = false);
+    FX_BOOL AttachFile(IFX_StreamWrite *pFile, FX_BOOL bTakeover = FALSE);
 
-    bool AttachFile(const FX_WCHAR* filename);
+    FX_BOOL AttachFile(const FX_WCHAR* filename);
 
-    bool AttachFile(const FX_CHAR* filename);
+    FX_BOOL AttachFile(const FX_CHAR* filename);
 
 private:
-    bool DoWork(const void* pBuf, size_t size) override;
+    FX_BOOL DoWork(const void* pBuf, size_t size) override;
 
     IFX_StreamWrite* m_pFile;
 
-    bool m_bTakeover;
+    FX_BOOL m_bTakeover;
 };
 
 struct CFX_CharMap {
@@ -362,17 +362,17 @@ protected:
 
     ~CFX_BasicArray();
 
-    bool                       SetSize(int nNewSize);
+    FX_BOOL                    SetSize(int nNewSize);
 
-    bool                       Append(const CFX_BasicArray& src);
+    FX_BOOL                    Append(const CFX_BasicArray& src);
 
-    bool                       Copy(const CFX_BasicArray& src);
+    FX_BOOL                    Copy(const CFX_BasicArray& src);
 
     uint8_t*           InsertSpaceAt(int nIndex, int nCount);
 
-    bool                       RemoveAt(int nIndex, int nCount);
+    FX_BOOL                    RemoveAt(int nIndex, int nCount);
 
-    bool                       InsertAt(int nStartIndex, const CFX_BasicArray* pNewArray);
+    FX_BOOL                    InsertAt(int nStartIndex, const CFX_BasicArray* pNewArray);
 
     const void*                GetDataPtr(int index) const;
 protected:
@@ -401,7 +401,7 @@ public:
         return m_nSize - 1;
     }
 
-    bool               SetSize(int nNewSize)
+    FX_BOOL            SetSize(int nNewSize)
     {
         return CFX_BasicArray::SetSize(nNewSize);
     }
@@ -419,13 +419,13 @@ public:
         return ((const TYPE*)m_pData)[nIndex];
     }
 
-    bool               SetAt(int nIndex, TYPE newElement)
+    FX_BOOL            SetAt(int nIndex, TYPE newElement)
     {
         if (nIndex < 0 || nIndex >= m_nSize) {
-            return false;
+            return FALSE;
         }
         ((TYPE*)m_pData)[nIndex] = newElement;
-        return true;
+        return TRUE;
     }
 
     TYPE&              ElementAt(int nIndex)
@@ -446,36 +446,36 @@ public:
         return (TYPE*)m_pData;
     }
 
-    bool               SetAtGrow(int nIndex, TYPE newElement)
+    FX_BOOL            SetAtGrow(int nIndex, TYPE newElement)
     {
         if (nIndex < 0) {
-            return false;
+            return FALSE;
         }
         if (nIndex >= m_nSize)
             if (!SetSize(nIndex + 1)) {
-                return false;
+                return FALSE;
             }
         ((TYPE*)m_pData)[nIndex] = newElement;
-        return true;
+        return TRUE;
     }
 
-    bool               Add(TYPE newElement)
+    FX_BOOL            Add(TYPE newElement)
     {
         if (m_nSize < m_nMaxSize) {
             m_nSize ++;
         } else if (!SetSize(m_nSize + 1)) {
-            return false;
+            return FALSE;
         }
         ((TYPE*)m_pData)[m_nSize - 1] = newElement;
-        return true;
+        return TRUE;
     }
 
-    bool               Append(const CFX_ArrayTemplate& src)
+    FX_BOOL            Append(const CFX_ArrayTemplate& src)
     {
         return CFX_BasicArray::Append(src);
     }
 
-    bool               Copy(const CFX_ArrayTemplate& src)
+    FX_BOOL            Copy(const CFX_ArrayTemplate& src)
     {
         return CFX_BasicArray::Copy(src);
     }
@@ -511,23 +511,23 @@ public:
         return ((TYPE*)m_pData)[nIndex];
     }
 
-    bool               InsertAt(int nIndex, TYPE newElement, int nCount = 1)
+    FX_BOOL            InsertAt(int nIndex, TYPE newElement, int nCount = 1)
     {
         if (!InsertSpaceAt(nIndex, nCount)) {
-            return false;
+            return FALSE;
         }
         while (nCount--) {
             ((TYPE*)m_pData)[nIndex++] = newElement;
         }
-        return true;
+        return TRUE;
     }
 
-    bool               RemoveAt(int nIndex, int nCount = 1)
+    FX_BOOL            RemoveAt(int nIndex, int nCount = 1)
     {
         return CFX_BasicArray::RemoveAt(nIndex, nCount);
     }
 
-    bool               InsertAt(int nStartIndex, const CFX_BasicArray* pNewArray)
+    FX_BOOL            InsertAt(int nStartIndex, const CFX_BasicArray* pNewArray)
     {
         return CFX_BasicArray::InsertAt(nStartIndex, pNewArray);
     }
@@ -700,7 +700,7 @@ public:
         return m_UnitSize;
     }
 
-    void*      Iterate(bool (*callback)(void* param, void* pData), void* param) const;
+    void*      Iterate(FX_BOOL (*callback)(void* param, void* pData), void* param) const;
 private:
 
     int                                m_UnitSize;
@@ -715,8 +715,8 @@ private:
 
     void*                      m_pIndex;
     void**     GetIndex(int seg_index) const;
-    void*      IterateIndex(int level, int& start, void** pIndex, bool (*callback)(void* param, void* pData), void* param) const;
-    void*      IterateSegment(const uint8_t* pSegment, int count, bool (*callback)(void* param, void* pData), void* param) const;
+    void*      IterateIndex(int level, int& start, void** pIndex, FX_BOOL (*callback)(void* param, void* pData), void* param) const;
+    void*      IterateSegment(const uint8_t* pSegment, int count, FX_BOOL (*callback)(void* param, void* pData), void* param) const;
 };
 template <class ElementType>
 class CFX_SegmentedArray : public CFX_BaseSegmentedArray
@@ -798,12 +798,12 @@ public:
         return m_nCount;
     }
 
-    bool IsEmpty() const
+    FX_BOOL IsEmpty() const
     {
         return m_nCount == 0;
     }
 
-    bool Lookup(void* key, void*& rValue) const;
+    FX_BOOL Lookup(void* key, void*& rValue) const;
 
     void* GetValueAt(void* key) const;
 
@@ -814,7 +814,7 @@ public:
         (*this)[key] = newValue;
     }
 
-    bool RemoveKey(void* key);
+    FX_BOOL RemoveKey(void* key);
 
     void RemoveAll();
 
@@ -830,7 +830,7 @@ public:
         return m_nHashTableSize;
     }
 
-    void InitHashTable(FX_DWORD hashSize, bool bAllocNow = true);
+    void InitHashTable(FX_DWORD hashSize, FX_BOOL bAllocNow = TRUE);
 protected:
 
     CAssoc** m_pHashTable;
@@ -858,7 +858,7 @@ class CFX_CMapDWordToDWord
 {
 public:
 
-    bool                       Lookup(FX_DWORD key, FX_DWORD& value) const;
+    FX_BOOL                    Lookup(FX_DWORD key, FX_DWORD& value) const;
 
     void                       SetAt(FX_DWORD key, FX_DWORD value);
 
@@ -893,12 +893,12 @@ public:
         return m_nCount;
     }
 
-    bool IsEmpty() const
+    FX_BOOL IsEmpty() const
     {
         return m_nCount == 0;
     }
 
-    bool Lookup(const CFX_ByteStringC& key, void*& rValue) const;
+    FX_BOOL Lookup(const CFX_ByteStringC& key, void*& rValue) const;
 
     void*& operator[](const CFX_ByteStringC& key);
 
@@ -907,7 +907,7 @@ public:
         (*this)[key] = newValue;
     }
 
-    bool RemoveKey(const CFX_ByteStringC& key);
+    FX_BOOL RemoveKey(const CFX_ByteStringC& key);
 
     void RemoveAll();
 
@@ -925,7 +925,7 @@ public:
         return m_nHashTableSize;
     }
 
-    void InitHashTable(FX_DWORD hashSize, bool bAllocNow = true);
+    void InitHashTable(FX_DWORD hashSize, FX_BOOL bAllocNow = TRUE);
 
     FX_DWORD HashKey(const CFX_ByteStringC& key) const;
 protected:
@@ -966,7 +966,7 @@ public:
 
     void*              GetNextValue(FX_POSITION& rNextPosition) const;
 
-    bool                       Lookup(const CFX_ByteStringC& key, void*& rValue) const;
+    FX_BOOL                    Lookup(const CFX_ByteStringC& key, void*& rValue) const;
 
     void                       SetAt(const CFX_ByteStringC& key, void* value);
 
@@ -1090,7 +1090,7 @@ struct FX_PRIVATEDATA {
 
     PD_CALLBACK_FREEDATA       m_pCallback;
 
-    bool                                       m_bSelfDestruct;
+    FX_BOOL                                    m_bSelfDestruct;
 };
 class CFX_PrivateData
 {
@@ -1106,27 +1106,27 @@ public:
 
     void*                              GetPrivateData(void* module_id);
 
-    bool                                       LookupPrivateData(void* module_id, void* &pData) const
+    FX_BOOL                                    LookupPrivateData(void* module_id, void* &pData) const
     {
         if (!module_id) {
-            return false;
+            return FALSE;
         }
         FX_DWORD nCount = m_DataList.GetSize();
         for (FX_DWORD n = 0; n < nCount; n ++) {
             if (m_DataList[n].m_pModuleId == module_id) {
                 pData = m_DataList[n].m_pData;
-                return true;
+                return TRUE;
             }
         }
-        return false;
+        return FALSE;
     }
 
-    bool                                       RemovePrivateData(void* module_id);
+    FX_BOOL                                    RemovePrivateData(void* module_id);
 protected:
 
     CFX_ArrayTemplate<FX_PRIVATEDATA>  m_DataList;
 
-    void                                       AddData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback, bool bSelfDestruct);
+    void                                       AddData(void* module_id, void* pData, PD_CALLBACK_FREEDATA callback, FX_BOOL bSelfDestruct);
 };
 class CFX_BitStream
 {
@@ -1139,7 +1139,7 @@ public:
 
     void                               ByteAlign();
 
-    bool                               IsEOF()
+    FX_BOOL                            IsEOF()
     {
         return m_BitPos >= m_BitSize;
     }
@@ -1252,12 +1252,12 @@ public:
         return m_pObject;
     }
 
-    bool                               IsNull() const
+    FX_BOOL                            IsNull() const
     {
         return m_pObject == NULL;
     }
 
-    bool                               NotNull() const
+    FX_BOOL                            NotNull() const
     {
         return m_pObject != NULL;
     }
@@ -1288,7 +1288,7 @@ public:
         m_pObject = NULL;
     }
 
-    bool                               operator == (const Ref& ref) const
+    FX_BOOL                            operator == (const Ref& ref) const
     {
         return m_pObject == ref.m_pObject;
     }
@@ -1300,7 +1300,7 @@ class IFX_Pause
 {
 public:
     virtual ~IFX_Pause() { }
-    virtual bool       NeedToPauseNow() = 0;
+    virtual FX_BOOL    NeedToPauseNow() = 0;
 };
 class CFX_DataFilter
 {
@@ -1310,7 +1310,7 @@ public:
 
     void                       SetDestFilter(CFX_DataFilter* pFilter);
 
-    bool                       IsEOF() const
+    FX_BOOL                    IsEOF() const
     {
         return m_bEOF;
     }
@@ -1330,7 +1330,7 @@ protected:
     virtual void       v_FilterFinish(CFX_BinaryBuf& dest_buf) = 0;
     void                       ReportEOF(FX_DWORD left_input);
 
-    bool                       m_bEOF;
+    FX_BOOL                    m_bEOF;
 
     FX_DWORD           m_SrcPos;
 
index 6edaf53..3689a4b 100644 (file)
@@ -68,11 +68,11 @@ public:
         y /= lamda;
         return *this;
     }
-    friend     bool            operator == (const FXT_PSV &obj1, const FXT_PSV &obj2)
+    friend     FX_BOOL         operator == (const FXT_PSV &obj1, const FXT_PSV &obj2)
     {
         return obj1.x == obj2.x && obj1.y == obj2.y;
     }
-    friend     bool            operator != (const FXT_PSV &obj1, const FXT_PSV &obj2)
+    friend     FX_BOOL         operator != (const FXT_PSV &obj1, const FXT_PSV &obj2)
     {
         return obj1.x != obj2.x || obj1.y != obj2.y;
     }
@@ -174,21 +174,21 @@ public:
     {
         return FXT_PSV::x * v.x + FXT_PSV::y * v.y;
     }
-    bool               IsParallel(baseType otherx, baseType othery) const
+    FX_BOOL            IsParallel(baseType otherx, baseType othery) const
     {
         baseType t = FXT_PSV::x * othery - FXT_PSV::y * otherx;
         return FXSYS_fabs(t) < 0x0001f;
     }
-    bool               IsParallel(const FXT_VECTOR &v) const
+    FX_BOOL            IsParallel(const FXT_VECTOR &v) const
     {
         return IsParallel(v.x, v.y);
     }
-    bool               IsPerpendicular(baseType otherx, baseType othery) const
+    FX_BOOL            IsPerpendicular(baseType otherx, baseType othery) const
     {
         baseType t = DotProduct(otherx, othery);
         return FXSYS_fabs(t) < 0x0001f;
     }
-    bool               IsPerpendicular(const FXT_VECTOR &v) const
+    FX_BOOL            IsPerpendicular(const FXT_VECTOR &v) const
     {
         return IsPerpendicular(v.x, v.y);
     }
@@ -340,11 +340,11 @@ public:
     {
         Deflate(rt.left, rt.top, rt.top + rt.width, rt.top + rt.height);
     }
-    bool               IsEmpty() const
+    FX_BOOL            IsEmpty() const
     {
         return width <= 0 || height <= 0;
     }
-    bool               IsEmpty(FX_FLOAT fEpsilon) const
+    FX_BOOL            IsEmpty(FX_FLOAT fEpsilon) const
     {
         return width <= fEpsilon || height <= fEpsilon;
     }
@@ -352,15 +352,15 @@ public:
     {
         width = height = 0;
     }
-    bool               Contains(baseType x, baseType y) const
+    FX_BOOL            Contains(baseType x, baseType y) const
     {
         return x >= left && x < left + width && y >= top && y < top + height;
     }
-    bool               Contains(const FXT_POINT &p) const
+    FX_BOOL            Contains(const FXT_POINT &p) const
     {
         return Contains(p.x, p.y);
     }
-    bool               Contains(const FXT_RECT &rt) const
+    FX_BOOL            Contains(const FXT_RECT &rt) const
     {
         return rt.left >= left && rt.right() <= right() && rt.top >= top && rt.bottom() <= bottom();
     }
@@ -501,23 +501,23 @@ public:
         width = r - left;
         height = b - top;
     }
-    bool               IntersectWith(const FXT_RECT &rt) const
+    FX_BOOL            IntersectWith(const FXT_RECT &rt) const
     {
         FXT_RECT rect = rt;
         rect.Intersect(*this);
         return !rect.IsEmpty();
     }
-    bool               IntersectWith(const FXT_RECT &rt, FX_FLOAT fEpsilon) const
+    FX_BOOL            IntersectWith(const FXT_RECT &rt, FX_FLOAT fEpsilon) const
     {
         FXT_RECT rect = rt;
         rect.Intersect(*this);
         return !rect.IsEmpty(fEpsilon);
     }
-    friend     bool    operator == (const FXT_RECT &rc1, const FXT_RECT &rc2)
+    friend     FX_BOOL operator == (const FXT_RECT &rc1, const FXT_RECT &rc2)
     {
         return rc1.left == rc2.left && rc1.top == rc2.top && rc1.width == rc2.width && rc1.height == rc2.height;
     }
-    friend     bool    operator != (const FXT_RECT &rc1, const FXT_RECT &rc2)
+    friend     FX_BOOL operator != (const FXT_RECT &rc1, const FXT_RECT &rc2)
     {
         return rc1.left != rc2.left || rc1.top != rc2.top || rc1.width != rc2.width || rc1.height != rc2.height;
     }
@@ -561,7 +561,7 @@ struct FX_RECT {
         return bottom - top;
     }
 
-    bool               IsEmpty() const
+    FX_BOOL            IsEmpty() const
     {
         return right <= left || bottom <= top;
     }
@@ -577,7 +577,7 @@ struct FX_RECT {
 
     void               Union(const FX_RECT& other_rect);
 
-    bool               operator == (const FX_RECT& src) const
+    FX_BOOL            operator == (const FX_RECT& src) const
     {
         return left == src.left && right == src.right && top == src.top && bottom == src.bottom;
     }
@@ -590,12 +590,12 @@ struct FX_RECT {
         bottom += dy;
     }
 
-    bool               Contains(const FX_RECT& other_rect) const
+    FX_BOOL            Contains(const FX_RECT& other_rect) const
     {
         return other_rect.left >= left && other_rect.right <= right && other_rect.top >= top && other_rect.bottom <= bottom;
     }
 
-    bool               Contains(int x, int y) const
+    FX_BOOL            Contains(int x, int y) const
     {
         return x >= left && x < right && y >= top && y < bottom;
     }
@@ -637,7 +637,7 @@ public:
 
     CFX_FloatRect(const FX_RECT& rect);
 
-    bool                               IsEmpty() const
+    FX_BOOL                            IsEmpty() const
     {
         return left >= right || bottom >= top;
     }
@@ -649,9 +649,9 @@ public:
         left = right = bottom = top = 0;
     }
 
-    bool                               Contains(const CFX_FloatRect& other_rect) const;
+    FX_BOOL                            Contains(const CFX_FloatRect& other_rect) const;
 
-    bool                               Contains(FX_FLOAT x, FX_FLOAT y) const;
+    FX_BOOL                            Contains(FX_FLOAT x, FX_FLOAT y) const;
 
     void                               Transform(const CFX_Matrix* pMatrix);
 
@@ -786,11 +786,11 @@ public:
 
     void                       SetReverse(const CFX_Matrix &m);
 
-    void                       Concat(FX_FLOAT a, FX_FLOAT b, FX_FLOAT c, FX_FLOAT d, FX_FLOAT e, FX_FLOAT f, bool bPrepended = false);
+    void                       Concat(FX_FLOAT a, FX_FLOAT b, FX_FLOAT c, FX_FLOAT d, FX_FLOAT e, FX_FLOAT f, FX_BOOL bPrepended = FALSE);
 
-    void                       Concat(const CFX_Matrix &m, bool bPrepended = false);
+    void                       Concat(const CFX_Matrix &m, FX_BOOL bPrepended = FALSE);
 
-    void                       ConcatInverse(const CFX_Matrix& m, bool bPrepended = false);
+    void                       ConcatInverse(const CFX_Matrix& m, FX_BOOL bPrepended = FALSE);
     void                       Reset()
     {
         SetIdentity();
@@ -801,30 +801,30 @@ public:
         *this = m;
     }
 
-    bool                       IsIdentity() const
+    FX_BOOL                    IsIdentity() const
     {
         return a == 1 && b == 0 && c == 0 && d == 1 && e == 0 && f == 0;
     }
-    bool                       IsInvertible() const;
+    FX_BOOL                    IsInvertible() const;
 
-    bool                       Is90Rotated() const;
+    FX_BOOL                    Is90Rotated() const;
 
-    bool                       IsScaled() const;
+    FX_BOOL                    IsScaled() const;
 
-    void                       Translate(FX_FLOAT x, FX_FLOAT y, bool bPrepended = false);
+    void                       Translate(FX_FLOAT x, FX_FLOAT y, FX_BOOL bPrepended = FALSE);
 
-    void                       TranslateI(int32_t x, int32_t y, bool bPrepended = false)
+    void                       TranslateI(int32_t x, int32_t y, FX_BOOL bPrepended = FALSE)
     {
         Translate((FX_FLOAT)x, (FX_FLOAT)y, bPrepended);
     }
 
-    void                       Scale(FX_FLOAT sx, FX_FLOAT sy, bool bPrepended = false);
+    void                       Scale(FX_FLOAT sx, FX_FLOAT sy, FX_BOOL bPrepended = FALSE);
 
-    void                       Rotate(FX_FLOAT fRadian, bool bPrepended = false);
+    void                       Rotate(FX_FLOAT fRadian, FX_BOOL bPrepended = FALSE);
 
-    void                       RotateAt(FX_FLOAT fRadian, FX_FLOAT x, FX_FLOAT y, bool bPrepended = false);
+    void                       RotateAt(FX_FLOAT fRadian, FX_FLOAT x, FX_FLOAT y, FX_BOOL bPrepended = FALSE);
 
-    void                       Shear(FX_FLOAT fAlphaRadian, FX_FLOAT fBetaRadian, bool bPrepended = false);
+    void                       Shear(FX_FLOAT fAlphaRadian, FX_FLOAT fBetaRadian, FX_BOOL bPrepended = FALSE);
 
     void                       MatchRect(const CFX_FloatRect &dest, const CFX_FloatRect &src);
 
index a04fc52..f24f454 100644 (file)
@@ -21,11 +21,11 @@ FX_WCHAR*           FXSYS_wcsncpy(FX_WCHAR* dstStr, const FX_WCHAR* srcStr, size_t count)
 int32_t                FXSYS_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count);
 int32_t                FXSYS_strnicmp(const FX_CHAR* s1, const FX_CHAR* s2, size_t count);
 
-inline bool    FXSYS_islower(int32_t ch)
+inline FX_BOOL FXSYS_islower(int32_t ch)
 {
     return ch >= 'a' && ch <= 'z';
 }
-inline bool    FXSYS_isupper(int32_t ch)
+inline FX_BOOL FXSYS_isupper(int32_t ch)
 {
     return ch >= 'A' && ch <= 'Z';
 }
@@ -38,8 +38,8 @@ inline int32_t FXSYS_toupper(int32_t ch)
     return ch < 'a' || ch > 'z' ? ch : (ch - 0x20);
 }
 
-FX_DWORD       FX_HashCode_String_GetA(const FX_CHAR* pStr, int32_t iLength, bool bIgnoreCase = false);
-FX_DWORD       FX_HashCode_String_GetW(const FX_WCHAR* pStr, int32_t iLength, bool bIgnoreCase = false);
+FX_DWORD       FX_HashCode_String_GetA(const FX_CHAR* pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE);
+FX_DWORD       FX_HashCode_String_GetW(const FX_WCHAR* pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE);
 
 #ifdef __cplusplus
 }
index b05e84d..fdd7b11 100644 (file)
@@ -11,8 +11,8 @@
 
 void* FX_OpenFolder(const FX_CHAR* path);
 void* FX_OpenFolder(const FX_WCHAR* path);
-bool FX_GetNextFile(void* handle, CFX_ByteString& filename, bool& bFolder);
-bool FX_GetNextFile(void* handle, CFX_WideString& filename, bool& bFolder);
+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();
 typedef struct FX_HFILE_ {
@@ -53,23 +53,23 @@ size_t              FX_File_Read(FX_HFILE hFile, void* pBuffer, size_t szBuffer);
 size_t         FX_File_ReadPos(FX_HFILE hFile, void* pBuffer, size_t szBuffer, FX_FILESIZE pos);
 size_t         FX_File_Write(FX_HFILE hFile, const void* pBuffer, size_t szBuffer);
 size_t         FX_File_WritePos(FX_HFILE hFile, const void* pBuffer, size_t szBuffer, FX_FILESIZE pos);
-bool           FX_File_Flush(FX_HFILE hFile);
-bool           FX_File_Truncate(FX_HFILE hFile, FX_FILESIZE szFile);
-bool           FX_File_Exist(const CFX_ByteStringC& fileName);
-bool           FX_File_Exist(const CFX_WideStringC& fileName);
-bool           FX_File_Delete(const CFX_ByteStringC& fileName);
-bool           FX_File_Delete(const CFX_WideStringC& fileName);
-bool           FX_File_Copy(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst);
-bool           FX_File_Copy(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst);
-bool           FX_File_Move(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst);
-bool           FX_File_Move(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst);
+FX_BOOL                FX_File_Flush(FX_HFILE hFile);
+FX_BOOL                FX_File_Truncate(FX_HFILE hFile, FX_FILESIZE szFile);
+FX_BOOL                FX_File_Exist(const CFX_ByteStringC& fileName);
+FX_BOOL                FX_File_Exist(const CFX_WideStringC& fileName);
+FX_BOOL                FX_File_Delete(const CFX_ByteStringC& fileName);
+FX_BOOL                FX_File_Delete(const CFX_WideStringC& fileName);
+FX_BOOL                FX_File_Copy(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst);
+FX_BOOL                FX_File_Copy(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst);
+FX_BOOL                FX_File_Move(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst);
+FX_BOOL                FX_File_Move(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst);
 class IFX_StreamWrite
 {
 public:
     virtual ~IFX_StreamWrite() { }
     virtual void               Release() = 0;
 
-    virtual    bool            WriteBlock(const void* pData, size_t size) = 0;
+    virtual    FX_BOOL         WriteBlock(const void* pData, size_t size) = 0;
 };
 class IFX_FileWrite : public IFX_StreamWrite
 {
@@ -79,10 +79,10 @@ public:
 
     virtual FX_FILESIZE                GetSize() = 0;
 
-    virtual bool                       Flush() = 0;
+    virtual FX_BOOL                    Flush() = 0;
 
-    virtual    bool                    WriteBlock(const void* pData, FX_FILESIZE offset, size_t size) = 0;
-    virtual    bool                    WriteBlock(const void* pData, size_t size)
+    virtual    FX_BOOL                 WriteBlock(const void* pData, FX_FILESIZE offset, size_t size) = 0;
+    virtual    FX_BOOL                 WriteBlock(const void* pData, size_t size)
     {
         return WriteBlock(pData, GetSize(), size);
     }
@@ -96,7 +96,7 @@ public:
 
     virtual void                       Release() = 0;
 
-    virtual bool                       IsEOF() = 0;
+    virtual FX_BOOL                    IsEOF() = 0;
 
     virtual FX_FILESIZE                GetPosition() = 0;
 
@@ -109,9 +109,9 @@ public:
 
     virtual FX_FILESIZE                GetSize() = 0;
 
-    virtual bool                       IsEOF()
+    virtual FX_BOOL                    IsEOF()
     {
-        return false;
+        return FALSE;
     }
 
     virtual FX_FILESIZE                GetPosition()
@@ -119,14 +119,14 @@ public:
         return 0;
     }
 
-    virtual bool                       SetRange(FX_FILESIZE offset, FX_FILESIZE size)
+    virtual FX_BOOL                    SetRange(FX_FILESIZE offset, FX_FILESIZE size)
     {
-        return false;
+        return FALSE;
     }
 
     virtual void                       ClearRange() {}
 
-    virtual bool                       ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) = 0;
+    virtual FX_BOOL                    ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) = 0;
 
     virtual size_t                     ReadBlock(void* buffer, size_t size)
     {
@@ -145,21 +145,21 @@ public:
 
     virtual FX_FILESIZE                        GetSize() = 0;
 
-    virtual bool                               IsEOF() = 0;
+    virtual FX_BOOL                            IsEOF() = 0;
 
     virtual FX_FILESIZE                        GetPosition() = 0;
 
-    virtual bool                               ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) = 0;
+    virtual FX_BOOL                            ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) = 0;
 
     virtual size_t                             ReadBlock(void* buffer, size_t size) = 0;
 
-    virtual    bool                            WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) = 0;
-    virtual    bool                            WriteBlock(const void* buffer, size_t size)
+    virtual    FX_BOOL                         WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) = 0;
+    virtual    FX_BOOL                         WriteBlock(const void* buffer, size_t size)
     {
         return WriteBlock(buffer, GetSize(), size);
     }
 
-    virtual bool                               Flush() = 0;
+    virtual FX_BOOL                            Flush() = 0;
 };
 IFX_FileStream*                FX_CreateFileStream(const FX_CHAR* filename, FX_DWORD dwModes);
 IFX_FileStream*                FX_CreateFileStream(const FX_WCHAR* filename, FX_DWORD dwModes);
@@ -167,31 +167,31 @@ class IFX_MemoryStream : public IFX_FileStream
 {
 public:
 
-    virtual bool                       IsConsecutive() const = 0;
+    virtual FX_BOOL                    IsConsecutive() const = 0;
 
     virtual void                       EstimateSize(size_t nInitSize, size_t nGrowSize) = 0;
 
     virtual uint8_t*           GetBuffer() const = 0;
 
-    virtual void                       AttachBuffer(uint8_t* pBuffer, size_t nSize, bool bTakeOver = false) = 0;
+    virtual void                       AttachBuffer(uint8_t* pBuffer, size_t nSize, FX_BOOL bTakeOver = FALSE) = 0;
 
     virtual void                       DetachBuffer() = 0;
 };
-IFX_MemoryStream*      FX_CreateMemoryStream(uint8_t* pBuffer, size_t nSize, bool bTakeOver = false);
-IFX_MemoryStream*      FX_CreateMemoryStream(bool bConsecutive = false);
+IFX_MemoryStream*      FX_CreateMemoryStream(uint8_t* pBuffer, size_t nSize, FX_BOOL bTakeOver = FALSE);
+IFX_MemoryStream*      FX_CreateMemoryStream(FX_BOOL bConsecutive = FALSE);
 class IFX_BufferRead : public IFX_StreamRead
 {
 public:
 
     virtual void                       Release() = 0;
 
-    virtual bool                       IsEOF() = 0;
+    virtual FX_BOOL                    IsEOF() = 0;
 
     virtual FX_FILESIZE                GetPosition() = 0;
 
     virtual size_t                     ReadBlock(void* buffer, size_t size) = 0;
 
-    virtual bool                       ReadNextBlock(bool bRestart = false) = 0;
+    virtual FX_BOOL                    ReadNextBlock(FX_BOOL bRestart = FALSE) = 0;
 
     virtual const uint8_t*             GetBlockBuffer() = 0;
 
index 736aa32..8d73555 100644 (file)
@@ -670,7 +670,7 @@ public:
     void                                       Empty();
 
 
-    bool                                       IsEmpty() const
+    FX_BOOL                                    IsEmpty() const
     {
         return !GetLength();
     }
@@ -895,7 +895,7 @@ inline bool operator!= (const CFX_WideStringC& lhs, const CFX_WideString& rhs) {
     return rhs != lhs;
 }
 FX_FLOAT FX_atof(const CFX_ByteStringC& str);
-void FX_atonum(const CFX_ByteStringC& str, bool& bInteger, void* pData);
+void FX_atonum(const CFX_ByteStringC& str, FX_BOOL& bInteger, void* pData);
 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf);
 CFX_ByteString FX_UTF8Encode(const FX_WCHAR* pwsStr, FX_STRSIZE len);
 inline CFX_ByteString  FX_UTF8Encode(const CFX_WideStringC& wsStr)
index 9fcaf17..8bc2b4a 100644 (file)
@@ -71,6 +71,7 @@ typedef void*                   FX_POSITION; // Keep until fxcrt containers gone
 typedef unsigned short          FX_WORD;     // Keep - "an efficient small type"
 typedef unsigned int            FX_DWORD;    // Keep - "an efficient type"
 typedef float                   FX_FLOAT;    // Keep, allow upgrade to doubles.
+typedef int                     FX_BOOL;     // Keep, sadly not always 0 or 1.
 typedef char                    FX_CHAR;     // Keep, questionable signedness.
 typedef wchar_t                 FX_WCHAR;    // Keep, maybe bad platform wchars.
 
@@ -83,6 +84,14 @@ typedef int FX_STRSIZE;
 #define _DEBUG
 #endif
 
+#ifndef TRUE
+#define TRUE   1
+#endif
+
+#ifndef FALSE
+#define FALSE  0
+#endif
+
 #ifndef NULL
 #define NULL   0
 #endif
index d9b5781..7b730bb 100644 (file)
@@ -92,11 +92,11 @@ enum FX_CHARTYPE {
     FX_CHARTYPE_Arabic                         = (12 << FX_CHARTYPEBITS),
 };
 FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch);
-bool   FX_IsCtrlCode(FX_WCHAR ch);
-bool   FX_IsRotationCode(FX_WCHAR ch);
-bool FX_IsCombinationChar(FX_WCHAR wch);
-bool   FX_IsBidiChar(FX_WCHAR wch);
-FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, bool bRTL, bool bVertical);
-FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_DWORD dwProps, bool bRTL, bool bVertical);
+FX_BOOL        FX_IsCtrlCode(FX_WCHAR ch);
+FX_BOOL        FX_IsRotationCode(FX_WCHAR ch);
+FX_BOOL FX_IsCombinationChar(FX_WCHAR wch);
+FX_BOOL        FX_IsBidiChar(FX_WCHAR wch);
+FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical);
+FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_DWORD dwProps, FX_BOOL bRTL, FX_BOOL bVertical);
 
 #endif  // CORE_INCLUDE_FXCRT_FX_UCD_H_
index 233a8f9..ba33b20 100644 (file)
@@ -38,21 +38,21 @@ public:
 class CXML_Content
 {
 public:
-    CXML_Content() : m_bCDATA(false), m_Content() {}
-    void       Set(bool bCDATA, const CFX_WideStringC& content)
+    CXML_Content() : m_bCDATA(FALSE), m_Content() {}
+    void       Set(FX_BOOL bCDATA, const CFX_WideStringC& content)
     {
         m_bCDATA = bCDATA;
         m_Content = content;
     }
-    bool                       m_bCDATA;
+    FX_BOOL                    m_bCDATA;
     CFX_WideString     m_Content;
 };
 class CXML_Element
 {
 public:
-    static CXML_Element*       Parse(const void* pBuffer, size_t size, bool bSaveSpaceChars = false, FX_FILESIZE* pParsedSize = NULL);
-    static CXML_Element*       Parse(IFX_FileRead *pFile, bool bSaveSpaceChars = false, FX_FILESIZE* pParsedSize = NULL);
-    static CXML_Element*       Parse(IFX_BufferRead *pBuffer, bool bSaveSpaceChars = false, FX_FILESIZE* pParsedSize = NULL);
+    static CXML_Element*       Parse(const void* pBuffer, size_t size, FX_BOOL bSaveSpaceChars = FALSE, FX_FILESIZE* pParsedSize = NULL);
+    static CXML_Element*       Parse(IFX_FileRead *pFile, FX_BOOL bSaveSpaceChars = FALSE, FX_FILESIZE* pParsedSize = NULL);
+    static CXML_Element*       Parse(IFX_BufferRead *pBuffer, FX_BOOL bSaveSpaceChars = FALSE, FX_FILESIZE* pParsedSize = NULL);
     CXML_Element(const CFX_ByteStringC& qSpace, const CFX_ByteStringC& tagName);
     CXML_Element(const CFX_ByteStringC& qTagName);
     CXML_Element();
@@ -63,9 +63,9 @@ public:
 
 
 
-    CFX_ByteString                     GetTagName(bool bQualified = false) const;
+    CFX_ByteString                     GetTagName(FX_BOOL bQualified = FALSE) const;
 
-    CFX_ByteString                     GetNamespace(bool bQualified = false) const;
+    CFX_ByteString                     GetNamespace(FX_BOOL bQualified = FALSE) const;
 
     CFX_ByteString                     GetNamespaceURI(const CFX_ByteStringC& qName) const;
 
@@ -81,9 +81,9 @@ public:
 
     void                                       GetAttrByIndex(int index, CFX_ByteString &space, CFX_ByteString &name, CFX_WideString &value) const;
 
-    bool                                       HasAttr(const CFX_ByteStringC& qName) const;
+    FX_BOOL                                    HasAttr(const CFX_ByteStringC& qName) const;
 
-    bool                                       GetAttrValue(const CFX_ByteStringC& name, CFX_WideString& attribute) const;
+    FX_BOOL                                    GetAttrValue(const CFX_ByteStringC& name, CFX_WideString& attribute) const;
     CFX_WideString                     GetAttrValue(const CFX_ByteStringC& name) const
     {
         CFX_WideString attr;
@@ -91,7 +91,7 @@ public:
         return attr;
     }
 
-    bool                                       GetAttrValue(const CFX_ByteStringC& space, const CFX_ByteStringC& name, CFX_WideString& attribute) const;
+    FX_BOOL                                    GetAttrValue(const CFX_ByteStringC& space, const CFX_ByteStringC& name, CFX_WideString& attribute) const;
     CFX_WideString                     GetAttrValue(const CFX_ByteStringC& space, const CFX_ByteStringC& name) const
     {
         CFX_WideString attr;
@@ -99,7 +99,7 @@ public:
         return attr;
     }
 
-    bool                                       GetAttrInteger(const CFX_ByteStringC& name, int& attribute) const;
+    FX_BOOL                                    GetAttrInteger(const CFX_ByteStringC& name, int& attribute) const;
     int                                                GetAttrInteger(const CFX_ByteStringC& name) const
     {
         int attr = 0;
@@ -107,7 +107,7 @@ public:
         return attr;
     }
 
-    bool                                       GetAttrInteger(const CFX_ByteStringC& space, const CFX_ByteStringC& name, int& attribute) const;
+    FX_BOOL                                    GetAttrInteger(const CFX_ByteStringC& space, const CFX_ByteStringC& name, int& attribute) const;
     int                                                GetAttrInteger(const CFX_ByteStringC& space, const CFX_ByteStringC& name) const
     {
         int attr = 0;
@@ -115,7 +115,7 @@ public:
         return attr;
     }
 
-    bool                                       GetAttrFloat(const CFX_ByteStringC& name, FX_FLOAT& attribute) const;
+    FX_BOOL                                    GetAttrFloat(const CFX_ByteStringC& name, FX_FLOAT& attribute) const;
     FX_FLOAT                           GetAttrFloat(const CFX_ByteStringC& name) const
     {
         FX_FLOAT attr = 0;
@@ -123,7 +123,7 @@ public:
         return attr;
     }
 
-    bool                                       GetAttrFloat(const CFX_ByteStringC& space, const CFX_ByteStringC& name, FX_FLOAT& attribute) const;
+    FX_BOOL                                    GetAttrFloat(const CFX_ByteStringC& space, const CFX_ByteStringC& name, FX_FLOAT& attribute) const;
     FX_FLOAT                           GetAttrFloat(const CFX_ByteStringC& space, const CFX_ByteStringC& name) const
     {
         FX_FLOAT attr = 0;
index 115ef55..fb9bf4d 100644 (file)
@@ -41,8 +41,8 @@ public:
     virtual int32_t            GetAscent() const = 0;
     virtual int32_t            GetDescent() const = 0;
 
-    virtual bool                       GetGlyphBBox(int32_t iGlyphIndex, FX_RECT &rtBBox) = 0;
-    virtual bool                       GetBBox(FX_RECT &rtBBox) = 0;
+    virtual FX_BOOL                    GetGlyphBBox(int32_t iGlyphIndex, FX_RECT &rtBBox) = 0;
+    virtual FX_BOOL                    GetBBox(FX_RECT &rtBBox) = 0;
 
     virtual int32_t            GetHeight() const = 0;
     virtual int32_t            GetItalicAngle() const = 0;
index 554fe30..27fc2f9 100644 (file)
@@ -179,13 +179,13 @@ public:
 
     virtual const uint8_t*     GetScanline(int line) const = 0;
 
-    virtual bool               SkipToScanline(int line, IFX_Pause* pPause) const
+    virtual FX_BOOL            SkipToScanline(int line, IFX_Pause* pPause) const
     {
-        return false;
+        return FALSE;
     }
 
     virtual void               DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
-                                           int dest_width, bool bFlipX, int clip_left, int clip_width) const = 0;
+                                           int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const = 0;
 
     virtual void               SetDownSampleSize(int width, int height) const {}
 
@@ -194,24 +194,24 @@ public:
         return m_bpp;
     }
 
-    bool                       IsAlphaMask() const
+    FX_BOOL                    IsAlphaMask() const
     {
         return m_AlphaFlag == 1;
     }
 
-    bool                       HasAlpha() const
+    FX_BOOL                    HasAlpha() const
     {
-        return m_AlphaFlag & 2 ? true : false;
+        return m_AlphaFlag & 2 ? TRUE : FALSE;
     }
 
-    bool                       IsOpaqueImage() const
+    FX_BOOL                    IsOpaqueImage() const
     {
         return !(m_AlphaFlag & 3);
     }
 
-    bool                       IsCmykImage() const
+    FX_BOOL                    IsCmykImage() const
     {
-        return m_AlphaFlag & 4 ? true : false;
+        return m_AlphaFlag & 4 ? TRUE : FALSE;
     }
 
 
@@ -248,11 +248,11 @@ public:
 
     CFX_DIBitmap*      GetAlphaMask(const FX_RECT* pClip = NULL) const;
 
-    bool                       CopyAlphaMask(const CFX_DIBSource* pAlphaMask, const FX_RECT* pClip = NULL);
+    FX_BOOL                    CopyAlphaMask(const CFX_DIBSource* pAlphaMask, const FX_RECT* pClip = NULL);
 
-    CFX_DIBitmap*      SwapXY(bool bXFlip, bool bYFlip, const FX_RECT* pClip = NULL) const;
+    CFX_DIBitmap*      SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_RECT* pClip = NULL) const;
 
-    CFX_DIBitmap*      FlipImage(bool bXFlip, bool bYFlip) const;
+    CFX_DIBitmap*      FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const;
 
     void                       GetOverlapRect(int& dest_left, int& dest_top, int& width, int& height, int src_width,
                                    int src_height, int& src_left, int& src_top, const CFX_ClipRgn* pClipRgn);
@@ -276,7 +276,7 @@ protected:
 
     void                       BuildPalette();
 
-    bool                       BuildAlphaMask();
+    FX_BOOL                    BuildAlphaMask();
 
     int                                FindPalette(FX_DWORD color) const;
 
@@ -292,9 +292,9 @@ public:
 
     CFX_DIBitmap(const CFX_DIBitmap& src);
 
-    bool                       Create(int width, int height, FXDIB_Format format, uint8_t* pBuffer = NULL, int pitch = 0);
+    FX_BOOL                    Create(int width, int height, FXDIB_Format format, uint8_t* pBuffer = NULL, int pitch = 0);
 
-    bool                       Copy(const CFX_DIBSource* pSrc);
+    FX_BOOL                    Copy(const CFX_DIBSource* pSrc);
 
     virtual    uint8_t*        GetBuffer() const
     {
@@ -307,11 +307,11 @@ public:
     }
 
     virtual void       DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
-                                       int dest_width, bool bFlipX, int clip_left, int clip_width) const;
+                                       int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const;
 
     void                       TakeOver(CFX_DIBitmap* pSrcBitmap);
 
-    bool                       ConvertFormat(FXDIB_Format format, void* pIccTransform = NULL);
+    FX_BOOL                    ConvertFormat(FXDIB_Format format, void* pIccTransform = NULL);
 
     void                       Clear(FX_DWORD color);
 
@@ -319,40 +319,40 @@ public:
 
     void                       SetPixel(int x, int y, FX_DWORD color);
 
-    bool                       LoadChannel(FXDIB_Channel destChannel, const CFX_DIBSource* pSrcBitmap, FXDIB_Channel srcChannel);
+    FX_BOOL                    LoadChannel(FXDIB_Channel destChannel, const CFX_DIBSource* pSrcBitmap, FXDIB_Channel srcChannel);
 
-    bool                       LoadChannel(FXDIB_Channel destChannel, int value);
+    FX_BOOL                    LoadChannel(FXDIB_Channel destChannel, int value);
 
-    bool                       MultiplyAlpha(int alpha);
+    FX_BOOL                    MultiplyAlpha(int alpha);
 
-    bool                       MultiplyAlpha(const CFX_DIBSource* pAlphaMask);
+    FX_BOOL                    MultiplyAlpha(const CFX_DIBSource* pAlphaMask);
 
-    bool                       TransferBitmap(int dest_left, int dest_top, int width, int height,
+    FX_BOOL                    TransferBitmap(int dest_left, int dest_top, int width, int height,
                                    const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, void* pIccTransform = NULL);
 
-    bool                       CompositeBitmap(int dest_left, int dest_top, int width, int height,
+    FX_BOOL                    CompositeBitmap(int dest_left, int dest_top, int width, int height,
                                     const CFX_DIBSource* pSrcBitmap, int src_left, int src_top,
-                                    int blend_type = FXDIB_BLEND_NORMAL, const CFX_ClipRgn* pClipRgn = NULL, bool bRgbByteOrder = false, void* pIccTransform = NULL);
+                                    int blend_type = FXDIB_BLEND_NORMAL, const CFX_ClipRgn* pClipRgn = NULL, FX_BOOL bRgbByteOrder = FALSE, void* pIccTransform = NULL);
 
-    bool                       TransferMask(int dest_left, int dest_top, int width, int height,
+    FX_BOOL                    TransferMask(int dest_left, int dest_top, int width, int height,
                                  const CFX_DIBSource* pMask, FX_DWORD color, int src_left, int src_top, int alpha_flag = 0, void* pIccTransform = NULL);
 
-    bool                       CompositeMask(int dest_left, int dest_top, int width, int height,
+    FX_BOOL                    CompositeMask(int dest_left, int dest_top, int width, int height,
                                   const CFX_DIBSource* pMask, FX_DWORD color, int src_left, int src_top,
-                                  int blend_type = FXDIB_BLEND_NORMAL, const CFX_ClipRgn* pClipRgn = NULL, bool bRgbByteOrder = false, int alpha_flag = 0, void* pIccTransform = NULL);
+                                  int blend_type = FXDIB_BLEND_NORMAL, const CFX_ClipRgn* pClipRgn = NULL, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, void* pIccTransform = NULL);
 
-    bool                       CompositeRect(int dest_left, int dest_top, int width, int height, FX_DWORD color, int alpha_flag = 0, void* pIccTransform = NULL);
+    FX_BOOL                    CompositeRect(int dest_left, int dest_top, int width, int height, FX_DWORD color, int alpha_flag = 0, void* pIccTransform = NULL);
 
-    bool                       ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor);
+    FX_BOOL                    ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor);
 
-    bool                       DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_RECT* pRect = NULL);
+    FX_BOOL                    DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_RECT* pRect = NULL);
 protected:
 
     uint8_t*           m_pBuffer;
 
-    bool                       m_bExtBuf;
+    FX_BOOL                    m_bExtBuf;
 
-    bool                       GetGrayData(void* pIccTransform = NULL);
+    FX_BOOL                    GetGrayData(void* pIccTransform = NULL);
 };
 class CFX_DIBExtractor
 {
@@ -379,7 +379,7 @@ public:
 
     ~CFX_FilteredDIB();
 
-    void                                       LoadSrc(const CFX_DIBSource* pSrc, bool bAutoDropSrc = false);
+    void                                       LoadSrc(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc = FALSE);
 
     virtual FXDIB_Format       GetDestFormat() = 0;
 
@@ -392,11 +392,11 @@ public:
 protected:
     virtual const uint8_t*             GetScanline(int line) const;
     virtual void                       DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp,
-            int dest_width, bool bFlipX, int clip_left, int clip_width) const;
+            int dest_width, FX_BOOL bFlipX, int clip_left, int clip_width) const;
 
     const CFX_DIBSource*       m_pSrc;
 
-    bool                                       m_bAutoDropSrc;
+    FX_BOOL                                    m_bAutoDropSrc;
 
     uint8_t*                           m_pScanline;
 };
@@ -407,7 +407,7 @@ public:
 
     virtual    void            ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha = NULL) = 0;
 
-    virtual bool               SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette) = 0;
+    virtual FX_BOOL            SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette) = 0;
 };
 class CFX_ScanlineCompositor
 {
@@ -416,8 +416,8 @@ public:
 
     ~CFX_ScanlineCompositor();
 
-    bool                               Init(FXDIB_Format dest_format, FXDIB_Format src_format, int32_t width, FX_DWORD* pSrcPalette,
-                             FX_DWORD mask_color, int blend_type, bool bClip, bool bRgbByteOrder = false, int alpha_flag = 0, void* pIccTransform = NULL);
+    FX_BOOL                            Init(FXDIB_Format dest_format, FXDIB_Format src_format, int32_t width, FX_DWORD* pSrcPalette,
+                             FX_DWORD mask_color, int blend_type, FX_BOOL bClip, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, void* pIccTransform = NULL);
 
 
     void                               CompositeRgbBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan,
@@ -449,7 +449,7 @@ protected:
     void*                              m_pIccTransform;
     uint8_t*                   m_pCacheScanline;
     int                                        m_CacheSize;
-    bool             m_bRgbByteOrder;
+    FX_BOOL             m_bRgbByteOrder;
 };
 class CFX_BitmapComposer : public IFX_ScanlineComposer
 {
@@ -461,11 +461,11 @@ public:
 
 
     void                               Compose(CFX_DIBitmap* pDest, const CFX_ClipRgn* pClipRgn, int bitmap_alpha,
-                                FX_DWORD mask_color, FX_RECT& dest_rect, bool bVertical,
-                                bool bFlipX, bool bFlipY, bool bRgbByteOrder = false,
+                                FX_DWORD mask_color, FX_RECT& dest_rect, FX_BOOL bVertical,
+                                FX_BOOL bFlipX, FX_BOOL bFlipY, FX_BOOL bRgbByteOrder = FALSE,
                                 int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
 
-    virtual bool               SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette);
+    virtual FX_BOOL            SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette);
 
 
     virtual    void            ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha);
@@ -480,10 +480,10 @@ protected:
     FX_DWORD                   m_MaskColor;
     const CFX_DIBitmap*        m_pClipMask;
     CFX_ScanlineCompositor     m_Compositor;
-    bool                               m_bVertical, m_bFlipX, m_bFlipY;
+    FX_BOOL                            m_bVertical, m_bFlipX, m_bFlipY;
     int                                        m_AlphaFlag;
     void*                              m_pIccTransform;
-    bool             m_bRgbByteOrder;
+    FX_BOOL             m_bRgbByteOrder;
     int                                        m_BlendType;
     void                               ComposeScanlineV(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha = NULL);
     uint8_t* m_pScanlineV;
@@ -501,7 +501,7 @@ public:
 
     virtual    void            ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha);
 
-    virtual bool               SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette);
+    virtual FX_BOOL            SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette);
 
     CFX_DIBitmap*              GetBitmap()
     {
@@ -521,22 +521,22 @@ public:
     CFX_ImageStretcher();
     ~CFX_ImageStretcher();
 
-    bool Start(IFX_ScanlineComposer* pDest, const CFX_DIBSource* pBitmap,
+    FX_BOOL Start(IFX_ScanlineComposer* pDest, const CFX_DIBSource* pBitmap,
                   int dest_width, int dest_height, const FX_RECT& bitmap_rect,
                   FX_DWORD flags);
 
-    bool Continue(IFX_Pause* pPause);
-    bool StartQuickStretch();
-    bool StartStretch();
-    bool ContinueQuickStretch(IFX_Pause* pPause);
-    bool ContinueStretch(IFX_Pause* pPause);
+    FX_BOOL Continue(IFX_Pause* pPause);
+    FX_BOOL StartQuickStretch();
+    FX_BOOL StartStretch();
+    FX_BOOL ContinueQuickStretch(IFX_Pause* pPause);
+    FX_BOOL ContinueStretch(IFX_Pause* pPause);
 
     IFX_ScanlineComposer*      m_pDest;
     const CFX_DIBSource*       m_pSource;
     CStretchEngine*            m_pStretchEngine;
     FX_DWORD           m_Flags;
-    bool                       m_bFlipX;
-    bool         m_bFlipY;
+    FX_BOOL                    m_bFlipX;
+    FX_BOOL         m_bFlipY;
     int                                m_DestWidth;
     int             m_DestHeight;
     FX_RECT                    m_ClipRect;
@@ -552,10 +552,10 @@ public:
     CFX_ImageTransformer();
     ~CFX_ImageTransformer();
 
-    bool Start(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pMatrix,
+    FX_BOOL Start(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pMatrix,
                   int flags, const FX_RECT* pClip);
 
-    bool Continue(IFX_Pause* pPause);
+    FX_BOOL Continue(IFX_Pause* pPause);
 
     CFX_AffineMatrix* m_pMatrix;
     FX_RECT            m_StretchClip;
@@ -575,14 +575,14 @@ public:
     CFX_ImageRenderer();
     ~CFX_ImageRenderer();
 
-    bool Start(CFX_DIBitmap* pDevice, const CFX_ClipRgn* pClipRgn,
+    FX_BOOL Start(CFX_DIBitmap* pDevice, const CFX_ClipRgn* pClipRgn,
                   const CFX_DIBSource* pSource, int bitmap_alpha,
                   FX_DWORD mask_color, const CFX_AffineMatrix* pMatrix,
-                  FX_DWORD dib_flags, bool bRgbByteOrder = false,
+                  FX_DWORD dib_flags, FX_BOOL bRgbByteOrder = FALSE,
                   int alpha_flag = 0, void* pIccTransform = NULL,
                   int blend_type = FXDIB_BLEND_NORMAL);
 
-    bool Continue(IFX_Pause* pPause);
+    FX_BOOL Continue(IFX_Pause* pPause);
 
 protected:
     CFX_DIBitmap*              m_pDevice;
@@ -598,7 +598,7 @@ protected:
     FX_DWORD                   m_Flags;
     int                                        m_AlphaFlag;
     void*                              m_pIccTransform;
-    bool                               m_bRgbByteOrder;
+    FX_BOOL                            m_bRgbByteOrder;
     int                                        m_BlendType;
 };
 
index 20ef5d4..2832fbf 100644 (file)
@@ -56,12 +56,12 @@ public:
     CFX_Font();
     ~CFX_Font();
 
-    bool                                       LoadSubst(const CFX_ByteString& face_name, bool bTrueType, FX_DWORD flags,
-                                      int weight, int italic_angle, int CharsetCP, bool bVertical = false);
+    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);
 
-    bool                                       LoadEmbedded(const uint8_t* data, FX_DWORD size);
+    FX_BOOL                                    LoadEmbedded(const uint8_t* data, FX_DWORD size);
 
-    bool                                       LoadFile(IFX_FileRead* pFile);
+    FX_BOOL                                    LoadFile(IFX_FileRead* pFile);
 
     FXFT_Face                          GetFace() const
     {
@@ -82,15 +82,15 @@ public:
 
     int                                                GetDescent() const;
 
-    bool                 GetGlyphBBox(FX_DWORD glyph_index, FX_RECT &bbox);
+    FX_BOOL                 GetGlyphBBox(FX_DWORD glyph_index, FX_RECT &bbox);
 
-    bool                 IsItalic();
+    FX_BOOL                 IsItalic();
 
-    bool                 IsBold();
+    FX_BOOL                 IsBold();
 
-    bool                 IsFixedWidth();
+    FX_BOOL                 IsFixedWidth();
 
-    bool                                       IsVertical() const
+    FX_BOOL                                    IsVertical() const
     {
         return m_bVertical;
     }
@@ -103,9 +103,9 @@ public:
     CFX_ByteString          GetFaceName() const;
 
 
-    bool                 IsTTFont();
+    FX_BOOL                 IsTTFont();
 
-    bool                 GetBBox(FX_RECT &bbox);
+    FX_BOOL                 GetBBox(FX_RECT &bbox);
 
     int                     GetHeight();
 
@@ -118,7 +118,7 @@ public:
     FXFT_Face                          m_Face;
 
     CFX_SubstFont*                     m_pSubstFont;
-    bool                                       IsEmbedded()
+    FX_BOOL                                    IsEmbedded()
     {
         return m_bEmbedded;
     }
@@ -133,14 +133,14 @@ public:
     void*                   m_pPlatformFont;
     void*                   m_pPlatformFontCollection;
     void*                   m_pDwFont;
-    bool                 m_bDwLoaded;
+    FX_BOOL                 m_bDwLoaded;
     void                    ReleasePlatformResource();
 
     void                                       DeleteFace();
 protected:
 
-    bool                                       m_bEmbedded;
-    bool                                       m_bVertical;
+    FX_BOOL                                    m_bEmbedded;
+    FX_BOOL                                    m_bVertical;
     void*                                      m_pOwnedStream;
 };
 #define ENCODING_INTERNAL              0
@@ -182,11 +182,11 @@ public:
 
     int                                                m_ItalicAngle;
 
-    bool                                       m_bSubstOfCJK;
+    FX_BOOL                                    m_bSubstOfCJK;
 
     int                                                m_WeightCJK;
 
-    bool                                       m_bItlicCJK;
+    FX_BOOL                                    m_bItlicCJK;
 };
 #define FX_FONT_FLAG_SERIF              0x01
 #define FX_FONT_FLAG_FIXEDPITCH                        0x02
@@ -206,9 +206,9 @@ public:
     ~CFX_FontMgr();
     void                       InitFTLibrary();
     FXFT_Face          GetCachedFace(const CFX_ByteString& face_name,
-                                  int weight, bool bItalic, uint8_t*& pFontData);
+                                  int weight, FX_BOOL bItalic, uint8_t*& pFontData);
     FXFT_Face          AddCachedFace(const CFX_ByteString& face_name,
-                                  int weight, bool bItalic, uint8_t* 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, uint8_t*& pFontData);
     FXFT_Face          AddCachedTTCFace(int ttc_size, FX_DWORD checksum,
@@ -217,12 +217,12 @@ public:
     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, bool bTrueType, FX_DWORD flags,
+    FXFT_Face          FindSubstFont(const CFX_ByteString& face_name, FX_BOOL bTrueType, FX_DWORD flags,
                                   int weight, int italic_angle, int CharsetCP, CFX_SubstFont* pSubstFont);
 
     void                       FreeCache();
 
-    bool                       GetStandardFont(const uint8_t*& 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;
@@ -235,7 +235,7 @@ public:
 
     virtual ~IFX_FontMapper() {}
 
-    virtual FXFT_Face  FindSubstFont(const CFX_ByteString& face_name, bool bTrueType, FX_DWORD flags,
+    virtual FXFT_Face  FindSubstFont(const CFX_ByteString& face_name, FX_BOOL bTrueType, FX_DWORD flags,
                                       int weight, int italic_angle, int CharsetCP, CFX_SubstFont* pSubstFont) = 0;
 
     CFX_FontMgr*               m_pFontMgr;
@@ -277,14 +277,14 @@ public:
     {
         return m_pFontEnumerator;
     }
-    virtual FXFT_Face  FindSubstFont(const CFX_ByteString& face_name, bool bTrueType, FX_DWORD flags,
+    virtual FXFT_Face  FindSubstFont(const CFX_ByteString& face_name, FX_BOOL bTrueType, FX_DWORD flags,
                                       int weight, int italic_angle, int CharsetCP, CFX_SubstFont* pSubstFont);
 private:
     CFX_ByteString             GetPSNameFromTT(void* hFont);
     CFX_ByteString             MatchInstalledFonts(const CFX_ByteString& norm_name);
     FXFT_Face                  UseInternalSubst(CFX_SubstFont* pSubstFont, int iBaseFont, int italic_angle, int weight, int picthfamily);
 
-    bool                               m_bListLoaded;
+    FX_BOOL                            m_bListLoaded;
     FXFT_Face                  m_MMFaces[2];
     CFX_ByteString             m_LastFamily;
     CFX_DWordArray             m_CharsetArray;
@@ -299,12 +299,12 @@ public:
     static IFX_SystemFontInfo* CreateDefault();
     virtual void               Release() = 0;
 
-    virtual    bool            EnumFontList(CFX_FontMapper* pMapper) = 0;
-    virtual void*              MapFont(int weight, bool bItalic, int charset, int pitch_family, const FX_CHAR* face, int& iExact) = 0;
+    virtual    FX_BOOL         EnumFontList(CFX_FontMapper* pMapper) = 0;
+    virtual void*              MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, int& iExact) = 0;
     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 bool               GetFaceName(void* hFont, CFX_ByteString& name) = 0;
-    virtual bool               GetFontCharset(void* hFont, int& charset) = 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)
     {
         return 0;
@@ -326,15 +326,15 @@ public:
 
     // IFX_SytemFontInfo:
     void Release() override;
-    bool EnumFontList(CFX_FontMapper* pMapper) override;
-    void* MapFont(int weight, bool bItalic, int charset, int pitch_family,
+    FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override;
+    void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family,
                   const FX_CHAR* face, int& bExact) override;
     void* GetFont(const FX_CHAR* face) override;
     FX_DWORD GetFontData(void* hFont, FX_DWORD table,
                          uint8_t* buffer, FX_DWORD size) override;
     void DeleteFont(void* hFont) override;
-    bool GetFaceName(void* hFont, CFX_ByteString& name) override;
-    bool GetFontCharset(void* hFont, int& charset) override;
+    FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override;
+    FX_BOOL GetFontCharset(void* hFont, int& charset) override;
 
 protected:
     CFX_MapByteStringToPtr     m_FontList;
@@ -357,7 +357,7 @@ public:
     ~CFX_FontCache();
     CFX_FaceCache*                     GetCachedFace(CFX_Font* pFont);
     void                                       ReleaseCachedFace(CFX_Font* pFont);
-    void                                       FreeCache(bool bRelease = false);
+    void                                       FreeCache(FX_BOOL bRelease = FALSE);
 
 private:
     using CFX_FTCacheMap = std::map<FXFT_Face, CFX_CountedFaceCache*>;
@@ -391,7 +391,7 @@ class CFX_FaceCache
 {
 public:
     ~CFX_FaceCache();
-    const CFX_GlyphBitmap*     LoadGlyphBitmap(CFX_Font* pFont, FX_DWORD glyph_index, bool bFontStyle, const CFX_AffineMatrix* pMatrix,
+    const CFX_GlyphBitmap*     LoadGlyphBitmap(CFX_Font* pFont, FX_DWORD glyph_index, FX_BOOL bFontStyle, const CFX_AffineMatrix* pMatrix,
                                             int dest_width, int anti_alias, int& text_flags);
     const CFX_PathData*                LoadGlyphPath(CFX_Font* pFont, FX_DWORD glyph_index, int dest_width);
 
@@ -399,12 +399,12 @@ public:
     CFX_FaceCache(FXFT_Face face);
 private:
     FXFT_Face                          m_Face;
-    CFX_GlyphBitmap*           RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_index, bool bFontStyle,
+    CFX_GlyphBitmap*           RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_index, FX_BOOL bFontStyle,
                                         const CFX_AffineMatrix* pMatrix, int dest_width, int anti_alias);
     CFX_GlyphBitmap*           RenderGlyph_Nativetext(CFX_Font* pFont, FX_DWORD glyph_index,
             const CFX_AffineMatrix* pMatrix, int dest_width, int anti_alias);
     CFX_GlyphBitmap*        LookUpGlyphBitmap(CFX_Font* pFont, const CFX_AffineMatrix* pMatrix, CFX_ByteStringC& FaceGlyphsKey,
-            FX_DWORD glyph_index, bool bFontStyle, int dest_width, int anti_alias);
+            FX_DWORD glyph_index, FX_BOOL bFontStyle, int dest_width, int anti_alias);
     CFX_MapByteStringToPtr     m_SizeMap;
     CFX_MapPtrToPtr                    m_PathMap;
     CFX_DIBitmap*           m_pBitmap;
@@ -418,16 +418,16 @@ typedef struct {
     FX_FLOAT                   m_fOriginX, m_fOriginY;
 } FXTEXT_GLYPHPOS;
 FX_RECT FXGE_GetGlyphsBBox(FXTEXT_GLYPHPOS* pGlyphAndPos, int nChars, int anti_alias, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f);
-bool   OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size,
+FX_BOOL        OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size,
                     CFX_AffineMatrix* pMatrix, unsigned long glyph_index, unsigned long argb);
-bool   OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size,
+FX_BOOL        OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size,
                    CFX_AffineMatrix* pText_matrix, unsigned short const* text, unsigned long argb);
 class IFX_GSUBTable
 {
 public:
     static IFX_GSUBTable* Create(CFX_Font* pFont);
     virtual ~IFX_GSUBTable() { }
-    virtual bool GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0;
+    virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0;
 };
 
 #endif  // CORE_INCLUDE_FXGE_FX_FONT_H_
index 5965641..fd9c148 100644 (file)
@@ -193,11 +193,11 @@ public:
 
     void                               Transform(const CFX_AffineMatrix* pMatrix);
 
-    bool                               IsRect() const;
+    FX_BOOL                            IsRect() const;
 
-    bool                               GetZeroAreaPath(CFX_PathData& NewPath, CFX_AffineMatrix* pMatrix, bool&bThin, bool bAdjust) const;
+    FX_BOOL                            GetZeroAreaPath(CFX_PathData& NewPath, CFX_AffineMatrix* pMatrix, FX_BOOL&bThin, FX_BOOL bAdjust) const;
 
-    bool                               IsRect(const CFX_AffineMatrix* pMatrix, CFX_FloatRect* rect) const;
+    FX_BOOL                            IsRect(const CFX_AffineMatrix* pMatrix, CFX_FloatRect* rect) const;
 
     void Append(const CFX_PathData* pSrc, const CFX_AffineMatrix* pMatrix);
     void AppendRect(FX_FLOAT left, FX_FLOAT bottom, FX_FLOAT right, FX_FLOAT top);
@@ -294,10 +294,10 @@ typedef struct {
     FX_DWORD                   m_GlyphIndex;
     FX_FLOAT                   m_OriginX, m_OriginY;
     int                                        m_FontCharWidth;
-    bool                               m_bGlyphAdjust;
+    FX_BOOL                            m_bGlyphAdjust;
     FX_FLOAT                   m_AdjustMatrix[4];
     FX_DWORD                   m_ExtGID;
-    bool                               m_bFontStyle;
+    FX_BOOL                            m_bFontStyle;
 } FXTEXT_CHARPOS;
 class CFX_RenderDevice
 {
@@ -313,7 +313,7 @@ public:
         return m_pDeviceDriver;
     }
 
-    bool                       StartRendering();
+    FX_BOOL                    StartRendering();
 
     void                       EndRendering();
 
@@ -321,7 +321,7 @@ public:
 
     void                       SaveState();
 
-    void                       RestoreState(bool bKeepSaved = false);
+    void                       RestoreState(FX_BOOL bKeepSaved = FALSE);
 
 
 
@@ -365,26 +365,26 @@ public:
         m_pBitmap = pBitmap;
     }
 
-    bool                       CreateCompatibleBitmap(CFX_DIBitmap* pDIB, int width, int height) const;
+    FX_BOOL                    CreateCompatibleBitmap(CFX_DIBitmap* pDIB, int width, int height) const;
 
     const FX_RECT&     GetClipBox() const
     {
         return m_ClipBox;
     }
 
-    bool                       SetClip_PathFill(const CFX_PathData* pPathData,
+    FX_BOOL                    SetClip_PathFill(const CFX_PathData* pPathData,
                                      const CFX_AffineMatrix* pObject2Device,
                                      int fill_mode
                               );
 
-    bool                       SetClip_Rect(const FX_RECT* pRect);
+    FX_BOOL                    SetClip_Rect(const FX_RECT* pRect);
 
-    bool                       SetClip_PathStroke(const CFX_PathData* pPathData,
+    FX_BOOL                    SetClip_PathStroke(const CFX_PathData* pPathData,
                                        const CFX_AffineMatrix* pObject2Device,
                                        const CFX_GraphStateData* pGraphState
                                 );
 
-    bool                       DrawPath(const CFX_PathData* pPathData,
+    FX_BOOL                    DrawPath(const CFX_PathData* pPathData,
                              const CFX_AffineMatrix* pObject2Device,
                              const CFX_GraphStateData* pGraphState,
                              FX_DWORD fill_color,
@@ -395,46 +395,46 @@ public:
                              int blend_type = FXDIB_BLEND_NORMAL
                       );
 
-    bool                       SetPixel(int x, int y, FX_DWORD color,
+    FX_BOOL                    SetPixel(int x, int y, FX_DWORD color,
                              int alpha_flag = 0, void* pIccTransform = NULL);
 
-    bool                       FillRect(const FX_RECT* pRect, FX_DWORD color,
+    FX_BOOL                    FillRect(const FX_RECT* pRect, FX_DWORD color,
                              int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
 
-    bool                       DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, FX_DWORD color,
+    FX_BOOL                    DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, FX_DWORD color,
                                      int fill_mode = 0, int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
 
-    bool                       GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform = NULL);
+    FX_BOOL                    GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform = NULL);
 
     CFX_DIBitmap*   GetBackDrop();
 
-    bool                       SetDIBits(const CFX_DIBSource* pBitmap, int left, int top, int blend_type = FXDIB_BLEND_NORMAL,
+    FX_BOOL                    SetDIBits(const CFX_DIBSource* pBitmap, int left, int top, int blend_type = FXDIB_BLEND_NORMAL,
                               void* pIccTransform = NULL);
 
-    bool                       StretchDIBits(const CFX_DIBSource* pBitmap, int left, int top, int dest_width, int dest_height,
+    FX_BOOL                    StretchDIBits(const CFX_DIBSource* pBitmap, int left, int top, int dest_width, int dest_height,
                                   FX_DWORD flags = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
 
-    bool                       SetBitMask(const CFX_DIBSource* pBitmap, int left, int top, FX_DWORD color,
+    FX_BOOL                    SetBitMask(const CFX_DIBSource* pBitmap, int left, int top, FX_DWORD color,
                                int alpha_flag = 0, void* pIccTransform = NULL);
 
-    bool                       StretchBitMask(const CFX_DIBSource* pBitmap, int left, int top, int dest_width, int dest_height,
+    FX_BOOL                    StretchBitMask(const CFX_DIBSource* pBitmap, int left, int top, int dest_width, int dest_height,
                                    FX_DWORD color, FX_DWORD flags = 0, int alpha_flag = 0, void* pIccTransform = NULL);
 
-    bool                       StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
+    FX_BOOL                    StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
                                 const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
                                 int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
 
-    bool                       ContinueDIBits(void* handle, IFX_Pause* pPause);
+    FX_BOOL                    ContinueDIBits(void* handle, IFX_Pause* pPause);
 
     void                       CancelDIBits(void* handle);
 
-    bool                       DrawNormalText(int nChars, const FXTEXT_CHARPOS* pCharPos,
+    FX_BOOL                    DrawNormalText(int nChars, const FXTEXT_CHARPOS* pCharPos,
                                    CFX_Font* pFont, CFX_FontCache* pCache,
                                    FX_FLOAT font_size, const CFX_AffineMatrix* pText2Device,
                                    FX_DWORD fill_color, FX_DWORD text_flags,
                                    int alpha_flag = 0, void* pIccTransform = NULL);
 
-    bool                       DrawTextPath(int nChars, const FXTEXT_CHARPOS* pCharPos,
+    FX_BOOL                    DrawTextPath(int nChars, const FXTEXT_CHARPOS* pCharPos,
                                  CFX_Font* pFont, CFX_FontCache* pCache,
                                  FX_FLOAT font_size, const CFX_AffineMatrix* pText2User,
                                  const CFX_AffineMatrix* pUser2Device, const CFX_GraphStateData* pGraphState,
@@ -477,12 +477,12 @@ public:
 
     ~CFX_FxgeDevice();
 
-    bool                       Attach(CFX_DIBitmap* pBitmap, int dither_bits = 0, bool bRgbByteOrder = false, CFX_DIBitmap* pOriDevice = NULL, bool bGroupKnockout = false);
+    FX_BOOL                    Attach(CFX_DIBitmap* pBitmap, int dither_bits = 0, FX_BOOL bRgbByteOrder = FALSE, CFX_DIBitmap* pOriDevice = NULL, FX_BOOL bGroupKnockout = FALSE);
 
-    bool                       Create(int width, int height, FXDIB_Format format, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL);
+    FX_BOOL                    Create(int width, int height, FXDIB_Format format, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL);
 protected:
 
-    bool                       m_bOwnedBitmap;
+    FX_BOOL                    m_bOwnedBitmap;
 };
 class CFX_SkiaDevice : public CFX_RenderDevice
 {
@@ -492,19 +492,19 @@ public:
 
     ~CFX_SkiaDevice();
 
-    bool                       Attach(CFX_DIBitmap* pBitmap, int dither_bits = 0, bool bRgbByteOrder = false, CFX_DIBitmap* pOriDevice = NULL, bool bGroupKnockout = false);
+    FX_BOOL                    Attach(CFX_DIBitmap* pBitmap, int dither_bits = 0, FX_BOOL bRgbByteOrder = FALSE, CFX_DIBitmap* pOriDevice = NULL, FX_BOOL bGroupKnockout = FALSE);
 
-    bool                       Create(int width, int height, FXDIB_Format format, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL);
+    FX_BOOL                    Create(int width, int height, FXDIB_Format format, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL);
 protected:
 
-    bool                       m_bOwnedBitmap;
+    FX_BOOL                    m_bOwnedBitmap;
 };
 class IFX_RenderDeviceDriver
 {
 public:
 
-    static IFX_RenderDeviceDriver*             CreateFxgeDriver(CFX_DIBitmap* pBitmap, bool bRgbByteOrder = false,
-            CFX_DIBitmap* pOriDevice = NULL, bool bGroupKnockout = false);
+    static IFX_RenderDeviceDriver*             CreateFxgeDriver(CFX_DIBitmap* pBitmap, FX_BOOL bRgbByteOrder = FALSE,
+            CFX_DIBitmap* pOriDevice = NULL, FX_BOOL bGroupKnockout = FALSE);
 
     virtual ~IFX_RenderDeviceDriver() {}
     virtual void Begin() { }
@@ -517,14 +517,14 @@ public:
         return CFX_Matrix();
     }
 
-    virtual bool IsPSPrintDriver()
+    virtual FX_BOOL IsPSPrintDriver()
     {
-        return false;
+        return FALSE;
     }
 
-    virtual bool       StartRendering()
+    virtual FX_BOOL    StartRendering()
     {
-        return true;
+        return TRUE;
     }
 
     virtual void       EndRendering() {}
@@ -534,23 +534,23 @@ public:
 
     virtual void       SaveState() = 0;
 
-    virtual void       RestoreState(bool bKeepSaved = false) = 0;
+    virtual void       RestoreState(FX_BOOL bKeepSaved = FALSE) = 0;
 
 
-    virtual bool       SetClip_PathFill(const CFX_PathData* pPathData,
+    virtual FX_BOOL    SetClip_PathFill(const CFX_PathData* pPathData,
                                      const CFX_AffineMatrix* pObject2Device,
                                      int fill_mode
                                     ) = 0;
 
-    virtual bool       SetClip_PathStroke(const CFX_PathData* pPathData,
+    virtual FX_BOOL    SetClip_PathStroke(const CFX_PathData* pPathData,
                                        const CFX_AffineMatrix* pObject2Device,
                                        const CFX_GraphStateData* pGraphState
                                       )
     {
-        return false;
+        return FALSE;
     }
 
-    virtual bool       DrawPath(const CFX_PathData* pPathData,
+    virtual FX_BOOL    DrawPath(const CFX_PathData* pPathData,
                              const CFX_AffineMatrix* pObject2Device,
                              const CFX_GraphStateData* pGraphState,
                              FX_DWORD fill_color,
@@ -561,59 +561,59 @@ public:
                              int blend_type = FXDIB_BLEND_NORMAL
                             ) = 0;
 
-    virtual bool       SetPixel(int x, int y, FX_DWORD color,
+    virtual FX_BOOL    SetPixel(int x, int y, FX_DWORD color,
                              int alpha_flag = 0, void* pIccTransform = NULL)
     {
-        return false;
+        return FALSE;
     }
 
-    virtual bool FillRect(const FX_RECT* pRect, FX_DWORD fill_color,
+    virtual FX_BOOL FillRect(const FX_RECT* pRect, FX_DWORD fill_color,
                              int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL)
     {
-        return false;
+        return FALSE;
     }
 
-    virtual bool       DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, FX_DWORD color,
+    virtual FX_BOOL    DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, FX_DWORD color,
                                      int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL)
     {
-        return false;
+        return FALSE;
     }
 
-    virtual bool GetClipBox(FX_RECT* pRect) = 0;
+    virtual FX_BOOL GetClipBox(FX_RECT* pRect) = 0;
 
-    virtual bool       GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform = NULL, bool bDEdge = false)
+    virtual FX_BOOL    GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform = NULL, FX_BOOL bDEdge = FALSE)
     {
-        return false;
+        return FALSE;
     }
     virtual CFX_DIBitmap*   GetBackDrop()
     {
         return NULL;
     }
 
-    virtual bool       SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect,
+    virtual FX_BOOL    SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect,
                               int dest_left, int dest_top, int blend_type,
                               int alpha_flag = 0, void* pIccTransform = NULL) = 0;
 
-    virtual bool       StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
+    virtual FX_BOOL    StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
                                   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) = 0;
 
-    virtual bool       StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
+    virtual FX_BOOL    StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
                                 const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
                                 int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL) = 0;
 
-    virtual bool       ContinueDIBits(void* handle, IFX_Pause* pPause)
+    virtual FX_BOOL    ContinueDIBits(void* handle, IFX_Pause* pPause)
     {
-        return false;
+        return FALSE;
     }
 
     virtual void       CancelDIBits(void* handle) {}
 
-    virtual bool DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
+    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)
     {
-        return false;
+        return FALSE;
     }
 
     virtual void*      GetPlatformSurface()
@@ -646,13 +646,13 @@ public:
 
     ~CFX_PSRenderer();
 
-    void                       Init(IFX_PSOutput* pOutput, int ps_level, int width, int height, bool bCmykOutput);
-    bool                       StartRendering();
+    void                       Init(IFX_PSOutput* pOutput, int ps_level, int width, int height, FX_BOOL bCmykOutput);
+    FX_BOOL                    StartRendering();
     void                       EndRendering();
 
     void                       SaveState();
 
-    void                       RestoreState(bool bKeepSaved = false);
+    void                       RestoreState(FX_BOOL bKeepSaved = FALSE);
 
     void                       SetClip_PathFill(const CFX_PathData* pPathData,
                                      const CFX_AffineMatrix* pObject2Device,
@@ -669,7 +669,7 @@ public:
         return m_ClipBox;
     }
 
-    bool                       DrawPath(const CFX_PathData* pPathData,
+    FX_BOOL                    DrawPath(const CFX_PathData* pPathData,
                              const CFX_AffineMatrix* pObject2Device,
                              const CFX_GraphStateData* pGraphState,
                              FX_DWORD fill_color,
@@ -679,18 +679,18 @@ public:
                              void* pIccTransform = NULL
                       );
 
-    bool                       SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
+    FX_BOOL                    SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
                               int alpha_flag = 0, void* pIccTransform = NULL);
 
-    bool                       StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
+    FX_BOOL                    StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
                                   int dest_width, int dest_height, FX_DWORD flags,
                                   int alpha_flag = 0, void* pIccTransform = NULL);
 
-    bool                       DrawDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color,
+    FX_BOOL                    DrawDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color,
                                const CFX_AffineMatrix* pMatrix, FX_DWORD flags,
                                int alpha_flag = 0, void* pIccTransform = NULL);
 
-    bool                       DrawText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, CFX_FontCache* pCache,
+    FX_BOOL                    DrawText(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);
 private:
@@ -701,11 +701,11 @@ private:
 
     CFX_GraphStateData m_CurGraphState;
 
-    bool                       m_bGraphStateSet;
+    FX_BOOL                    m_bGraphStateSet;
 
-    bool                       m_bCmykOutput;
+    FX_BOOL                    m_bCmykOutput;
 
-    bool                       m_bColorSet;
+    FX_BOOL                    m_bColorSet;
 
     FX_DWORD           m_LastColor;
 
@@ -714,7 +714,7 @@ private:
     CFX_ArrayTemplate<CPSFont*>        m_PSFontList;
 
     CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack;
-    bool                       m_bInited;
+    FX_BOOL                    m_bInited;
 
     void                       OutputPath(const CFX_PathData* pPathData, const CFX_AffineMatrix* pObject2Device);
 
index ebe61cc..0fb8bed 100644 (file)
@@ -13,15 +13,15 @@ class CFX_QuartzDevice : public CFX_RenderDevice
 public:
     CFX_QuartzDevice();
     ~CFX_QuartzDevice();
-    bool Attach(CGContextRef context, int32_t nDeviceClass = FXDC_DISPLAY);
-    bool Attach(CFX_DIBitmap* pBitmap);
-    bool Create(int32_t width, int32_t height, FXDIB_Format format);
+    FX_BOOL Attach(CGContextRef context, int32_t nDeviceClass = FXDC_DISPLAY);
+    FX_BOOL Attach(CFX_DIBitmap* pBitmap);
+    FX_BOOL Create(int32_t width, int32_t height, FXDIB_Format format);
 
     CGContextRef GetContext();
 
 protected:
     CGContextRef m_pContext;
-    bool m_bOwnedBitmap;
+    FX_BOOL m_bOwnedBitmap;
 };
 #endif
 
index 8023bd8..5b16146 100644 (file)
@@ -72,13 +72,13 @@ protected:
 class CFX_WindowsDevice : public CFX_RenderDevice
 {
 public:
-    static IFX_RenderDeviceDriver*     CreateDriver(HDC hDC, bool bCmykOutput = false);
+    static IFX_RenderDeviceDriver*     CreateDriver(HDC hDC, FX_BOOL bCmykOutput = FALSE);
 
-    CFX_WindowsDevice(HDC hDC, bool bCmykOutput = false, bool bForcePSOutput = false, int psLevel = 2);
+    CFX_WindowsDevice(HDC hDC, FX_BOOL bCmykOutput = FALSE, FX_BOOL bForcePSOutput = FALSE, int psLevel = 2);
 
     HDC                GetDC() const;
 
-    bool m_bForcePSOutput;
+    FX_BOOL m_bForcePSOutput;
 
     static int m_psLevel;
 };
index e0a871e..88d2109 100644 (file)
@@ -230,7 +230,7 @@ typedef unsigned int JDIMENSION;
 
 
 /*
- * On a few systems, type boolean and/or its values false, true may appear
+ * On a few systems, type boolean and/or its values FALSE, TRUE may appear
  * in standard header files.  Or you may have conflicts with application-
  * specific header files that you want to include together with these files.
  * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
@@ -239,11 +239,11 @@ typedef unsigned int JDIMENSION;
 #ifndef HAVE_BOOLEAN
 typedef int boolean;
 #endif
-#ifndef false                  /* in case these macros already exist */
-#define false  0               /* values of boolean */
+#ifndef FALSE                  /* in case these macros already exist */
+#define FALSE  0               /* values of boolean */
 #endif
-#ifndef true
-#define true   1
+#ifndef TRUE
+#define TRUE   1
 #endif
 
 
index 745a4c0..95b00d4 100644 (file)
@@ -95,7 +95,7 @@ struct jpeg_downsampler {
                             JSAMPIMAGE output_buf,
                             JDIMENSION out_row_group_index));
 
-  boolean need_context_rows;   /* true if need rows above & below */
+  boolean need_context_rows;   /* TRUE if need rows above & below */
 };
 
 /* Forward DCT (also controls coefficient quantization) */
@@ -213,7 +213,7 @@ struct jpeg_entropy_decoder {
 
   /* This is here to share code between baseline and progressive decoders; */
   /* other modules probably should not use it */
-  boolean insufficient_data;   /* set true after emitting warning */
+  boolean insufficient_data;   /* set TRUE after emitting warning */
 };
 
 /* Inverse DCT (also performs dequantization) */
@@ -239,7 +239,7 @@ struct jpeg_upsampler {
                           JDIMENSION *out_row_ctr,
                           JDIMENSION out_rows_avail));
 
-  boolean need_context_rows;   /* true if need rows above & below */
+  boolean need_context_rows;   /* TRUE if need rows above & below */
 };
 
 /* Colorspace conversion */
index 78831ac..7de5ab7 100644 (file)
@@ -153,12 +153,12 @@ typedef struct {
    * CAUTION: IJG versions prior to v6a kept this array in zigzag order.
    */
   UINT16 quantval[DCTSIZE2];   /* quantization step for each coefficient */
-  /* This field is used only during compression.  It's initialized false when
-   * the table is created, and set true when it's been output to the file.
-   * You could suppress output of a table by setting this to true.
+  /* This field is used only during compression.  It's initialized FALSE when
+   * the table is created, and set TRUE when it's been output to the file.
+   * You could suppress output of a table by setting this to TRUE.
    * (See jpeg_suppress_tables for an example.)
    */
-  boolean sent_table;          /* true when table has been output */
+  boolean sent_table;          /* TRUE when table has been output */
 } JQUANT_TBL;
 
 
@@ -169,12 +169,12 @@ typedef struct {
   UINT8 bits[17];              /* bits[k] = # of symbols with codes of */
                                /* length k bits; bits[0] is unused */
   UINT8 huffval[256];          /* The symbols, in order of incr code length */
-  /* This field is used only during compression.  It's initialized false when
-   * the table is created, and set true when it's been output to the file.
-   * You could suppress output of a table by setting this to true.
+  /* This field is used only during compression.  It's initialized FALSE when
+   * the table is created, and set TRUE when it's been output to the file.
+   * You could suppress output of a table by setting this to TRUE.
    * (See jpeg_suppress_tables for an example.)
    */
-  boolean sent_table;          /* true when table has been output */
+  boolean sent_table;          /* TRUE when table has been output */
 } JHUFF_TBL;
 
 
@@ -384,10 +384,10 @@ struct jpeg_compress_struct {
    * set num_scans and scan_info to point to an array of scan definitions.
    */
 
-  boolean raw_data_in;         /* true=caller supplies downsampled data */
-  boolean arith_code;          /* true=arithmetic coding, false=Huffman */
-  boolean optimize_coding;     /* true=optimize entropy encoding parms */
-  boolean CCIR601_sampling;    /* true=first samples are cosited */
+  boolean raw_data_in;         /* TRUE=caller supplies downsampled data */
+  boolean arith_code;          /* TRUE=arithmetic coding, FALSE=Huffman */
+  boolean optimize_coding;     /* TRUE=optimize entropy encoding parms */
+  boolean CCIR601_sampling;    /* TRUE=first samples are cosited */
   int smoothing_factor;                /* 1..100, or 0 for no input smoothing */
   J_DCT_METHOD dct_method;     /* DCT algorithm selector */
 
@@ -427,7 +427,7 @@ struct jpeg_compress_struct {
   /*
    * These fields are computed during compression startup
    */
-  boolean progressive_mode;    /* true if scan script uses progressive mode */
+  boolean progressive_mode;    /* TRUE if scan script uses progressive mode */
   int max_h_samp_factor;       /* largest h_samp_factor */
   int max_v_samp_factor;       /* largest v_samp_factor */
 
@@ -500,17 +500,17 @@ struct jpeg_decompress_struct {
 
   double output_gamma;         /* image gamma wanted in output */
 
-  boolean buffered_image;      /* true=multiple output passes */
-  boolean raw_data_out;                /* true=downsampled data wanted */
+  boolean buffered_image;      /* TRUE=multiple output passes */
+  boolean raw_data_out;                /* TRUE=downsampled data wanted */
 
   J_DCT_METHOD dct_method;     /* IDCT algorithm selector */
-  boolean do_fancy_upsampling; /* true=apply fancy upsampling */
-  boolean do_block_smoothing;  /* true=apply interblock smoothing */
+  boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */
+  boolean do_block_smoothing;  /* TRUE=apply interblock smoothing */
 
-  boolean quantize_colors;     /* true=colormapped output wanted */
+  boolean quantize_colors;     /* TRUE=colormapped output wanted */
   /* the following are ignored if not quantize_colors: */
   J_DITHER_MODE dither_mode;   /* type of color dithering to use */
-  boolean two_pass_quantize;   /* true=use two-pass color quantization */
+  boolean two_pass_quantize;   /* TRUE=use two-pass color quantization */
   int desired_number_of_colors;        /* max # colors to use in created colormap */
   /* these are significant only in buffered-image mode: */
   boolean enable_1pass_quant;  /* enable future use of 1-pass quantizer */
@@ -602,8 +602,8 @@ struct jpeg_decompress_struct {
   jpeg_component_info * comp_info;
   /* comp_info[i] describes component that appears i'th in SOF */
 
-  boolean progressive_mode;    /* true if SOFn specifies progressive mode */
-  boolean arith_code;          /* true=arithmetic coding, false=Huffman */
+  boolean progressive_mode;    /* TRUE if SOFn specifies progressive mode */
+  boolean arith_code;       &nbs