libgimpprint API Reference: xml.h File Reference

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

# include/gimp-print/xml.h File Reference

`#include <gimp-print/mxml.h>`

Go to the source code of this file.

## Typedefs
typedef int(* | stp_xml_parse_func )(stp_mxml_node_t *node, const char *file)
## Functions
void | stp_register_xml_parser (const char *name, stp_xml_parse_func parse_func)
void | stp_unregister_xml_parser (const char *name)
void | stp_register_xml_preload (const char *filename)
void | stp_unregister_xml_preload (const char *filename)
int | stp_xml_init_defaults (void)
int | stp_xml_parse_file (const char *file)
long | stp_xmlstrtol (const char *value)
unsigned long | stp_xmlstrtoul (const char *value)
double | stp_xmlstrtod (const char *textval)
void | stp_xml_init (void)
void | stp_xml_exit (void)
stp_mxml_node_t * | stp_xml_get_node (stp_mxml_node_t *xmlroot,...)
stp_mxml_node_t * | stp_xmldoc_create_generic (void)
void | stp_xml_preinit (void)
stp_sequence_t * | stp_sequence_create_from_xmltree (stp_mxml_node_t *da)
stp_mxml_node_t * | stp_xmltree_create_from_sequence (const stp_sequence_t *seq)
stp_curve_t * | stp_curve_create_from_xmltree (stp_mxml_node_t *da)
stp_mxml_node_t * | stp_xmltree_create_from_curve (const stp_curve_t *curve)
stp_array_t * | stp_array_create_from_xmltree (stp_mxml_node_t *array)
stp_mxml_node_t * | stp_xmltree_create_from_array (const stp_array_t *array)
void | stp_xml_parse_file_named (const char *name)

## Typedef Documentation

typedef int(* stp_xml_parse_func)(stp_mxml_node_t *node, const char *file)

| Definition at line 34 of file xml.h. Referenced by stp_register_xml_parser().

## Function Documentation

stp_array_t* stp_array_create_from_xmltree | ( | stp_mxml_node_t * | array | ) |

| Definition at line 183 of file array.c. References stp_array::data, stp_array_create(), stp_array_destroy(), stp_array_t, stp_erprintf(), STP_MXML_DESCEND, stp_mxml_node_t, stp_mxmlElementGetAttr(), stp_mxmlFindElement(), stp_sequence_create_from_xmltree(), stp_sequence_destroy(), stp_sequence_get_size(), and stp_sequence_t. Referenced by stp_printer_create_from_xmltree(), and stpi_dither_array_create_from_xmltree().

stp_curve_t* stp_curve_create_from_xmltree | ( | stp_mxml_node_t * | da | ) |

| Definition at line 1408 of file curve.c. References stp_curve_count_points(), stp_curve_create(), stp_curve_destroy(), stp_curve_set_bounds(), stp_curve_set_data(), stp_curve_set_data_points(), stp_curve_set_gamma(), stp_curve_set_interpolation_type(), stp_curve_t, STP_CURVE_TYPE_LINEAR, STP_CURVE_TYPE_SPLINE, stp_curve_type_t, STP_CURVE_WRAP_AROUND, stp_curve_wrap_mode_t, STP_CURVE_WRAP_NONE, STP_DBG_CURVE_ERRORS, stp_deprintf(), STP_MXML_DESCEND, stp_mxml_node_t, stp_mxmlElementGetAttr(), stp_mxmlFindElement(), stp_sequence_create_from_xmltree(), stp_sequence_destroy(), stp_sequence_get_bounds(), stp_sequence_get_data(), stp_sequence_t, stp_xml_exit(), stp_xml_init(), stp_xmlstrtod(), and stpi_curve_check_parameters(). Referenced by stp_printer_create_from_xmltree(), and xml_doc_get_curve().

void stp_register_xml_parser | ( | const char * | name,
|  | stp_xml_parse_func | parse_func
| ) |

| Definition at line 84 of file xml.c. References stpi_xml_parse_registry::name, stpi_xml_parse_registry::parse_func, stp_list_get_item_by_name(), stp_list_item_create(), stp_list_item_get_data(), stp_list_item_t, stp_malloc(), stp_strdup(), stp_xml_parse_func, and stpi_xml_registry. Referenced by stpi_init_dither(), stpi_init_paper(), and stpi_init_printer().

