home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / CSAPE32.ARJ / SOURCE / OWLSCR / BOBSET.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-28  |  829 b   |  51 lines

  1. /*
  2.     bobset.c
  3.  
  4.     % bob_SetPosition, bob_GetPosition
  5.  
  6.     No one uses these things but they're in the manual
  7.     so....
  8.  
  9.     OWL 1.2
  10.     Copyright (c) 1989, by Oakland Group, Inc.
  11.     ALL RIGHTS RESERVED.
  12.  
  13.     Revision History:
  14.     -----------------
  15.      3/28/90 jmd    ansi-fied
  16. */
  17.  
  18. #include "oakhead.h"
  19. #include "disppriv.h"
  20. #include "bordobj.h"
  21.  
  22. void bob_GetPosition(bob_type bob, int *rowp, int *colp)
  23. /*
  24.     Get the position of a bob.
  25. */
  26. {
  27.     if (bob_IsWin(bob)) {
  28.         *rowp = bord_GetTopRow(bob);
  29.         *colp = bord_GetLeftCol(bob);
  30.     }
  31.     else {
  32.         *rowp = 0;
  33.         *colp = 0;
  34.     }
  35. }
  36.  
  37. void bob_GetSize(bob_type bob, int *heightp, int *widthp)
  38. /*
  39.     Get the height and width of a bob.
  40. */
  41. {
  42.     if (bob_IsWin(bob)) {
  43.         *heightp = bord_GetHeight(bob);
  44.         *widthp = bord_GetWidth(bob);
  45.     }
  46.     else {
  47.         *heightp = 0;
  48.         *widthp = 0;
  49.     }
  50. }
  51.