CAPS Universe documentation  1.0.4
All you need to know to be successful
Functions
libcapsraster-helper.c File Reference

Some internal helper functions. More...

Functions

static void progression_info_update (struct rstr_print_state *state, struct caps_job_progression *prog_info, unsigned copies, bool collating)
 
int handle_next_page (struct document_desc *job)
 
void handle_initial_page (struct document_desc *job, unsigned pcnt)
 

Detailed Description

Author
Jürgen Borleis
Version
1.0.0
Warning
Use as experimental

These functions keep track of the walk through the document and the two major printing options: non-collate and collate. The functions are more complex to be able to deal with copies at the same time. Refer print-simplex.c and print-duplex.c for details.

Function Documentation

◆ progression_info_update()

static void progression_info_update ( struct rstr_print_state state,
struct caps_job_progression prog_info,
unsigned  copies,
bool  collating 
)
static

Update the printing progression info

Parameters
[in,out]stateThe current printing state
[in,out]prog_infoWhere to store progression info
[in]copiesThe defined copy count (by the user)
[in]collatingTrue, if this job is a collating one
Note
The parameters are selected in order to test this function. So don't use document_desc for all of them instead (wich would work…)

◆ handle_next_page()

int handle_next_page ( struct document_desc job)

Handle all these ugly details to calculate the next page to print

Parameters
[in,out]jobInfos about the print job
Return values
0A new page was selected and must be rasterized
1The same page was kept, no rasterizing required.

◆ handle_initial_page()

void handle_initial_page ( struct document_desc job,
unsigned  pcnt 
)

Setup information prior processing a printing job

Parameters
[in,out]jobInfos about the print job
[in]pcntFull page count of this document (from the selected rasterizer)

Handles simplex and duplex prints, with collation or non-collating and one copy (per medium or per document) or more than one copies (per medium or per document).

Here, the full amount of to be printed pages gets calculated as well. Refer caps_pp_job_progression_report() for what it's good for…

Note
Keep caps_rstr_page_desc::copies = '0' here, to enter the printing loop correctly
Precondition
job_page_count_calculate() must be already called