2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2014-07-10 17:41:30 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2024-01-05 19:03:36 +01:00
|
|
|
// $hash=05dab6ef5ea0be5caa908b8ba26bafdb4ac23579$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/print_settings_cpptoc.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2017-05-19 11:06:00 +02:00
|
|
|
#include <algorithm>
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
CEF_EXPORT cef_print_settings_t* cef_print_settings_create() {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefPrintSettings> _retval = CefPrintSettings::Create();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefPrintSettingsCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
namespace {
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
int CEF_CALLBACK print_settings_is_valid(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefPrintSettingsCppToC::Get(self)->IsValid();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
print_settings_is_read_only(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefPrintSettingsCppToC::Get(self)->IsReadOnly();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
print_settings_set_orientation(struct _cef_print_settings_t* self,
|
|
|
|
int landscape) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPrintSettingsCppToC::Get(self)->SetOrientation(landscape ? true : false);
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
print_settings_is_landscape(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefPrintSettingsCppToC::Get(self)->IsLandscape();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK print_settings_set_printer_printable_area(
|
|
|
|
struct _cef_print_settings_t* self,
|
|
|
|
const cef_size_t* physical_size_device_units,
|
2017-05-17 11:29:28 +02:00
|
|
|
const cef_rect_t* printable_area_device_units,
|
|
|
|
int landscape_needs_flip) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
// Verify param: physical_size_device_units; type: simple_byref_const
|
|
|
|
DCHECK(physical_size_device_units);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!physical_size_device_units) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
// Verify param: printable_area_device_units; type: simple_byref_const
|
|
|
|
DCHECK(printable_area_device_units);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!printable_area_device_units) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Translate param: physical_size_device_units; type: simple_byref_const
|
|
|
|
CefSize physical_size_device_unitsVal =
|
2017-05-17 11:29:28 +02:00
|
|
|
physical_size_device_units ? *physical_size_device_units : CefSize();
|
2014-07-10 17:41:30 +02:00
|
|
|
// Translate param: printable_area_device_units; type: simple_byref_const
|
|
|
|
CefRect printable_area_device_unitsVal =
|
2017-05-17 11:29:28 +02:00
|
|
|
printable_area_device_units ? *printable_area_device_units : CefRect();
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefPrintSettingsCppToC::Get(self)->SetPrinterPrintableArea(
|
2017-05-17 11:29:28 +02:00
|
|
|
physical_size_device_unitsVal, printable_area_device_unitsVal,
|
|
|
|
landscape_needs_flip ? true : false);
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
print_settings_set_device_name(struct _cef_print_settings_t* self,
|
|
|
|
const cef_string_t* name) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
// Unverified params: name
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPrintSettingsCppToC::Get(self)->SetDeviceName(CefString(name));
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_userfree_t CEF_CALLBACK
|
|
|
|
print_settings_get_device_name(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return NULL;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefString _retval = CefPrintSettingsCppToC::Get(self)->GetDeviceName();
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK print_settings_set_dpi(struct _cef_print_settings_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
int dpi) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPrintSettingsCppToC::Get(self)->SetDPI(dpi);
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int CEF_CALLBACK print_settings_get_dpi(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
int _retval = CefPrintSettingsCppToC::Get(self)->GetDPI();
|
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
print_settings_set_page_ranges(struct _cef_print_settings_t* self,
|
|
|
|
size_t rangesCount,
|
|
|
|
cef_range_t const* ranges) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
// Verify param: ranges; type: simple_vec_byref_const
|
|
|
|
DCHECK(rangesCount == 0 || ranges);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (rangesCount > 0 && !ranges) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Translate param: ranges; type: simple_vec_byref_const
|
2017-05-17 11:29:28 +02:00
|
|
|
std::vector<CefRange> rangesList;
|
2014-07-10 17:41:30 +02:00
|
|
|
if (rangesCount > 0) {
|
|
|
|
for (size_t i = 0; i < rangesCount; ++i) {
|
2016-01-19 21:09:01 +01:00
|
|
|
CefRange rangesVal = ranges[i];
|
2015-06-06 00:06:48 +02:00
|
|
|
rangesList.push_back(rangesVal);
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPrintSettingsCppToC::Get(self)->SetPageRanges(rangesList);
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t CEF_CALLBACK
|
|
|
|
print_settings_get_page_ranges_count(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
size_t _retval = CefPrintSettingsCppToC::Get(self)->GetPageRangesCount();
|
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
print_settings_get_page_ranges(struct _cef_print_settings_t* self,
|
|
|
|
size_t* rangesCount,
|
|
|
|
cef_range_t* ranges) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
// Verify param: ranges; type: simple_vec_byref
|
|
|
|
DCHECK(rangesCount && (*rangesCount == 0 || ranges));
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!rangesCount || (*rangesCount > 0 && !ranges)) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Translate param: ranges; type: simple_vec_byref
|
2017-05-17 11:29:28 +02:00
|
|
|
std::vector<CefRange> rangesList;
|
2014-07-10 17:41:30 +02:00
|
|
|
if (rangesCount && *rangesCount > 0 && ranges) {
|
|
|
|
for (size_t i = 0; i < *rangesCount; ++i) {
|
|
|
|
rangesList.push_back(ranges[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPrintSettingsCppToC::Get(self)->GetPageRanges(rangesList);
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Restore param: ranges; type: simple_vec_byref
|
|
|
|
if (rangesCount && ranges) {
|
|
|
|
*rangesCount = std::min(rangesList.size(), *rangesCount);
|
|
|
|
if (*rangesCount > 0) {
|
|
|
|
for (size_t i = 0; i < *rangesCount; ++i) {
|
|
|
|
ranges[i] = rangesList[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
print_settings_set_selection_only(struct _cef_print_settings_t* self,
|
|
|
|
int selection_only) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPrintSettingsCppToC::Get(self)->SetSelectionOnly(selection_only ? true
|
|
|
|
: false);
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
print_settings_is_selection_only(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefPrintSettingsCppToC::Get(self)->IsSelectionOnly();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK print_settings_set_collate(struct _cef_print_settings_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
int collate) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPrintSettingsCppToC::Get(self)->SetCollate(collate ? true : false);
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
print_settings_will_collate(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefPrintSettingsCppToC::Get(self)->WillCollate();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
print_settings_set_color_model(struct _cef_print_settings_t* self,
|
|
|
|
cef_color_model_t model) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPrintSettingsCppToC::Get(self)->SetColorModel(model);
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_color_model_t CEF_CALLBACK
|
|
|
|
print_settings_get_color_model(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return COLOR_MODEL_UNKNOWN;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_color_model_t _retval =
|
|
|
|
CefPrintSettingsCppToC::Get(self)->GetColorModel();
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK print_settings_set_copies(struct _cef_print_settings_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
int copies) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPrintSettingsCppToC::Get(self)->SetCopies(copies);
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int CEF_CALLBACK print_settings_get_copies(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
int _retval = CefPrintSettingsCppToC::Get(self)->GetCopies();
|
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
print_settings_set_duplex_mode(struct _cef_print_settings_t* self,
|
|
|
|
cef_duplex_mode_t mode) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPrintSettingsCppToC::Get(self)->SetDuplexMode(mode);
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_duplex_mode_t CEF_CALLBACK
|
|
|
|
print_settings_get_duplex_mode(struct _cef_print_settings_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2014-07-10 17:41:30 +02:00
|
|
|
return DUPLEX_MODE_UNKNOWN;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_duplex_mode_t _retval =
|
|
|
|
CefPrintSettingsCppToC::Get(self)->GetDuplexMode();
|
2014-07-10 17:41:30 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
} // namespace
|
|
|
|
|
2014-07-10 17:41:30 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
CefPrintSettingsCppToC::CefPrintSettingsCppToC() {
|
|
|
|
GetStruct()->is_valid = print_settings_is_valid;
|
|
|
|
GetStruct()->is_read_only = print_settings_is_read_only;
|
|
|
|
GetStruct()->set_orientation = print_settings_set_orientation;
|
|
|
|
GetStruct()->is_landscape = print_settings_is_landscape;
|
|
|
|
GetStruct()->set_printer_printable_area =
|
2014-07-10 17:41:30 +02:00
|
|
|
print_settings_set_printer_printable_area;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->set_device_name = print_settings_set_device_name;
|
|
|
|
GetStruct()->get_device_name = print_settings_get_device_name;
|
|
|
|
GetStruct()->set_dpi = print_settings_set_dpi;
|
|
|
|
GetStruct()->get_dpi = print_settings_get_dpi;
|
|
|
|
GetStruct()->set_page_ranges = print_settings_set_page_ranges;
|
|
|
|
GetStruct()->get_page_ranges_count = print_settings_get_page_ranges_count;
|
|
|
|
GetStruct()->get_page_ranges = print_settings_get_page_ranges;
|
|
|
|
GetStruct()->set_selection_only = print_settings_set_selection_only;
|
|
|
|
GetStruct()->is_selection_only = print_settings_is_selection_only;
|
|
|
|
GetStruct()->set_collate = print_settings_set_collate;
|
|
|
|
GetStruct()->will_collate = print_settings_will_collate;
|
|
|
|
GetStruct()->set_color_model = print_settings_set_color_model;
|
|
|
|
GetStruct()->get_color_model = print_settings_get_color_model;
|
|
|
|
GetStruct()->set_copies = print_settings_set_copies;
|
|
|
|
GetStruct()->get_copies = print_settings_get_copies;
|
|
|
|
GetStruct()->set_duplex_mode = print_settings_set_duplex_mode;
|
|
|
|
GetStruct()->get_duplex_mode = print_settings_get_duplex_mode;
|
|
|
|
}
|
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefPrintSettingsCppToC::~CefPrintSettingsCppToC() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefRefPtr<CefPrintSettings> CefCppToCRefCounted<
|
|
|
|
CefPrintSettingsCppToC,
|
|
|
|
CefPrintSettings,
|
|
|
|
cef_print_settings_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
cef_print_settings_t* s) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2014-07-10 17:41:30 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCppToCRefCounted<CefPrintSettingsCppToC,
|
|
|
|
CefPrintSettings,
|
|
|
|
cef_print_settings_t>::kWrapperType =
|
|
|
|
WT_PRINT_SETTINGS;
|