Changeset 2e08f2b6 in mainline for uspace/lib


Ignore:
Timestamp:
2025-01-20T17:35:12Z (10 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
5162f6e
Parents:
afb4025
Message:

Confirm shutdown in shutdown dialog.

Location:
uspace/lib/ui
Files:
2 edited

Legend:

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

    rafb4025 r2e08f2b6  
    5858} ui_msg_dialog_choice_t;
    5959
     60/** Message dialog flags */
     61typedef enum {
     62        /** Topmost window */
     63        umdf_topmost = 0x1,
     64        /** Place to the center of the screen */
     65        umdf_center = 0x2
     66} ui_msg_dialog_flags_t;
     67
    6068/** Message dialog parameters */
    6169typedef struct {
     
    6674        /** The choice that the user is given */
    6775        ui_msg_dialog_choice_t choice;
     76        /** Flags */
     77        ui_msg_dialog_flags_t flags;
    6878} ui_msg_dialog_params_t;
    6979
  • uspace/lib/ui/src/msgdialog.c

    rafb4025 r2e08f2b6  
    111111        ui_wnd_params_init(&wparams);
    112112        wparams.caption = params->caption;
     113        if ((params->flags & umdf_topmost) != 0)
     114                wparams.flags |= wndf_topmost;
     115        if ((params->flags & umdf_center) != 0)
     116                wparams.placement = ui_wnd_place_center;
    113117
    114118        /* FIXME: Auto layout */
Note: See TracChangeset for help on using the changeset viewer.