Changeset ec8a1bf in mainline
- Timestamp:
- 2021-11-03T18:27:47Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 552b69f
- Parents:
- b48e680f
- Location:
- uspace/app/launcher
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/launcher/launcher.c
rb48e680f rec8a1bf 96 96 app_launchl("/app/terminal", "-c", "/app/nav", NULL); 97 97 } else if (pbutton == launcher->pb2) { 98 app_launchl("/app/terminal", "-c", "/app/edit", NULL); 99 } else if (pbutton == launcher->pb3) { 98 100 app_launchl("/app/terminal", NULL); 99 } else if (pbutton == launcher->pb 3) {101 } else if (pbutton == launcher->pb4) { 100 102 app_launchl("/app/calculator", NULL); 101 } else if (pbutton == launcher->pb 4) {103 } else if (pbutton == launcher->pb5) { 102 104 app_launchl("/app/uidemo", NULL); 103 } else if (pbutton == launcher->pb 5) {105 } else if (pbutton == launcher->pb6) { 104 106 app_launchl("/app/gfxdemo", "ui", NULL); 105 107 } … … 222 224 params.rect.p0.y = 0; 223 225 params.rect.p1.x = 210; 224 params.rect.p1.y = 3 10;226 params.rect.p1.y = 345; 225 227 226 228 memset((void *) &launcher, 0, sizeof(launcher)); … … 318 320 } 319 321 322 /* Text Editor */ 323 324 rc = ui_pbutton_create(ui_res, "Text Editor", &launcher.pb2); 325 if (rc != EOK) { 326 printf("Error creating button.\n"); 327 return rc; 328 } 329 330 ui_pbutton_set_cb(launcher.pb2, &pbutton_cb, (void *) &launcher); 331 332 rect.p0.x = 15; 333 rect.p0.y = 130 + 35; 334 rect.p1.x = 190; 335 rect.p1.y = rect.p0.y + 28; 336 ui_pbutton_set_rect(launcher.pb2, &rect); 337 338 rc = ui_fixed_add(launcher.fixed, ui_pbutton_ctl(launcher.pb2)); 339 if (rc != EOK) { 340 printf("Error adding control to layout.\n"); 341 return rc; 342 } 343 320 344 /* Terminal */ 321 345 322 rc = ui_pbutton_create(ui_res, "Terminal", &launcher.pb 2);323 if (rc != EOK) { 324 printf("Error creating button.\n"); 325 return rc; 326 } 327 328 ui_pbutton_set_cb(launcher.pb 2, &pbutton_cb, (void *) &launcher);329 330 rect.p0.x = 15; 331 rect.p0.y = 130 + 35;332 rect.p1.x = 190; 333 rect.p1.y = rect.p0.y + 28; 334 ui_pbutton_set_rect(launcher.pb 2, &rect);335 336 rc = ui_fixed_add(launcher.fixed, ui_pbutton_ctl(launcher.pb 2));346 rc = ui_pbutton_create(ui_res, "Terminal", &launcher.pb3); 347 if (rc != EOK) { 348 printf("Error creating button.\n"); 349 return rc; 350 } 351 352 ui_pbutton_set_cb(launcher.pb3, &pbutton_cb, (void *) &launcher); 353 354 rect.p0.x = 15; 355 rect.p0.y = 130 + 2 * 35; 356 rect.p1.x = 190; 357 rect.p1.y = rect.p0.y + 28; 358 ui_pbutton_set_rect(launcher.pb3, &rect); 359 360 rc = ui_fixed_add(launcher.fixed, ui_pbutton_ctl(launcher.pb3)); 337 361 if (rc != EOK) { 338 362 printf("Error adding control to layout.\n"); … … 342 366 /* Calculator */ 343 367 344 rc = ui_pbutton_create(ui_res, "Calculator", &launcher.pb 3);345 if (rc != EOK) { 346 printf("Error creating button.\n"); 347 return rc; 348 } 349 350 ui_pbutton_set_cb(launcher.pb 3, &pbutton_cb, (void *) &launcher);351 352 rect.p0.x = 15; 353 rect.p0.y = 130 + 2* 35;354 rect.p1.x = 190; 355 rect.p1.y = rect.p0.y + 28; 356 ui_pbutton_set_rect(launcher.pb 3, &rect);357 358 rc = ui_fixed_add(launcher.fixed, ui_pbutton_ctl(launcher.pb 3));368 rc = ui_pbutton_create(ui_res, "Calculator", &launcher.pb4); 369 if (rc != EOK) { 370 printf("Error creating button.\n"); 371 return rc; 372 } 373 374 ui_pbutton_set_cb(launcher.pb4, &pbutton_cb, (void *) &launcher); 375 376 rect.p0.x = 15; 377 rect.p0.y = 130 + 3 * 35; 378 rect.p1.x = 190; 379 rect.p1.y = rect.p0.y + 28; 380 ui_pbutton_set_rect(launcher.pb4, &rect); 381 382 rc = ui_fixed_add(launcher.fixed, ui_pbutton_ctl(launcher.pb4)); 359 383 if (rc != EOK) { 360 384 printf("Error adding control to layout.\n"); … … 364 388 /* UI Demo */ 365 389 366 rc = ui_pbutton_create(ui_res, "UI Demo", &launcher.pb 4);367 if (rc != EOK) { 368 printf("Error creating button.\n"); 369 return rc; 370 } 371 372 ui_pbutton_set_cb(launcher.pb 4, &pbutton_cb, (void *) &launcher);373 374 rect.p0.x = 15; 375 rect.p0.y = 130 + 3* 35;376 rect.p1.x = 190; 377 rect.p1.y = rect.p0.y + 28; 378 ui_pbutton_set_rect(launcher.pb 4, &rect);379 380 rc = ui_fixed_add(launcher.fixed, ui_pbutton_ctl(launcher.pb 4));390 rc = ui_pbutton_create(ui_res, "UI Demo", &launcher.pb5); 391 if (rc != EOK) { 392 printf("Error creating button.\n"); 393 return rc; 394 } 395 396 ui_pbutton_set_cb(launcher.pb5, &pbutton_cb, (void *) &launcher); 397 398 rect.p0.x = 15; 399 rect.p0.y = 130 + 4 * 35; 400 rect.p1.x = 190; 401 rect.p1.y = rect.p0.y + 28; 402 ui_pbutton_set_rect(launcher.pb5, &rect); 403 404 rc = ui_fixed_add(launcher.fixed, ui_pbutton_ctl(launcher.pb5)); 381 405 if (rc != EOK) { 382 406 printf("Error adding control to layout.\n"); … … 386 410 /* GFX Demo */ 387 411 388 rc = ui_pbutton_create(ui_res, "GFX Demo", &launcher.pb 5);389 if (rc != EOK) { 390 printf("Error creating button.\n"); 391 return rc; 392 } 393 394 ui_pbutton_set_cb(launcher.pb 5, &pbutton_cb, (void *) &launcher);395 396 rect.p0.x = 15; 397 rect.p0.y = 130 + 4* 35;398 rect.p1.x = 190; 399 rect.p1.y = rect.p0.y + 28; 400 ui_pbutton_set_rect(launcher.pb 5, &rect);401 402 rc = ui_fixed_add(launcher.fixed, ui_pbutton_ctl(launcher.pb 5));412 rc = ui_pbutton_create(ui_res, "GFX Demo", &launcher.pb6); 413 if (rc != EOK) { 414 printf("Error creating button.\n"); 415 return rc; 416 } 417 418 ui_pbutton_set_cb(launcher.pb6, &pbutton_cb, (void *) &launcher); 419 420 rect.p0.x = 15; 421 rect.p0.y = 130 + 5 * 35; 422 rect.p1.x = 190; 423 rect.p1.y = rect.p0.y + 28; 424 ui_pbutton_set_rect(launcher.pb6, &rect); 425 426 rc = ui_fixed_add(launcher.fixed, ui_pbutton_ctl(launcher.pb6)); 403 427 if (rc != EOK) { 404 428 printf("Error adding control to layout.\n"); -
uspace/app/launcher/launcher.h
rb48e680f rec8a1bf 57 57 ui_pbutton_t *pb4; 58 58 ui_pbutton_t *pb5; 59 ui_pbutton_t *pb6; 59 60 } launcher_t; 60 61
Note:
See TracChangeset
for help on using the changeset viewer.