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

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

Issue 423953002: Tidy up app::response(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Wordsmith Created 6 years, 4 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 | « no previous file | fpdfsdk/src/javascript/app.cpp » ('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 7
8 #ifndef _FPDFORMFILL_H 8 #ifndef _FPDFORMFILL_H
9 #define _FPDFORMFILL_H 9 #define _FPDFORMFILL_H
10 #include "fpdfview.h" 10 #include "fpdfview.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 * nType - The sound type. 65 * nType - The sound type.
66 * 0 - Error 66 * 0 - Error
67 * 1 - Warning 67 * 1 - Warning
68 * 2 - Question 68 * 2 - Question
69 * 3 - Status 69 * 3 - Status
70 * 4 - Default (def ault value) 70 * 4 - Default (def ault value)
71 * Return Value: 71 * Return Value:
72 * None 72 * None
73 */ 73 */
74 void (*app_beep)(struct _IPDF_JsPlatform* pThis, int nType); 74 void (*app_beep)(struct _IPDF_JsPlatform* pThis, int nType);
75 » 75
76 »
77 /** 76 /**
78 * Method: app_response 77 * Method: app_response
79 » *» » » Displays a dialog box containing a question and an entry field for the user to reply to the question. 78 » *» » » Displays a dialog box containing a question and an entry field for the user to reply to the question.
80 * Interface Version: 79 * Interface Version:
81 * 1 80 * 1
82 * Implementation Required: 81 * Implementation Required:
83 * yes 82 * yes
84 * Parameters: 83 * Parameters:
85 * pThis - Pointer to the interface structure itself 84 * pThis - Pointer to the interface structure itself
86 * Question - The question to be posed to the user. 85 * Question - The question to be posed to the user.
87 * Title - The title of the dialog box. 86 * Title - The title of the dialog box.
88 * Default - A default value for the answer to the question. If not specified, no default value is presented. 87 * Default - A default value for the answer to the question. If not specified, no default value is presented.
89 » *» » » cLabel» » -» A short string to appear in front of and on the same line as the edit text field. 88 » *» » » cLabel» » -» A short string to appear in front of and on the same line as the edit text field.
90 » *» » » bPassword» -» If true, indicates that the user's response should show as asterisks (*) or bullets (?) to mask the resp onse, which might be sensitive information. The default is false.» » 89 » *» » » bPassword» -» If true, indicates that the user's response should show as asterisks (*) or bullets (?) to mask the resp onse, which might be sensitive information. The default is false.
91 » *» » » response» -» A string buffer allocate d by SDK, to receive the user's response. 90 » *» » » response» -» A string buffer allocate d by SDK, to receive the user's response.
92 * length - The length of the buffer, nu mber of bytes. Currently, It's always be 2048. 91 * length - The length of the buffer, nu mber of bytes. Currently, It's always be 2048.
93 * Return Value: 92 * Return Value:
94 » *» » » Number of bytes the user input text consumes, no t including trailing zeros. If the text exceed 2048 bytes, 93 » *» » Number of bytes the complete user input would actually r equire, not including trailing zeros, regardless of the value of the length
95 » *» » » the exceeded part will be ignored. 94 » *» » parameter or the presence of the response buffer.
96 * Comments: 95 * Comments:
97 » *» » » No matter on what platform, the response should be always input in UTF-16LE encoding. 96 » *» » No matter on what platform, the response buffer should b e always written using UTF-16LE encoding. If a response buffer is
98 » *» » » The return value always indicated number of byte s required for the buffer, even when there is 97 » *» » present and the size of the user input exceeds the capac ity of the buffer as specified by the length parameter, only the
99 » *» » » no buffer specified, or the buffer size is less then required. In this case, the buffer will not 98 » *» » first "length" bytes of the user input are to be written to the buffer.
100 » *» » » be modified.
101 */ 99 */
102 int (*app_response)(struct _IPDF_JsPlatform* pThis, FPDF_WIDESTRING Ques tion, FPDF_WIDESTRING Title, FPDF_WIDESTRING Default, FPDF_WIDESTRING cLabel, FP DF_BOOL bPassword, void* response, int length); 100 int (*app_response)(struct _IPDF_JsPlatform* pThis, FPDF_WIDESTRING Ques tion, FPDF_WIDESTRING Title, FPDF_WIDESTRING Default, FPDF_WIDESTRING cLabel, FP DF_BOOL bPassword, void* response, int length);
103 » 101
104 »
105 »
106 /* 102 /*
107 * Method: Doc_getFilePath 103 * Method: Doc_getFilePath
108 * Get the file path of the current document. 104 * Get the file path of the current document.
109 * Interface Version: 105 * Interface Version:
110 * 1 106 * 1
111 * Implementation Required: 107 * Implementation Required:
112 * yes 108 * yes
113 * Parameters: 109 * Parameters:
114 * pThis - Pointer to the interface structure itself 110 * pThis - Pointer to the interface structure itself
115 * filePath - The string buffer to rec eive the file path. Can be NULL. 111 * filePath - The string buffer to rec eive the file path. Can be NULL.
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 int size_x, int size_y, int rota te, int flags); 828 int size_x, int size_y, int rota te, int flags);
833 829
834 830
835 831
836 #ifdef __cplusplus 832 #ifdef __cplusplus
837 }; 833 };
838 #endif 834 #endif
839 835
840 #endif //_FPDFORMFILL_H 836 #endif //_FPDFORMFILL_H
841 837
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/app.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698