Пример #1
0
static void _override(PANEL *pan, int show)
{
    int y;
    PANEL *pan2;
    PANELOBS *tobs = pan->obscure;      /* "this" one */

    if (show == 1)
        Touchpan(pan);
    else if (!show)
    {
        Touchpan(pan);
        Touchpan(&_stdscr_pseudo_panel);
    }
    else if (show == -1)
        while (tobs && (tobs->pan != pan))
            tobs = tobs->above;

    while (tobs)
    {
        if ((pan2 = tobs->pan) != pan)
            for (y = pan->wstarty; y < pan->wendy; y++)
                if ((y >= pan2->wstarty) && (y < pan2->wendy) &&
                   ((is_linetouched(pan->win, y - pan->wstarty)) ||
                    (is_linetouched(stdscr, y))))
                    Touchline(pan2, y - pan2->wstarty, 1);

        tobs = tobs->above;
    }
}
Пример #2
0
/*
 * is_wintouched --
 *	Check if the window has been touched.
 */
bool
is_wintouched(WINDOW *win)
{
	int y, maxy;

	maxy = win->maxy;
	for (y = 0; y < maxy; y++) {
		if (is_linetouched(win, y) == TRUE)
			return TRUE;
	}

	return FALSE;
}
Пример #3
0
/*
 * std_touchup
 * Touch lines in obscuring panals as necessary.  This routine is
 * almost exactly like touchup, except that the "panel" is stdscr,
 * and the obscured list is the list of panels.
 */
static void
std_touchup(void)
{
	int	screen_y;

	/*
	 * for each line in stdscr which has been touched,
	 * touch lines in panals above it.
	 */

	for (screen_y = LINES - 1; screen_y >= 0; screen_y--) {
		if (is_linetouched(stdscr, screen_y) == TRUE)
			std_touch_top(screen_y, _Top_panel, 0, COLS - 1);
	}
}
Пример #4
0
/*+-------------------------------------------------------------------------
	__override(pan,show)
--------------------------------------------------------------------------*/
void
_nc_override(const PANEL *pan, int show)
{
  int y;
  PANEL *pan2;
  PANELCONS *tobs = pan->obscure;			   /* "this" one */

  dBug(("_nc_override %s,%d", USER_PTR(pan->user),show));

  switch (show)
    {
    case P_TOUCH:
      Touchpan(pan);
      /* The following while loop will now mark all panel window lines
       * obscured by use or obscuring us as touched, so they will be
       * updated.
       */
      break;
    case P_UPDATE:
      while(tobs && (tobs->pan != pan))
	tobs = tobs->above;
      /* The next loop will now only go through the panels obscuring pan;
       * it updates all the lines in the obscuring panels in sync. with
       * the lines touched in pan itself. This is called in update_panels()
       * in a loop from the bottom_panel to the top_panel, resulting in
       * the desired update effect.
       */
      break;
    default:
      return;
    }

  while(tobs)
    {
      if((pan2 = tobs->pan) != pan) {
	dBug(("test obs pan=%s pan2=%s", USER_PTR(pan->user), USER_PTR(pan2->user)));
	for(y = pan->wstarty; y < pan->wendy; y++) {
	  if( (y >= pan2->wstarty) && (y < pan2->wendy) &&
	      ((is_linetouched(pan->win,y - pan->wstarty) == TRUE)) )
	    Touchline(pan2,y - pan2->wstarty,1);
	}
      }
      tobs = tobs->above;
    }
}
Пример #5
0
/* touchup - Touch lines in obscuring panals as necessary */
static void
touchup(PANEL *panel)
{
	int	screen_y, i;

	/*
	 * for each line in the window which has been touched,
	 * touch lines in panals above it.
	 */

	screen_y = panel->wendy;

	for (i = panel->wendy - panel->wstarty; i >= 0; screen_y--, i--) {
		if (is_linetouched(panel -> win, i) == TRUE)
			touch_top(panel, screen_y, panel->obscured->next,
			    panel->wstartx, panel->wendx);
	}
}
Пример #6
0
//------------------------------------------------------------------------------
static void _override( PANEL* pan, int show )
{
	__QCS_FCONTEXT( "_override" );

    int y;
    PANEL* pan2;
    PANELOBS* tobs = pan->obscure;      // "this" one

    if( show == 1 )
	{
        Touchpan( pan );
	}
    else if( !show )
    {
        Touchpan( pan );
        Touchpan( &_stdscr_pseudo_panel );
    }
    else if ( show == -1 )
	{
        while( tobs && ( tobs->pan != pan ) )
		{
            tobs = tobs->above;
		}
	}

    while( tobs )
    {
        if( ( pan2 = tobs->pan ) != pan )
		{
            for( y = pan->wstarty; y < pan->wendy; y++ )
			{
                if( ( y >= pan2->wstarty ) && ( y < pan2->wendy ) && ( ( is_linetouched( pan->win, y - pan->wstarty ) ) || ( is_linetouched( stdscr, y ) ) ) )
				{
                    Touchline( pan2, y - pan2->wstarty, 1 );
				}
			}
		}

        tobs = tobs->above;
    }
}
Пример #7
0
EIF_INTEGER c_ecurses_is_linetouched (EIF_POINTER w, EIF_INTEGER line)
{
    return is_linetouched ( ((WINDOW *) w) , (int) line) ;
};