NetSurf
Data Structures | Macros | Enumerations | Functions | Variables
print.c File Reference
#include "amiga/os3support.h"
#include <string.h>
#include <proto/utility.h>
#include <proto/iffparse.h>
#include <proto/dos.h>
#include <proto/intuition.h>
#include <proto/Picasso96API.h>
#include <devices/printer.h>
#include <devices/prtbase.h>
#include <prefs/prefhdr.h>
#include <prefs/printertxt.h>
#include <libraries/gadtools.h>
#include <proto/window.h>
#include <proto/layout.h>
#include <proto/integer.h>
#include <proto/label.h>
#include <proto/chooser.h>
#include <proto/fuelgauge.h>
#include <classes/window.h>
#include <gadgets/fuelgauge.h>
#include <gadgets/layout.h>
#include <gadgets/integer.h>
#include <gadgets/chooser.h>
#include <images/label.h>
#include <reaction/reaction_macros.h>
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/nsurl.h"
#include "netsurf/plotters.h"
#include "netsurf/layout.h"
#include "netsurf/mouse.h"
#include "netsurf/window.h"
#include "netsurf/content.h"
#include "desktop/printer.h"
#include "desktop/print.h"
#include "amiga/plotters.h"
#include "amiga/font.h"
#include "amiga/gui.h"
#include "amiga/libs.h"
#include "amiga/misc.h"
#include "amiga/print.h"
#include "amiga/utf8.h"
Include dependency graph for print.c:

Go to the source code of this file.

Data Structures

struct  ami_printer_info
 
struct  ami_print_window
 

Macros

#define IFFPrefChunkCnt   2
 

Enumerations

enum  {
  POID_MAIN = 0 , POID_LAST , PGID_MAIN , PGID_PRINTER ,
  PGID_SCALE , PGID_COPIES , PGID_PRINT , PGID_CANCEL ,
  PGID_STATUS , PGID_LAST
}
 

Functions

bool ami_print_begin (struct print_settings *ps)
 
bool ami_print_next_page (void)
 
void ami_print_end (void)
 
bool ami_print_dump (void)
 
void ami_print_progress (void)
 
void ami_print_close_device (void)
 
static BOOL ami_print_event (void *w)
 
static void ami_print_ui_setup (void)
 
static void ami_print_ui_free (void)
 
static BOOL ami_print_readunit (CONST_STRPTR filename, char name[], uint32 namesize, int unitnum)
 
void ami_print_ui (struct hlcache_handle *c)
 
static void ami_print_close (struct ami_print_window *pw)
 
void ami_print (struct hlcache_handle *c, int copies)
 
bool ami_print_cont (void)
 
struct MsgPort * ami_print_init (void)
 
void ami_print_free (void)
 
struct MsgPort * ami_print_get_msgport (void)
 

Variables

const struct printer amiprinter
 
static LONG IFFPrefChunks []
 
static struct ami_printer_info ami_print_info
 
static CONST_STRPTR gadlab [PGID_LAST]
 
static STRPTR printers [11]
 
static const struct ami_win_event_table ami_print_table
 

Macro Definition Documentation

◆ IFFPrefChunkCnt

#define IFFPrefChunkCnt   2

Definition at line 121 of file print.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
POID_MAIN 
POID_LAST 
PGID_MAIN 
PGID_PRINTER 
PGID_SCALE 
PGID_COPIES 
PGID_PRINT 
PGID_CANCEL 
PGID_STATUS 
PGID_LAST 

Definition at line 76 of file print.c.

Function Documentation

◆ ami_print()

void ami_print ( struct hlcache_handle c,
int  copies 
)

Definition at line 408 of file print.c.

References AllocSysObjectTags, ami_layout_table, ami_print_close_device(), ami_print_cont(), ami_print_info, ami_print_init(), ami_print_progress(), amiga_warn_user(), amiprinter, ASO_NoTrack, ASOT_IOREQUEST, ami_printer_info::c, ami_printer_info::gg, height, hlcache_handle_get_url(), ami_printer_info::msgport, nsoption_int, nsurl_access(), print_settings::page_height, print_settings::page_width, ami_printer_info::pages, ami_printer_info::PD, ami_printer_info::PED, ami_printer_info::PReq, PRINT_DEFAULT, print_make_settings(), print_scale, print_set_up(), print_settings::priv, ami_printer_info::ps, and print_settings::scale.

Referenced by ami_print_event().

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

◆ ami_print_begin()

bool ami_print_begin ( struct print_settings ps)

Definition at line 499 of file print.c.

References ami_plot_ra_alloc(), ami_print_info, ami_printer_info::gg, ami_printer_info::page, and ami_printer_info::PED.

Here is the call graph for this function:

◆ ami_print_close()

static void ami_print_close ( struct ami_print_window pw)
static

Definition at line 349 of file print.c.

References ami_gui_win_list_remove(), ami_print_ui_free(), ami_print_window::objects, and POID_MAIN.

Referenced by ami_print_event().

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

◆ ami_print_close_device()

void ami_print_close_device ( void  )

Definition at line 531 of file print.c.

References ami_print_info, ASOT_IOREQUEST, FreeSysObject(), and ami_printer_info::PReq.

Referenced by ami_print(), and ami_print_end().

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

◆ ami_print_cont()

bool ami_print_cont ( void  )

Definition at line 460 of file print.c.

References ami_print_dump(), ami_print_info, amiprinter, ami_printer_info::c, ami_printer_info::page, ami_printer_info::pages, print_cleanup(), print_draw_next_page(), and ami_printer_info::ps.

Referenced by ami_get_msg(), and ami_print().

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

◆ ami_print_dump()

bool ami_print_dump ( void  )

