Changeset 22faaf2 in mainline
- Timestamp:
- 2019-10-29T02:34:14Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b3c185b6
- Parents:
- 587b4cb
- Location:
- uspace/srv/hid/display
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/display.c
r587b4cb r22faaf2 65 65 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_create() -> EOK, id=%zu", 66 66 wnd->id); 67 68 wnd->dpos.x = ((wnd->id - 1) & 1) * 400; 69 wnd->dpos.y = ((wnd->id - 1) & 2) / 2 * 300; 70 67 71 *rwnd_id = wnd->id; 68 72 return EOK; -
uspace/srv/hid/display/output.c
r587b4cb r22faaf2 61 61 } 62 62 63 vw = 400;64 vh = 300;63 vw = 800; 64 vh = 600; 65 65 66 66 pixbuf = calloc(vw * vh, sizeof(pixel_t)); -
uspace/srv/hid/display/types/display/window.h
r587b4cb r22faaf2 39 39 #include <adt/list.h> 40 40 #include <gfx/context.h> 41 #include <gfx/coord.h> 41 42 42 43 typedef sysarg_t ds_wnd_id_t; … … 48 49 /** Link to @c display->windows */ 49 50 link_t lwindows; 51 /** Display position */ 52 gfx_coord2_t dpos; 50 53 /** Window ID */ 51 54 ds_wnd_id_t id; -
uspace/srv/hid/display/window.c
r587b4cb r22faaf2 90 90 { 91 91 ds_window_t *wnd = (ds_window_t *) arg; 92 gfx_rect_t drect; 92 93 93 94 log_msg(LOG_DEFAULT, LVL_NOTE, "gc_fill_rect"); 94 return gfx_fill_rect(wnd->display->gc, rect); 95 gfx_rect_translate(&wnd->dpos, rect, &drect); 96 return gfx_fill_rect(wnd->display->gc, &drect); 95 97 } 96 98 … … 152 154 { 153 155 ds_window_bitmap_t *cbm = (ds_window_bitmap_t *)bm; 154 155 return gfx_bitmap_render(cbm->bitmap, srect0, offs0); 156 gfx_coord2_t doffs; 157 158 if (offs0 != NULL) 159 gfx_coord2_add(&cbm->wnd->dpos, offs0, &doffs); 160 else 161 doffs = cbm->wnd->dpos; 162 163 return gfx_bitmap_render(cbm->bitmap, srect0, &doffs); 156 164 } 157 165
Note:
See TracChangeset
for help on using the changeset viewer.