home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / VIDEO / WMINSLIN.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  735 b   |  31 lines

  1. /* wminslin.c (emx+gcc) -- Copyright (c) 1987-1993 by Eberhard Mattes */
  2.  
  3. #include <string.h>
  4. #include <sys/winmgr.h>
  5. #include "winmgr2.h"
  6.  
  7. void wm_ins_line (wm_handle wh, int y, int count)
  8. {
  9.   int i;
  10.   char *p1, *p2;
  11.  
  12.   if (wh->used != WM_USED || count <= 0)
  13.     return;
  14.   if (count > wh->height)
  15.     count = wh->height;
  16.   for (i = wh->height - count - 1; i >= y; --i)
  17.     {
  18.       p1 = &DATA (wh, wh->ax, i+wh->ay);
  19.       p2 = p1 + 2 * count * wh->bwidth;
  20.       memmove (p2, p1, 2 * wh->width);
  21.     }
  22.   for (i = 0; i < count; ++i)
  23.     _wm_clrline1 (wh, i+y+wh->ay, wh->ax,
  24.                   wh->width-1+wh->ax);
  25.   if (wh->display)
  26.     _wm_put1 (wh);
  27.   else
  28.     wh->update_req = TRUE;
  29.   _wm_cursor1 ();
  30. }
  31.