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#ifndef DT_COMMON_CUPS_PRINT_H
25#define DT_COMMON_CUPS_PRINT_H
26
28
29#define MAX_NAME 128
30
42
48
53
59
69
77
78// Asynchronous printer discovery, cb will be called for each printer found
79void dt_printers_discovery(void (*cb)(dt_printer_info_t *pr, void *user_data), void *user_data);
81
82// initialize the pinfo structure
84
85// get printer information for the given printer name
86void dt_get_printer_info(const char *printer_name, dt_printer_info_t *pinfo);
87
88// get all available papers for the given printer
89GList *dt_get_papers(const dt_printer_info_t *printer);
90
91// get paper information for the given paper name
92dt_paper_info_t *dt_get_paper(GList *papers, const char *name);
93
94// get all available media type for the given printer
95GList *dt_get_media_type(const dt_printer_info_t *printer);
96
97// get paper information for the given paper name
98dt_medium_info_t *dt_get_medium(GList *media, const char *name);
99
100// print filename using the printer and the page size and setup
101void dt_print_file(const int32_t imgid, const char *filename, const char *job_title, const dt_print_info_t *pinfo);
102
103// given the page settings (media size and border) and the printer (hardware margins) returns the
104// page and printable area layout in the area_width and area_height (the area that dt allocate
105// for the central display).
106// - the page area (px, py, pwidth, pheight)
107// - the printable area (ax, ay, awidth and aheight), the area without the borders
108// there is no unit, every returned values are based on the area size.
110 const int32_t area_width, const int32_t area_height,
111 float *px, float *py, float *pwidth, float *pheight,
112 float *ax, float *ay, float *awidth, float *aheight,
113 gboolean *borderless);
114
115#endif // DT_COMMON_CUPS_PRINT_H
116
117// clang-format off
118// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
119// vim: shiftwidth=2 expandtab tabstop=2 cindent
120// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
121// clang-format on
122
void dt_get_printer_info(const char *printer_name, dt_printer_info_t *pinfo)
Definition cups_print.c:89
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:428
dt_medium_info_t * dt_get_medium(GList *media, const char *name)
Definition cups_print.c:412
GList * dt_get_media_type(const dt_printer_info_t *printer)
Definition cups_print.c:375
void dt_printers_discovery(void(*cb)(dt_printer_info_t *pr, void *user_data), void *user_data)
Definition cups_print.c:217
void dt_printers_abort_discovery(void)
Definition cups_print.c:212
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:593
#define MAX_NAME
Definition cups_print.h:29
dt_paper_info_t * dt_get_paper(GList *papers, const char *name)
Definition cups_print.c:247
GList * dt_get_papers(const dt_printer_info_t *printer)
Definition cups_print.c:273
void dt_init_print_info(dt_print_info_t *pinfo)
Definition cups_print.c:79
dt_alignment_t
Definition cups_print.h:31
@ ALIGNMENT_TOP_RIGHT
Definition cups_print.h:34
@ ALIGNMENT_LEFT
Definition cups_print.h:35
@ ALIGNMENT_CENTER
Definition cups_print.h:36
@ ALIGNMENT_BOTTOM_RIGHT
Definition cups_print.h:40
@ ALIGNMENT_TOP_LEFT
Definition cups_print.h:32
@ ALIGNMENT_BOTTOM
Definition cups_print.h:39
@ ALIGNMENT_TOP
Definition cups_print.h:33
@ ALIGNMENT_RIGHT
Definition cups_print.h:37
@ ALIGNMENT_BOTTOM_LEFT
Definition cups_print.h:38
const char * name
Definition pdf.h:90
The colour-profile vocabulary, and nothing else.
dt_iop_color_intent_t
ICC rendering intent, as stored in iop params and in conf.
char common_name[128]
Definition cups_print.h:51
char name[128]
Definition cups_print.h:51
double margin_bottom
Definition cups_print.h:57
double margin_right
Definition cups_print.h:57
double margin_left
Definition cups_print.h:57
double margin_top
Definition cups_print.h:57
gboolean landscape
Definition cups_print.h:56
char name[128]
Definition cups_print.h:45
char common_name[128]
Definition cups_print.h:45
dt_medium_info_t medium
Definition cups_print.h:75
dt_paper_info_t paper
Definition cups_print.h:74
dt_printer_info_t printer
Definition cups_print.h:72
dt_page_setup_t page
Definition cups_print.h:73
dt_iop_color_intent_t intent
Definition cups_print.h:65
double hw_margin_right
Definition cups_print.h:64
char profile[256]
Definition cups_print.h:66
gboolean is_turboprint
Definition cups_print.h:67
double hw_margin_left
Definition cups_print.h:64
double hw_margin_bottom
Definition cups_print.h:64