NetSurf
Functions | Variables
print.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ro_print_save_bounce (wimp_message *m)
 Handle a bounced message_PRINT_SAVE. More...
 
void ro_print_error (wimp_message *m)
 Handle message_PRINT_ERROR. More...
 
void ro_print_type_odd (wimp_message *m)
 Handle message_PRINT_TYPE_ODD. More...
 
bool ro_print_ack (wimp_message *m)
 Handle message_DATASAVE_ACK for the printing protocol. More...
 
void ro_print_dataload_bounce (wimp_message *m)
 Handle a bounced dataload message. More...
 
void ro_print_cleanup (void)
 Cleanup after printing. More...
 

Variables

struct gui_windowro_print_current_window
 

Function Documentation

◆ ro_print_ack()

bool ro_print_ack ( wimp_message *  m)

Handle message_DATASAVE_ACK for the printing protocol.

Parameters
mthe message to handle
Returns
true if message successfully handled, false otherwise

We cheat here and, instead of giving Printers what it asked for (a copy of the file so it can poke us later via a broadcast of PrintTypeOdd), we give it a file that it can print itself without having to bother us further. For PostScript printers (type 0) we give it a PostScript file. Otherwise, we give it a PrintOut file.

This method has a couple of advantages:

  • we can reuse this code for background printing (we simply ignore the PrintTypeOdd reply)
  • there's no need to ensure all components of a page queued to be printed still exist when it reaches the top of the queue. (which reduces complexity a fair bit)

Definition at line 429 of file print.c.

References NSLOG, print_document(), print_prev_message, ro_print_cleanup(), ro_print_current_window, ro_warn_user(), and type.

Referenced by ro_msg_datasave_ack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_print_cleanup()

void ro_print_cleanup ( void  )

Cleanup after printing.

Definition at line 502 of file print.c.

References dialog_print, print_max_sheets, print_prev_message, print_text_black, ro_gui_dialog_close(), ro_gui_menu_destroy(), and ro_print_current_window.

Referenced by print_send_printsave(), ro_gui_user_message(), ro_print_ack(), ro_print_dataload_bounce(), ro_print_error(), ro_print_save_bounce(), and ro_print_type_odd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_print_dataload_bounce()

void ro_print_dataload_bounce ( wimp_message *  m)

Handle a bounced dataload message.

Parameters
mthe message to handle

Definition at line 488 of file print.c.

References print_prev_message, and ro_print_cleanup().

Referenced by ro_gui_user_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_print_error()

void ro_print_error ( wimp_message *  m)

Handle message_PRINT_ERROR.

Parameters
mthe message containing the error

Definition at line 370 of file print.c.

References print_prev_message, ro_print_cleanup(), and ro_warn_user().

Referenced by ro_gui_user_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_print_save_bounce()

void ro_print_save_bounce ( wimp_message *  m)

Handle a bounced message_PRINT_SAVE.

Parameters
mthe bounced message

Definition at line 351 of file print.c.

References print_document(), print_prev_message, ro_print_cleanup(), and ro_print_current_window.

Referenced by ro_gui_user_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_print_type_odd()

void ro_print_type_odd ( wimp_message *  m)

Handle message_PRINT_TYPE_ODD.

Parameters
mthe message to handle

Definition at line 391 of file print.c.

References print_document(), print_in_background, print_prev_message, print_send_printtypeknown(), ro_print_cleanup(), and ro_print_current_window.

Referenced by ro_gui_user_message().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ro_print_current_window

struct gui_window* ro_print_current_window
extern
Todo:

landscape format pages

be somewhat more intelligent and try not to crop pages half way up a line of text

make use of print stylesheets

Definition at line 79 of file print.c.

Referenced by ro_gui_print_apply(), ro_gui_print_prepare(), ro_gui_user_message(), ro_print_ack(), ro_print_cleanup(), ro_print_save_bounce(), and ro_print_type_odd().