Changeset 806d761 in mainline for uspace/lib/ui/src/checkbox.c


Ignore:
Timestamp:
2024-02-07T23:44:59Z (4 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
242e3c3
Parents:
74cb6610
Message:

Start menu should have 'open in terminal' functionality

Makes it easier for the user and if we are running in console mode,
we correctly start the application, instead of failing to start a
terminal.

File:
1 edited

Legend:

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

    r74cb6610 r806d761  
    11/*
    2  * Copyright (c) 2022 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    139139}
    140140
    141 /** Set button rectangle.
    142  *
    143  * @param checkbox Button
    144  * @param rect New button rectangle
     141/** Set check box rectangle.
     142 *
     143 * @param checkbox Check box
     144 * @param rect New check box rectangle
    145145 */
    146146void ui_checkbox_set_rect(ui_checkbox_t *checkbox, gfx_rect_t *rect)
    147147{
    148148        checkbox->rect = *rect;
     149}
     150
     151/** Return if check box is checked.
     152 *
     153 * @param checkbox Check box
     154 * @return @c true iff check box is checked
     155 */
     156bool ui_checkbox_get_checked(ui_checkbox_t *checkbox)
     157{
     158        return checkbox->checked;
     159}
     160
     161/** Set check box checked state.
     162 *
     163 * @param checkbox Check box
     164 * @param checked @c true iff checkbox should be checked
     165 */
     166void ui_checkbox_set_checked(ui_checkbox_t *checkbox, bool checked)
     167{
     168        checkbox->checked = checked;
    149169}
    150170
Note: See TracChangeset for help on using the changeset viewer.