Changeset 8565a42 in mainline for uspace/lib/gui/canvas.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

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

    r3061bc1 r8565a42  
    4545{
    4646        canvas_t *canvas = (canvas_t *) widget;
    47        
     47
    4848        surface_t *surface = window_claim(canvas->widget.window);
    4949        if (!surface) {
    5050                window_yield(canvas->widget.window);
    5151        }
    52        
     52
    5353        transform_t transform;
    5454        transform_identity(&transform);
    5555        transform_translate(&transform, widget->hpos, widget->vpos);
    56        
     56
    5757        source_t source;
    5858        source_init(&source);
     
    6060        source_set_texture(&source, canvas->surface,
    6161            PIXELMAP_EXTEND_TRANSPARENT_BLACK);
    62        
     62
    6363        drawctx_t drawctx;
    6464        drawctx_init(&drawctx, surface);
    65        
     65
    6666        drawctx_set_source(&drawctx, &source);
    6767        drawctx_transfer(&drawctx, widget->hpos, widget->vpos, widget->width,
    6868            widget->height);
    69        
     69
    7070        window_yield(canvas->widget.window);
    7171}
     
    7979{
    8080        canvas_t *canvas = (canvas_t *) widget;
    81        
     81
    8282        deinit_canvas(canvas);
    8383        free(canvas);
     
    9393{
    9494        canvas_t *canvas = (canvas_t *) widget;
    95        
     95
    9696        widget_modify(widget, hpos, vpos, canvas->width, canvas->height);
    9797        paint_internal(widget);
     
    107107{
    108108        canvas_t *canvas = (canvas_t *) widget;
    109        
     109
    110110        sig_send(&canvas->keyboard_event, &event);
    111111}
     
    115115        canvas_t *canvas = (canvas_t *) widget;
    116116        pos_event_t tevent;
    117        
     117
    118118        tevent = event;
    119119        tevent.hpos -= widget->hpos;
    120120        tevent.vpos -= widget->vpos;
    121        
     121
    122122        sig_send(&canvas->position_event, &tevent);
    123123}
     
    127127{
    128128        widget_init(&canvas->widget, parent, data);
    129        
     129
    130130        canvas->widget.width = width;
    131131        canvas->widget.height = height;
    132        
     132
    133133        canvas->widget.width_min = width;
    134134        canvas->widget.height_min = height;
     
    137137        canvas->widget.width_max = width;
    138138        canvas->widget.height_max = height;
    139        
     139
    140140        canvas->widget.destroy = canvas_destroy;
    141141        canvas->widget.reconfigure = canvas_reconfigure;
     
    144144        canvas->widget.handle_keyboard_event = canvas_handle_keyboard_event;
    145145        canvas->widget.handle_position_event = canvas_handle_position_event;
    146        
     146
    147147        canvas->width = width;
    148148        canvas->height = height;
    149149        canvas->surface = surface;
    150        
     150
    151151        return true;
    152152}
     
    156156        if (surface != NULL)
    157157                canvas->surface = surface;
    158        
     158
    159159        canvas_repaint(&canvas->widget);
    160160        return true;
     
    167167        if (!canvas)
    168168                return NULL;
    169        
     169
    170170        if (init_canvas(canvas, parent, data, width, height, surface))
    171171                return canvas;
    172        
     172
    173173        free(canvas);
    174174        return NULL;
Note: See TracChangeset for help on using the changeset viewer.