libgimpprint API Reference: escp2-driver.c File Reference

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

# src/main/escp2-driver.c File Reference

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

Go to the source code of this file.

## Functions
escp2_privdata_t * | get_privdata (stp_vars_t *v)
void | escp2_reset_printer (stp_vars_t *v)
void | print_remote_param (stp_vars_t *v, const char *param, const char *value)
void | print_remote_int_param (stp_vars_t *v, const char *param, int value)
void | print_remote_float_param (stp_vars_t *v, const char *param, double value)
void | print_debug_params (stp_vars_t *v)
void | escp2_set_remote_sequence (stp_vars_t *v)
void | escp2_set_graphics_mode (stp_vars_t *v)
void | escp2_set_resolution (stp_vars_t *v)
void | escp2_set_color (stp_vars_t *v)
void | escp2_set_printer_weave (stp_vars_t *v)
void | escp2_set_printhead_speed (stp_vars_t *v)
void | escp2_set_dot_size (stp_vars_t *v)
void | escp2_set_page_height (stp_vars_t *v)
void | escp2_set_margins (stp_vars_t *v)
void | escp2_set_form_factor (stp_vars_t *v)
void | escp2_set_printhead_resolution (stp_vars_t *v)
void | set_vertical_position (stp_vars_t *v, stp_pass_t *pass)
void | set_color (stp_vars_t *v, stp_pass_t *pass, int color)
void | set_horizontal_position (stp_vars_t *v, stp_pass_t *pass, int vertical_subpass)
void | send_print_command (stp_vars_t *v, stp_pass_t *pass, int color, int nlines)
void | send_extra_data (stp_vars_t *v, int extralines)
void | stpi_escp2_init_printer (stp_vars_t *v)
void | stpi_escp2_deinit_printer (stp_vars_t *v)
void | stpi_escp2_flush_pass (stp_vars_t *v, int passno, int vertical_subpass)
void | stpi_escp2_terminate_page (stp_vars_t *v)

## Function Documentation

void escp2_reset_printer | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 49 of file escp2-driver.c. References stp_raw_t::bytes, stp_raw_t::data, get_privdata(), escp2_privdata_t::init_sequence, stp_send_command(), stp_vars_t, and stp_zfwrite(). Referenced by stpi_escp2_init_printer().

void escp2_set_color | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 291 of file escp2-driver.c. References get_privdata(), escp2_privdata_t::has_graymode, stp_send_command(), stp_vars_t, escp2_privdata_t::use_black_parameters, and escp2_privdata_t::use_fast_360. Referenced by stpi_escp2_init_printer().

void escp2_set_dot_size | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 338 of file escp2-driver.c. References escp2_privdata_t::drop_size, get_privdata(), stp_send_command(), and stp_vars_t. Referenced by stpi_escp2_init_printer().

void escp2_set_form_factor | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 374 of file escp2-driver.c. References escp2_privdata_t::advanced_command_set, get_privdata(), escp2_privdata_t::page_management_units, escp2_privdata_t::page_true_height, escp2_privdata_t::page_width, stp_get_boolean_parameter(), stp_send_command(), and stp_vars_t. Referenced by stpi_escp2_init_printer().

void escp2_set_graphics_mode | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 270 of file escp2-driver.c. References stp_send_command(), and stp_vars_t. Referenced by stpi_escp2_init_printer().

void escp2_set_margins | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 358 of file escp2-driver.c. References escp2_privdata_t::command_set, get_privdata(), escp2_privdata_t::initial_vertical_offset, MODEL_COMMAND_2000, MODEL_COMMAND_PRO, escp2_privdata_t::page_bottom, escp2_privdata_t::page_management_units, escp2_privdata_t::page_top, stp_send_command(), stp_vars_t, and escp2_privdata_t::use_extended_commands. Referenced by stpi_escp2_init_printer().

void escp2_set_page_height | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 347 of file escp2-driver.c. References get_privdata(), escp2_privdata_t::page_management_units, escp2_privdata_t::page_true_height, stp_send_command(), stp_vars_t, and escp2_privdata_t::use_extended_commands. Referenced by stpi_escp2_init_printer().

