-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,177 changed files
with
559,675 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Build folder | ||
out | ||
|
||
# Prerequisites | ||
*.d | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "3rdParty/TargomanCMake"] | ||
path = 3rdParty/TargomanCMake | ||
url = https://github.com/Targoman/TargomanCMake |
Submodule TargomanCMake
added at
44da39
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Names should be added to this file with this pattern: | ||
# | ||
# For individuals: | ||
# Name <email address> | ||
# | ||
# For organizations: | ||
# Organization <fnmatch pattern> | ||
# | ||
# See python fnmatch module documentation for more information. | ||
|
||
Andrey Khalyavin <[email protected]> | ||
Brett Wilson <[email protected]> | ||
Chris Palmer <[email protected]> | ||
Finnur Thorarinsson <[email protected]> | ||
Jochen Eisinger <[email protected]> | ||
John Abd-El-Malek <[email protected]> | ||
Julien Tinnes <[email protected]> | ||
Kostya Serebryany <[email protected]> | ||
Lei Zhang <[email protected]> | ||
Lucas Nihlen <[email protected]> | ||
Matt Giuca <[email protected]> | ||
Michael Doppler <[email protected]> | ||
Nico Weber <[email protected]> | ||
Raymes Khoury <[email protected]> | ||
Reid Kleckner <[email protected]> | ||
Robert Sesek <[email protected]> | ||
Thomas Sepez <[email protected]> | ||
|
||
Foxit Software Inc <*@foxitsoftware.com> | ||
Google Inc. <*@google.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright 2014 PDFium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | ||
|
||
#ifndef _FX_CRYPT_H_ | ||
#define _FX_CRYPT_H_ | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
void CRYPT_ArcFourCryptBlock(FX_LPBYTE data, FX_DWORD size, FX_LPCBYTE key, FX_DWORD keylen); | ||
void CRYPT_ArcFourSetup(FX_LPVOID context, FX_LPCBYTE key, FX_DWORD length); | ||
void CRYPT_ArcFourCrypt(FX_LPVOID context, FX_LPBYTE data, FX_DWORD size); | ||
void CRYPT_AESSetKey(FX_LPVOID context, FX_DWORD blocklen, FX_LPCBYTE key, FX_DWORD keylen, FX_BOOL bEncrypt); | ||
void CRYPT_AESSetIV(FX_LPVOID context, FX_LPCBYTE iv); | ||
void CRYPT_AESDecrypt(FX_LPVOID context, FX_LPBYTE dest, FX_LPCBYTE src, FX_DWORD size); | ||
void CRYPT_AESEncrypt(FX_LPVOID context, FX_LPBYTE dest, FX_LPCBYTE src, FX_DWORD size); | ||
void CRYPT_MD5Generate(FX_LPCBYTE data, FX_DWORD size, FX_BYTE digest[16]); | ||
void CRYPT_MD5Start(FX_LPVOID context); | ||
void CRYPT_MD5Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size); | ||
void CRYPT_MD5Finish(FX_LPVOID context, FX_BYTE digest[16]); | ||
void CRYPT_SHA1Generate(FX_LPCBYTE data, FX_DWORD size, FX_BYTE digest[20]); | ||
void CRYPT_SHA1Start(FX_LPVOID context); | ||
void CRYPT_SHA1Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size); | ||
void CRYPT_SHA1Finish(FX_LPVOID context, FX_BYTE digest[20]); | ||
void CRYPT_SHA256Generate(FX_LPCBYTE data, FX_DWORD size, FX_BYTE digest[32]); | ||
void CRYPT_SHA256Start(FX_LPVOID context); | ||
void CRYPT_SHA256Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size); | ||
void CRYPT_SHA256Finish(FX_LPVOID context, FX_BYTE digest[32]); | ||
void CRYPT_SHA384Start(FX_LPVOID context); | ||
void CRYPT_SHA384Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size); | ||
void CRYPT_SHA384Finish(FX_LPVOID context, FX_BYTE digest[48]); | ||
void CRYPT_SHA384Generate(FX_LPCBYTE data, FX_DWORD size, FX_BYTE digest[48]); | ||
void CRYPT_SHA512Start(FX_LPVOID context); | ||
void CRYPT_SHA512Update(FX_LPVOID context, FX_LPCBYTE data, FX_DWORD size); | ||
void CRYPT_SHA512Finish(FX_LPVOID context, FX_BYTE digest[64]); | ||
void CRYPT_SHA512Generate(FX_LPCBYTE data, FX_DWORD size, FX_BYTE digest[64]); | ||
void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(FX_LPCBYTE pData, FX_DWORD size, FX_LPBYTE data_buf, FX_DWORD& data_len)); | ||
#ifdef __cplusplus | ||
}; | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
// Copyright 2014 PDFium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | ||
|
||
#ifndef _FPDF_MODULE_ | ||
#define _FPDF_MODULE_ | ||
#ifndef _FXCRT_EXTENSION_ | ||
#include "../fxcrt/fx_ext.h" | ||
#endif | ||
class CPDF_ModuleMgr; | ||
class CPDF_PageModuleDef; | ||
class CPDF_RenderModuleDef; | ||
class CPDF_SecurityHandler; | ||
class CCodec_ModuleMgr; | ||
class CPDF_Dictionary; | ||
class ICodec_JpegModule; | ||
class ICodec_JpxModule; | ||
class ICodec_FaxModule; | ||
class ICodec_Jbig2Module; | ||
class ICodec_IccModule; | ||
class ICodec_FlateModule; | ||
#define ADDIN_NAME_CJK "Eastern Asian Language Support" | ||
#define ADDIN_NAME_DECODER "JPEG2000 and JBIG2 Image Decoders" | ||
class CPDF_ModuleMgr : public CFX_Object | ||
{ | ||
public: | ||
|
||
static void Create(); | ||
|
||
static CPDF_ModuleMgr* Get(); | ||
|
||
static void Destroy(); | ||
|
||
|
||
|
||
void SetCodecModule(CCodec_ModuleMgr* pModule) | ||
{ | ||
m_pCodecModule = pModule; | ||
} | ||
CCodec_ModuleMgr* GetCodecModule() | ||
{ | ||
return m_pCodecModule; | ||
} | ||
|
||
void InitPageModule(); | ||
|
||
void InitRenderModule(); | ||
|
||
|
||
void SetModulePath(FX_LPCSTR module_name, FX_LPCSTR path); | ||
|
||
CFX_ByteString GetModuleFilePath(FX_LPCSTR module_name, FX_LPCSTR name); | ||
|
||
void SetDownloadCallback(FX_BOOL (*callback)(FX_LPCSTR module_name)); | ||
|
||
FX_BOOL DownloadModule(FX_LPCSTR module_name); | ||
|
||
void NotifyModuleAvailable(FX_LPCSTR module_name); | ||
|
||
|
||
|
||
CPDF_RenderModuleDef* GetRenderModule() const | ||
{ | ||
return m_pRenderModule; | ||
} | ||
|
||
CPDF_PageModuleDef* GetPageModule() const | ||
{ | ||
return m_pPageModule; | ||
} | ||
|
||
|
||
|
||
|
||
void LoadEmbeddedGB1CMaps(); | ||
|
||
void LoadEmbeddedCNS1CMaps(); | ||
|
||
void LoadEmbeddedJapan1CMaps(); | ||
|
||
void LoadEmbeddedKorea1CMaps(); | ||
|
||
ICodec_FaxModule* GetFaxModule(); | ||
ICodec_JpegModule* GetJpegModule(); | ||
ICodec_JpxModule* GetJpxModule(); | ||
ICodec_Jbig2Module* GetJbig2Module(); | ||
ICodec_IccModule* GetIccModule(); | ||
ICodec_FlateModule* GetFlateModule(); | ||
|
||
void RegisterSecurityHandler(FX_LPCSTR name, CPDF_SecurityHandler * (*CreateHandler)(void* param), void* param); | ||
|
||
CPDF_SecurityHandler* CreateSecurityHandler(FX_LPCSTR name); | ||
|
||
void SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback); | ||
|
||
FX_LPVOID GetPrivateData(FX_LPVOID module_id); | ||
|
||
int m_FileBufSize; | ||
protected: | ||
|
||
CPDF_ModuleMgr(); | ||
|
||
~CPDF_ModuleMgr(); | ||
void Initialize(); | ||
|
||
void InitModules(); | ||
|
||
|
||
|
||
CCodec_ModuleMgr* m_pCodecModule; | ||
|
||
CPDF_RenderModuleDef* m_pRenderModule; | ||
|
||
CPDF_PageModuleDef* m_pPageModule; | ||
|
||
|
||
FX_BOOL (*m_pDownloadCallback)(FX_LPCSTR module_name); | ||
|
||
CFX_ByteString m_DefaultModulePath; | ||
|
||
CFX_CMapByteStringToPtr m_ModulePathList; | ||
|
||
CFX_MapByteStringToPtr m_SecurityHandlerMap; | ||
|
||
CFX_PrivateData m_privateData; | ||
}; | ||
class CPDF_Document; | ||
class CPDF_DocPageData; | ||
class CPDF_FontGlobals; | ||
class IPDF_FontMgr; | ||
class IPDF_FontMapper; | ||
class CPDF_ColorSpace; | ||
class CPDF_PageModuleDef : public CFX_Object | ||
{ | ||
public: | ||
virtual ~CPDF_PageModuleDef() {} | ||
|
||
virtual CPDF_DocPageData* CreateDocData(CPDF_Document* pDoc) | ||
{ | ||
return NULL; | ||
} | ||
|
||
virtual void ReleaseDoc(CPDF_Document*) {} | ||
virtual void ClearDoc(CPDF_Document*) {} | ||
|
||
virtual CPDF_FontGlobals* GetFontGlobals() | ||
{ | ||
return NULL; | ||
} | ||
|
||
virtual void ClearStockFont(CPDF_Document* pDoc) {} | ||
|
||
virtual void NotifyCJKAvailable() {} | ||
|
||
virtual CPDF_ColorSpace* GetStockCS(int family) | ||
{ | ||
return NULL; | ||
} | ||
}; | ||
class CPDF_PageObjects; | ||
class CFX_AffineMatrix; | ||
class CPDF_RenderOptions; | ||
class CPDF_Page; | ||
class CPDF_DocRenderData; | ||
class CPDF_PageRenderCache; | ||
class CFX_BitmapDevice; | ||
class CPDF_Stream; | ||
class CFX_DIBSource; | ||
class CPDF_RenderConfig; | ||
class CPDF_Image; | ||
class CPDF_RenderModuleDef : public CFX_Object | ||
{ | ||
public: | ||
virtual ~CPDF_RenderModuleDef() {} | ||
|
||
virtual CPDF_DocRenderData* CreateDocData(CPDF_Document* pDoc) | ||
{ | ||
return NULL; | ||
} | ||
|
||
virtual void DestroyDocData(CPDF_DocRenderData*) {} | ||
virtual void ClearDocData(CPDF_DocRenderData*) {} | ||
|
||
virtual CPDF_DocRenderData* GetRenderData() | ||
{ | ||
return NULL; | ||
} | ||
|
||
virtual CPDF_PageRenderCache* CreatePageCache(CPDF_Page* pPage) | ||
{ | ||
return NULL; | ||
} | ||
|
||
virtual void DestroyPageCache(CPDF_PageRenderCache*) {} | ||
|
||
virtual void NotifyDecoderAvailable() {} | ||
|
||
virtual CPDF_RenderConfig* GetConfig() | ||
{ | ||
return NULL; | ||
} | ||
}; | ||
#endif |
Oops, something went wrong.