home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / code / stubshack / HeapGraph / !HeapDisp / c / Update < prev   
Encoding:
Text File  |  1994-11-29  |  1.3 KB  |  47 lines

  1. #include "DeskLib:WimpSWIs.h"
  2.  
  3. #include "Update.h"
  4.  
  5.  
  6. void    ForceRegionUpdate( app_block *app, int pos, int size)
  7. {
  8. window_redrawblock    redrawblock;
  9. Shell_convertpoint    convert;
  10. wimp_rect        workrect;
  11. BOOL            more;
  12. wimp_point        rectsize;
  13.  
  14. rectsize.x = app->heaprect->rect.max.x - app->heaprect->rect.min.x;
  15. rectsize.y = app->heaprect->rect.max.y - app->heaprect->rect.min.y;
  16.  
  17. redrawblock.window = app->heaprect->window;
  18.  
  19. redrawblock.rect.min.x = app->heaprect->rect.min.x;
  20. redrawblock.rect.max.x = app->heaprect->rect.max.x;
  21. redrawblock.rect.min.y = ( pos - app->min_mem) / app->words_per_os - 4;
  22. redrawblock.rect.max.y = ( (pos+size) - app->min_mem) / app->words_per_os + 4;
  23.  
  24. Wimp_UpdateWindow( &redrawblock, &more);
  25.  
  26. convert.x = redrawblock.rect.min.x - redrawblock.scroll.x + app->heaprect->rect.min.x;
  27. convert.y = redrawblock.rect.max.y - redrawblock.scroll.y + app->heaprect->rect.min.y;
  28.  
  29. for    (
  30.     ;
  31.     more;
  32.     Wimp_GetRectangle( &redrawblock, &more)
  33.     )
  34.  
  35.     {
  36.     workrect.max.x = redrawblock.cliprect.max.x - convert.x;
  37.     workrect.min.x = redrawblock.cliprect.min.x - convert.x;
  38.     workrect.max.y = redrawblock.cliprect.max.y - convert.y;
  39.     workrect.min.y = redrawblock.cliprect.min.y - convert.y;
  40.  
  41.     ( *(app->heaprect->redrawer) ) ( convert, rectsize, app->heaprect->reference, &workrect);
  42.     /* Call the redrawing function for the rectangle */
  43.  
  44.     }
  45. }
  46.  
  47.