| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DEV_PPP_PRINTING_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPP_PRINTING_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPP_PRINTING_DEV_H_ | 6 #define PPAPI_C_DEV_PPP_PRINTING_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_macros.h" | 10 #include "ppapi/c/pp_macros.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // Specifies a contiguous range of page numbers to be printed. | 40 // Specifies a contiguous range of page numbers to be printed. |
| 41 // The page numbers use a zero-based index. | 41 // The page numbers use a zero-based index. |
| 42 struct PP_PrintPageNumberRange_Dev { | 42 struct PP_PrintPageNumberRange_Dev { |
| 43 uint32_t first_page_number; | 43 uint32_t first_page_number; |
| 44 uint32_t last_page_number; | 44 uint32_t last_page_number; |
| 45 }; | 45 }; |
| 46 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PrintPageNumberRange_Dev, 8); | 46 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PrintPageNumberRange_Dev, 8); |
| 47 | 47 |
| 48 // Interface for the plugin to implement printing. | 48 // Interface for the plugin to implement printing. |
| 49 #define PPP_PRINTING_DEV_INTERFACE "PPP_Printing(Dev);0.2" | 49 #define PPP_PRINTING_DEV_INTERFACE "PPP_Printing(Dev);0.3" |
| 50 | 50 |
| 51 struct PPP_Printing_Dev { | 51 struct PPP_Printing_Dev { |
| 52 // Returns array of supported print output formats. The array is allocated | 52 // Returns array of supported print output formats. The array is allocated |
| 53 // using PPB_Core.MemAlloc. The caller is responsible for freeing the array | 53 // using PPB_Core.MemAlloc. The caller is responsible for freeing the array |
| 54 // using PPB_Core.MemFree. | 54 // using PPB_Core.MemFree. |
| 55 // Sets |*format_count| to 0 returns NULL if printing is not supported at all. | 55 // Sets |*format_count| to 0 returns NULL if printing is not supported at all. |
| 56 PP_PrintOutputFormat_Dev* (*QuerySupportedFormats)(PP_Instance instance, | 56 PP_PrintOutputFormat_Dev* (*QuerySupportedFormats)(PP_Instance instance, |
| 57 uint32_t* format_count); | 57 uint32_t* format_count); |
| 58 | 58 |
| 59 // Begins a print session with the given print settings. Calls to PrintPage | 59 // Begins a print session with the given print settings. Calls to PrintPage |
| (...skipping 10 matching lines...) Expand all Loading... |
| 70 PP_Resource (*PrintPages)( | 70 PP_Resource (*PrintPages)( |
| 71 PP_Instance instance, | 71 PP_Instance instance, |
| 72 const struct PP_PrintPageNumberRange_Dev* page_ranges, | 72 const struct PP_PrintPageNumberRange_Dev* page_ranges, |
| 73 uint32_t page_range_count); | 73 uint32_t page_range_count); |
| 74 | 74 |
| 75 // Ends the print session. Further calls to PrintPage will fail. | 75 // Ends the print session. Further calls to PrintPage will fail. |
| 76 void (*End)(PP_Instance instance); | 76 void (*End)(PP_Instance instance); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 #endif // PPAPI_C_DEV_PPP_PRINTING_DEV_H_ | 79 #endif // PPAPI_C_DEV_PPP_PRINTING_DEV_H_ |
| OLD | NEW |