Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Side by Side Diff: fpdfsdk/include/fsdk_mgr.h

Issue 1171733003: Remove typdefs for pointer types in fx_system.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual fixes. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/include/fsdk_baseform.h ('k') | fpdfsdk/include/fx_systemhandler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_ 7 #ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_
8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ 8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_
9 9
10 #include "../../public/fpdf_formfill.h" 10 #include "../../public/fpdf_formfill.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 FX_BOOL FFI_IsALTKeyDown(FX_DWORD nFlag) 114 FX_BOOL FFI_IsALTKeyDown(FX_DWORD nFlag)
115 { 115 {
116 116
117 return (nFlag & FWL_EVENTFLAG_AltKey) != 0; 117 return (nFlag & FWL_EVENTFLAG_AltKey) != 0;
118 } 118 }
119 FX_BOOL FFI_IsINSERTKeyDown(FX_DWORD nFlag) 119 FX_BOOL FFI_IsINSERTKeyDown(FX_DWORD nFlag)
120 { 120 {
121 return FALSE; 121 return FALSE;
122 } 122 }
123 123
124 » int JS_appAlert(FX_LPCWSTR Msg, FX_LPCWSTR Title, FX_UINT Type, FX_UINT Icon) 124 » int JS_appAlert(const FX_WCHAR* Msg, const FX_WCHAR* Title, FX_UINT Type , FX_UINT Icon)
125 { 125 {
126 if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform-> app_alert) 126 if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform-> app_alert)
127 { 127 {
128 CFX_ByteString bsMsg = CFX_WideString(Msg).UTF16LE_Encod e(); 128 CFX_ByteString bsMsg = CFX_WideString(Msg).UTF16LE_Encod e();
129 CFX_ByteString bsTitle = CFX_WideString(Title).UTF16LE_E ncode(); 129 CFX_ByteString bsTitle = CFX_WideString(Title).UTF16LE_E ncode();
130 FPDF_WIDESTRING pMsg = (FPDF_WIDESTRING)bsMsg.GetBuffer( bsMsg.GetLength()); 130 FPDF_WIDESTRING pMsg = (FPDF_WIDESTRING)bsMsg.GetBuffer( bsMsg.GetLength());
131 FPDF_WIDESTRING pTitle = (FPDF_WIDESTRING)bsTitle.GetBuf fer(bsTitle.GetLength()); 131 FPDF_WIDESTRING pTitle = (FPDF_WIDESTRING)bsTitle.GetBuf fer(bsTitle.GetLength());
132 int ret = m_pInfo->m_pJsPlatform->app_alert(m_pInfo->m_p JsPlatform, pMsg, pTitle, Type, Icon); 132 int ret = m_pInfo->m_pJsPlatform->app_alert(m_pInfo->m_p JsPlatform, pMsg, pTitle, Type, Icon);
133 bsMsg.ReleaseBuffer(); 133 bsMsg.ReleaseBuffer();
134 bsTitle.ReleaseBuffer(); 134 bsTitle.ReleaseBuffer();
135 return ret; 135 return ret;
136 } 136 }
137 return -1; 137 return -1;
138 } 138 }
139 139
140 » int JS_appResponse(FX_LPCWSTR Question, FX_LPCWSTR Title, FX_LPCWSTR Def ault, FX_LPCWSTR cLabel, FPDF_BOOL bPassword, void* response, int length) 140 » int JS_appResponse(const FX_WCHAR* Question, const FX_WCHAR* Title, cons t FX_WCHAR* Default, const FX_WCHAR* cLabel, FPDF_BOOL bPassword, void* response , int length)
141 { 141 {
142 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform- >app_response) 142 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform- >app_response)
143 { 143 {
144 CFX_ByteString bsQuestion = CFX_WideString(Question).UTF 16LE_Encode(); 144 CFX_ByteString bsQuestion = CFX_WideString(Question).UTF 16LE_Encode();
145 CFX_ByteString bsTitle = CFX_WideString(Title).UTF16LE_E ncode(); 145 CFX_ByteString bsTitle = CFX_WideString(Title).UTF16LE_E ncode();
146 CFX_ByteString bsDefault = CFX_WideString(Default).UTF16 LE_Encode(); 146 CFX_ByteString bsDefault = CFX_WideString(Default).UTF16 LE_Encode();
147 CFX_ByteString bsLabel = CFX_WideString(cLabel).UTF16LE_ Encode(); 147 CFX_ByteString bsLabel = CFX_WideString(cLabel).UTF16LE_ Encode();
148 FPDF_WIDESTRING pQuestion = (FPDF_WIDESTRING)bsQuestion. GetBuffer(bsQuestion.GetLength()); 148 FPDF_WIDESTRING pQuestion = (FPDF_WIDESTRING)bsQuestion. GetBuffer(bsQuestion.GetLength());
149 FPDF_WIDESTRING pTitle = (FPDF_WIDESTRING)bsTitle.GetBuf fer(bsTitle.GetLength()); 149 FPDF_WIDESTRING pTitle = (FPDF_WIDESTRING)bsTitle.GetBuf fer(bsTitle.GetLength());
150 FPDF_WIDESTRING pDefault = (FPDF_WIDESTRING)bsDefault.Ge tBuffer(bsDefault.GetLength()); 150 FPDF_WIDESTRING pDefault = (FPDF_WIDESTRING)bsDefault.Ge tBuffer(bsDefault.GetLength());
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 return L""; 215 return L"";
216 } 216 }
217 CFX_ByteString bsRet = CFX_ByteString(pbuff, nActualLen) ; 217 CFX_ByteString bsRet = CFX_ByteString(pbuff, nActualLen) ;
218 CFX_WideString wsRet = CFX_WideString::FromLocal(bsRet); 218 CFX_WideString wsRet = CFX_WideString::FromLocal(bsRet);
219 delete[] pbuff; 219 delete[] pbuff;
220 return wsRet; 220 return wsRet;
221 } 221 }
222 return L""; 222 return L"";
223 } 223 }
224 224
225 » void JS_docSubmitForm(void* formData, int length, FX_LPCWSTR URL) 225 » void JS_docSubmitForm(void* formData, int length, const FX_WCHAR* URL)
226 { 226 {
227 if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform-> Doc_submitForm) 227 if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform-> Doc_submitForm)
228 { 228 {
229 CFX_ByteString bsDestination = CFX_WideString(URL).UTF16 LE_Encode(); 229 CFX_ByteString bsDestination = CFX_WideString(URL).UTF16 LE_Encode();
230 FPDF_WIDESTRING pDestination = (FPDF_WIDESTRING)bsDestin ation.GetBuffer(bsDestination.GetLength()); 230 FPDF_WIDESTRING pDestination = (FPDF_WIDESTRING)bsDestin ation.GetBuffer(bsDestination.GetLength());
231 m_pInfo->m_pJsPlatform->Doc_submitForm(m_pInfo->m_pJsPla tform, formData, length, pDestination); 231 m_pInfo->m_pJsPlatform->Doc_submitForm(m_pInfo->m_pJsPla tform, formData, length, pDestination);
232 bsDestination.ReleaseBuffer(); 232 bsDestination.ReleaseBuffer();
233 } 233 }
234 } 234 }
235 235
236 » void JS_docmailForm(void* mailData, int length, FPDF_BOOL bUI,FX_LPCWSTR To, FX_LPCWSTR Subject, FX_LPCWSTR CC, FX_LPCWSTR BCC, FX_LPCWSTR Msg) 236 » void JS_docmailForm(void* mailData, int length, FPDF_BOOL bUI,const FX_W CHAR* To, const FX_WCHAR* Subject, const FX_WCHAR* CC, const FX_WCHAR* BCC, cons t FX_WCHAR* Msg)
237 { 237 {
238 if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform-> Doc_mail) 238 if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform-> Doc_mail)
239 { 239 {
240 CFX_ByteString bsTo = CFX_WideString(To).UTF16LE_Encode( ); 240 CFX_ByteString bsTo = CFX_WideString(To).UTF16LE_Encode( );
241 CFX_ByteString bsCC = CFX_WideString(Subject).UTF16LE_En code(); 241 CFX_ByteString bsCC = CFX_WideString(Subject).UTF16LE_En code();
242 CFX_ByteString bsBcc = CFX_WideString(BCC).UTF16LE_Encod e(); 242 CFX_ByteString bsBcc = CFX_WideString(BCC).UTF16LE_Encod e();
243 CFX_ByteString bsSubject = CFX_WideString(Subject).UTF16 LE_Encode(); 243 CFX_ByteString bsSubject = CFX_WideString(Subject).UTF16 LE_Encode();
244 CFX_ByteString bsMsg = CFX_WideString(Msg).UTF16LE_Encod e(); 244 CFX_ByteString bsMsg = CFX_WideString(Msg).UTF16LE_Encod e();
245 FPDF_WIDESTRING pTo = (FPDF_WIDESTRING)bsTo.GetBuffer(bs To.GetLength()); 245 FPDF_WIDESTRING pTo = (FPDF_WIDESTRING)bsTo.GetBuffer(bs To.GetLength());
246 FPDF_WIDESTRING pCC = (FPDF_WIDESTRING)bsCC.GetBuffer(bs CC.GetLength()); 246 FPDF_WIDESTRING pCC = (FPDF_WIDESTRING)bsCC.GetBuffer(bs CC.GetLength());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 291 }
292 292
293 int FFI_GetRotation(FPDF_PAGE page) 293 int FFI_GetRotation(FPDF_PAGE page)
294 { 294 {
295 if(m_pInfo && m_pInfo->FFI_GetRotation) 295 if(m_pInfo && m_pInfo->FFI_GetRotation)
296 { 296 {
297 return m_pInfo->FFI_GetRotation(m_pInfo, page); 297 return m_pInfo->FFI_GetRotation(m_pInfo, page);
298 } 298 }
299 return 0; 299 return 0;
300 } 300 }
301 » void» FFI_ExecuteNamedAction(FX_LPCSTR namedAction) 301 » void» FFI_ExecuteNamedAction(const FX_CHAR* namedAction)
302 { 302 {
303 if(m_pInfo && m_pInfo->FFI_ExecuteNamedAction) 303 if(m_pInfo && m_pInfo->FFI_ExecuteNamedAction)
304 { 304 {
305 m_pInfo->FFI_ExecuteNamedAction(m_pInfo, namedAction); 305 m_pInfo->FFI_ExecuteNamedAction(m_pInfo, namedAction);
306 } 306 }
307 } 307 }
308 void FFI_OnSetFieldInputFocus(void* field,FPDF_WIDESTRING focusText, FPDF_DWORD nTextLen, FX_BOOL bFocus) 308 void FFI_OnSetFieldInputFocus(void* field,FPDF_WIDESTRING focusText, FPDF_DWORD nTextLen, FX_BOOL bFocus)
309 { 309 {
310 if(m_pInfo && m_pInfo->FFI_SetTextFieldFocus) 310 if(m_pInfo && m_pInfo->FFI_SetTextFieldFocus)
311 { 311 {
312 m_pInfo->FFI_SetTextFieldFocus(m_pInfo, focusText, nText Len, bFocus); 312 m_pInfo->FFI_SetTextFieldFocus(m_pInfo, focusText, nText Len, bFocus);
313 } 313 }
314 } 314 }
315 315
316 » void» FFI_DoURIAction(FX_LPCSTR bsURI) 316 » void» FFI_DoURIAction(const FX_CHAR* bsURI)
317 { 317 {
318 if(m_pInfo && m_pInfo->FFI_DoURIAction) 318 if(m_pInfo && m_pInfo->FFI_DoURIAction)
319 { 319 {
320 m_pInfo->FFI_DoURIAction(m_pInfo, bsURI); 320 m_pInfo->FFI_DoURIAction(m_pInfo, bsURI);
321 } 321 }
322 } 322 }
323 323
324 void FFI_DoGoToAction(int nPageIndex, int zoomMode, float* fPosArray, int sizeOfArray) 324 void FFI_DoGoToAction(int nPageIndex, int zoomMode, float* fPosArray, int sizeOfArray)
325 { 325 {
326 if(m_pInfo && m_pInfo->FFI_DoGoToAction) 326 if(m_pInfo && m_pInfo->FFI_DoGoToAction)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 CPDF_Annot* GetPDFAnnotAtPoi nt(FX_FLOAT pageX, FX_FLOAT pageY); 423 CPDF_Annot* GetPDFAnnotAtPoi nt(FX_FLOAT pageX, FX_FLOAT pageY);
424 CPDFSDK_Annot* GetFXAnnotAtPoint(FX_FLO AT pageX, FX_FLOAT pageY); 424 CPDFSDK_Annot* GetFXAnnotAtPoint(FX_FLO AT pageX, FX_FLOAT pageY);
425 CPDF_Annot* GetPDFWidgetAtPo int(FX_FLOAT pageX, FX_FLOAT pageY); 425 CPDF_Annot* GetPDFWidgetAtPo int(FX_FLOAT pageX, FX_FLOAT pageY);
426 CPDFSDK_Annot* GetFXWidgetAtPoint(FX_FL OAT pageX, FX_FLOAT pageY); 426 CPDFSDK_Annot* GetFXWidgetAtPoint(FX_FL OAT pageX, FX_FLOAT pageY);
427 CPDFSDK_Annot* GetFocusAnnot() ; 427 CPDFSDK_Annot* GetFocusAnnot() ;
428 void SetFocusAnnot(CP DFSDK_Annot* pSDKAnnot,FX_UINT nFlag = 0) {m_pSDKDoc->SetFocusAnnot(pSDKAnnot, n Flag);} 428 void SetFocusAnnot(CP DFSDK_Annot* pSDKAnnot,FX_UINT nFlag = 0) {m_pSDKDoc->SetFocusAnnot(pSDKAnnot, n Flag);}
429 FX_BOOL KillFocusAnnot(F X_UINT nFlag = 0) {return m_pSDKDoc->KillFocusAnnot(nFlag);} 429 FX_BOOL KillFocusAnnot(F X_UINT nFlag = 0) {return m_pSDKDoc->KillFocusAnnot(nFlag);}
430 FX_BOOL Annot_HasAppeara nce(CPDF_Annot* pAnnot); 430 FX_BOOL Annot_HasAppeara nce(CPDF_Annot* pAnnot);
431 431
432 CPDFSDK_Annot* AddAnnot(CPDF_Dictionary * pDict); 432 CPDFSDK_Annot* AddAnnot(CPDF_Dictionary * pDict);
433 » CPDFSDK_Annot*» » » » » AddAnnot(FX_LPCSTR lpSub Type,CPDF_Dictionary * pDict); 433 » CPDFSDK_Annot*» » » » » AddAnnot(const FX_CHAR* lpSubType,CPDF_Dictionary * pDict);
434 CPDFSDK_Annot* AddAnnot(CPDF_Annot * pP DFAnnot); 434 CPDFSDK_Annot* AddAnnot(CPDF_Annot * pP DFAnnot);
435 FX_BOOL DeleteAnnot(CPDFSDK_Anno t* pAnnot); 435 FX_BOOL DeleteAnnot(CPDFSDK_Anno t* pAnnot);
436 int CountAnn ots(); 436 int CountAnn ots();
437 CPDFSDK_Annot* GetAnnot(int nIndex); 437 CPDFSDK_Annot* GetAnnot(int nIndex);
438 CPDFSDK_Annot* GetAnnotByDict(CPDF_Dictiona ry * pDict); 438 CPDFSDK_Annot* GetAnnotByDict(CPDF_Dictiona ry * pDict);
439 CPDF_Page* GetPDFPage(){ret urn m_page;} 439 CPDF_Page* GetPDFPage(){ret urn m_page;}
440 CPDF_Document* GetPDFDocument(); 440 CPDF_Document* GetPDFDocument();
441 CPDFSDK_Document* GetSDKDocument() {return m_pSDKDoc;} 441 CPDFSDK_Document* GetSDKDocument() {return m_pSDKDoc;}
442 FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_UINT nFlag); 442 FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_UINT nFlag);
443 FX_BOOL OnLButtonUp(const CPDF_Point & p oint, FX_UINT nFlag); 443 FX_BOOL OnLButtonUp(const CPDF_Point & p oint, FX_UINT nFlag);
444 FX_BOOL OnChar(int nChar, FX_UINT nFlag) ; 444 FX_BOOL OnChar(int nChar, FX_UINT nFlag) ;
445 FX_BOOL OnKeyDown(int nKeyCode, int nFla g); 445 FX_BOOL OnKeyDown(int nKeyCode, int nFla g);
446 FX_BOOL OnKeyUp(int nKeyCode, int nFlag) ; 446 FX_BOOL OnKeyUp(int nKeyCode, int nFlag) ;
447 447
448 FX_BOOL OnMouseMove(const CPDF_Point & p oint, int nFlag); 448 FX_BOOL OnMouseMove(const CPDF_Point & p oint, int nFlag);
449 FX_BOOL OnMouseWheel(double deltaX, doub le deltaY,const CPDF_Point& point, int nFlag); 449 FX_BOOL OnMouseWheel(double deltaX, doub le deltaY,const CPDF_Point& point, int nFlag);
450 » FX_BOOL»» » » » IsValidAnnot(FX_LPVOID p); 450 » FX_BOOL»» » » » IsValidAnnot(void* p);
451 void GetCurrentMatrix(CPDF_Matrix& ma trix) {matrix = m_curMatrix;} 451 void GetCurrentMatrix(CPDF_Matrix& ma trix) {matrix = m_curMatrix;}
452 void UpdateRects(CFX_RectArray& rects ); 452 void UpdateRects(CFX_RectArray& rects );
453 void UpdateView(CPDFS DK_Annot* pAnnot); 453 void UpdateView(CPDFS DK_Annot* pAnnot);
454 CFX_PtrArray* GetAnnotList(){ return & m_fxAnnotArray; } 454 CFX_PtrArray* GetAnnotList(){ return & m_fxAnnotArray; }
455 455
456 int GetPageIndex(); 456 int GetPageIndex();
457 void LoadFXAnnots(); 457 void LoadFXAnnots();
458 458
459 void SetValid(FX_BOOL bValid) {m_bValid = bValid;} 459 void SetValid(FX_BOOL bValid) {m_bValid = bValid;}
460 FX_BOOL IsValid() {return m_bValid;} 460 FX_BOOL IsValid() {return m_bValid;}
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 j--; 553 j--;
554 } 554 }
555 } 555 }
556 556
557 if (nStartPos < m) QuickSort(nStartPos, m, bAscend, pCompare); 557 if (nStartPos < m) QuickSort(nStartPos, m, bAscend, pCompare);
558 if (nStopPos > m) QuickSort(m, nStopPos, bAscend, pCompare); 558 if (nStopPos > m) QuickSort(m, nStopPos, bAscend, pCompare);
559 } 559 }
560 }; 560 };
561 561
562 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ 562 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_baseform.h ('k') | fpdfsdk/include/fx_systemhandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698