]> git.sesse.net Git - casparcg/blob - dependencies64/cef/include/capi/cef_print_settings_capi.h
* Merged html producer and updated to latest CEF version (does not have satisfactory...
[casparcg] / dependencies64 / cef / include / capi / cef_print_settings_capi.h
1 // Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
5 // met:
6 //
7 //    * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 //    * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer
11 // in the documentation and/or other materials provided with the
12 // distribution.
13 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14 // Framework nor the names of its contributors may be used to endorse
15 // or promote products derived from this software without specific prior
16 // written permission.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // ---------------------------------------------------------------------------
31 //
32 // This file was generated by the CEF translator tool and should not edited
33 // by hand. See the translator.README.txt file in the tools directory for
34 // more information.
35 //
36
37 #ifndef CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_
38 #define CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_
39 #pragma once
40
41 #include "include/capi/cef_base_capi.h"
42
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47
48 ///
49 // Structure representing print settings.
50 ///
51 typedef struct _cef_print_settings_t {
52   ///
53   // Base structure.
54   ///
55   cef_base_t base;
56
57   ///
58   // Returns true (1) if this object is valid. Do not call any other functions
59   // if this function returns false (0).
60   ///
61   int (CEF_CALLBACK *is_valid)(struct _cef_print_settings_t* self);
62
63   ///
64   // Returns true (1) if the values of this object are read-only. Some APIs may
65   // expose read-only objects.
66   ///
67   int (CEF_CALLBACK *is_read_only)(struct _cef_print_settings_t* self);
68
69   ///
70   // Returns a writable copy of this object.
71   ///
72   struct _cef_print_settings_t* (CEF_CALLBACK *copy)(
73       struct _cef_print_settings_t* self);
74
75   ///
76   // Set the page orientation.
77   ///
78   void (CEF_CALLBACK *set_orientation)(struct _cef_print_settings_t* self,
79       int landscape);
80
81   ///
82   // Returns true (1) if the orientation is landscape.
83   ///
84   int (CEF_CALLBACK *is_landscape)(struct _cef_print_settings_t* self);
85
86   ///
87   // Set the printer printable area in device units. Some platforms already
88   // provide flipped area. Set |landscape_needs_flip| to false (0) on those
89   // platforms to avoid double flipping.
90   ///
91   void (CEF_CALLBACK *set_printer_printable_area)(
92       struct _cef_print_settings_t* self,
93       const cef_size_t* physical_size_device_units,
94       const cef_rect_t* printable_area_device_units,
95       int landscape_needs_flip);
96
97   ///
98   // Set the device name.
99   ///
100   void (CEF_CALLBACK *set_device_name)(struct _cef_print_settings_t* self,
101       const cef_string_t* name);
102
103   ///
104   // Get the device name.
105   ///
106   // The resulting string must be freed by calling cef_string_userfree_free().
107   cef_string_userfree_t (CEF_CALLBACK *get_device_name)(
108       struct _cef_print_settings_t* self);
109
110   ///
111   // Set the DPI (dots per inch).
112   ///
113   void (CEF_CALLBACK *set_dpi)(struct _cef_print_settings_t* self, int dpi);
114
115   ///
116   // Get the DPI (dots per inch).
117   ///
118   int (CEF_CALLBACK *get_dpi)(struct _cef_print_settings_t* self);
119
120   ///
121   // Set the page ranges.
122   ///
123   void (CEF_CALLBACK *set_page_ranges)(struct _cef_print_settings_t* self,
124       size_t rangesCount, cef_page_range_t const* ranges);
125
126   ///
127   // Returns the number of page ranges that currently exist.
128   ///
129   size_t (CEF_CALLBACK *get_page_ranges_count)(
130       struct _cef_print_settings_t* self);
131
132   ///
133   // Retrieve the page ranges.
134   ///
135   void (CEF_CALLBACK *get_page_ranges)(struct _cef_print_settings_t* self,
136       size_t* rangesCount, cef_page_range_t* ranges);
137
138   ///
139   // Set whether only the selection will be printed.
140   ///
141   void (CEF_CALLBACK *set_selection_only)(struct _cef_print_settings_t* self,
142       int selection_only);
143
144   ///
145   // Returns true (1) if only the selection will be printed.
146   ///
147   int (CEF_CALLBACK *is_selection_only)(struct _cef_print_settings_t* self);
148
149   ///
150   // Set whether pages will be collated.
151   ///
152   void (CEF_CALLBACK *set_collate)(struct _cef_print_settings_t* self,
153       int collate);
154
155   ///
156   // Returns true (1) if pages will be collated.
157   ///
158   int (CEF_CALLBACK *will_collate)(struct _cef_print_settings_t* self);
159
160   ///
161   // Set the color model.
162   ///
163   void (CEF_CALLBACK *set_color_model)(struct _cef_print_settings_t* self,
164       cef_color_model_t model);
165
166   ///
167   // Get the color model.
168   ///
169   cef_color_model_t (CEF_CALLBACK *get_color_model)(
170       struct _cef_print_settings_t* self);
171
172   ///
173   // Set the number of copies.
174   ///
175   void (CEF_CALLBACK *set_copies)(struct _cef_print_settings_t* self,
176       int copies);
177
178   ///
179   // Get the number of copies.
180   ///
181   int (CEF_CALLBACK *get_copies)(struct _cef_print_settings_t* self);
182
183   ///
184   // Set the duplex mode.
185   ///
186   void (CEF_CALLBACK *set_duplex_mode)(struct _cef_print_settings_t* self,
187       cef_duplex_mode_t mode);
188
189   ///
190   // Get the duplex mode.
191   ///
192   cef_duplex_mode_t (CEF_CALLBACK *get_duplex_mode)(
193       struct _cef_print_settings_t* self);
194 } cef_print_settings_t;
195
196
197 ///
198 // Create a new cef_print_settings_t object.
199 ///
200 CEF_EXPORT cef_print_settings_t* cef_print_settings_create();
201
202
203 #ifdef __cplusplus
204 }
205 #endif
206
207 #endif  // CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_