Changeset 9a07ee3 in mainline for uspace/lib/ui/include


Ignore:
Timestamp:
2024-11-12T09:56:19Z (14 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
12dd36c
Parents:
0d00e53
git-author:
Jiri Svoboda <jiri@…> (2024-11-11 19:56:06)
git-committer:
Jiri Svoboda <jiri@…> (2024-11-12 09:56:19)
Message:

Add message dialog choice selection (OK, OK/Cancel)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/include/types/ui/msgdialog.h

    r0d00e53 r9a07ee3  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4545typedef struct ui_msg_dialog ui_msg_dialog_t;
    4646
     47enum {
     48        /** Maximum number of buttons in message dialog. */
     49        ui_msg_dialog_maxbtn = 2
     50};
     51
     52/** Which choices the user can select from. */
     53typedef enum {
     54        /** OK (the default) */
     55        umdc_ok,
     56        /** OK, Cancel */
     57        umdc_ok_cancel
     58} ui_msg_dialog_choice_t;
     59
    4760/** Message dialog parameters */
    4861typedef struct {
     
    5164        /** Message text */
    5265        const char *text;
     66        /** The choice that the user is given */
     67        ui_msg_dialog_choice_t choice;
    5368} ui_msg_dialog_params_t;
    5469
Note: See TracChangeset for help on using the changeset viewer.