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 Fri Jan 16 13:30:14 2015. */
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);
58 struct PP_PrintSettings_Dev
{
59 /** This is the size of the printable area in points (1/72 of an inch). */
60 struct PP_Rect printable_area
;
61 struct PP_Rect content_area
;
62 struct PP_Size paper_size
;
64 PP_PrintOrientation_Dev orientation
;
65 PP_PrintScalingOption_Dev print_scaling_option
;
67 /** Note that Chrome currently only supports PDF printing. */
68 PP_PrintOutputFormat_Dev format
;
70 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PrintSettings_Dev
, 60);
75 #endif /* PPAPI_C_DEV_PP_PRINT_SETTINGS_DEV_H_ */