libgimpprint API Reference: print-papers.c File Reference

Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

# src/main/print-papers.c File Reference

`#include <gimp-print/gimp-print.h>`
`#include "gimp-print-internal.h"`
`#include <gimp-print/gimp-print-intl-internal.h>`
`#include <math.h>`
`#include <string.h>`
`#include <stdlib.h>`

Go to the source code of this file.

## Functions
void | stpi_paper_freefunc (void *item)
const char * | stpi_paper_namefunc (const void *item)
const char * | stpi_paper_long_namefunc (const void *item)
int | stpi_paper_list_init (void)
void | check_paperlist (void)
int | stpi_paper_create (stp_papersize_t *p)
int | stpi_paper_destroy (stp_papersize_t *p)
int | stp_known_papersizes (void)
| Get the number of available papersizes.
const stp_papersize_t * | stp_get_papersize_by_name (const char *name)
| Get a papersize by name.
const stp_papersize_t * | stp_get_papersize_by_index (int idx)
| Get a papersize by its index number.
int | paper_size_mismatch (int l, int w, const stp_papersize_t *val)
const stp_papersize_t * | stp_get_papersize_by_size (int l, int w)
| Get a papersize by size.
void | stp_default_media_size (const stp_vars_t *v, int *width, int *height)
stp_papersize_t * | stp_xml_process_paper (stp_mxml_node_t *paper)
int | stp_xml_process_paperdef (stp_mxml_node_t *paperdef, const char *file)
void | stpi_init_paper (void)
## Variables
stp_list_t * | paper_list = NULL

## Function Documentation

void check_paperlist | ( | void |  | ) | `[inline, static]`

| Definition at line 83 of file print-papers.c. References paper_list, stp_erprintf(), stp_xml_parse_file_named(), and stpi_paper_list_init(). Referenced by stp_get_papersize_by_index(), stp_get_papersize_by_name(), stp_known_papersizes(), and stpi_paper_destroy().

int paper_size_mismatch | ( | int | l,
|  | int | w,
|  | const stp_papersize_t * | val
| ) | `[static]`

| Definition at line 186 of file print-papers.c. References stp_papersize_t::height, and stp_papersize_t::width. Referenced by stp_get_papersize_by_size().

stp_papersize_t* stp_xml_process_paper | ( | stp_mxml_node_t * | paper | ) | `[static]`

| Definition at line 257 of file print-papers.c. References stp_papersize_t::bottom, stp_mxml_node_s::child, stp_papersize_t::comment, stp_mxml_value_u::element, stp_papersize_t::height, stp_papersize_t::left, stp_mxml_value_s::name, stp_papersize_t::name, stp_mxml_node_s::next, stp_papersize_t::paper_unit, PAPERSIZE_ENGLISH_EXTENDED, PAPERSIZE_ENGLISH_STANDARD, PAPERSIZE_METRIC_EXTENDED, PAPERSIZE_METRIC_STANDARD, stp_papersize_t::right, STP_DBG_XML, stp_erprintf(), stp_free(), stp_get_debug_level(), STP_MXML_ELEMENT, stp_mxml_node_t, stp_mxmlElementGetAttr(), stp_strdup(), stp_xmlstrtoul(), stp_zalloc(), stp_papersize_t::text, stp_papersize_t::top, stp_mxml_node_s::type, stp_mxml_node_s::value, and stp_papersize_t::width. Referenced by stp_xml_process_paperdef().

int stp_xml_process_paperdef | ( | stp_mxml_node_t * | paperdef,
|  | const char * | file
| ) | `[static]`

| Definition at line 395 of file print-papers.c. References stp_mxml_node_s::child, stp_mxml_value_u::element, stp_mxml_value_s::name, stp_mxml_node_s::next, STP_MXML_ELEMENT, stp_mxml_node_t, stp_xml_process_paper(), stpi_paper_create(), stp_mxml_node_s::type, and stp_mxml_node_s::value. Referenced by stpi_init_paper().

int stpi_paper_create | ( | stp_papersize_t * | p | ) | `[static]`

| Definition at line 97 of file print-papers.c. References stp_papersize_t::name, paper_list, STP_DBG_PAPER, stp_deprintf(), stp_list_get_start(), stp_list_item_create(), stp_list_item_get_data(), stp_list_item_next(), stp_list_item_t, stpi_paper_freefunc(), and stpi_paper_list_init(). Referenced by stp_xml_process_paperdef().

int stpi_paper_destroy | ( | stp_papersize_t * | p | ) | `[static]`

| Definition at line 129 of file print-papers.c. References check_paperlist(), stp_papersize_t::name, paper_list, stp_list_get_start(), stp_list_item_destroy(), stp_list_item_get_data(), stp_list_item_next(), and stp_list_item_t.

void stpi_paper_freefunc | ( | void * | item | ) | `[static]`

| Definition at line 45 of file print-papers.c. References stp_papersize_t::comment, stp_papersize_t::name, STP_SAFE_FREE, and stp_papersize_t::text. Referenced by stpi_paper_create(), and stpi_paper_list_init().

int stpi_paper_list_init | ( | void |  | ) | `[static]`

| Definition at line 69 of file print-papers.c. References paper_list, stp_list_create(), stp_list_destroy(), stp_list_set_freefunc(), stp_list_set_long_namefunc(), stp_list_set_namefunc(), stpi_paper_freefunc(), stpi_paper_long_namefunc(), and stpi_paper_namefunc(). Referenced by check_paperlist(), and stpi_paper_create().

const char* stpi_paper_long_namefunc | ( | const void * | item | ) | `[static]`

| Definition at line 62 of file print-papers.c. References stp_papersize_t::text. Referenced by stpi_paper_list_init().

const char* stpi_paper_namefunc | ( | const void * | item | ) | `[static]`

| Definition at line 55 of file print-papers.c. References stp_papersize_t::name. Referenced by stpi_paper_list_init().

## Variable Documentation

stp_list_t* paper_list = NULL`[static]`

| Definition at line 42 of file print-papers.c. Referenced by check_paperlist(), stp_get_papersize_by_index(), stp_get_papersize_by_name(), stp_known_papersizes(), stpi_paper_create(), stpi_paper_destroy(), and stpi_paper_list_init().