Lines Matching refs:ip
65 void et_init(struct ite_softc *ip);
66 void et_cursor(struct ite_softc *ip, int flag);
67 void et_deinit(struct ite_softc *ip);
68 void et_putc(struct ite_softc *ip, int c, int dy, int dx, int mode);
69 void et_clear(struct ite_softc *ip, int sy, int sx, int h, int w);
70 void et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir);
108 et_init(struct ite_softc *ip)
112 ip->priv = ip->grf->g_data;
113 md = (struct grfettext_mode *) ip->priv;
115 ip->cols = md->cols;
116 ip->rows = md->rows;
121 et_cursor(struct ite_softc *ip, int flag)
123 volatile u_char *ba = ip->grf->g_regkva;
129 flag = ip->curx + ip->cury * ip->cols;
134 ip->cursorx = ip->curx;
135 ip->cursory = ip->cury;
148 et_deinit(struct ite_softc *ip)
150 ip->flags &= ~ITE_INITED;
155 et_putc(struct ite_softc *ip, int c, int dy, int dx, int mode)
157 volatile unsigned char *ba = ip->grf->g_regkva;
158 volatile unsigned char *fb = ip->grf->g_fbkva;
162 if (ip->flags & ITE_INGRF)
170 cp = fb + ((dy * ip->cols) + dx);
179 et_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
186 volatile unsigned char *ba = ip->grf->g_regkva;
189 if (ip->flags & ITE_INGRF)
192 dst = (volatile unsigned char*)ip->grf->g_fbkva + (sy * ip->cols) + sx;
193 src = dst + (ip->rows*ip->cols);
204 et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
207 volatile unsigned char *ba = ip->grf->g_regkva;
209 if (ip->flags & ITE_INGRF)
212 fb = (volatile unsigned char*)ip->grf->g_fbkva + sy * ip->cols;
217 etbcopy(fb, fb - (count * ip->cols),
218 (ip->bottom_margin + 1 - sy) * ip->cols);
221 etbcopy(fb, fb + (count * ip->cols),
222 (ip->bottom_margin + 1 - (sy + count)) * ip->cols);
225 etbcopy(fb+sx, fb+sx+count, ip->cols - (sx + count));
228 etbcopy(fb+sx, fb+sx-count, ip->cols - sx);
236 etbcopy(fb, fb - (count * ip->cols),
237 (ip->bottom_margin + 1 - sy) * ip->cols);
240 etbcopy(fb, fb + (count * ip->cols),
241 (ip->bottom_margin + 1 - (sy + count)) * ip->cols);
244 etbcopy(fb+sx, fb+sx+count, ip->cols - (sx + count));
247 etbcopy(fb+sx, fb+sx-count, ip->cols - sx);