Mercurial > dwindows
comparison dwtest.c @ 1343:d4c874f13e9b
More fixes for OS/2 gcc/gmake. Need to use := to evaluate the $(shell) variable.
Fixed a few OS/2 gcc warnings in dwtest.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 14 Nov 2011 21:22:21 +0000 |
parents | 03f0bc85e7be |
children | 1f22addc2722 |
comparison
equal
deleted
inserted
replaced
1342:b4a23eab81fa | 1343:d4c874f13e9b |
---|---|
426 if(current_file) | 426 if(current_file) |
427 { | 427 { |
428 int nrows; | 428 int nrows; |
429 | 429 |
430 /* Calculate new dimensions */ | 430 /* Calculate new dimensions */ |
431 dw_font_text_extents_get(NULL, pixmap, "(g", NULL, &fheight); | 431 dw_font_text_extents_get(0, pixmap, "(g", NULL, &fheight); |
432 nrows = (int)(DW_PIXMAP_HEIGHT(pixmap) / fheight); | 432 nrows = (int)(DW_PIXMAP_HEIGHT(pixmap) / fheight); |
433 | 433 |
434 /* Do the actual drawing */ | 434 /* Do the actual drawing */ |
435 draw_file(0, 0, nrows, fheight, pixmap); | 435 draw_file(0, 0, nrows, fheight, pixmap); |
436 } | 436 } |
438 { | 438 { |
439 /* We don't have a file so center an error message on the page */ | 439 /* We don't have a file so center an error message on the page */ |
440 char *text = "No file currently selected!"; | 440 char *text = "No file currently selected!"; |
441 int posx, posy; | 441 int posx, posy; |
442 | 442 |
443 dw_font_text_extents_get(NULL, pixmap, text, &fwidth, &fheight); | 443 dw_font_text_extents_get(0, pixmap, text, &fwidth, &fheight); |
444 | 444 |
445 posx = (int)(DW_PIXMAP_WIDTH(pixmap) - fwidth)/2; | 445 posx = (int)(DW_PIXMAP_WIDTH(pixmap) - fwidth)/2; |
446 posy = (int)(DW_PIXMAP_HEIGHT(pixmap) - fheight)/2; | 446 posy = (int)(DW_PIXMAP_HEIGHT(pixmap) - fheight)/2; |
447 | 447 |
448 dw_color_foreground_set(DW_CLR_BLACK); | 448 dw_color_foreground_set(DW_CLR_BLACK); |
449 dw_color_background_set(DW_CLR_WHITE); | 449 dw_color_background_set(DW_CLR_WHITE); |
450 dw_draw_text(NULL, pixmap, posx, posy, text); | 450 dw_draw_text(0, pixmap, posx, posy, text); |
451 } | 451 } |
452 } | 452 } |
453 return TRUE; | 453 return TRUE; |
454 } | 454 } |
455 | 455 |