Changeset 0773396 in mainline for uspace/lib/gui/canvas.c


Ignore:
Timestamp:
2013-12-25T13:05:25Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc54126c
Parents:
f4a47e52 (diff), 6946f23 (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.
Message:

merge mainline changes

File:
1 edited

Legend:

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

    rf4a47e52 r0773396  
    105105static void canvas_handle_keyboard_event(widget_t *widget, kbd_event_t event)
    106106{
    107         /* No-op */
     107        canvas_t *canvas = (canvas_t *) widget;
     108       
     109        sig_send(&canvas->keyboard_event, &event);
    108110}
    109111
    110112static void canvas_handle_position_event(widget_t *widget, pos_event_t event)
    111113{
    112         /* No-op */
     114        canvas_t *canvas = (canvas_t *) widget;
     115        pos_event_t tevent;
     116       
     117        tevent = event;
     118        tevent.hpos -= widget->hpos;
     119        tevent.vpos -= widget->vpos;
     120       
     121        sig_send(&canvas->position_event, &tevent);
    113122}
    114123
     
    142151}
    143152
     153bool update_canvas(canvas_t *canvas, surface_t *surface)
     154{
     155        if (surface != NULL)
     156                canvas->surface = surface;
     157       
     158        canvas_repaint(&canvas->widget);
     159        return true;
     160}
     161
    144162canvas_t *create_canvas(widget_t *parent, sysarg_t width, sysarg_t height,
    145163    surface_t *surface)
Note: See TracChangeset for help on using the changeset viewer.