Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/src/cmd/mothra/libpanel/frame.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include <u.h>
#include <libc.h>
#include <draw.h>
#include <event.h>
#include <panel.h>
#include "pldefs.h"
void pl_drawframe(Panel *p){
	pl_box(p->b, p->r, FRAME);
}
int pl_hitframe(Panel *p, Mouse *m){
	USED(p, m);
	return 0;
}
void pl_typeframe(Panel *p, Rune c){
	USED(p, c);
}
Point pl_getsizeframe(Panel *p, Point children){
	USED(p);
	return pl_boxsize(children, FRAME);
}
void pl_childspaceframe(Panel *p, Point *ul, Point *size){
	USED(p);
	pl_interior(FRAME, ul, size);
}
void plinitframe(Panel *v, int flags){
	v->flags=flags;
	v->draw=pl_drawframe;
	v->hit=pl_hitframe;
	v->type=pl_typeframe;
	v->getsize=pl_getsizeframe;
	v->childspace=pl_childspaceframe;
	v->kind="frame";
}
Panel *plframe(Panel *parent, int flags){
	Panel *p;
	p=pl_newpanel(parent, 0);
	plinitframe(p, flags);
	return p;
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.