Changeset 10cb47e in mainline for uspace/lib/gui/canvas.c


Ignore:
Timestamp:
2016-08-31T15:43:01Z (8 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bdfdc51c
Parents:
58563585
Message:

add support for custom client data into widgets

File:
1 edited

Legend:

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

    r58563585 r10cb47e  
    123123}
    124124
    125 bool init_canvas(canvas_t *canvas, widget_t *parent, sysarg_t width,
    126     sysarg_t height, surface_t *surface)
     125bool init_canvas(canvas_t *canvas, widget_t *parent, const void *data,
     126    sysarg_t width, sysarg_t height, surface_t *surface)
    127127{
    128         widget_init(&canvas->widget, parent);
     128        widget_init(&canvas->widget, parent, data);
    129129       
    130130        canvas->widget.width = width;
     
    161161}
    162162
    163 canvas_t *create_canvas(widget_t *parent, sysarg_t width, sysarg_t height,
    164     surface_t *surface)
     163canvas_t *create_canvas(widget_t *parent, const void *data, sysarg_t width,
     164    sysarg_t height, surface_t *surface)
    165165{
    166166        canvas_t *canvas = (canvas_t *) malloc(sizeof(canvas_t));
     
    168168                return NULL;
    169169       
    170         if (init_canvas(canvas, parent, width, height, surface))
     170        if (init_canvas(canvas, parent, data, width, height, surface))
    171171                return canvas;
    172172       
Note: See TracChangeset for help on using the changeset viewer.