From b81d4e31bc54ad83527eef800db6706ce967d5e1 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Mon, 26 Mar 2018 23:36:28 +1100 Subject: Added FLTK.Devices.Surfaces.Paged.Printers --- src/c_fl_printer.cpp | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 src/c_fl_printer.cpp (limited to 'src/c_fl_printer.cpp') diff --git a/src/c_fl_printer.cpp b/src/c_fl_printer.cpp new file mode 100644 index 0000000..614012b --- /dev/null +++ b/src/c_fl_printer.cpp @@ -0,0 +1,96 @@ + + +#include +#include +#include +#include "c_fl_printer.h" + + + + +PRINTER new_fl_printer(void) { + Fl_Printer *p = new Fl_Printer(); + return p; +} + +void free_fl_printer(PRINTER p) { + delete reinterpret_cast(p); +} + + + + +int fl_printer_start_job(PRINTER p, int c) { + return reinterpret_cast(p)->start_job(c,0,0); +} + +int fl_printer_start_job2(PRINTER p, int c, int f, int t) { + return reinterpret_cast(p)->start_job(c,&f,&t); +} + +void fl_printer_end_job(PRINTER p) { + reinterpret_cast(p)->end_job(); +} + +int fl_printer_start_page(PRINTER p) { + return reinterpret_cast(p)->start_page(); +} + +int fl_printer_end_page(PRINTER p) { + return reinterpret_cast(p)->end_page(); +} + + + + +void fl_printer_margins(PRINTER p, int * l, int * t, int * r, int * b) { + reinterpret_cast(p)->margins(l,t,r,b); +} + +int fl_printer_printable_rect(PRINTER p, int * w, int * h) { + return reinterpret_cast(p)->printable_rect(w,h); +} + +void fl_printer_get_origin(PRINTER p, int * x, int * y) { + reinterpret_cast(p)->origin(x,y); +} + +void fl_printer_set_origin(PRINTER p, int x, int y) { + reinterpret_cast(p)->origin(x,y); +} + +void fl_printer_rotate(PRINTER p, float r) { + reinterpret_cast(p)->rotate(r); +} + +void fl_printer_scale(PRINTER p, float x, float y) { + reinterpret_cast(p)->scale(x,y); +} + +void fl_printer_translate(PRINTER p, int x, int y) { + reinterpret_cast(p)->translate(x,y); +} + +void fl_printer_untranslate(PRINTER p) { + reinterpret_cast(p)->untranslate(); +} + + + + +void fl_printer_print_widget(PRINTER p, void * i, int dx, int dy) { + reinterpret_cast(p)->print_widget(reinterpret_cast(i),dx,dy); +} + +void fl_printer_print_window_part(PRINTER p, void * i, int x, int y, int w, int h, int dx, int dy) { + reinterpret_cast(p)->print_window_part(reinterpret_cast(i),x,y,w,h,dx,dy); +} + + + + +void fl_printer_set_current(PRINTER p) { + reinterpret_cast(p)->set_current(); +} + + -- cgit