Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
cups_print.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2014-2015, 2017, 2020-2021 Pascal Obry.
4 Copyright (C) 2015 Jérémy Rosen.
5 Copyright (C) 2016 Roman Lebedev.
6 Copyright (C) 2016 Tobias Ellinghaus.
7 Copyright (C) 2018 Dan Torop.
8 Copyright (C) 2022 Martin Bařinka.
9
10 darktable is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
14
15 darktable is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with darktable. If not, see <http://www.gnu.org/licenses/>.
22*/
23
24#pragma once
25
26#include <common/colorspaces.h>
27
28#define MAX_NAME 128
29
41
47
52
58
68
76
77// Asynchronous printer discovery, cb will be called for each printer found
78void dt_printers_discovery(void (*cb)(dt_printer_info_t *pr, void *user_data), void *user_data);
80
81// initialize the pinfo structure
83
84// get printer information for the given printer name
85void dt_get_printer_info(const char *printer_name, dt_printer_info_t *pinfo);
86
87// get all available papers for the given printer
88GList *dt_get_papers(const dt_printer_info_t *printer);
89
90// get paper information for the given paper name
91dt_paper_info_t *dt_get_paper(GList *papers, const char *name);
92
93// get all available media type for the given printer
94GList *dt_get_media_type(const dt_printer_info_t *printer);
95
96// get paper information for the given paper name
97dt_medium_info_t *dt_get_medium(GList *media, const char *name);
98
99// print filename using the printer and the page size and setup
100void dt_print_file(const int32_t imgid, const char *filename, const char *job_title, const dt_print_info_t *pinfo);
101
102// given the page settings (media size and border) and the printer (hardware margins) returns the
103// page and printable area layout in the area_width and area_height (the area that dt allocate
104// for the central display).
105// - the page area (px, py, pwidth, pheight)
106// - the printable area (ax, ay, awidth and aheight), the area without the borders
107// there is no unit, every returned values are based on the area size.
109 const int32_t area_width, const int32_t area_height,
110 float *px, float *py, float *pwidth, float *pheight,
111 float *ax, float *ay, float *awidth, float *aheight,
112 gboolean *borderless);
113
114// clang-format off
115// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
116// vim: shiftwidth=2 expandtab tabstop=2 cindent
117// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
118// clang-format on
119
dt_iop_color_intent_t
Definition colorspaces.h:63
char * name
Definition common/metadata.c:61
void dt_get_printer_info(const char *printer_name, dt_printer_info_t *pinfo)
Definition cups_print.c:87
void dt_print_file(const int32_t imgid, const char *filename, const char *job_title, const dt_print_info_t *pinfo)
Definition cups_print.c:426
dt_medium_info_t * dt_get_medium(GList *media, const char *name)
Definition cups_print.c:410
GList * dt_get_media_type(const dt_printer_info_t *printer)
Definition cups_print.c:373
void dt_printers_discovery(void(*cb)(dt_printer_info_t *pr, void *user_data), void *user_data)
Definition cups_print.c:215
void dt_printers_abort_discovery(void)
Definition cups_print.c:210
void dt_get_print_layout(const dt_print_info_t *prt, const int32_t area_width, const int32_t area_height, float *px, float *py, float *pwidth, float *pheight, float *ax, float *ay, float *awidth, float *aheight, gboolean *borderless)
Definition cups_print.c:591
#define MAX_NAME
Definition cups_print.h:28
dt_paper_info_t * dt_get_paper(GList *papers, const char *name)
Definition cups_print.c:245
GList * dt_get_papers(const dt_printer_info_t *printer)
Definition cups_print.c:271
void dt_init_print_info(dt_print_info_t *pinfo)
Definition cups_print.c:77
dt_alignment_t
Definition cups_print.h:30
@ ALIGNMENT_TOP_RIGHT
Definition cups_print.h:33
@ ALIGNMENT_LEFT
Definition cups_print.h:34
@ ALIGNMENT_CENTER
Definition cups_print.h:35
@ ALIGNMENT_BOTTOM_RIGHT
Definition cups_print.h:39
@ ALIGNMENT_TOP_LEFT
Definition cups_print.h:31
@ ALIGNMENT_BOTTOM
Definition cups_print.h:38
@ ALIGNMENT_TOP
Definition cups_print.h:32
@ ALIGNMENT_RIGHT
Definition cups_print.h:36
@ ALIGNMENT_BOTTOM_LEFT
Definition cups_print.h:37
Definition cups_print.h:49
char common_name[128]
Definition cups_print.h:50
char name[128]
Definition cups_print.h:50
Definition cups_print.h:54
double margin_bottom
Definition cups_print.h:56
double margin_right
Definition cups_print.h:56
double margin_left
Definition cups_print.h:56
double margin_top
Definition cups_print.h:56
gboolean landscape
Definition cups_print.h:55
Definition cups_print.h:43
double height
Definition cups_print.h:45
double width
Definition cups_print.h:45
char name[128]
Definition cups_print.h:44
char common_name[128]
Definition cups_print.h:44
Definition cups_print.h:70
dt_medium_info_t medium
Definition cups_print.h:74
dt_paper_info_t paper
Definition cups_print.h:73
dt_printer_info_t printer
Definition cups_print.h:71
dt_page_setup_t page
Definition cups_print.h:72
Definition cups_print.h:60
char name[128]
Definition cups_print.h:61
dt_iop_color_intent_t intent
Definition cups_print.h:64
double hw_margin_top
Definition cups_print.h:63
double hw_margin_right
Definition cups_print.h:63
char profile[256]
Definition cups_print.h:65
gboolean is_turboprint
Definition cups_print.h:66
double hw_margin_left
Definition cups_print.h:63
int resolution
Definition cups_print.h:62
double hw_margin_bottom
Definition cups_print.h:63