![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <cups/cups.h>
#include <cups/ppd.h>
#include <glib.h>
#include <stdio.h>
#include "common/file_location.h"
#include "common/image.h"
#include "common/image_cache.h"
#include "common/mipmap_cache.h"
#include "common/pdf.h"
#include "control/jobs/control_jobs.h"
#include "cups_print.h"
Data Structures | |
struct | dt_prtctl_t |
Typedefs | |
typedef struct dt_prtctl_t | dt_prtctl_t |
Functions | |
void | dt_init_print_info (dt_print_info_t *pinfo) |
void | dt_get_printer_info (const char *printer_name, dt_printer_info_t *pinfo) |
static int | _dest_cb (void *user_data, unsigned flags, cups_dest_t *dest) |
static int | _detect_printers_callback (dt_job_t *job) |
void | dt_printers_abort_discovery (void) |
void | dt_printers_discovery (void(*cb)(dt_printer_info_t *pr, void *user_data), void *user_data) |
static gboolean | paper_exists (GList *papers, const char *name) |
dt_paper_info_t * | dt_get_paper (GList *papers, const char *name) |
static gint | sort_papers (gconstpointer p1, gconstpointer p2) |
GList * | dt_get_papers (const dt_printer_info_t *printer) |
GList * | dt_get_media_type (const dt_printer_info_t *printer) |
dt_medium_info_t * | dt_get_medium (GList *media, const char *name) |
void | dt_print_file (const int32_t imgid, const char *filename, const char *job_title, const dt_print_info_t *pinfo) |
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) |
Variables | |
static int | _cancel = 0 |
typedef struct dt_prtctl_t dt_prtctl_t |
|
static |
References dt_prtctl_t::cb, DT_DEBUG_PRINT, dt_get_printer_info(), dt_print(), and dt_prtctl_t::user_data.
Referenced by _detect_printers_callback().
|
static |
References _cancel, _dest_cb(), and dt_control_job_get_params().
Referenced by dt_printers_discovery().
GList * dt_get_media_type | ( | const dt_printer_info_t * | printer | ) |
References dt_medium_info_t::common_name, DT_DEBUG_PRINT, dt_print(), MAX_NAME, dt_medium_info_t::name, and dt_printer_info_t::name.
Referenced by _set_printer().
dt_medium_info_t * dt_get_medium | ( | GList * | media, |
const char * | name | ||
) |
References dt_medium_info_t::common_name, m, dt_medium_info_t::name, and name.
Referenced by _media_changed().
dt_paper_info_t * dt_get_paper | ( | GList * | papers, |
const char * | name | ||
) |
References dt_paper_info_t::common_name, dt_paper_info_t::name, and name.
Referenced by _paper_changed().
GList * dt_get_papers | ( | const dt_printer_info_t * | printer | ) |
References dt_paper_info_t::common_name, double(), DT_DEBUG_PRINT, dt_pdf_point_to_mm, dt_print(), dt_paper_info_t::height, MAX_NAME, dt_paper_info_t::name, dt_printer_info_t::name, paper_exists(), size, sort_papers(), and dt_paper_info_t::width.
Referenced by _set_printer().
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 | ||
) |
References dt_paper_info_t::height, dt_printer_info_t::hw_margin_bottom, dt_printer_info_t::hw_margin_left, dt_printer_info_t::hw_margin_right, dt_printer_info_t::hw_margin_top, dt_page_setup_t::landscape, dt_page_setup_t::margin_bottom, dt_page_setup_t::margin_left, dt_page_setup_t::margin_right, dt_page_setup_t::margin_top, dt_print_info_t::page, dt_print_info_t::paper, dt_print_info_t::printer, and dt_paper_info_t::width.
Referenced by expose_print_page().
void dt_get_printer_info | ( | const char * | printer_name, |
dt_printer_info_t * | pinfo | ||
) |
References dt_pdf_point_to_mm, dt_util_str_to_loc_numbers_format(), dt_printer_info_t::hw_margin_bottom, dt_printer_info_t::hw_margin_left, dt_printer_info_t::hw_margin_right, dt_printer_info_t::hw_margin_top, dt_printer_info_t::is_turboprint, MAX_NAME, dt_printer_info_t::name, and dt_printer_info_t::resolution.
Referenced by _dest_cb(), and _set_printer().
void dt_init_print_info | ( | dt_print_info_t * | pinfo | ) |
void dt_print_file | ( | const int32_t | imgid, |
const char * | filename, | ||
const char * | job_title, | ||
const dt_print_info_t * | pinfo | ||
) |
References dt_paper_info_t::common_name, dt_control_log(), DT_DEBUG_PRINT, dt_loc_get_tmp_dir(), dt_print(), dt_printer_info_t::hw_margin_bottom, dt_printer_info_t::hw_margin_left, dt_printer_info_t::hw_margin_right, dt_printer_info_t::hw_margin_top, dt_printer_info_t::intent, dt_printer_info_t::is_turboprint, dt_print_info_t::medium, dt_paper_info_t::name, dt_medium_info_t::name, dt_printer_info_t::name, name, dt_print_info_t::paper, PATH_MAX, dt_print_info_t::printer, and dt_printer_info_t::profile.
Referenced by _print_job_run().
References _cancel.
Referenced by dt_cleanup().
void dt_printers_discovery | ( | void(*)(dt_printer_info_t *pr, void *user_data) | cb, |
void * | user_data | ||
) |
|
static |
References dt_paper_info_t::common_name, FALSE, dt_paper_info_t::name, name, and TRUE.
Referenced by dt_get_papers().
|
static |
References dt_paper_info_t::common_name.
Referenced by dt_get_papers().
|
static |
Referenced by _detect_printers_callback(), and dt_printers_abort_discovery().