void escp2_set_printer_weave | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 302 of file escp2-driver.c. References get_privdata(), res_t::printer_weave, escp2_privdata_t::printer_weave, escp2_privdata_t::res, stp_send_command(), stp_vars_t, and printer_weave_t::value. Referenced by stpi_escp2_init_printer().

void escp2_set_printhead_resolution | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 393 of file escp2-driver.c. References escp2_privdata_t::base_separation, escp2_privdata_t::command_set, get_privdata(), MODEL_COMMAND_PRO, escp2_privdata_t::nozzle_separation, escp2_privdata_t::physical_xdpi, escp2_privdata_t::res, escp2_privdata_t::resolution_scale, res_t::softweave, stp_send_command(), stp_vars_t, escp2_privdata_t::use_extended_commands, and res_t::vres. Referenced by stpi_escp2_init_printer().

void escp2_set_printhead_speed | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 314 of file escp2-driver.c. References get_privdata(), res_t::hres, escp2_privdata_t::printing_resolution, escp2_privdata_t::res, stp_get_string_parameter(), stp_send_command(), stp_vars_t, and res_t::vres. Referenced by stpi_escp2_init_printer().

void escp2_set_remote_sequence | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 204 of file escp2-driver.c. References escp2_privdata_t::advanced_command_set, escp2_privdata_t::base_separation, stp_raw_t::bytes, escp2_privdata_t::command_set, stp_raw_t::data, paper_t::feed_adjustment, get_privdata(), escp2_privdata_t::has_vacuum, input_slot_t::init_sequence, escp2_privdata_t::input_slot, MODEL_COMMAND_PRO, escp2_privdata_t::page_true_height, paper_t::paper_feed_sequence, paper_t::paper_thickness, escp2_privdata_t::paper_type, print_debug_params(), ROLL_FEED_CUT_ALL, input_slot_t::roll_feed_cut_flags, ROLL_FEED_CUT_LAST, STP_DBG_MARK_FILE, stp_get_boolean_parameter(), stp_get_debug_level(), stp_send_command(), stp_vars_t, stp_zfwrite(), and paper_t::vacuum_intensity. Referenced by stpi_escp2_init_printer().

void escp2_set_resolution | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 276 of file escp2-driver.c. References get_privdata(), escp2_privdata_t::horizontal_units, escp2_privdata_t::page_management_units, stp_send_command(), stp_vars_t, escp2_privdata_t::unit_scale, escp2_privdata_t::use_extended_commands, and escp2_privdata_t::vertical_units. Referenced by stpi_escp2_init_printer().

escp2_privdata_t* get_privdata | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 43 of file escp2-driver.c. References stp_get_component_data(), and stp_vars_t.

void print_debug_params | ( | stp_vars_t * | v | ) | `[static]`

