Changeset 6560960 in mainline
- Timestamp:
- 2012-08-20T22:46:13Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 077dad2
- Parents:
- 971f50e7 (diff), dd13349 (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. - Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r971f50e7 r6560960 45 45 CONFIG_HEADER = config.h 46 46 47 .PHONY: all precheck cscope autotool config_auto config_default config distclean clean check releasefile release47 .PHONY: all precheck cscope cscope_parts autotool config_auto config_default config distclean clean check releasefile release 48 48 49 49 all: $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) … … 58 58 cscope: 59 59 find abi kernel boot uspace -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE).out 60 61 cscope_parts: 62 find abi -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_abi.out 63 find kernel -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_kernel.out 64 find boot -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_boot.out 65 find uspace -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE)_uspace.out 60 66 61 67 # Pre-integration build check -
uspace/app/edit/edit.c
r971f50e7 r6560960 111 111 #define BUF_SIZE 64 112 112 #define TAB_WIDTH 8 113 #define ED_INFTY 65536114 113 115 114 /** Maximum filename length that can be entered. */ … … 507 506 static void key_handle_movement(unsigned int key, bool select) 508 507 { 508 spt_t pt; 509 509 switch (key) { 510 510 case KC_LEFT: … … 521 521 break; 522 522 case KC_HOME: 523 caret_move_relative(0, -ED_INFTY, dir_after, select); 523 tag_get_pt(&pane.caret_pos, &pt); 524 pt_get_sol(&pt, &pt); 525 caret_move(pt, select, true); 524 526 break; 525 527 case KC_END: 526 caret_move_relative(0, +ED_INFTY, dir_before, select); 528 tag_get_pt(&pane.caret_pos, &pt); 529 pt_get_eol(&pt, &pt); 530 caret_move(pt, select, true); 527 531 break; 528 532 case KC_PAGE_UP: -
uspace/lib/c/arch/abs32le/include/types.h
r971f50e7 r6560960 47 47 48 48 typedef uint32_t sysarg_t; 49 typedef int32_t native_t; 49 50 50 51 typedef int32_t ssize_t; -
uspace/lib/c/arch/amd64/include/types.h
r971f50e7 r6560960 47 47 48 48 typedef uint64_t sysarg_t; 49 typedef int64_t native_t; 49 50 50 51 typedef int64_t ssize_t; -
uspace/lib/c/arch/arm32/include/types.h
r971f50e7 r6560960 48 48 49 49 typedef uint32_t sysarg_t; 50 typedef int32_t native_t; 50 51 51 52 typedef int32_t ssize_t; -
uspace/lib/c/arch/ia32/include/types.h
r971f50e7 r6560960 47 47 48 48 typedef uint32_t sysarg_t; 49 typedef int32_t native_t; 49 50 50 51 typedef int32_t ssize_t; -
uspace/lib/c/arch/ia64/include/types.h
r971f50e7 r6560960 57 57 58 58 typedef uint64_t sysarg_t; 59 typedef int64_t native_t; 59 60 60 61 typedef int64_t ssize_t; -
uspace/lib/c/arch/mips32/include/types.h
r971f50e7 r6560960 48 48 49 49 typedef uint32_t sysarg_t; 50 typedef int32_t native_t; 50 51 51 52 typedef int32_t ssize_t; -
uspace/lib/c/arch/mips64/include/types.h
r971f50e7 r6560960 48 48 49 49 typedef uint64_t sysarg_t; 50 typedef int64_t native_t; 50 51 51 52 typedef int64_t ssize_t; -
uspace/lib/c/arch/ppc32/include/types.h
r971f50e7 r6560960 47 47 48 48 typedef uint32_t sysarg_t; 49 typedef int32_t native_t; 49 50 50 51 typedef int32_t ssize_t; -
uspace/lib/c/arch/sparc64/include/types.h
r971f50e7 r6560960 47 47 48 48 typedef uint64_t sysarg_t; 49 typedef int64_t native_t; 49 50 50 51 typedef int64_t ssize_t; -
uspace/lib/c/generic/io/input.c
r971f50e7 r6560960 143 143 x = IPC_GET_ARG1(*call); 144 144 y = IPC_GET_ARG2(*call); 145 max_x = IPC_GET_ARG 2(*call);146 max_y = IPC_GET_ARG 3(*call);145 max_x = IPC_GET_ARG3(*call); 146 max_y = IPC_GET_ARG4(*call); 147 147 148 148 rc = input->ev_ops->abs_move(input, x, y, max_x, max_y); -
uspace/lib/draw/surface.c
r971f50e7 r6560960 44 44 surface_flags_t flags; 45 45 46 s ysarg_t dirty_x_lo;47 s ysarg_t dirty_x_hi;48 s ysarg_t dirty_y_lo;49 s ysarg_t dirty_y_hi;46 surface_coord_t dirty_x_lo; 47 surface_coord_t dirty_x_hi; 48 surface_coord_t dirty_y_lo; 49 surface_coord_t dirty_y_hi; 50 50 51 51 pixelmap_t pixmap; 52 52 }; 53 53 54 surface_t *surface_create( 55 sysarg_t width, sysarg_t height,pixel_t *pixbuf, surface_flags_t flags)54 surface_t *surface_create(surface_coord_t width, surface_coord_t height, 55 pixel_t *pixbuf, surface_flags_t flags) 56 56 { 57 57 surface_t *surface = (surface_t *) malloc(sizeof(surface_t)); … … 118 118 } 119 119 120 void surface_get_resolution(surface_t *surface, s ysarg_t *width, sysarg_t *height)120 void surface_get_resolution(surface_t *surface, surface_coord_t *width, surface_coord_t *height) 121 121 { 122 122 assert(width); … … 127 127 } 128 128 129 void surface_get_damaged_region(surface_t *surface, s ysarg_t *x, sysarg_t *y,130 s ysarg_t *width, sysarg_t *height)129 void surface_get_damaged_region(surface_t *surface, surface_coord_t *x, surface_coord_t *y, 130 surface_coord_t *width, surface_coord_t *height) 131 131 { 132 132 assert(x); … … 151 151 } 152 152 153 void surface_put_pixel(surface_t *surface, s ysarg_t x, sysarg_t y, pixel_t pixel)153 void surface_put_pixel(surface_t *surface, surface_coord_t x, surface_coord_t y, pixel_t pixel) 154 154 { 155 155 surface->dirty_x_lo = surface->dirty_x_lo > x ? x : surface->dirty_x_lo; … … 163 163 } 164 164 165 pixel_t surface_get_pixel(surface_t *surface, s ysarg_t x, sysarg_t y)165 pixel_t surface_get_pixel(surface_t *surface, surface_coord_t x, surface_coord_t y) 166 166 { 167 167 if (x < surface->pixmap.width && y < surface->pixmap.height) { -
uspace/lib/draw/surface.h
r971f50e7 r6560960 45 45 typedef struct surface surface_t; 46 46 47 typedef sysarg_t surface_coord_t; 48 47 49 typedef enum { 48 50 SURFACE_FLAG_NONE = 0, … … 50 52 } surface_flags_t; 51 53 52 extern surface_t *surface_create(s ysarg_t, sysarg_t, pixel_t *, surface_flags_t);54 extern surface_t *surface_create(surface_coord_t, surface_coord_t, pixel_t *, surface_flags_t); 53 55 extern void surface_destroy(surface_t *); 54 56 … … 56 58 extern pixel_t *surface_direct_access(surface_t *); 57 59 extern pixelmap_t *surface_pixmap_access(surface_t *); 58 extern void surface_get_resolution(surface_t *, s ysarg_t *, sysarg_t *);59 extern void surface_get_damaged_region(surface_t *, s ysarg_t *, sysarg_t *,60 s ysarg_t *, sysarg_t *);60 extern void surface_get_resolution(surface_t *, surface_coord_t *, surface_coord_t *); 61 extern void surface_get_damaged_region(surface_t *, surface_coord_t *, surface_coord_t *, 62 surface_coord_t *, surface_coord_t *); 61 63 extern void surface_reset_damaged_region(surface_t *); 62 64 63 extern void surface_put_pixel(surface_t *, s ysarg_t, sysarg_t, pixel_t);64 extern pixel_t surface_get_pixel(surface_t *, s ysarg_t, sysarg_t);65 extern void surface_put_pixel(surface_t *, surface_coord_t, surface_coord_t, pixel_t); 66 extern pixel_t surface_get_pixel(surface_t *, surface_coord_t, surface_coord_t); 65 67 66 68 #endif -
uspace/srv/hid/compositor/compositor.c
r971f50e7 r6560960 92 92 sysarg_t id; 93 93 uint8_t state; 94 sysarg_t hpos; 95 sysarg_t vpos; 94 desktop_point_t pos; 96 95 sysarg_t btn_num; 97 sysarg_t btn_hpos; 98 sysarg_t btn_vpos; 99 int accum_dx; 100 int accum_dy; 96 desktop_point_t btn_pos; 97 desktop_vector_t accum; 101 98 sysarg_t grab_flags; 102 99 bool pressed; … … 135 132 vslmode_t mode; 136 133 async_sess_t *sess; 137 sysarg_t hpos; 138 sysarg_t vpos; 134 desktop_point_t pos; 139 135 surface_t *surface; 140 136 } viewport_t; … … 174 170 175 171 link_initialize(&p->link); 176 p-> hpos= coord_origin;177 p-> vpos= coord_origin;172 p->pos.x = coord_origin; 173 p->pos.y = coord_origin; 178 174 p->btn_num = 1; 179 p->btn_hpos = p->hpos; 180 p->btn_vpos = p->vpos; 181 p->accum_dx = 0; 182 p->accum_dy = 0; 175 p->btn_pos = p->pos; 176 p->accum.x = 0; 177 p->accum.y = 0; 183 178 p->grab_flags = GF_EMPTY; 184 179 p->pressed = false; … … 307 302 bool isec_vp = rectangle_intersect( 308 303 x_dmg_glob, y_dmg_glob, w_dmg_glob, h_dmg_glob, 309 vp-> hpos, vp->vpos, w_dmg_vp, h_dmg_vp,304 vp->pos.x, vp->pos.y, w_dmg_vp, h_dmg_vp, 310 305 &x_dmg_vp, &y_dmg_vp, &w_dmg_vp, &h_dmg_vp); 311 306 … … 313 308 314 309 /* Paint background color. */ 315 for (sysarg_t y = y_dmg_vp - vp-> vpos; y < y_dmg_vp - vp->vpos+ h_dmg_vp; ++y) {316 for (sysarg_t x = x_dmg_vp - vp-> hpos; x < x_dmg_vp - vp->hpos+ w_dmg_vp; ++x) {310 for (sysarg_t y = y_dmg_vp - vp->pos.y; y < y_dmg_vp - vp->pos.y + h_dmg_vp; ++y) { 311 for (sysarg_t x = x_dmg_vp - vp->pos.x; x < x_dmg_vp - vp->pos.x + w_dmg_vp; ++x) { 317 312 surface_put_pixel(vp->surface, x, y, bg_color); 318 313 } … … 352 347 * coordinates. */ 353 348 transform = win->transform; 354 double hpos = vp->hpos; 355 double vpos = vp->vpos; 356 transform_translate(&transform, -hpos, -vpos); 349 double_point_t pos; 350 pos.x = vp->pos.x; 351 pos.y = vp->pos.y; 352 transform_translate(&transform, -pos.x, -pos.y); 357 353 358 354 source_set_transform(&source, transform); … … 361 357 362 358 drawctx_transfer(&context, 363 x_dmg_win - vp-> hpos, y_dmg_win - vp->vpos, w_dmg_win, h_dmg_win);359 x_dmg_win - vp->pos.x, y_dmg_win - vp->pos.y, w_dmg_win, h_dmg_win); 364 360 } 365 361 } … … 375 371 bool isec_ptr = rectangle_intersect( 376 372 x_dmg_vp, y_dmg_vp, w_dmg_vp, h_dmg_vp, 377 ptr-> hpos, ptr->vpos, w_dmg_ptr, h_dmg_ptr,373 ptr->pos.x, ptr->pos.y, w_dmg_ptr, h_dmg_ptr, 378 374 &x_dmg_ptr, &y_dmg_ptr, &w_dmg_ptr, &h_dmg_ptr); 379 375 … … 386 382 387 383 pixel_t pix = 0; 388 sysarg_t x_vp = x_dmg_ptr - vp-> hpos;389 sysarg_t y_vp = y_dmg_ptr - vp-> vpos;390 sysarg_t x_ptr = x_dmg_ptr - ptr-> hpos;391 sysarg_t y_ptr = y_dmg_ptr - ptr-> vpos;384 sysarg_t x_vp = x_dmg_ptr - vp->pos.x; 385 sysarg_t y_vp = y_dmg_ptr - vp->pos.y; 386 sysarg_t x_ptr = x_dmg_ptr - ptr->pos.x; 387 sysarg_t y_ptr = y_dmg_ptr - ptr->pos.y; 392 388 393 389 for (sysarg_t y = 0; y < h_dmg_ptr; ++y) { … … 901 897 902 898 link_initialize(&vp->link); 903 vp-> hpos= coord_origin;904 vp-> vpos= coord_origin;899 vp->pos.x = coord_origin; 900 vp->pos.y = coord_origin; 905 901 906 902 /* Establish output bidirectional connection. */ … … 1002 998 /* window_list_mtx locked by caller */ 1003 999 1004 int dx = pointer->accum _dx;1005 int dy = pointer->accum _dy;1006 pointer->accum _dx = 0;1007 pointer->accum _dy = 0;1000 int dx = pointer->accum.x; 1001 int dy = pointer->accum.y; 1002 pointer->accum.x = 0; 1003 pointer->accum.y = 0; 1008 1004 1009 1005 bool move = (pointer->grab_flags & GF_MOVE_X) || (pointer->grab_flags & GF_MOVE_Y); … … 1079 1075 unsigned max_x, unsigned max_y) 1080 1076 { 1081 /* XXX TODO */ 1082 return EOK; 1077 /* XXX TODO Use absolute coordinates directly */ 1078 1079 pointer_t *pointer = input_pointer(input); 1080 1081 sysarg_t width, height; 1082 1083 fibril_mutex_lock(&viewport_list_mtx); 1084 if (list_empty(&viewport_list)) { 1085 printf("No viewport found\n"); 1086 fibril_mutex_unlock(&viewport_list_mtx); 1087 return EOK; /* XXX */ 1088 } 1089 link_t *link = list_first(&viewport_list); 1090 viewport_t *vp = list_get_instance(link, viewport_t, link); 1091 surface_get_resolution(vp->surface, &width, &height); 1092 desktop_point_t vp_pos = vp->pos; 1093 fibril_mutex_unlock(&viewport_list_mtx); 1094 1095 desktop_point_t pos_in_viewport; 1096 pos_in_viewport.x = x * width / max_x; 1097 pos_in_viewport.y = y * height / max_y; 1098 1099 /* Calculate offset from pointer */ 1100 fibril_mutex_lock(&pointer_list_mtx); 1101 desktop_vector_t delta; 1102 delta.x = (vp_pos.x + pos_in_viewport.x) - pointer->pos.x; 1103 delta.y = (vp_pos.y + pos_in_viewport.y) - pointer->pos.y; 1104 fibril_mutex_unlock(&pointer_list_mtx); 1105 1106 return comp_mouse_move(input, delta.x, delta.y); 1083 1107 } 1084 1108 … … 1089 1113 /* Update pointer position. */ 1090 1114 fibril_mutex_lock(&pointer_list_mtx); 1091 sysarg_t old_hpos = pointer->hpos; 1092 sysarg_t old_vpos = pointer->vpos; 1115 desktop_point_t old_pos = pointer->pos; 1093 1116 sysarg_t cursor_width; 1094 1117 sysarg_t cursor_height; 1095 1118 surface_get_resolution(pointer->cursor.states[pointer->state], 1096 1119 &cursor_width, &cursor_height); 1097 pointer-> hpos+= dx;1098 pointer-> vpos+= dy;1120 pointer->pos.x += dx; 1121 pointer->pos.y += dy; 1099 1122 fibril_mutex_unlock(&pointer_list_mtx); 1100 comp_damage(old_ hpos, old_vpos, cursor_width, cursor_height);1101 comp_damage(old_ hpos + dx, old_vpos+ dy, cursor_width, cursor_height);1123 comp_damage(old_pos.x, old_pos.y, cursor_width, cursor_height); 1124 comp_damage(old_pos.x + dx, old_pos.y + dy, cursor_width, cursor_height); 1102 1125 1103 1126 fibril_mutex_lock(&window_list_mtx); … … 1111 1134 sysarg_t width, height; 1112 1135 surface_get_resolution(top->surface, &width, &height); 1113 within_client = comp_coord_to_client(pointer-> hpos, pointer->vpos,1136 within_client = comp_coord_to_client(pointer->pos.x, pointer->pos.y, 1114 1137 top->transform, width, height, &point_x, &point_y); 1115 1138 fibril_mutex_unlock(&window_list_mtx); … … 1130 1153 } else { 1131 1154 /* Pointer is grabbed by top-level window action. */ 1132 pointer->accum _dx += dx;1133 pointer->accum _dy += dy;1155 pointer->accum.x += dx; 1156 pointer->accum.y += dy; 1134 1157 #if ANIMATE_WINDOW_TRANSFORMS == 1 1135 1158 sysarg_t x, y, width, height; … … 1153 1176 1154 1177 if (bpress) { 1155 pointer->btn_hpos = pointer->hpos; 1156 pointer->btn_vpos = pointer->vpos; 1178 pointer->btn_pos = pointer->pos; 1157 1179 pointer->btn_num = bnum; 1158 1180 pointer->pressed = true; … … 1167 1189 sysarg_t x, y, width, height; 1168 1190 surface_get_resolution(win->surface, &width, &height); 1169 bool within_client = comp_coord_to_client(pointer-> hpos, pointer->vpos,1191 bool within_client = comp_coord_to_client(pointer->pos.x, pointer->pos.y, 1170 1192 win->transform, width, height, &x, &y); 1171 1193 fibril_mutex_unlock(&window_list_mtx); … … 1202 1224 if (win->surface) { 1203 1225 surface_get_resolution(win->surface, &width, &height); 1204 within_client = comp_coord_to_client(pointer-> hpos, pointer->vpos,1226 within_client = comp_coord_to_client(pointer->pos.x, pointer->pos.y, 1205 1227 win->transform, width, height, &point_x, &point_y); 1206 1228 } … … 1518 1540 switch (key) { 1519 1541 case KC_I: 1520 vp-> hpos+= 0;1521 vp-> vpos+= -20;1542 vp->pos.x += 0; 1543 vp->pos.y += -20; 1522 1544 break; 1523 1545 case KC_K: 1524 vp-> hpos+= 0;1525 vp-> vpos+= 20;1546 vp->pos.x += 0; 1547 vp->pos.y += 20; 1526 1548 break; 1527 1549 case KC_J: 1528 vp-> hpos+= -20;1529 vp-> vpos+= 0;1550 vp->pos.x += -20; 1551 vp->pos.y += 0; 1530 1552 break; 1531 1553 case KC_L: 1532 vp-> hpos+= 20;1533 vp-> vpos+= 0;1554 vp->pos.x += 20; 1555 vp->pos.y += 0; 1534 1556 break; 1535 1557 default: 1536 vp-> hpos+= 0;1537 vp-> vpos+= 0;1558 vp->pos.x += 0; 1559 vp->pos.y += 0; 1538 1560 break; 1539 1561 } 1540 1562 1541 sysarg_t x = vp-> hpos;1542 sysarg_t y = vp-> vpos;1563 sysarg_t x = vp->pos.x; 1564 sysarg_t y = vp->pos.y; 1543 1565 sysarg_t width, height; 1544 1566 surface_get_resolution(vp->surface, &width, &height); -
uspace/srv/hid/compositor/compositor.h
r971f50e7 r6560960 36 36 #define COMPOSITOR_COMPOSITOR_H_ 37 37 38 typedef native_t desktop_coord_t; 39 typedef struct { 40 desktop_coord_t x; 41 desktop_coord_t y; 42 } desktop_point_t; 43 typedef desktop_point_t desktop_vector_t; 44 45 /* TODO remove? */ 46 typedef struct { 47 double x; 48 double y; 49 } double_point_t; 50 typedef double_point_t double_vector_t; 51 38 52 #endif 39 53
Note:
See TracChangeset
for help on using the changeset viewer.