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

Side by Side Diff: ppapi/c/dev/ppp_printing_dev.h

Issue 10544085: Added PPB function to return default print settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
OLDNEW
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 Tue May 15 15:17:01 2012. */ 6 /* From dev/ppp_printing_dev.idl modified Fri Jun 8 15:54:52 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/dev/pp_print_settings_dev.h"
11 #include "ppapi/c/pp_bool.h" 12 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h" 14 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_point.h" 15 #include "ppapi/c/pp_point.h"
15 #include "ppapi/c/pp_rect.h" 16 #include "ppapi/c/pp_rect.h"
16 #include "ppapi/c/pp_resource.h" 17 #include "ppapi/c/pp_resource.h"
17 #include "ppapi/c/pp_size.h" 18 #include "ppapi/c/pp_size.h"
18 #include "ppapi/c/pp_stdint.h" 19 #include "ppapi/c/pp_stdint.h"
19 20
20 #define PPP_PRINTING_DEV_INTERFACE_0_6 "PPP_Printing(Dev);0.6" 21 #define PPP_PRINTING_DEV_INTERFACE_0_6 "PPP_Printing(Dev);0.6"
21 #define PPP_PRINTING_DEV_INTERFACE PPP_PRINTING_DEV_INTERFACE_0_6 22 #define PPP_PRINTING_DEV_INTERFACE PPP_PRINTING_DEV_INTERFACE_0_6
22 23
23 /** 24 /**
24 * @file 25 * @file
25 * Implementation of the Printing interface. 26 * Implementation of the Printing interface.
26 */ 27 */
27 28
28 29
29 /** 30 /**
30 * @addtogroup Enums
31 * @{
32 */
33 typedef enum {
34 PP_PRINTORIENTATION_NORMAL = 0,
35 PP_PRINTORIENTATION_ROTATED_90_CW = 1,
36 PP_PRINTORIENTATION_ROTATED_180 = 2,
37 PP_PRINTORIENTATION_ROTATED_90_CCW = 3
38 } PP_PrintOrientation_Dev;
39 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintOrientation_Dev, 4);
40
41 typedef enum {
42 PP_PRINTOUTPUTFORMAT_RASTER = 1u << 0,
43 PP_PRINTOUTPUTFORMAT_PDF = 1u << 1,
44 PP_PRINTOUTPUTFORMAT_POSTSCRIPT = 1u << 2,
45 PP_PRINTOUTPUTFORMAT_EMF = 1u << 3
46 } PP_PrintOutputFormat_Dev;
47 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintOutputFormat_Dev, 4);
48
49 typedef enum {
50 PP_PRINTSCALINGOPTION_NONE = 0,
51 PP_PRINTSCALINGOPTION_FIT_TO_PRINTABLE_AREA = 1,
52 PP_PRINTSCALINGOPTION_SOURCE_SIZE = 2
53 } PP_PrintScalingOption_Dev;
54 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintScalingOption_Dev, 4);
55 /**
56 * @}
57 */
58
59 /**
60 * @addtogroup Structs 31 * @addtogroup Structs
61 * @{ 32 * @{
62 */ 33 */
63 struct PP_PrintSettings_Dev {
64 /** This is the size of the printable area in points (1/72 of an inch) */
65 struct PP_Rect printable_area;
66 struct PP_Rect content_area;
67 struct PP_Size paper_size;
68 int32_t dpi;
69 PP_PrintOrientation_Dev orientation;
70 PP_PrintScalingOption_Dev print_scaling_option;
71 PP_Bool grayscale;
72 /** Note that Chrome currently only supports PDF printing. */
73 PP_PrintOutputFormat_Dev format;
74 };
75 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PrintSettings_Dev, 60);
76
77 /** 34 /**
78 * Specifies a contiguous range of page numbers to be printed. 35 * Specifies a contiguous range of page numbers to be printed.
79 * The page numbers use a zero-based index. 36 * The page numbers use a zero-based index.
80 */ 37 */
81 struct PP_PrintPageNumberRange_Dev { 38 struct PP_PrintPageNumberRange_Dev {
82 uint32_t first_page_number; 39 uint32_t first_page_number;
83 uint32_t last_page_number; 40 uint32_t last_page_number;
84 }; 41 };
85 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PrintPageNumberRange_Dev, 8); 42 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PrintPageNumberRange_Dev, 8);
86 /** 43 /**
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 PP_Bool (*IsScalingDisabled)(PP_Instance instance); 82 PP_Bool (*IsScalingDisabled)(PP_Instance instance);
126 }; 83 };
127 84
128 typedef struct PPP_Printing_Dev_0_6 PPP_Printing_Dev; 85 typedef struct PPP_Printing_Dev_0_6 PPP_Printing_Dev;
129 /** 86 /**
130 * @} 87 * @}
131 */ 88 */
132 89
133 #endif /* PPAPI_C_DEV_PPP_PRINTING_DEV_H_ */ 90 #endif /* PPAPI_C_DEV_PPP_PRINTING_DEV_H_ */
134 91
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698