forked from enlightenment/terminology
tests: add tytest_termio_resize()
This commit is contained in:
parent
490d388314
commit
36fcd2d2c4
|
@ -3049,6 +3049,8 @@ _handle_resize_by_chars(Termpty *ty, Eina_Unicode **ptr)
|
|||
evas_object_resize(wn,
|
||||
base_w + step_w * w,
|
||||
base_h + step_h * h);
|
||||
#else
|
||||
tytest_termio_resize(w, h);
|
||||
#endif
|
||||
termpty_resize(ty, w, h);
|
||||
}
|
||||
|
|
|
@ -156,8 +156,19 @@ _tytest_checksum(Termpty *ty)
|
|||
Evas_Textgrid_Cell *
|
||||
test_textgrid_cellrow_get(Evas_Object *obj EINA_UNUSED, int y)
|
||||
{
|
||||
assert (y >= 0 && y < TY_H);
|
||||
return &_cells[y * TY_W];
|
||||
assert (y >= 0 && y < _sd.pty->h);
|
||||
return &_cells[y * _sd.pty->w];
|
||||
}
|
||||
|
||||
void
|
||||
tytest_termio_resize(int w, int h)
|
||||
{
|
||||
Evas_Textgrid_Cell *cells = realloc(_cells,
|
||||
w * h * sizeof(Evas_Textgrid_Cell));
|
||||
assert (cells);
|
||||
_sd.grid.w = w;
|
||||
_sd.grid.h = h;
|
||||
_cells = cells;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ test_textgrid_palette_get(const Evas_Object *obj,
|
|||
#define evas_object_textgrid_cellrow_get test_textgrid_cellrow_get
|
||||
Evas_Textgrid_Cell *
|
||||
test_textgrid_cellrow_get(Evas_Object *obj, int y);
|
||||
void
|
||||
tytest_termio_resize(int w, int h);
|
||||
|
||||
void tytest_init(void);
|
||||
void tytest_shutdown(void);
|
||||
|
|
Loading…
Reference in New Issue