Definition at line 537 of file print.c.

References ami_plot_ra_get_rastport(), ami_print_info, ami_printer_info::gg, ami_printer_info::PED, and ami_printer_info::PReq.

Referenced by ami_print_cont().

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

◆ ami_print_end()

void ami_print_end ( void  )

Definition at line 522 of file print.c.

References ami_plot_ra_free(), ami_print_close_device(), ami_print_free(), ami_print_info, ami_printer_info::gg, ami_printer_info::objects, and POID_MAIN.

Here is the call graph for this function:

◆ ami_print_event()

static BOOL ami_print_event ( void *  w)
static

Definition at line 357 of file print.c.

References ami_print(), ami_print_close(), nsoption_set_int, PGID_CANCEL, PGID_COPIES, PGID_PRINT, PGID_PRINTER, PGID_SCALE, POID_MAIN, print_scale, hlcache_handle::pw, result, and ami_print_window::w.

Here is the call graph for this function:

◆ ami_print_free()

void ami_print_free ( void  )

Definition at line 488 of file print.c.

References ami_print_info, ASOT_PORT, FreeSysObject(), and ami_printer_info::msgport.

Referenced by ami_print_end().

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

◆ ami_print_get_msgport()

struct MsgPort * ami_print_get_msgport ( void  )

Definition at line 494 of file print.c.

References ami_print_info, and ami_printer_info::msgport.

Referenced by ami_get_msg().

Here is the caller graph for this function:

◆ ami_print_init()

struct MsgPort * ami_print_init ( void  )

Definition at line 479 of file print.c.

References AllocSysObjectTags, ami_print_info, ASO_NoTrack, ASOT_PORT, and ami_printer_info::msgport.

Referenced by ami_print().

Here is the caller graph for this function:

◆ ami_print_next_page()

bool ami_print_next_page ( void  )

Definition at line 511 of file print.c.

References ami_print_info, ami_printer_info::gadgets, ami_printer_info::page, PGID_STATUS, RefreshSetGadgetAttrs(), and ami_printer_info::win.

Here is the call graph for this function:

◆ ami_print_progress()

void ami_print_progress ( void  )

Definition at line 558 of file print.c.

References ami_gui_get_screen(), ami_gui_get_screen_title(), ami_print_info, FuelGaugeObj, ami_printer_info::gadgets, LayoutVObj, messages_get(), ami_printer_info::objects, ami_printer_info::pages, PGID_MAIN, PGID_STATUS, POID_MAIN, ami_printer_info::win, and WindowObj.

Referenced by ami_print().

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

◆ ami_print_readunit()

static BOOL ami_print_readunit ( CONST_STRPTR  filename,
char  name[],
uint32  namesize,
int  unitnum 
)
static

Definition at line 162 of file print.c.

References IFFPrefChunkCnt, IFFPrefChunks, and SNPrintf.

Referenced by ami_print_ui().

Here is the caller graph for this function:

◆ ami_print_ui()

void ami_print_ui ( struct hlcache_handle c)

Definition at line 243 of file print.c.

References ami_gui_get_screen(), ami_gui_get_screen_title(), ami_gui_get_shared_msgport(), ami_gui_win_list_add(), ami_print_readunit(), ami_print_table, ami_print_ui_setup(), AMINS_PRINTWINDOW, ButtonObj, ami_print_window::c, ami_print_window::gadgets, gadlab, IntegerObj, LayoutVObj, nsoption_int, ami_print_window::objects, PGID_CANCEL, PGID_COPIES, PGID_MAIN, PGID_PRINT, PGID_PRINTER, PGID_SCALE, POID_MAIN, print_scale, printers, ami_print_window::win, and WindowObj.

Referenced by HOOKF().

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

◆ ami_print_ui_free()

static void ami_print_ui_free ( void  )
static

Definition at line 149 of file print.c.

References gadlab, PGID_LAST, and printers.

Referenced by ami_print_close().

Here is the caller graph for this function:

◆ ami_print_ui_setup()

static void ami_print_ui_setup ( void  )
static

Definition at line 140 of file print.c.

References ami_utf8_easy(), gadlab, messages_get(), PGID_CANCEL, PGID_COPIES, PGID_PRINT, PGID_PRINTER, and PGID_SCALE.

Referenced by ami_print_ui().

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

Variable Documentation

◆ ami_print_info

struct ami_printer_info ami_print_info
static

◆ ami_print_table

const struct ami_win_event_table ami_print_table
static
Initial value:
= {
NULL,
}
static BOOL ami_print_event(void *w)
Definition: print.c:357

Definition at line 135 of file print.c.

Referenced by ami_print_ui().

◆ amiprinter

const struct printer amiprinter
Initial value:
= {
}
const struct plotter_table amiplot
Definition: plotters.c:1180
bool ami_print_begin(struct print_settings *ps)
Definition: print.c:499
void ami_print_end(void)
Definition: print.c:522
bool ami_print_next_page(void)
Definition: print.c:511

Definition at line 90 of file print.c.

Referenced by ami_print(), and ami_print_cont().

◆ gadlab

CONST_STRPTR gadlab[PGID_LAST]
static

Definition at line 130 of file print.c.

Referenced by ami_print_ui(), ami_print_ui_free(), and ami_print_ui_setup().

◆ IFFPrefChunks

LONG IFFPrefChunks[]
static
Initial value:
=
{
ID_PREF, ID_PRHD,
ID_PREF, ID_PDEV,
}

Definition at line 122 of file print.c.

Referenced by ami_print_readunit().

◆ printers

STRPTR printers[11]
static

Definition at line 131 of file print.c.

Referenced by ami_print_ui(), and ami_print_ui_free().