| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 | 5 |
| 6 /* From dev/ppp_printing_dev.idl modified Wed Feb 22 12:44:39 2012. */ | 6 /* From dev/ppp_printing_dev.idl modified Wed Apr 11 22:18:13 2012. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_DEV_PPP_PRINTING_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPP_PRINTING_DEV_H_ |
| 9 #define PPAPI_C_DEV_PPP_PRINTING_DEV_H_ | 9 #define PPAPI_C_DEV_PPP_PRINTING_DEV_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_point.h" | 14 #include "ppapi/c/pp_point.h" |
| 15 #include "ppapi/c/pp_rect.h" | 15 #include "ppapi/c/pp_rect.h" |
| 16 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 32 */ | 32 */ |
| 33 typedef enum { | 33 typedef enum { |
| 34 PP_PRINTORIENTATION_NORMAL = 0, | 34 PP_PRINTORIENTATION_NORMAL = 0, |
| 35 PP_PRINTORIENTATION_ROTATED_90_CW = 1, | 35 PP_PRINTORIENTATION_ROTATED_90_CW = 1, |
| 36 PP_PRINTORIENTATION_ROTATED_180 = 2, | 36 PP_PRINTORIENTATION_ROTATED_180 = 2, |
| 37 PP_PRINTORIENTATION_ROTATED_90_CCW = 3 | 37 PP_PRINTORIENTATION_ROTATED_90_CCW = 3 |
| 38 } PP_PrintOrientation_Dev; | 38 } PP_PrintOrientation_Dev; |
| 39 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintOrientation_Dev, 4); | 39 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintOrientation_Dev, 4); |
| 40 | 40 |
| 41 typedef enum { | 41 typedef enum { |
| 42 PP_PRINTOUTPUTFORMAT_RASTER = 1u << 0, | |
| 43 PP_PRINTOUTPUTFORMAT_PDF = 1u << 1, | 42 PP_PRINTOUTPUTFORMAT_PDF = 1u << 1, |
| 44 PP_PRINTOUTPUTFORMAT_POSTSCRIPT = 1u << 2, | 43 PP_PRINTOUTPUTFORMAT_POSTSCRIPT = 1u << 2, |
| 45 PP_PRINTOUTPUTFORMAT_EMF = 1u << 3 | 44 PP_PRINTOUTPUTFORMAT_EMF = 1u << 3 |
| 46 } PP_PrintOutputFormat_Dev; | 45 } PP_PrintOutputFormat_Dev; |
| 47 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintOutputFormat_Dev, 4); | 46 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintOutputFormat_Dev, 4); |
| 48 /** | 47 /** |
| 49 * @} | 48 * @} |
| 50 */ | 49 */ |
| 51 | 50 |
| 52 /** | 51 /** |
| (...skipping 23 matching lines...) Expand all Loading... |
| 76 * @} | 75 * @} |
| 77 */ | 76 */ |
| 78 | 77 |
| 79 /** | 78 /** |
| 80 * @addtogroup Interfaces | 79 * @addtogroup Interfaces |
| 81 * @{ | 80 * @{ |
| 82 */ | 81 */ |
| 83 struct PPP_Printing_Dev_0_5 { | 82 struct PPP_Printing_Dev_0_5 { |
| 84 /** | 83 /** |
| 85 * Returns a bit field representing the supported print output formats. For | 84 * Returns a bit field representing the supported print output formats. For |
| 86 * example, if only Raster and PostScript are supported, | 85 * example, if only PDF and PostScript are supported, |
| 87 * QuerySupportedFormats returns a value equivalent to: | 86 * QuerySupportedFormats returns a value equivalent to: |
| 88 * (PP_PRINTOUTPUTFORMAT_RASTER | PP_PRINTOUTPUTFORMAT_POSTSCRIPT) | 87 * (PP_PRINTOUTPUTFORMAT_PDF | PP_PRINTOUTPUTFORMAT_POSTSCRIPT) |
| 89 */ | 88 */ |
| 90 uint32_t (*QuerySupportedFormats)(PP_Instance instance); | 89 uint32_t (*QuerySupportedFormats)(PP_Instance instance); |
| 91 /** | 90 /** |
| 92 * Begins a print session with the given print settings. Calls to PrintPage | 91 * Begins a print session with the given print settings. Calls to PrintPage |
| 93 * can only be made after a successful call to Begin. Returns the number of | 92 * can only be made after a successful call to Begin. Returns the number of |
| 94 * pages required for the print output at the given page size (0 indicates | 93 * pages required for the print output at the given page size (0 indicates |
| 95 * a failure). | 94 * a failure). |
| 96 */ | 95 */ |
| 97 int32_t (*Begin)(PP_Instance instance, | 96 int32_t (*Begin)(PP_Instance instance, |
| 98 const struct PP_PrintSettings_Dev* print_settings); | 97 const struct PP_PrintSettings_Dev* print_settings); |
| 99 /** | 98 /** |
| 100 * Prints the specified pages using the format specified in Begin. | 99 * Prints the specified pages using the format specified in Begin. |
| 101 * Returns a resource that represents the printed output. | 100 * Returns a PPB_Buffer resource that represents the printed output. Returns |
| 102 * This is a PPB_ImageData resource if the output format is | 101 * 0 on failure. |
| 103 * PP_PrintOutputFormat_Raster and a PPB_Buffer otherwise. Returns 0 on | |
| 104 * failure. | |
| 105 */ | 102 */ |
| 106 PP_Resource (*PrintPages)( | 103 PP_Resource (*PrintPages)( |
| 107 PP_Instance instance, | 104 PP_Instance instance, |
| 108 const struct PP_PrintPageNumberRange_Dev* page_ranges, | 105 const struct PP_PrintPageNumberRange_Dev* page_ranges, |
| 109 uint32_t page_range_count); | 106 uint32_t page_range_count); |
| 110 /** Ends the print session. Further calls to PrintPage will fail. */ | 107 /** Ends the print session. Further calls to PrintPage will fail. */ |
| 111 void (*End)(PP_Instance instance); | 108 void (*End)(PP_Instance instance); |
| 112 /** | 109 /** |
| 113 * Returns true if the current content should be printed into the full page | 110 * Returns true if the current content should be printed into the full page |
| 114 * and not scaled down to fit within the printer's printable area. | 111 * and not scaled down to fit within the printer's printable area. |
| 115 */ | 112 */ |
| 116 PP_Bool (*IsScalingDisabled)(PP_Instance instance); | 113 PP_Bool (*IsScalingDisabled)(PP_Instance instance); |
| 117 }; | 114 }; |
| 118 | 115 |
| 119 typedef struct PPP_Printing_Dev_0_5 PPP_Printing_Dev; | 116 typedef struct PPP_Printing_Dev_0_5 PPP_Printing_Dev; |
| 120 /** | 117 /** |
| 121 * @} | 118 * @} |
| 122 */ | 119 */ |
| 123 | 120 |
| 124 #endif /* PPAPI_C_DEV_PPP_PRINTING_DEV_H_ */ | 121 #endif /* PPAPI_C_DEV_PPP_PRINTING_DEV_H_ */ |
| 125 | 122 |
| OLD | NEW |