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
3 * found in the LICENSE file.
6 /* From dev/pp_print_settings_dev.idl modified Wed Jun 13 09:14:31 2012. */
8 #ifndef PPAPI_C_DEV_PP_PRINT_SETTINGS_DEV_H_
9 #define PPAPI_C_DEV_PP_PRINT_SETTINGS_DEV_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_point.h"
14 #include "ppapi/c/pp_rect.h"
15 #include "ppapi/c/pp_size.h"
16 #include "ppapi/c/pp_stdint.h"
20 * This file defines the struct for PrintSettings.
29 PP_PRINTORIENTATION_NORMAL
= 0,
30 PP_PRINTORIENTATION_ROTATED_90_CW
= 1,
31 PP_PRINTORIENTATION_ROTATED_180
= 2,
32 PP_PRINTORIENTATION_ROTATED_90_CCW
= 3
33 } PP_PrintOrientation_Dev
;
34 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintOrientation_Dev
, 4);
37 PP_PRINTOUTPUTFORMAT_RASTER
= 1u << 0,
38 PP_PRINTOUTPUTFORMAT_PDF
= 1u << 1,
39 PP_PRINTOUTPUTFORMAT_POSTSCRIPT
= 1u << 2,
40 PP_PRINTOUTPUTFORMAT_EMF
= 1u << 3
41 } PP_PrintOutputFormat_Dev
;
42 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintOutputFormat_Dev
, 4);
45 PP_PRINTSCALINGOPTION_NONE
= 0,
46 PP_PRINTSCALINGOPTION_FIT_TO_PRINTABLE_AREA
= 1,
47 PP_PRINTSCALINGOPTION_SOURCE_SIZE
= 2
48 } PP_PrintScalingOption_Dev
;
49 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintScalingOption_Dev
, 4);
52 PP_PRINTDUPLEXMODE_NONE
= 0,
53 PP_PRINTDUPLEXMODE_SIMPLEX
= 1,
54 PP_PRINTDUPLEXMODE_LONG_EDGE
= 2,
55 PP_PRINTDUPLEXMODE_SHORT_EDGE
= 3
56 } PP_PrintDuplexMode_Dev
;
57 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintDuplexMode_Dev
, 4);
66 struct PP_PrintSettings_Dev
{
67 /** This is the size of the printable area in points (1/72 of an inch). */
68 struct PP_Rect printable_area
;
69 struct PP_Rect content_area
;
70 struct PP_Size paper_size
;
72 PP_PrintOrientation_Dev orientation
;
73 PP_PrintScalingOption_Dev print_scaling_option
;
75 /** Note that Chrome currently only supports PDF printing. */
76 PP_PrintOutputFormat_Dev format
;
78 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PrintSettings_Dev
, 60);
80 struct PP_PrintRange_Dev
{
84 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PrintRange_Dev
, 8);
89 #endif /* PPAPI_C_DEV_PP_PRINT_SETTINGS_DEV_H_ */