Beispiel #1
0
/* Free the resources tied up by 'win'.  Return 0 for success. */
int
win_del(Tile *w) {
	if(!w)
		return 0;

	assert(ISWIN(w));

	/* make sure we can delete the body */
	if(view_delete(w->body)){
		return -1;
	}
	/* delete the tag, and the tile */
	view_delete(w->tag);
	tile_del(w);
	return 0;
}
Beispiel #2
0
void viewglut_delete(viewglut *P)
{
    assert(P);

    glDeleteBuffers(1, &P->axes);
    glDeleteBuffers(1, &P->rect);

    view_delete(P->V);
}
Beispiel #3
0
/*#DOC*/
View view_init(View v, int x, int y, int w, int h)
{
	if (NULL == v) return NULL;
	/* Allow relative positions */
	x = viewP_posrelat(x, TERM_W);
	y = viewP_posrelat(y, TERM_H);
	w = viewP_posrelat(w, TERM_W - x);
	h = viewP_posrelat(h, TERM_H - y);

	v->_win = newwin(h, w, y, x);
	v->_pan = new_panel(view_win(v));
	v->_sty = 0;
	if (NULL == view_win(v) || NULL == view_pan(v)) {
		view_delete(v); return NULL;
	} /* set_panel_userptr(view_pan(v), v); /@* Loopback pointer */
	keypad(view_win(v), TRUE);
	return v;
}