| Definition at line 87 of file escp2-driver.c. References escp2_privdata_t::base_separation, escp2_privdata_t::bitwidth, channel_set_t::channel_count, escp2_inkname_t::channel_set, escp2_privdata_t::channels_in_use, escp2_privdata_t::command_set, escp2_privdata_t::drop_size, escp2_privdata_t::extra_720dpi_separation, get_privdata(), escp2_privdata_t::has_graymode, escp2_privdata_t::has_vacuum, escp2_privdata_t::horizontal_passes, escp2_privdata_t::horizontal_units, res_t::hres, escp2_privdata_t::image_height, escp2_privdata_t::image_left, escp2_privdata_t::image_left_position, escp2_privdata_t::image_printed_height, escp2_privdata_t::image_printed_width, escp2_privdata_t::image_scaled_height, escp2_privdata_t::image_scaled_width, escp2_privdata_t::image_top, escp2_privdata_t::image_width, escp2_privdata_t::initial_vertical_offset, escp2_privdata_t::ink_resid, escp2_privdata_t::inkname, escp2_inkname_t::inkset, escp2_privdata_t::logical_channels, escp2_privdata_t::micro_units, stp_parameter_t::name, escp2_inkname_t::name, escp2_privdata_t::nozzle_separation, escp2_privdata_t::nozzles, stp_parameter_t::p_type, escp2_privdata_t::page_bottom, escp2_privdata_t::page_height, escp2_privdata_t::page_left, escp2_privdata_t::page_management_units, escp2_privdata_t::page_right, escp2_privdata_t::page_top, escp2_privdata_t::page_true_height, escp2_privdata_t::page_width, escp2_privdata_t::physical_channels, escp2_privdata_t::physical_xdpi, print_remote_float_param(), print_remote_int_param(), print_remote_param(), res_t::printer_weave, escp2_privdata_t::printing_resolution, escp2_privdata_t::pseudo_separation_rows, escp2_privdata_t::res, escp2_privdata_t::resolution_scale, escp2_privdata_t::send_zero_pass_advance, escp2_privdata_t::separation_rows, res_t::softweave, stp_check_boolean_parameter(), stp_check_curve_parameter(), stp_check_dimension_parameter(), stp_check_float_parameter(), stp_check_int_parameter(), stp_check_string_parameter(), stp_curve_write_string(), stp_free(), stp_get_boolean_parameter(), stp_get_curve_parameter(), stp_get_dimension_parameter(), stp_get_driver(), stp_get_float_parameter(), stp_get_int_parameter(), stp_get_left(), stp_get_model_id(), stp_get_page_height(), stp_get_page_width(), stp_get_parameter_list(), stp_get_string_parameter(), stp_get_top(), STP_PARAMETER_DEFAULTED, stp_parameter_list_count(), stp_parameter_list_destroy(), stp_parameter_list_param(), stp_parameter_list_t, STP_PARAMETER_TYPE_BOOLEAN, STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_TYPE_DIMENSION, STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_TYPE_INT, STP_PARAMETER_TYPE_STRING_LIST, stp_send_command(), stp_vars_t, escp2_privdata_t::unit_scale, escp2_privdata_t::use_black_parameters, escp2_privdata_t::use_fast_360, escp2_privdata_t::use_printer_weave, escp2_privdata_t::variable_dots, res_t::vertical_passes, escp2_privdata_t::vertical_units, and res_t::vres. Referenced by escp2_set_remote_sequence().

void print_remote_float_param | ( | stp_vars_t * | v,
|  | const char * | param,
|  | double | value
| ) | `[static]`

| Definition at line 79 of file escp2-driver.c. References print_remote_param(), and stp_vars_t. Referenced by print_debug_params().

void print_remote_int_param | ( | stp_vars_t * | v,
|  | const char * | param,
|  | int | value
| ) | `[static]`

| Definition at line 71 of file escp2-driver.c. References print_remote_param(), and stp_vars_t. Referenced by print_debug_params().

void print_remote_param | ( | stp_vars_t * | v,
|  | const char * | param,
|  | const char * | value
| ) | `[static]`

| Definition at line 63 of file escp2-driver.c. References stp_send_command(), and stp_vars_t. Referenced by print_debug_params(), print_remote_float_param(), and print_remote_int_param().

void send_extra_data | ( | stp_vars_t * | v,
|  | int | extralines
| ) | `[static]`

| Definition at line 508 of file escp2-driver.c. References escp2_privdata_t::bitwidth, get_privdata(), escp2_privdata_t::horizontal_passes, escp2_privdata_t::image_printed_width, stp_free(), stp_malloc(), stp_putc(), stp_vars_t, and stp_zfwrite(). Referenced by stpi_escp2_flush_pass().

void send_print_command | ( | stp_vars_t * | v,
|  | stp_pass_t * | pass,
|  | int | color,
|  | int | nlines
| ) | `[static]`

| Definition at line 472 of file escp2-driver.c. References escp2_privdata_t::bitwidth, escp2_privdata_t::channels, physical_subchannel_t::color, escp2_privdata_t::command_set, COMPRESSION, escp2_privdata_t::extra_720dpi_separation, get_privdata(), escp2_privdata_t::horizontal_passes, escp2_privdata_t::image_printed_width, MODEL_COMMAND_PRO, escp2_privdata_t::nozzles, escp2_privdata_t::physical_xdpi, escp2_privdata_t::pseudo_separation_rows, escp2_privdata_t::separation_rows, stp_send_command(), stp_vars_t, physical_subchannel_t::subchannel, escp2_privdata_t::variable_dots, and escp2_privdata_t::vertical_units. Referenced by stpi_escp2_flush_pass().

