#define CKBORDER 2 /* space around X inside frame */
static int plldepth;
static Image *pl_white, *pl_light, *pl_dark, *pl_black, *pl_hilit;
+Image *pl_blue;
int pl_drawinit(int ldepth){
plldepth=ldepth;
/* mono */
pl_dark=allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x555555FF);
pl_black=allocimage(display, Rect(0,0,1,1), screen->chan, 1, 0x000000FF);
pl_hilit=allocimage(display, Rect(0,0,1,1), CHAN1(CAlpha,8), 1, 0x80);
- if(pl_white==0 || pl_light==0 || pl_black==0 || pl_dark==0) return 0;
+ pl_blue=allocimage(display, Rect(0,0,1,1), RGB24, 1, 0x0000FFFF);
+ if(pl_white==0 || pl_light==0 || pl_black==0 || pl_dark==0 || pl_blue==0) sysfatal("allocimage: %r");
return 1;
}
void pl_relief(Image *b, Image *ul, Image *lr, Rectangle r, int wid){
Panel *plkbfocus; /* the panel in keyboard focus */
+extern Image *pl_blue;
+
int plinit(int); /* initialization */
void plpack(Panel *, Rectangle); /* figure out where to put the Panel & children */
void plmove(Panel *, Point); /* move an already-packed panel to a new location */
Point lp, sp;
Rectangle dr;
Image *bb;
- Image *pl_blue;
- pl_blue=allocimage(display, Rect(0,0,1,1), RGB24, 1, 0x0000FFFF);
bb = b;
if(backup==0 || backup->chan!=b->chan || rectinrect(r, backup->r)==0){
freeimage(backup);
er=t->text+last;
for(r=t->text+first,lp=t->loc+(first-t->top);r!=er;r++,lp++){
if(lp->y+t->hgt>t->r.max.y){
- fprint(2, "chr %C, index %lld of %d, loc %d %d, off bottom\n",
+ fprint(2, "chr %C, index %zd of %d, loc %d %d, off bottom\n",
*r, lp-t->loc, t->bot-t->top, lp->x, lp->y);
return;
}