Esempio n. 1
0
void Scroll_scroll(
	struct Tracker_Windows *window,
	int num_lines
){
//  int lokke;
	struct WBlocks *wblock=window->wblock;

#if !USE_OPENGL

	int top_realline=wblock->top_realline;
	int bot_realline=wblock->bot_realline;

	/*
	if(num_lines<0){
		Scroll_freePixMapLines(window,bot_realline+num_lines+1,bot_realline);
	}else{
		Scroll_freePixMapLines(window,top_realline,top_realline+num_lines-1);
	}

//	printf("scroll1:\n");
//  for(lokke=0;lokke<window->wblock->num_visiblelines;lokke++)
//    printf("vis: %d, val: %d\n",lokke,window->pixmapdefs[lokke]);

	*/

	//	Scroll_scrollPixMapDefs(window,num_lines);

	PixMap_scrollDefs(
		window,
		num_lines
	);
#endif

//	printf("scroll2:\n");
//  for(lokke=0;lokke<window->wblock->num_visiblelines;lokke++)
//    printf("vis: %d, val: %d\n",lokke,window->pixmapdefs[lokke]);

	wblock->top_realline+=num_lines;
	wblock->curr_realline+=num_lines;
	wblock->bot_realline+=num_lines;

        GE_set_curr_realline(wblock->curr_realline);

#if !USE_OPENGL
	if(num_lines<0){
		Scroll_makePixMapLines(window,top_realline+num_lines,top_realline-1);
	}else{
		Scroll_makePixMapLines(window,bot_realline+1,bot_realline+num_lines);
	}
#endif

//	printf("scroll3: n: %d\n",num_lines);
//  for(lokke=0;lokke<window->wblock->num_visiblelines;lokke++)
//    printf("vis: %d, val: %d\n",lokke,window->pixmapdefs[lokke]);

	/*
	Scroll_drawPixMaps(window,wblock->top_realline,wblock->bot_realline);
	*/
}
Esempio n. 2
0
void Scroll_scroll(
                   struct Tracker_Windows *window,
                   int num_lines
){

  bool dopause = (ATOMIC_GET(root->play_cursor_onoff)==false);
  
  if (dopause)
    PC_Pause();
  
//  int lokke;
	struct WBlocks *wblock=window->wblock;

#if !USE_OPENGL

	int top_realline=wblock->top_realline;
	int bot_realline=wblock->bot_realline;

	/*
	if(num_lines<0){
		Scroll_freePixMapLines(window,bot_realline+num_lines+1,bot_realline);
	}else{
		Scroll_freePixMapLines(window,top_realline,top_realline+num_lines-1);
	}

//	printf("scroll1:\n");
//  for(lokke=0;lokke<window->wblock->num_visiblelines;lokke++)
//    printf("vis: %d, val: %d\n",lokke,window->pixmapdefs[lokke]);

	*/

	//	Scroll_scrollPixMapDefs(window,num_lines);

	PixMap_scrollDefs(
		window,
		num_lines
	);
#endif

//	printf("scroll2:\n");
//  for(lokke=0;lokke<window->wblock->num_visiblelines;lokke++)
//    printf("vis: %d, val: %d\n",lokke,window->pixmapdefs[lokke]);

	wblock->top_realline+=num_lines;
	wblock->curr_realline+=num_lines;
	wblock->bot_realline+=num_lines;

        //printf("scroll: Set realline to %d (%d)\n",wblock->curr_realline,num_lines);
        GE_set_curr_realline(wblock->curr_realline);

#if !USE_OPENGL
	if(num_lines<0){
		Scroll_makePixMapLines(window,top_realline+num_lines,top_realline-1);
	}else{
		Scroll_makePixMapLines(window,bot_realline+1,bot_realline+num_lines);
	}
#endif

        if (dopause)
          PC_StopPause(window);

        
//	printf("scroll3: n: %d\n",num_lines);
//  for(lokke=0;lokke<window->wblock->num_visiblelines;lokke++)
//    printf("vis: %d, val: %d\n",lokke,window->pixmapdefs[lokke]);

	/*
	Scroll_drawPixMaps(window,wblock->top_realline,wblock->bot_realline);
	*/
}