Lines Matching defs:sx
296 grid_create(u_int sx, u_int sy, u_int hlimit)
301 gd->sx = sx;
340 if (ga->sx != gb->sx || ga->sy != gb->sy)
479 grid_expand_line(struct grid *gd, u_int py, u_int sx, u_int bg)
485 if (sx <= gl->cellsize)
488 if (sx < gd->sx / 4)
489 sx = gd->sx / 4;
490 else if (sx < gd->sx / 2)
491 sx = gd->sx / 2;
492 else if (gd->sx > sx)
493 sx = gd->sx;
495 gl->celldata = xreallocarray(gl->celldata, sx, sizeof *gl->celldata);
496 for (xx = gl->cellsize; xx < sx; xx++)
498 gl->cellsize = sx;
507 grid_expand_line(gd, py, gd->sx, bg);
634 u_int xx, yy, ox, sx;
639 if (px == 0 && nx == gd->sx) {
652 sx = gd->sx;
653 if (sx > gl->cellsize)
654 sx = gl->cellsize;
657 if (px > sx)
659 if (px + nx > sx)
660 ox = sx - px;
1230 grid_reflow_join(struct grid *target, struct grid *gd, u_int sx, u_int yy,
1280 if (width + gc.data.width > sx)
1290 if (width + gc.data.width > sx)
1303 if (!wrapped || want != from->cellused || width == sx)
1338 grid_reflow_split(struct grid *target, struct grid *gd, u_int sx, u_int yy,
1349 lines = 1 + (gl->cellused - 1) / sx;
1355 if (width + gc.data.width > sx) {
1372 if (width + gc.data.width > sx) {
1400 if (width < sx && (flags & GRID_LINE_WRAPPED))
1401 grid_reflow_join(target, gd, sx, yy, width, 1);
1406 grid_reflow(struct grid *gd, u_int sx)
1417 target = grid_create(gd->sx, 0, 0);
1435 if (width > sx)
1436 at = sx;
1442 if (at == 0 && width + gc.data.width > sx)
1452 if (width == sx) {
1461 if (width > sx) {
1462 grid_reflow_split(target, gd, sx, yy, at);
1471 grid_reflow_join(target, gd, sx, yy, width, 0);
1552 if (px > gd->sx)
1553 px = gd->sx;