Changeset a0ff947 in mainline


Ignore:
Timestamp:
2013-11-16T19:10:41Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
12735849
Parents:
7856d09
Message:

Add signal for position events to canvas.

Location:
uspace/lib/gui
Files:
2 edited

Legend:

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

    r7856d09 ra0ff947  
    112112static void canvas_handle_position_event(widget_t *widget, pos_event_t event)
    113113{
    114         /* 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);
    115122}
    116123
  • uspace/lib/gui/canvas.h

    r7856d09 ra0ff947  
    5050        surface_t *surface;
    5151        signal_t keyboard_event;
     52        signal_t position_event;
    5253} canvas_t;
    5354
Note: See TracChangeset for help on using the changeset viewer.