Changes in uspace/lib/gui/grid.c [e63c424f:10cb47e] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gui/grid.c

    re63c424f r10cb47e  
    298298        paint_internal(widget);
    299299       
    300         list_foreach(widget->children, link) {
    301                 widget_t *child = list_get_instance(link, widget_t, link);
     300        list_foreach(widget->children, link, widget_t, child) {
    302301                child->repaint(child);
    303302        }
     
    364363}
    365364
    366 bool init_grid(grid_t *grid, widget_t *parent, size_t cols, size_t rows,
    367     pixel_t background)
     365bool init_grid(grid_t *grid, widget_t *parent, const void *data, size_t cols,
     366    size_t rows, pixel_t background)
    368367{
    369368        if ((cols == 0) || (rows == 0))
     
    377376        memset(grid->layout, 0, cols * rows * sizeof(grid_cell_t));
    378377       
    379         widget_init(&grid->widget, parent);
     378        widget_init(&grid->widget, parent, data);
    380379       
    381380        grid->widget.destroy = grid_destroy;
     
    394393}
    395394
    396 grid_t *create_grid(widget_t *parent, size_t cols, size_t rows, pixel_t background)
     395grid_t *create_grid(widget_t *parent, const void *data, size_t cols,
     396    size_t rows, pixel_t background)
    397397{
    398398        grid_t *grid = (grid_t *) malloc(sizeof(grid_t));
     
    400400                return NULL;
    401401       
    402         if (init_grid(grid, parent, cols, rows, background))
     402        if (init_grid(grid, parent, data, cols, rows, background))
    403403                return grid;
    404404       
Note: See TracChangeset for help on using the changeset viewer.