void set_color | ( | stp_vars_t * | v,
|  | stp_pass_t * | pass,
|  | int | color
| ) | `[static]`

| Definition at line 436 of file escp2-driver.c. References escp2_privdata_t::channels, physical_subchannel_t::color, get_privdata(), escp2_privdata_t::last_color, stp_send_command(), stp_vars_t, physical_subchannel_t::subchannel, and escp2_privdata_t::use_extended_commands. Referenced by stpi_escp2_flush_pass().

void set_horizontal_position | ( | stp_vars_t * | v,
|  | stp_pass_t * | pass,
|  | int | vertical_subpass
| ) | `[static]`

| Definition at line 452 of file escp2-driver.c. References escp2_privdata_t::advanced_command_set, escp2_privdata_t::command_set, get_privdata(), escp2_privdata_t::horizontal_passes, res_t::hres, escp2_privdata_t::image_left_position, escp2_privdata_t::image_printed_width, escp2_privdata_t::image_scaled_width, escp2_privdata_t::micro_units, MODEL_COMMAND_PRO, escp2_privdata_t::res, stp_send_command(), stp_vars_t, and escp2_privdata_t::variable_dots. Referenced by stpi_escp2_flush_pass().

void set_vertical_position | ( | stp_vars_t * | v,
|  | stp_pass_t * | pass
| ) | `[static]`

| Definition at line 414 of file escp2-driver.c. References get_privdata(), escp2_privdata_t::last_pass, escp2_privdata_t::last_pass_offset, stp_pass_t::logicalpassstart, stp_pass_t::pass, escp2_privdata_t::printing_initial_vertical_offset, escp2_privdata_t::res, escp2_privdata_t::send_zero_pass_advance, escp2_privdata_t::separation_rows, stp_send_command(), stp_vars_t, escp2_privdata_t::use_extended_commands, escp2_privdata_t::vertical_units, and res_t::vres. Referenced by stpi_escp2_flush_pass().

void stpi_escp2_deinit_printer | ( | stp_vars_t * | v | ) |

| Definition at line 566 of file escp2-driver.c. References escp2_privdata_t::advanced_command_set, stp_raw_t::bytes, stp_raw_t::data, input_slot_t::deinit_sequence, escp2_privdata_t::deinit_sequence, get_privdata(), escp2_privdata_t::input_slot, stp_puts(), stp_send_command(), stp_vars_t, and stp_zfwrite(). Referenced by escp2_do_print().

void stpi_escp2_flush_pass | ( | stp_vars_t * | v,
|  | int | passno,
|  | int | vertical_subpass
| ) |

| Definition at line 589 of file escp2-driver.c. References escp2_privdata_t::channels_in_use, get_privdata(), escp2_privdata_t::min_nozzles, escp2_privdata_t::printed_something, send_extra_data(), send_print_command(), set_color(), set_horizontal_position(), set_vertical_position(), stp_get_lineactive_by_pass(), stp_get_linebases_by_pass(), stp_get_linecount_by_pass(), stp_get_lineoffsets_by_pass(), stp_get_pass_by_pass(), stp_send_command(), stp_vars_t, stp_zfwrite(), stp_lineactive_t::v, stp_linecount_t::v, and stp_lineoff_t::v. Referenced by escp2_print_page().

void stpi_escp2_init_printer | ( | stp_vars_t * | v | ) |

| Definition at line 549 of file escp2-driver.c. References escp2_reset_printer(), escp2_set_color(), escp2_set_dot_size(), escp2_set_form_factor(), escp2_set_graphics_mode(), escp2_set_margins(), escp2_set_page_height(), escp2_set_printer_weave(), escp2_set_printhead_resolution(), escp2_set_printhead_speed(), escp2_set_remote_sequence(), escp2_set_resolution(), and stp_vars_t. Referenced by escp2_do_print().

void stpi_escp2_terminate_page | ( | stp_vars_t * | v | ) |

| Definition at line 631 of file escp2-driver.c. References get_privdata(), escp2_privdata_t::input_slot, escp2_privdata_t::printed_something, input_slot_t::roll_feed_cut_flags, ROLL_FEED_DONT_EJECT, stp_send_command(), and stp_vars_t. Referenced by escp2_print_page().