Example #1
0
Window*
wtop(void)
{
	print_func_entry();
	exits("wtop!");
#if 0
	Window *w;

	w = wpointto(pt);
	if(w){
		if(w->topped == topped)
			return nil;
		topwindow(w->i);
		wcurrent(w);
		w->topped = ++topped;
	}
#endif
	print_func_exit();
	return nil;
}
Example #2
0
void
setfocus(Win *w)
{
	if(actw != nil)
		border(actw->im, actw->entire, BORDSIZ, actw->tab->cols[DISB], ZP);
	actw = w;
	if(w != cmdw)
		actf = w;
	if(w == nil)
		return;
	if(w->im == nil)
		sysfatal("setfocus: phase error");
	topwindow(w->im);
	w->prev->next = w->next;
	w->next->prev = w->prev;
	w->prev = wlist.prev;
	w->next = &wlist;
	w->prev->next = w;
	w->next->prev = w;
	border(w->im, w->entire, BORDSIZ, w->tab->cols[BORD], ZP);
}
Example #3
0
int checkformacs(){
	short mcto=0;
	char temps[2048];

	if(kreturn==11779){
	if(wn[cwin].chan>-1)closchan(wn[cwin].chan);
	return 1;
	}
	
	if(kreturn==19200){
	if(wn[cwin].cx>0){wn[cwin].cx--;return 1;}
	else{
	if(wn[cwin].cvof==0)return 1;
	if(wn[cwin].cvof!=0){wn[cwin].cvof--;wn[cwin].cx=wn[cwin].ihc[wn[cwin].cvof];ipbredraw(cwin);return 1;}
	}
	return 1;
	}
	if(kreturn==19712){
	if(wn[cwin].cx<wn[cwin].ihc[wn[cwin].cvof]){wn[cwin].cx++;return 1;}
	else{
	if(wn[cwin].cx==wn[cwin].ihc[wn[cwin].cvof]){
	if(wn[cwin].ihc[wn[cwin].cvof+1]){wn[cwin].cvof++;wn[cwin].cx=0;ipbredraw(cwin);return 1;}
	else{
	return 1;
	}
	}
	}
	return 1;
	}
	
	if(kreturn==283){
	clearipb(cwin);
	return 1;
	}
	if(kreturn==3849){
	clearipb(cwin);
	strcpy(temps,"/msg ");
	if(lastnt){
	mcto=0;
	lastnc++;
	while(!strlen(lastn[lastnc]) && mcto!=50){
	lastnc++;
	if(lastnc==20)lastnc=0;
	mcto++;
	if(mcto==21)mcto=50;
	}
	}
	if(strlen(lastn[lastnc])){strcat(temps,lastn[lastnc]);strcat(temps," ");wtib(temps,1);}
	lastnt=20;
	return 1;
	}
	
	if(kreturn==15104){doms(0);return 1;}
	if(kreturn==15360){doms(1);return 1;}
	if(kreturn==15616){doms(2);return 1;}
	if(kreturn==15872){doms(3);return 1;}
	if(kreturn==16128){doms(4);return 1;}
	if(kreturn==16384){doms(5);return 1;}
	if(kreturn==16640){doms(6);return 1;}
	if(kreturn==16896){doms(7);return 1;}
	if(kreturn==17152){doms(8);return 1;}
	if(kreturn==17408){doms(9);return 1;}
	
	if(kreturn==30720 && wn[0].hand>-1){topwindow(0);return 1;}
	if(kreturn==30976 && wn[1].hand>-1){topwindow(1);return 1;}
	if(kreturn==31232 && wn[2].hand>-1){topwindow(2);return 1;}
	if(kreturn==31488 && wn[3].hand>-1){topwindow(3);return 1;}
	if(kreturn==31744 && wn[4].hand>-1){topwindow(4);return 1;}
	if(kreturn==32000 && wn[5].hand>-1){topwindow(5);return 1;}
	if(kreturn==3103){
	wtib("",0);
	return 1;
	}
	if(kreturn==3357){
	wtib("",0);
	return 1;
	}
	if(kreturn==10496){
	wtib("",0);
	return 1;
	}
	if(kreturn==2832){
	wtib("",0);
	return 1;
	}
	
	if(kreturn==4096){
	mcto=0;
	while(mcto<NOFWIN)
	{
	if(cn[mcto].cn>-1){
	if(form_alert(2,"[1][Still connected!|Are you sure?][No!][Yes!]")==1)return 1;
	mcto=NOFWIN;
	}
	mcto++;
	}
	mcto=0;
	while(mcto<10)
	{
	if(dcc[mcto].stat){
	if(form_alert(2,"[1][DCC transfer open!|Are you sure?][No!][Yes!]")==1)return 1;
	mcto=10;
	}
	mcto++;
	}
	qt();
	}
	if(kreturn==19252){
	cycchan(BACKWARDS);
	return 1;
	}
	if(kreturn==19766){
	cycchan(FORWARDS);
	return 1;
	}
	if(kreturn==29440){
	cycwin(BACKWARDS);
	return 1;
	}
	if(kreturn==29696){
	cycwin(FORWARDS);
	return 1;
	}
	if(kreturn==4375){
	openwin(0,0,0,0,2);
	return 1;
	}
	if(kreturn==5653){
	dodccsend();
	return 1;
	}
	if(kreturn==4113){
	disnnect(wn[cwin].cnn);
	return 1;
	}
	if(kreturn==12813 && cwin>-1){
	closewin(cwin);
	return 1;
	}
	if(kreturn==6159){
	sortconnection();
	return 1;
	}
	return 0;
	}