Changeset 7ca7215 in mainline
- Timestamp:
- 2022-03-25T21:41:21Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0d1d0ea
- Parents:
- 8965860c
- Location:
- uspace
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/uidemo/uidemo.c
r8965860c r7ca7215 620 620 params.rect.p0.x = 0; 621 621 params.rect.p0.y = 0; 622 params.rect.p1.x = 2 20;622 params.rect.p1.x = 250; 623 623 params.rect.p1.y = 370; 624 624 } … … 764 764 rect.p0.x = 2; 765 765 rect.p0.y = 3; 766 rect.p1.x = 42;766 rect.p1.x = 39; 767 767 rect.p1.y = 4; 768 768 } else { … … 850 850 851 851 if (ui_is_textmode(ui)) { 852 rect.p0.x = 32;852 rect.p0.x = 29; 853 853 rect.p0.y = 7; 854 rect.p1.x = 42;854 rect.p1.x = 39; 855 855 rect.p1.y = 8; 856 856 } else { … … 873 873 bparams.rect.p0.x = 0; 874 874 bparams.rect.p0.y = 0; 875 bparams.rect.p1.x = 40;875 bparams.rect.p1.x = 37; 876 876 bparams.rect.p1.y = 2; 877 877 } else { … … 1053 1053 rect.p0.x = 2; 1054 1054 rect.p0.y = 18; 1055 rect.p1.x = 12;1055 rect.p1.x = 28; 1056 1056 rect.p1.y = 19; 1057 1057 } else { … … 1070 1070 } 1071 1071 1072 rc = ui_scrollbar_create(ui, window, &demo.scrollbar);1072 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &demo.hscrollbar); 1073 1073 if (rc != EOK) { 1074 1074 printf("Error creating button.\n"); … … 1076 1076 } 1077 1077 1078 ui_scrollbar_set_cb(demo. scrollbar, &scrollbar_cb, (void *) &demo);1078 ui_scrollbar_set_cb(demo.hscrollbar, &scrollbar_cb, (void *) &demo); 1079 1079 1080 1080 /* FIXME: Auto layout */ … … 1082 1082 rect.p0.x = 2; 1083 1083 rect.p0.y = 20; 1084 rect.p1.x = 12;1084 rect.p1.x = 40; 1085 1085 rect.p1.y = 21; 1086 1086 } else { 1087 1087 rect.p0.x = 15; 1088 1088 rect.p0.y = 340; 1089 rect.p1.x = 2 10;1089 rect.p1.x = 220; 1090 1090 rect.p1.y = 362; 1091 1091 } 1092 1092 1093 ui_scrollbar_set_rect(demo.scrollbar, &rect); 1094 1095 ui_scrollbar_set_thumb_length(demo.scrollbar, 1096 ui_scrollbar_through_length(demo.scrollbar) / 4); 1097 1098 rc = ui_fixed_add(demo.fixed, ui_scrollbar_ctl(demo.scrollbar)); 1093 ui_scrollbar_set_rect(demo.hscrollbar, &rect); 1094 1095 ui_scrollbar_set_thumb_length(demo.hscrollbar, 1096 ui_scrollbar_through_length(demo.hscrollbar) / 4); 1097 1098 rc = ui_fixed_add(demo.fixed, ui_scrollbar_ctl(demo.hscrollbar)); 1099 if (rc != EOK) { 1100 printf("Error adding control to layout.\n"); 1101 return rc; 1102 } 1103 1104 rc = ui_scrollbar_create(ui, window, ui_sbd_vert, &demo.vscrollbar); 1105 if (rc != EOK) { 1106 printf("Error creating button.\n"); 1107 return rc; 1108 } 1109 1110 ui_scrollbar_set_cb(demo.vscrollbar, &scrollbar_cb, (void *) &demo); 1111 1112 /* FIXME: Auto layout */ 1113 if (ui_is_textmode(ui)) { 1114 rect.p0.x = 40; 1115 rect.p0.y = 3; 1116 rect.p1.x = 41; 1117 rect.p1.y = 20; 1118 } else { 1119 rect.p0.x = 220; 1120 rect.p0.y = 53; 1121 rect.p1.x = 242; 1122 rect.p1.y = 340; 1123 } 1124 1125 ui_scrollbar_set_rect(demo.vscrollbar, &rect); 1126 1127 ui_scrollbar_set_thumb_length(demo.vscrollbar, 1128 ui_scrollbar_through_length(demo.vscrollbar) / 4); 1129 1130 rc = ui_fixed_add(demo.fixed, ui_scrollbar_ctl(demo.vscrollbar)); 1099 1131 if (rc != EOK) { 1100 1132 printf("Error adding control to layout.\n"); -
uspace/app/uidemo/uidemo.h
r8965860c r7ca7215 72 72 ui_rbutton_t *rbright; 73 73 ui_slider_t *slider; 74 ui_scrollbar_t *scrollbar; 74 ui_scrollbar_t *hscrollbar; 75 ui_scrollbar_t *vscrollbar; 75 76 } ui_demo_t; 76 77 -
uspace/lib/ui/include/types/ui/scrollbar.h
r8965860c r7ca7215 42 42 typedef struct ui_scrollbar ui_scrollbar_t; 43 43 44 /** Scrollbar direction */ 45 typedef enum { 46 /** Horizontal */ 47 ui_sbd_horiz, 48 /** Vertical */ 49 ui_sbd_vert 50 } ui_scrollbar_dir_t; 51 44 52 /** Scrollbar callbacks */ 45 53 typedef struct ui_scrollbar_cb { -
uspace/lib/ui/include/ui/scrollbar.h
r8965860c r7ca7215 47 47 #include <types/ui/window.h> 48 48 49 extern errno_t ui_scrollbar_create(ui_t *, ui_window_t *, ui_scrollbar_t **); 49 extern errno_t ui_scrollbar_create(ui_t *, ui_window_t *, ui_scrollbar_dir_t, 50 ui_scrollbar_t **); 50 51 extern void ui_scrollbar_destroy(ui_scrollbar_t *); 51 52 extern ui_control_t *ui_scrollbar_ctl(ui_scrollbar_t *); -
uspace/lib/ui/private/scrollbar.h
r8965860c r7ca7215 40 40 #include <gfx/coord.h> 41 41 #include <stdbool.h> 42 #include <types/ui/scrollbar.h> 42 43 43 44 /** Actual structure of scrollbar. … … 58 59 /** Scrollbar rectangle */ 59 60 gfx_rect_t rect; 61 /** Scrollbar direction */ 62 ui_scrollbar_dir_t dir; 60 63 /** Thumb length */ 61 64 gfx_coord_t thumb_len; … … 104 107 105 108 extern errno_t ui_scrollbar_paint_gfx(ui_scrollbar_t *); 106 extern errno_t ui_scrollbar_paint_text(ui_scrollbar_t *); 109 extern errno_t ui_scrollbar_paint_text_horiz(ui_scrollbar_t *); 110 extern errno_t ui_scrollbar_paint_text_vert(ui_scrollbar_t *); 107 111 extern void ui_scrollbar_get_geom(ui_scrollbar_t *, ui_scrollbar_geom_t *); 108 112 -
uspace/lib/ui/src/scrollbar.c
r8965860c r7ca7215 149 149 * @param ui UI 150 150 * @param window Window containing scrollbar 151 * @param dir Scrollbar direction 151 152 * @param rscrollbar Place to store pointer to new scrollbar 152 153 * @return EOK on success, ENOMEM if out of memory 153 154 */ 154 155 errno_t ui_scrollbar_create(ui_t *ui, ui_window_t *window, 155 ui_scrollbar_ t **rscrollbar)156 ui_scrollbar_dir_t dir, ui_scrollbar_t **rscrollbar) 156 157 { 157 158 ui_scrollbar_t *scrollbar; 158 159 ui_resource_t *resource; 160 const char *up_text; 161 const char *down_text; 159 162 errno_t rc; 160 163 … … 172 175 } 173 176 174 rc = ui_pbutton_create(resource, resource->textmode ? "\u25c4" : "<", 175 &scrollbar->up_btn); 177 if (dir == ui_sbd_horiz) { 178 up_text = resource->textmode ? "\u25c4" : "<"; 179 down_text = resource->textmode ? "\u25ba" : ">"; 180 } else { 181 up_text = resource->textmode ? "\u25b2" : "^"; 182 down_text = resource->textmode ? "\u25bc" : "v"; 183 } 184 185 rc = ui_pbutton_create(resource, up_text, &scrollbar->up_btn); 176 186 if (rc != EOK) 177 187 goto error; … … 180 190 (void *) scrollbar); 181 191 182 rc = ui_pbutton_create(resource, resource->textmode ? "\u25ba" : ">", 183 &scrollbar->down_btn); 192 rc = ui_pbutton_create(resource, down_text, &scrollbar->down_btn); 184 193 if (rc != EOK) 185 194 goto error; … … 194 203 scrollbar->ui = ui; 195 204 scrollbar->window = window; 205 scrollbar->dir = dir; 196 206 *rscrollbar = scrollbar; 197 207 return EOK; … … 340 350 ui_resource_t *resource; 341 351 gfx_coord2_t dims; 342 gfx_coord_t w; 352 gfx_coord_t len; 353 gfx_coord_t sblen; 343 354 344 355 resource = ui_window_get_res(scrollbar->window); 345 356 346 357 gfx_rect_dims(&scrollbar->rect, &dims); 347 w = resource->textmode ? ui_scrollbar_btn_len_text : 358 sblen = scrollbar->dir == ui_sbd_horiz ? 359 dims.x : dims.y; 360 361 len = resource->textmode ? ui_scrollbar_btn_len_text : 348 362 ui_scrollbar_btn_len; 349 return dims.x - 2 * w; 363 364 return sblen - 2 * len; 350 365 } 351 366 … … 477 492 478 493 /* Paint scrollbar thumb */ 479 480 494 rc = ui_scrollbar_paint_thumb_frame(resource, &geom.thumb_rect, 481 495 ui_scrollbar_thumb_frame_thickness, &brect); … … 512 526 } 513 527 514 /** Paint scrollbar in text mode.528 /** Paint horizontal scrollbar in text mode. 515 529 * 516 530 * @param scrollbar Scrollbar 517 531 * @return EOK on success or an error code 518 532 */ 519 errno_t ui_scrollbar_paint_text (ui_scrollbar_t *scrollbar)533 errno_t ui_scrollbar_paint_text_horiz(ui_scrollbar_t *scrollbar) 520 534 { 521 535 ui_resource_t *resource; … … 601 615 } 602 616 617 /** Paint vertical scrollbar in text mode. 618 * 619 * @param scrollbar Scrollbar 620 * @return EOK on success or an error code 621 */ 622 errno_t ui_scrollbar_paint_text_vert(ui_scrollbar_t *scrollbar) 623 { 624 ui_resource_t *resource; 625 ui_scrollbar_geom_t geom; 626 gfx_coord2_t pos; 627 gfx_text_fmt_t fmt; 628 errno_t rc; 629 630 resource = ui_window_get_res(scrollbar->window); 631 ui_scrollbar_get_geom(scrollbar, &geom); 632 633 /* Paint scrollbar through */ 634 635 gfx_text_fmt_init(&fmt); 636 fmt.font = resource->font; 637 fmt.color = resource->sbar_through_color; 638 fmt.halign = gfx_halign_left; 639 fmt.valign = gfx_valign_top; 640 641 pos.x = scrollbar->rect.p0.x; 642 for (pos.y = geom.through_rect.p0.y; pos.y < geom.through_rect.p1.y; 643 pos.y++) { 644 rc = gfx_puttext(&pos, &fmt, "\u2592"); 645 if (rc != EOK) 646 goto error; 647 } 648 649 /* Paint scrollbar thumb */ 650 651 pos.x = geom.thumb_rect.p0.x; 652 for (pos.y = geom.thumb_rect.p0.y; pos.y < geom.thumb_rect.p1.y; 653 pos.y++) { 654 rc = gfx_puttext(&pos, &fmt, "\u25a0"); 655 if (rc != EOK) 656 goto error; 657 } 658 659 rc = ui_pbutton_paint(scrollbar->up_btn); 660 if (rc != EOK) 661 goto error; 662 663 rc = ui_pbutton_paint(scrollbar->down_btn); 664 if (rc != EOK) 665 goto error; 666 667 rc = gfx_update(resource->gc); 668 if (rc != EOK) 669 goto error; 670 671 return EOK; 672 error: 673 return rc; 674 } 675 603 676 /** Paint scrollbar. 604 677 * … … 610 683 ui_resource_t *resource = ui_window_get_res(scrollbar->window); 611 684 612 if (resource->textmode) 613 return ui_scrollbar_paint_text(scrollbar); 614 else 685 if (resource->textmode) { 686 if (scrollbar->dir == ui_sbd_horiz) 687 return ui_scrollbar_paint_text_horiz(scrollbar); 688 else 689 return ui_scrollbar_paint_text_vert(scrollbar); 690 } else { 615 691 return ui_scrollbar_paint_gfx(scrollbar); 692 } 616 693 } 617 694 … … 646 723 } 647 724 648 /* Up button */ 649 geom->up_btn_rect.p0.x = orect.p0.x; 650 geom->up_btn_rect.p0.y = orect.p0.y; 651 geom->up_btn_rect.p1.x = orect.p0.x + btn_len; 652 geom->up_btn_rect.p1.y = orect.p1.y; 653 654 /* Through */ 655 geom->through_rect.p0.x = geom->up_btn_rect.p1.x; 656 geom->through_rect.p0.y = irect.p0.y; 657 geom->through_rect.p1.x = orect.p1.x - btn_len; 658 geom->through_rect.p1.y = irect.p1.y; 659 660 /* Thumb */ 661 geom->thumb_rect.p0.x = geom->up_btn_rect.p1.x + scrollbar->pos; 662 geom->thumb_rect.p0.y = orect.p0.y; 663 geom->thumb_rect.p1.x = geom->thumb_rect.p0.x + scrollbar->thumb_len; 664 geom->thumb_rect.p1.y = orect.p1.y; 665 666 /* Up through */ 667 geom->up_through_rect.p0 = geom->through_rect.p0; 668 geom->up_through_rect.p1.x = geom->thumb_rect.p0.x; 669 geom->up_through_rect.p1.y = geom->through_rect.p1.y; 670 671 /* Down through */ 672 geom->down_through_rect.p0.x = geom->thumb_rect.p1.x; 673 geom->down_through_rect.p0.y = geom->through_rect.p0.y; 674 geom->down_through_rect.p1 = geom->through_rect.p1; 675 676 /* Down button */ 677 geom->down_btn_rect.p0.x = geom->through_rect.p1.x; 678 geom->down_btn_rect.p0.y = orect.p0.y; 679 geom->down_btn_rect.p1.x = orect.p1.x; 680 geom->down_btn_rect.p1.y = orect.p1.y; 725 if (scrollbar->dir == ui_sbd_horiz) { 726 /* Up button */ 727 geom->up_btn_rect.p0.x = orect.p0.x; 728 geom->up_btn_rect.p0.y = orect.p0.y; 729 geom->up_btn_rect.p1.x = orect.p0.x + btn_len; 730 geom->up_btn_rect.p1.y = orect.p1.y; 731 732 /* Through */ 733 geom->through_rect.p0.x = geom->up_btn_rect.p1.x; 734 geom->through_rect.p0.y = irect.p0.y; 735 geom->through_rect.p1.x = orect.p1.x - btn_len; 736 geom->through_rect.p1.y = irect.p1.y; 737 738 /* Thumb */ 739 geom->thumb_rect.p0.x = geom->up_btn_rect.p1.x + 740 scrollbar->pos; 741 geom->thumb_rect.p0.y = orect.p0.y; 742 geom->thumb_rect.p1.x = geom->thumb_rect.p0.x + 743 scrollbar->thumb_len; 744 geom->thumb_rect.p1.y = orect.p1.y; 745 746 /* Up through */ 747 geom->up_through_rect.p0 = geom->through_rect.p0; 748 geom->up_through_rect.p1.x = geom->thumb_rect.p0.x; 749 geom->up_through_rect.p1.y = geom->through_rect.p1.y; 750 751 /* Down through */ 752 geom->down_through_rect.p0.x = geom->thumb_rect.p1.x; 753 geom->down_through_rect.p0.y = geom->through_rect.p0.y; 754 geom->down_through_rect.p1 = geom->through_rect.p1; 755 756 /* Down button */ 757 geom->down_btn_rect.p0.x = geom->through_rect.p1.x; 758 geom->down_btn_rect.p0.y = orect.p0.y; 759 geom->down_btn_rect.p1.x = orect.p1.x; 760 geom->down_btn_rect.p1.y = orect.p1.y; 761 } else { 762 /* Up button */ 763 geom->up_btn_rect.p0.x = orect.p0.x; 764 geom->up_btn_rect.p0.y = orect.p0.y; 765 geom->up_btn_rect.p1.x = orect.p1.x; 766 geom->up_btn_rect.p1.y = orect.p0.y + btn_len; 767 768 /* Through */ 769 geom->through_rect.p0.x = irect.p0.x; 770 geom->through_rect.p0.y = geom->up_btn_rect.p1.y; 771 geom->through_rect.p1.x = irect.p1.x; 772 geom->through_rect.p1.y = orect.p1.y - btn_len; 773 774 /* Thumb */ 775 geom->thumb_rect.p0.x = orect.p0.x; 776 geom->thumb_rect.p0.y = geom->up_btn_rect.p1.y + 777 scrollbar->pos; 778 geom->thumb_rect.p1.x = orect.p1.x; 779 geom->thumb_rect.p1.y = geom->thumb_rect.p0.y + 780 scrollbar->thumb_len; 781 782 /* Up through */ 783 geom->up_through_rect.p0 = geom->through_rect.p0; 784 geom->up_through_rect.p1.x = geom->through_rect.p1.x; 785 geom->up_through_rect.p1.y = geom->thumb_rect.p0.y; 786 787 /* Down through */ 788 geom->down_through_rect.p0.x = geom->through_rect.p0.x; 789 geom->down_through_rect.p0.y = geom->thumb_rect.p1.y; 790 geom->down_through_rect.p1 = geom->through_rect.p1; 791 792 /* Down button */ 793 geom->down_btn_rect.p0.x = orect.p0.x; 794 geom->down_btn_rect.p0.y = geom->through_rect.p1.y; 795 geom->down_btn_rect.p1.x = orect.p1.x; 796 geom->down_btn_rect.p1.y = orect.p1.y; 797 } 681 798 } 682 799 … … 790 907 } 791 908 792 /** Pointer moved.909 /** Scrollbar handler for pointer movement. 793 910 * 794 911 * @param scrollbar Scrollbar … … 800 917 801 918 if (scrollbar->thumb_held) { 802 spos = scrollbar->last_pos + pos->x - scrollbar->press_pos.x; 919 if (scrollbar->dir == ui_sbd_horiz) 920 spos = scrollbar->last_pos + pos->x - scrollbar->press_pos.x; 921 else 922 spos = scrollbar->last_pos + pos->y - scrollbar->press_pos.y; 923 803 924 ui_scrollbar_set_pos(scrollbar, spos); 804 925 } -
uspace/lib/ui/test/scrollbar.c
r8965860c r7ca7215 89 89 PCUT_ASSERT_NOT_NULL(window); 90 90 91 rc = ui_scrollbar_create(ui, window, &scrollbar);91 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 92 92 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 93 93 PCUT_ASSERT_NOT_NULL(scrollbar); … … 124 124 PCUT_ASSERT_NOT_NULL(window); 125 125 126 rc = ui_scrollbar_create(ui, window, &scrollbar);126 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 127 127 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 128 128 PCUT_ASSERT_NOT_NULL(scrollbar); … … 156 156 PCUT_ASSERT_NOT_NULL(window); 157 157 158 rc = ui_scrollbar_create(ui, window, &scrollbar);158 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 159 159 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 160 160 PCUT_ASSERT_NOT_NULL(scrollbar); … … 195 195 PCUT_ASSERT_NOT_NULL(window); 196 196 197 rc = ui_scrollbar_create(ui, window, &scrollbar);197 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 198 198 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 199 199 … … 206 206 } 207 207 208 /** Paint scrollbar in text mode */209 PCUT_TEST(paint_text )210 { 211 ui_t *ui = NULL; 212 ui_window_t *window = NULL; 213 ui_wnd_params_t params; 214 ui_scrollbar_t *scrollbar; 215 gfx_rect_t rect; 216 errno_t rc; 217 218 rc = ui_create_disp(NULL, &ui); 219 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 220 221 ui_wnd_params_init(¶ms); 222 params.caption = "Hello"; 223 224 rc = ui_window_create(ui, ¶ms, &window); 225 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 226 PCUT_ASSERT_NOT_NULL(window); 227 228 rc = ui_scrollbar_create(ui, window, &scrollbar);208 /** Paint horizontal scrollbar in text mode */ 209 PCUT_TEST(paint_text_horiz) 210 { 211 ui_t *ui = NULL; 212 ui_window_t *window = NULL; 213 ui_wnd_params_t params; 214 ui_scrollbar_t *scrollbar; 215 gfx_rect_t rect; 216 errno_t rc; 217 218 rc = ui_create_disp(NULL, &ui); 219 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 220 221 ui_wnd_params_init(¶ms); 222 params.caption = "Hello"; 223 224 rc = ui_window_create(ui, ¶ms, &window); 225 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 226 PCUT_ASSERT_NOT_NULL(window); 227 228 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 229 229 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 230 230 … … 235 235 ui_scrollbar_set_rect(scrollbar, &rect); 236 236 237 rc = ui_scrollbar_paint_text(scrollbar); 237 rc = ui_scrollbar_paint_text_horiz(scrollbar); 238 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 239 240 ui_scrollbar_destroy(scrollbar); 241 ui_window_destroy(window); 242 ui_destroy(ui); 243 } 244 245 /** Paint vertical scrollbar in text mode */ 246 PCUT_TEST(paint_text_vert) 247 { 248 ui_t *ui = NULL; 249 ui_window_t *window = NULL; 250 ui_wnd_params_t params; 251 ui_scrollbar_t *scrollbar; 252 gfx_rect_t rect; 253 errno_t rc; 254 255 rc = ui_create_disp(NULL, &ui); 256 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 257 258 ui_wnd_params_init(¶ms); 259 params.caption = "Hello"; 260 261 rc = ui_window_create(ui, ¶ms, &window); 262 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 263 PCUT_ASSERT_NOT_NULL(window); 264 265 rc = ui_scrollbar_create(ui, window, ui_sbd_vert, &scrollbar); 266 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 267 268 rect.p0.x = 1; 269 rect.p0.y = 1; 270 rect.p1.x = 2; 271 rect.p1.y = 10; 272 ui_scrollbar_set_rect(scrollbar, &rect); 273 274 rc = ui_scrollbar_paint_text_vert(scrollbar); 238 275 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 239 276 … … 264 301 PCUT_ASSERT_NOT_NULL(window); 265 302 266 rc = ui_scrollbar_create(ui, window, &scrollbar);303 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 267 304 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 268 305 … … 305 342 PCUT_ASSERT_NOT_NULL(window); 306 343 307 rc = ui_scrollbar_create(ui, window, &scrollbar);344 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 308 345 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 309 346 … … 347 384 PCUT_ASSERT_NOT_NULL(window); 348 385 349 rc = ui_scrollbar_create(ui, window, &scrollbar);386 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 350 387 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 351 388 … … 389 426 PCUT_ASSERT_NOT_NULL(window); 390 427 391 rc = ui_scrollbar_create(ui, window, &scrollbar);428 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 392 429 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 393 430 … … 429 466 PCUT_ASSERT_NOT_NULL(window); 430 467 431 rc = ui_scrollbar_create(ui, window, &scrollbar);468 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 432 469 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 433 470 … … 469 506 PCUT_ASSERT_NOT_NULL(window); 470 507 471 rc = ui_scrollbar_create(ui, window, &scrollbar);508 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 472 509 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 473 510 … … 522 559 PCUT_ASSERT_NOT_NULL(window); 523 560 524 rc = ui_scrollbar_create(ui, window, &scrollbar);561 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 525 562 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 526 563 … … 578 615 PCUT_ASSERT_NOT_NULL(window); 579 616 580 rc = ui_scrollbar_create(ui, window, &scrollbar);617 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 581 618 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 582 619 … … 642 679 PCUT_ASSERT_NOT_NULL(window); 643 680 644 rc = ui_scrollbar_create(ui, window, &scrollbar);681 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 645 682 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 646 683 … … 694 731 PCUT_ASSERT_NOT_NULL(window); 695 732 696 rc = ui_scrollbar_create(ui, window, &scrollbar);733 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 697 734 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 698 735 … … 745 782 PCUT_ASSERT_NOT_NULL(window); 746 783 747 rc = ui_scrollbar_create(ui, window, &scrollbar);784 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 748 785 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 749 786 … … 787 824 PCUT_ASSERT_NOT_NULL(window); 788 825 789 rc = ui_scrollbar_create(ui, window, &scrollbar);826 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 790 827 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 791 828 … … 828 865 PCUT_ASSERT_NOT_NULL(window); 829 866 830 rc = ui_scrollbar_create(ui, window, &scrollbar);867 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 831 868 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 832 869 … … 869 906 PCUT_ASSERT_NOT_NULL(window); 870 907 871 rc = ui_scrollbar_create(ui, window, &scrollbar);908 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 872 909 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 873 910 … … 910 947 PCUT_ASSERT_NOT_NULL(window); 911 948 912 rc = ui_scrollbar_create(ui, window, &scrollbar);949 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 913 950 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 914 951 … … 951 988 PCUT_ASSERT_NOT_NULL(window); 952 989 953 rc = ui_scrollbar_create(ui, window, &scrollbar);990 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 954 991 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 955 992 … … 996 1033 PCUT_ASSERT_NOT_NULL(window); 997 1034 998 rc = ui_scrollbar_create(ui, window, &scrollbar);1035 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 999 1036 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1000 1037 … … 1058 1095 PCUT_ASSERT_NOT_NULL(window); 1059 1096 1060 rc = ui_scrollbar_create(ui, window, &scrollbar);1097 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 1061 1098 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1062 1099 … … 1104 1141 PCUT_ASSERT_NOT_NULL(window); 1105 1142 1106 rc = ui_scrollbar_create(ui, window, &scrollbar);1143 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 1107 1144 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1108 1145 … … 1161 1198 PCUT_ASSERT_NOT_NULL(window); 1162 1199 1163 rc = ui_scrollbar_create(ui, window, &scrollbar);1200 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 1164 1201 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1165 1202 … … 1215 1252 PCUT_ASSERT_NOT_NULL(window); 1216 1253 1217 rc = ui_scrollbar_create(ui, window, &scrollbar);1254 rc = ui_scrollbar_create(ui, window, ui_sbd_horiz, &scrollbar); 1218 1255 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 1219 1256
Note:
See TracChangeset
for help on using the changeset viewer.