void stp_register_xml_preload | ( | const char * | filename | ) |

| Definition at line 108 of file xml.c. References stp_list_get_item_by_name(), stp_list_item_create(), stp_list_item_t, stp_strdup(), and stpi_xml_preloads. Referenced by stpi_init_printer().

stp_sequence_t* stp_sequence_create_from_xmltree | ( | stp_mxml_node_t * | da | ) |

| Definition at line 302 of file sequence.c. References stp_mxml_node_s::child, stp_mxml_node_s::next, STP_DBG_XML, stp_deprintf(), stp_erprintf(), stp_mxml_node_t, STP_MXML_TEXT, stp_mxmlElementGetAttr(), stp_sequence_create(), stp_sequence_destroy(), stp_sequence_set_bounds(), stp_sequence_set_point(), stp_sequence_set_size(), stp_sequence_t, stp_xmlstrtod(), stp_xmlstrtol(), stp_xmlstrtoul(), stp_mxml_text_s::string, stp_mxml_value_u::text, stp_mxml_node_s::type, and stp_mxml_node_s::value. Referenced by stp_array_create_from_xmltree(), and stp_curve_create_from_xmltree().

void stp_unregister_xml_parser | ( | const char * | name | ) |

| Definition at line 100 of file xml.c. References stp_list_get_item_by_name(), stp_list_item_destroy(), stp_list_item_t, and stpi_xml_registry.

void stp_unregister_xml_preload | ( | const char * | filename | ) |

| Definition at line 119 of file xml.c. References stp_list_get_item_by_name(), stp_list_item_destroy(), stp_list_item_t, and stpi_xml_preloads.

void stp_xml_exit | ( | void |  | ) |

| Definition at line 176 of file xml.c. References saved_lc_collate, saved_lc_ctype, saved_lc_numeric, and xml_is_initialised. Referenced by stp_curve_create_from_file(), stp_curve_create_from_stream(), stp_curve_create_from_string(), stp_curve_create_from_xmltree(), stp_curve_write(), stp_curve_write_string(), stp_xml_dither_cache_set(), stp_xml_init_defaults(), stp_xml_parse_file(), stp_xmltree_create_from_array(), stp_xmltree_create_from_curve(), and stpi_dither_array_create_from_file().

stp_mxml_node_t* stp_xml_get_node | ( | stp_mxml_node_t * | xmlroot,
|  |  | ...
| ) |

| Definition at line 350 of file xml.c. References STP_MXML_DESCEND, stp_mxml_node_t, and stp_mxmlFindElement(). Referenced by xml_doc_get_curve(), and xml_doc_get_dither_array().

void stp_xml_init | ( | void |  | ) |

| Definition at line 155 of file xml.c. References saved_lc_collate, saved_lc_ctype, saved_lc_numeric, and xml_is_initialised. Referenced by stp_curve_create_from_file(), stp_curve_create_from_stream(), stp_curve_create_from_string(), stp_curve_create_from_xmltree(), stp_curve_write(), stp_curve_write_string(), stp_xml_dither_cache_set(), stp_xml_init_defaults(), stp_xml_parse_file(), stp_xmltree_create_from_array(), stp_xmltree_create_from_curve(), and stpi_dither_array_create_from_file().

int stp_xml_init_defaults | ( | void |  | ) |

| Definition at line 225 of file xml.c. References STP_DBG_XML, stp_deprintf(), stp_list_destroy(), stp_list_get_start(), stp_list_item_get_data(), stp_list_item_next(), stp_list_item_t, stp_xml_exit(), stp_xml_init(), stp_xml_parse_file_named(), and stpi_xml_preloads. Referenced by stp_init().

int stp_xml_parse_file | ( | const char * | file | ) |

| Definition at line 252 of file xml.c. References stp_mxml_node_s::child, stp_mxml_value_u::element, stp_mxml_value_s::name, stp_mxml_node_s::next, STP_DBG_XML, stp_deprintf(), stp_erprintf(), STP_MXML_ELEMENT, STP_MXML_NO_CALLBACK, stp_mxml_node_t, stp_mxmlDelete(), stp_mxmlLoadFile(), stp_xml_exit(), stp_xml_init(), stpi_xml_process_gimpprint(), stp_mxml_node_s::type, and stp_mxml_node_s::value. Referenced by stp_xml_parse_file_named().

