Changeset d4ea1f6 in mainline for uspace/lib/ui/src/pbutton.c


Ignore:
Timestamp:
2022-03-21T17:38:57Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8965860c
Parents:
26c90dd
Message:

Scroll as soon as scroll button is pressed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/pbutton.c

    r26c90dd rd4ea1f6  
    429429        pbutton->held = true;
    430430        (void) ui_pbutton_paint(pbutton);
     431        ui_pbutton_down(pbutton);
    431432}
    432433
     
    446447                ui_pbutton_clicked(pbutton);
    447448        }
     449
     450        ui_pbutton_up(pbutton);
    448451}
    449452
     
    476479}
    477480
    478 /** Button was clicked.
     481/** Send button clicked event.
    479482 *
    480483 * @param pbutton Push button
     
    484487        if (pbutton->cb != NULL && pbutton->cb->clicked != NULL)
    485488                pbutton->cb->clicked(pbutton, pbutton->arg);
     489}
     490
     491/** Send button down event.
     492 *
     493 * @param pbutton Push button
     494 */
     495void ui_pbutton_down(ui_pbutton_t *pbutton)
     496{
     497        if (pbutton->cb != NULL && pbutton->cb->down != NULL)
     498                pbutton->cb->down(pbutton, pbutton->arg);
     499}
     500
     501/** Send button up event.
     502 *
     503 * @param pbutton Push button
     504 */
     505void ui_pbutton_up(ui_pbutton_t *pbutton)
     506{
     507        if (pbutton->cb != NULL && pbutton->cb->up != NULL)
     508                pbutton->cb->up(pbutton, pbutton->arg);
    486509}
    487510
Note: See TracChangeset for help on using the changeset viewer.