comparison mac/dw.m @ 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 6828a01ecf3c
children 8d8c73fb27f4
comparison
equal deleted inserted replaced
1136:1a5b0908659b 1137:e24e5a13ff2c
9260 { 9260 {
9261 NSURL *myurl = [NSURL URLWithString:[NSString stringWithUTF8String:url]]; 9261 NSURL *myurl = [NSURL URLWithString:[NSString stringWithUTF8String:url]];
9262 [[NSWorkspace sharedWorkspace] openURL:myurl]; 9262 [[NSWorkspace sharedWorkspace] openURL:myurl];
9263 return DW_ERROR_NONE; 9263 return DW_ERROR_NONE;
9264 } 9264 }
9265
9266 /*
9267 * Creates a new print object.
9268 * Parameters:
9269 * flags: Flags to initially configure the print object.
9270 * pages: Number of pages to print.
9271 * drawfunc: The pointer to the function to be used as the callback.
9272 * drawdata: User data to be passed to the handler function.
9273 * Returns:
9274 * A handle to the print object or NULL on failure.
9275 */
9276 HPRINT API dw_print_new(unsigned long flags, unsigned int pages, void *drawfunc, void *drawdata)
9277 {
9278 return NULL;
9279 }
9280
9281 /*
9282 * Runs the print job, causing the draw page callbacks to fire.
9283 * Parameters:
9284 * print: Handle to the print object returned by dw_print_new().
9285 * flags: Flags to run the print job.
9286 * Returns:
9287 * DW_ERROR_UNKNOWN on error or DW_ERROR_NONE on success.
9288 */
9289 int API dw_print_run(HPRINT print, unsigned long flags)
9290 {
9291 return DW_ERROR_UNKNOWN;
9292 }
9293
9294 /*
9295 * Cancels the print job, typically called from a draw page callback.
9296 * Parameters:
9297 * print: Handle to the print object returned by dw_print_new().
9298 */
9299 void API dw_print_cancel(HPRINT print)
9300 {
9301 }
9302