void stp_xml_parse_file_named | ( | const char * | name | ) |

| Definition at line 194 of file xml.c. References STP_DBG_XML, stp_deprintf(), stp_list_create(), stp_list_destroy(), stp_list_get_start(), stp_list_item_get_data(), stp_list_item_next(), stp_list_item_t, stp_list_node_free_data(), stp_list_set_freefunc(), stp_list_t, stp_path_search(), stp_path_split(), and stp_xml_parse_file(). Referenced by check_paperlist(), stp_xml_get_dither_array(), and stp_xml_init_defaults().

void stp_xml_preinit | ( | void |  | ) |

| Definition at line 135 of file xml.c. References stp_list_create(), stp_list_set_freefunc(), stp_list_set_namefunc(), stpi_xml_preloads, stpi_xml_registry, xml_preload_freefunc(), xml_preload_namefunc(), xml_registry_freefunc(), and xml_registry_namefunc(). Referenced by stp_init().

stp_mxml_node_t* stp_xmldoc_create_generic | ( | void |  | ) |

| Definition at line 405 of file xml.c. References stp_mxml_node_t, stp_mxmlElementSetAttr(), and stp_mxmlNewElement(). Referenced by xmldoc_create_from_curve().

double stp_xmlstrtod | ( | const char * | textval | ) |

| Definition at line 333 of file xml.c. Referenced by stp_curve_create_from_xmltree(), stp_printer_create_from_xmltree(), and stp_sequence_create_from_xmltree().

long stp_xmlstrtol | ( | const char * | value | ) |

| Definition at line 309 of file xml.c. Referenced by stp_printer_create_from_xmltree(), stp_sequence_create_from_xmltree(), and stp_xml_process_dither_matrix().

unsigned long stp_xmlstrtoul | ( | const char * | value | ) |

| Definition at line 321 of file xml.c. Referenced by stp_sequence_create_from_xmltree(), stp_xml_process_paper(), and stpi_dither_array_create_from_xmltree().

stp_mxml_node_t* stp_xmltree_create_from_array | ( | const stp_array_t * | array | ) |

| Definition at line 245 of file array.c. References stp_array_get_sequence(), stp_array_get_size(), stp_array_t, stp_asprintf(), stp_free(), STP_MXML_ADD_AFTER, stp_mxml_node_t, stp_mxmlAdd(), stp_mxmlDelete(), stp_mxmlElementSetAttr(), stp_mxmlNewElement(), stp_xml_exit(), stp_xml_init(), and stp_xmltree_create_from_sequence().

stp_mxml_node_t* stp_xmltree_create_from_curve | ( | const stp_curve_t * | curve | ) |

| Definition at line 1572 of file curve.c. References stp_curve::piecewise, stp_asprintf(), stp_curve_get_bounds(), stp_curve_get_gamma(), stp_curve_get_interpolation_type(), stp_curve_get_wrap(), stp_curve_type_t, stp_curve_wrap_mode_t, STP_CURVE_WRAP_NONE, STP_DBG_CURVE_ERRORS, stp_deprintf(), stp_free(), STP_MXML_ADD_AFTER, stp_mxml_node_t, stp_mxmlAdd(), stp_mxmlDelete(), stp_mxmlElementSetAttr(), stp_mxmlNewElement(), stp_sequence_create(), stp_sequence_destroy(), stp_sequence_set_bounds(), stp_sequence_set_data(), stp_sequence_set_size(), stp_sequence_t, stp_xml_exit(), stp_xml_init(), stp_xmltree_create_from_sequence(), stpi_curve_get_data_internal(), stpi_curve_type_names, and stpi_wrap_mode_names. Referenced by xmldoc_create_from_curve().

stp_mxml_node_t* stp_xmltree_create_from_sequence | ( | const stp_sequence_t * | seq | ) |

| Definition at line 411 of file sequence.c. References stp_asprintf(), stp_free(), stp_mxml_node_t, stp_mxmlDelete(), stp_mxmlElementSetAttr(), stp_mxmlNewElement(), stp_mxmlNewText(), stp_sequence_get_bounds(), stp_sequence_get_point(), stp_sequence_get_size(), and stp_sequence_t. Referenced by stp_xmltree_create_from_array(), and stp_xmltree_create_from_curve().