OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium 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 #ifndef PPAPI_C_PRIVATE_PPP_PDF_H_ | 5 #ifndef PPAPI_C_PRIVATE_PPP_PDF_H_ |
6 #define PPAPI_C_PRIVATE_PPP_PDF_H_ | 6 #define PPAPI_C_PRIVATE_PPP_PDF_H_ |
7 | 7 |
| 8 #include "ppapi/c/dev/pp_print_settings_dev.h" |
8 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
9 #include "ppapi/c/pp_point.h" | 10 #include "ppapi/c/pp_point.h" |
10 #include "ppapi/c/pp_var.h" | 11 #include "ppapi/c/pp_var.h" |
11 | 12 |
12 #define PPP_PDF_INTERFACE_1 "PPP_Pdf;1" | 13 #define PPP_PDF_INTERFACE_1 "PPP_Pdf;1" |
13 #define PPP_PDF_INTERFACE PPP_PDF_INTERFACE_1 | 14 #define PPP_PDF_INTERFACE PPP_PDF_INTERFACE_1 |
14 | 15 |
15 typedef enum { | 16 typedef enum { |
16 // Rotates the page 90 degrees clockwise from its current orientation. | 17 // Rotates the page 90 degrees clockwise from its current orientation. |
17 PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CW, | 18 PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CW, |
18 // Rotates the page 90 degrees counterclockwise from its current orientation. | 19 // Rotates the page 90 degrees counterclockwise from its current orientation. |
19 PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CCW | 20 PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CCW |
20 } PP_PrivatePageTransformType; | 21 } PP_PrivatePageTransformType; |
21 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrivatePageTransformType, 4); | 22 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrivatePageTransformType, 4); |
22 | 23 |
23 struct PPP_Pdf_1 { | 24 struct PP_PdfPrintPresetOptions_Dev { |
| 25 // Returns whether scaling is disabled. Returns same information as the |
| 26 // PPP_Printing_Dev's method IsScalingDiabled(). |
| 27 PP_Bool is_scaling_disabled; |
| 28 |
| 29 // Number of copies to be printed. |
| 30 int32_t copies; |
| 31 |
| 32 // DuplexMode to be used for printing. |
| 33 PP_PrintDuplexMode_Dev duplex; |
| 34 |
| 35 // Page range to be used for printing. |
| 36 struct PP_PrintRange_Dev page_range; |
| 37 int32_t page_range_count; |
| 38 }; |
| 39 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PdfPrintPresetOptions_Dev, 24); |
| 40 |
| 41 struct PPP_Pdf_1_1 { |
24 // Returns an absolute URL if the position is over a link. | 42 // Returns an absolute URL if the position is over a link. |
25 PP_Var (*GetLinkAtPosition)(PP_Instance instance, | 43 PP_Var (*GetLinkAtPosition)(PP_Instance instance, |
26 PP_Point point); | 44 PP_Point point); |
27 | 45 |
28 // Requests that the plugin apply the given transform to its view. | 46 // Requests that the plugin apply the given transform to its view. |
29 void (*Transform)(PP_Instance instance, PP_PrivatePageTransformType type); | 47 void (*Transform)(PP_Instance instance, PP_PrivatePageTransformType type); |
| 48 |
| 49 // Return true if print preset options are updated from document. |
| 50 PP_Bool (*GetPrintPresetOptionsFromDocument)( |
| 51 PP_Instance instance, |
| 52 PP_PdfPrintPresetOptions_Dev* options); |
30 }; | 53 }; |
31 | 54 |
32 typedef PPP_Pdf_1 PPP_Pdf; | 55 typedef PPP_Pdf_1_1 PPP_Pdf; |
33 | 56 |
34 #endif // PPAPI_C_PRIVATE_PPP_PDF_H_ | 57 #endif // PPAPI_C_PRIVATE_PPP_PDF_H_ |
OLD | NEW |