1 | /*
|
---|
2 | * Copyright (c) 2023 Jiri Svoboda
|
---|
3 | * All rights reserved.
|
---|
4 | *
|
---|
5 | * Redistribution and use in source and binary forms, with or without
|
---|
6 | * modification, are permitted provided that the following conditions
|
---|
7 | * are met:
|
---|
8 | *
|
---|
9 | * - Redistributions of source code must retain the above copyright
|
---|
10 | * notice, this list of conditions and the following disclaimer.
|
---|
11 | * - Redistributions in binary form must reproduce the above copyright
|
---|
12 | * notice, this list of conditions and the following disclaimer in the
|
---|
13 | * documentation and/or other materials provided with the distribution.
|
---|
14 | * - The name of the author may not be used to endorse or promote products
|
---|
15 | * derived from this software without specific prior written permission.
|
---|
16 | *
|
---|
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
27 | */
|
---|
28 |
|
---|
29 | /** @addtogroup display-cfg
|
---|
30 | * @{
|
---|
31 | */
|
---|
32 | /**
|
---|
33 | * @file Seat configuration tab
|
---|
34 | */
|
---|
35 |
|
---|
36 | #ifndef TYPES_SEATS_H
|
---|
37 | #define TYPES_SEATS_H
|
---|
38 |
|
---|
39 | #include <loc.h>
|
---|
40 | #include <types/common.h>
|
---|
41 | #include <ui/fixed.h>
|
---|
42 | #include <ui/label.h>
|
---|
43 | #include <ui/list.h>
|
---|
44 | #include <ui/pbutton.h>
|
---|
45 | #include <ui/promptdialog.h>
|
---|
46 | #include <ui/selectdialog.h>
|
---|
47 | #include <ui/tab.h>
|
---|
48 |
|
---|
49 | /** Seat configuration tab */
|
---|
50 | typedef struct dcfg_seats {
|
---|
51 | /** Containing display configuration */
|
---|
52 | struct display_cfg *dcfg;
|
---|
53 | /** UI tab */
|
---|
54 | ui_tab_t *tab;
|
---|
55 | /** Fixed layout */
|
---|
56 | ui_fixed_t *fixed;
|
---|
57 | /** 'Configured seats' label */
|
---|
58 | ui_label_t *seats_label;
|
---|
59 | /** List of configured seats */
|
---|
60 | ui_list_t *seat_list;
|
---|
61 | /** Add seat button */
|
---|
62 | ui_pbutton_t *add_seat;
|
---|
63 | /** Remove seat button */
|
---|
64 | ui_pbutton_t *remove_seat;
|
---|
65 | /** Add seat dialog */
|
---|
66 | ui_prompt_dialog_t *add_seat_dlg;
|
---|
67 | /** 'Devices assigned to xxx' label */
|
---|
68 | ui_label_t *devices_label;
|
---|
69 | /** List of assigned devices */
|
---|
70 | ui_list_t *device_list;
|
---|
71 | /** Add device button */
|
---|
72 | ui_pbutton_t *add_device;
|
---|
73 | /** Remove device button */
|
---|
74 | ui_pbutton_t *remove_device;
|
---|
75 | /** Add device dialog */
|
---|
76 | ui_select_dialog_t *add_device_dlg;
|
---|
77 | } dcfg_seats_t;
|
---|
78 |
|
---|
79 | /** Entry in seat list */
|
---|
80 | typedef struct {
|
---|
81 | /** Containing seat configuration tab */
|
---|
82 | struct dcfg_seats *seats;
|
---|
83 | /** List entry */
|
---|
84 | ui_list_entry_t *lentry;
|
---|
85 | /** Seat ID */
|
---|
86 | sysarg_t seat_id;
|
---|
87 | /** Seat name */
|
---|
88 | char *name;
|
---|
89 | } dcfg_seats_entry_t;
|
---|
90 |
|
---|
91 | /** Entry in device list */
|
---|
92 | typedef struct {
|
---|
93 | /** Containing seat configuration tab */
|
---|
94 | struct dcfg_seats *seats;
|
---|
95 | /** List entry */
|
---|
96 | ui_list_entry_t *lentry;
|
---|
97 | /** Service ID */
|
---|
98 | service_id_t svc_id;
|
---|
99 | /** Device name */
|
---|
100 | char *name;
|
---|
101 | } dcfg_devices_entry_t;
|
---|
102 |
|
---|
103 | #endif
|
---|
104 |
|
---|
105 | /** @}
|
---|
106 | */
|
---|