diff win/dw.c @ 1137:e24e5a13ff2c

Added code to test the new print functions in dwtest. GTK3 code mostly works except the for the text. Added stub print functions to all platforms besides GTK3. Need to decide what to do about GTK2; the GTK3 code will work in GTK 2.10 and later, but will require switching to cairo. Mac/Win/OS2 code coming soon. :)
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 09 Sep 2011 09:17:09 +0000
parents 6d618dcff792
children caeae1ff0289
line wrap: on
line diff
--- a/win/dw.c	Fri Sep 09 00:28:25 2011 +0000
+++ b/win/dw.c	Fri Sep 09 09:17:09 2011 +0000
@@ -9991,6 +9991,43 @@
 }
 
 /*
+ * Creates a new print object.
+ * Parameters:
+ *       flags: Flags to initially configure the print object.
+ *       pages: Number of pages to print.
+ *       drawfunc: The pointer to the function to be used as the callback.
+ *       drawdata: User data to be passed to the handler function.
+ * Returns:
+ *       A handle to the print object or NULL on failure.
+ */
+HPRINT API dw_print_new(unsigned long flags, unsigned int pages, void *drawfunc, void *drawdata)
+{
+   return NULL;
+}
+
+/*
+ * Runs the print job, causing the draw page callbacks to fire.
+ * Parameters:
+ *       print: Handle to the print object returned by dw_print_new().
+ *       flags: Flags to run the print job.
+ * Returns:
+ *       DW_ERROR_UNKNOWN on error or DW_ERROR_NONE on success.
+ */
+int API dw_print_run(HPRINT print, unsigned long flags)
+{
+   return DW_ERROR_UNKNOWN;
+}
+
+/*
+ * Cancels the print job, typically called from a draw page callback.
+ * Parameters:
+ *       print: Handle to the print object returned by dw_print_new().
+ */
+void API dw_print_cancel(HPRINT print)
+{
+}
+
+/*
  * Returns a pointer to a static buffer which containes the
  * current user directory.  Or the root directory (C:\ on
  * OS/2 and Windows).