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-2020 darktable developers.
4
5 darktable is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 darktable is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with darktable. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include <common/colorspaces.h>
22
23#define MAX_NAME 128
24
36
42
47
53
63
71
72// Asynchronous printer discovery, cb will be called for each printer found
73void dt_printers_discovery(void (*cb)(dt_printer_info_t *pr, void *user_data), void *user_data);
75
76// initialize the pinfo structure
78
79// get printer information for the given printer name
80void dt_get_printer_info(const char *printer_name, dt_printer_info_t *pinfo);
81
82// get all available papers for the given printer
83GList *dt_get_papers(const dt_printer_info_t *printer);
84
85// get paper information for the given paper name
86dt_paper_info_t *dt_get_paper(GList *papers, const char *name);
87
88// get all available media type for the given printer
89GList *dt_get_media_type(const dt_printer_info_t *printer);
90
91// get paper information for the given paper name
92dt_medium_info_t *dt_get_medium(GList *media, const char *name);
93
94// print filename using the printer and the page size and setup
95void dt_print_file(const int32_t imgid, const char *filename, const char *job_title, const dt_print_info_t *pinfo);
96
97// given the page settings (media size and border) and the printer (hardware margins) returns the
98// page and printable area layout in the area_width and area_height (the area that dt allocate
99// for the central display).
100// - the page area (px, py, pwidth, pheight)
101// - the printable area (ax, ay, awidth and aheight), the area without the borders
102// there is no unit, every returned values are based on the area size.
104 const int32_t area_width, const int32_t area_height,
105 float *px, float *py, float *pwidth, float *pheight,
106 float *ax, float *ay, float *awidth, float *aheight,
107 gboolean *borderless);
108
109// clang-format off
110// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
111// vim: shiftwidth=2 expandtab tabstop=2 cindent
112// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
113// clang-format on
114
dt_iop_color_intent_t
Definition colorspaces.h:43
char * name
Definition common/metadata.c:41
void dt_get_printer_info(const char *printer_name, dt_printer_info_t *pinfo)
Definition cups_print.c:75
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:414
dt_medium_info_t * dt_get_medium(GList *media, const char *name)
Definition cups_print.c:398
GList * dt_get_media_type(const dt_printer_info_t *printer)
Definition cups_print.c:361
void dt_printers_discovery(void(*cb)(dt_printer_info_t *pr, void *user_data), void *user_data)
Definition cups_print.c:203
void dt_printers_abort_discovery(void)
Definition cups_print.c:198
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:579
#define MAX_NAME
Definition cups_print.h:23
dt_paper_info_t * dt_get_paper(GList *papers, const char *name)
Definition cups_print.c:233
GList * dt_get_papers(const dt_printer_info_t *printer)
Definition cups_print.c:259
void dt_init_print_info(dt_print_info_t *pinfo)
Definition cups_print.c:65
dt_alignment_t
Definition cups_print.h:25
@ ALIGNMENT_TOP_RIGHT
Definition cups_print.h:28
@ ALIGNMENT_LEFT
Definition cups_print.h:29
@ ALIGNMENT_CENTER
Definition cups_print.h:30
@ ALIGNMENT_BOTTOM_RIGHT
Definition cups_print.h:34
@ ALIGNMENT_TOP_LEFT
Definition cups_print.h:26
@ ALIGNMENT_BOTTOM
Definition cups_print.h:33
@ ALIGNMENT_TOP
Definition cups_print.h:27
@ ALIGNMENT_RIGHT
Definition cups_print.h:31
@ ALIGNMENT_BOTTOM_LEFT
Definition cups_print.h:32
Definition cups_print.h:44
char common_name[128]
Definition cups_print.h:45
char name[128]
Definition cups_print.h:45
Definition cups_print.h:49
double margin_bottom
Definition cups_print.h:51
double margin_right
Definition cups_print.h:51
double margin_left
Definition cups_print.h:51
double margin_top
Definition cups_print.h:51
gboolean landscape
Definition cups_print.h:50
Definition cups_print.h:38
double height
Definition cups_print.h:40
double width
Definition cups_print.h:40
char name[128]
Definition cups_print.h:39
char common_name[128]
Definition cups_print.h:39
Definition cups_print.h:65
dt_medium_info_t medium
Definition cups_print.h:69
dt_paper_info_t paper
Definition cups_print.h:68
dt_printer_info_t printer
Definition cups_print.h:66
dt_page_setup_t page
Definition cups_print.h:67
Definition cups_print.h:55
char name[128]
Definition cups_print.h:56
dt_iop_color_intent_t intent
Definition cups_print.h:59
double hw_margin_top
Definition cups_print.h:58
double hw_margin_right
Definition cups_print.h:58
char profile[256]
Definition cups_print.h:60
gboolean is_turboprint
Definition cups_print.h:61
double hw_margin_left
Definition cups_print.h:58
int resolution
Definition cups_print.h:57
double hw_margin_bottom
Definition cups_print.h:58