Changeset 0ae9e18 in mainline for uspace/lib


Ignore:
Timestamp:
2025-03-09T12:03:24Z (7 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
da54714
Parents:
797ab95
Message:

Select shutdown action (power off / restart) in shutdown dialog.

Location:
uspace/lib/ui
Files:
2 edited

Legend:

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

    r797ab95 r0ae9e18  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4444typedef struct ui_select_dialog ui_select_dialog_t;
    4545
     46/** Select dialog flags */
     47typedef enum {
     48        /** Topmost window */
     49        usdf_topmost = 0x1,
     50        /** Place to the center of the screen */
     51        usdf_center = 0x2
     52} ui_select_dialog_flags_t;
     53
    4654/** Select dialog parameters */
    4755typedef struct {
     
    5058        /** Prompt text */
    5159        const char *prompt;
     60        /** Flags */
     61        ui_select_dialog_flags_t flags;
    5262} ui_select_dialog_params_t;
    5363
  • uspace/lib/ui/src/selectdialog.c

    r797ab95 r0ae9e18  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    114114        ui_wnd_params_init(&wparams);
    115115        wparams.caption = params->caption;
     116
     117        if ((params->flags & usdf_topmost) != 0)
     118                wparams.flags |= wndf_topmost;
     119        if ((params->flags & usdf_center) != 0)
     120                wparams.placement = ui_wnd_place_center;
    116121
    117122        /* FIXME: Auto layout */
Note: See TracChangeset for help on using the changeset viewer.