home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / Libraries / Icon / c / LoseCaret < prev    next >
Encoding:
Text File  |  1992-03-23  |  446 b   |  18 lines

  1. #include "Wimp.h"
  2. #include "WimpSWIs.h"
  3. #include "Icon.h"
  4.  
  5. extern void Icon_LoseCaret(window_handle window, icon_handle icon)
  6. /* Icon_LoseCaret
  7.  * This routine ensures that the caret is *not* contained within the
  8.  * designated icon. Only sets a new position if the icon currently contains
  9.  *  the caret.
  10.  */
  11. {
  12.   caret_block caret;
  13.  
  14.   Wimp_GetCaretPosition(&caret);
  15.   if (caret.window == window && caret.icon == icon)
  16.     Icon_SetCaret(-1, -1);
  17. }
  18.