diff options
Diffstat (limited to 'scripts/kconfig/lxdialog/dialog.h')
-rw-r--r-- | scripts/kconfig/lxdialog/dialog.h | 82 |
1 files changed, 40 insertions, 42 deletions
diff --git a/scripts/kconfig/lxdialog/dialog.h b/scripts/kconfig/lxdialog/dialog.h index af3cf716e215..2f4c19d710b2 100644 --- a/scripts/kconfig/lxdialog/dialog.h +++ b/scripts/kconfig/lxdialog/dialog.h | |||
@@ -87,62 +87,60 @@ | |||
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * Attribute names | 90 | * Color definitions |
91 | */ | 91 | */ |
92 | #define screen_attr attributes[0] | 92 | struct dialog_color { |
93 | #define shadow_attr attributes[1] | 93 | chtype atr; /* Color attribute */ |
94 | #define dialog_attr attributes[2] | 94 | int fg; /* foreground */ |
95 | #define title_attr attributes[3] | 95 | int bg; /* background */ |
96 | #define border_attr attributes[4] | 96 | int hl; /* highlight this item */ |
97 | #define button_active_attr attributes[5] | 97 | }; |
98 | #define button_inactive_attr attributes[6] | ||
99 | #define button_key_active_attr attributes[7] | ||
100 | #define button_key_inactive_attr attributes[8] | ||
101 | #define button_label_active_attr attributes[9] | ||
102 | #define button_label_inactive_attr attributes[10] | ||
103 | #define inputbox_attr attributes[11] | ||
104 | #define inputbox_border_attr attributes[12] | ||
105 | #define searchbox_attr attributes[13] | ||
106 | #define searchbox_title_attr attributes[14] | ||
107 | #define searchbox_border_attr attributes[15] | ||
108 | #define position_indicator_attr attributes[16] | ||
109 | #define menubox_attr attributes[17] | ||
110 | #define menubox_border_attr attributes[18] | ||
111 | #define item_attr attributes[19] | ||
112 | #define item_selected_attr attributes[20] | ||
113 | #define tag_attr attributes[21] | ||
114 | #define tag_selected_attr attributes[22] | ||
115 | #define tag_key_attr attributes[23] | ||
116 | #define tag_key_selected_attr attributes[24] | ||
117 | #define check_attr attributes[25] | ||
118 | #define check_selected_attr attributes[26] | ||
119 | #define uarrow_attr attributes[27] | ||
120 | #define darrow_attr attributes[28] | ||
121 | 98 | ||
122 | /* number of attributes */ | 99 | struct dialog_info { |
123 | #define ATTRIBUTE_COUNT 29 | 100 | const char *backtitle; |
101 | struct dialog_color screen; | ||
102 | struct dialog_color shadow; | ||
103 | struct dialog_color dialog; | ||
104 | struct dialog_color title; | ||
105 | struct dialog_color border; | ||
106 | struct dialog_color button_active; | ||
107 | struct dialog_color button_inactive; | ||
108 | struct dialog_color button_key_active; | ||
109 | struct dialog_color button_key_inactive; | ||
110 | struct dialog_color button_label_active; | ||
111 | struct dialog_color button_label_inactive; | ||
112 | struct dialog_color inputbox; | ||
113 | struct dialog_color inputbox_border; | ||
114 | struct dialog_color searchbox; | ||
115 | struct dialog_color searchbox_title; | ||
116 | struct dialog_color searchbox_border; | ||
117 | struct dialog_color position_indicator; | ||
118 | struct dialog_color menubox; | ||
119 | struct dialog_color menubox_border; | ||
120 | struct dialog_color item; | ||
121 | struct dialog_color item_selected; | ||
122 | struct dialog_color tag; | ||
123 | struct dialog_color tag_selected; | ||
124 | struct dialog_color tag_key; | ||
125 | struct dialog_color tag_key_selected; | ||
126 | struct dialog_color check; | ||
127 | struct dialog_color check_selected; | ||
128 | struct dialog_color uarrow; | ||
129 | struct dialog_color darrow; | ||
130 | }; | ||
124 | 131 | ||
125 | /* | 132 | /* |
126 | * Global variables | 133 | * Global variables |
127 | */ | 134 | */ |
128 | extern bool use_colors; | 135 | extern struct dialog_info dlg; |
129 | extern bool use_shadow; | ||
130 | |||
131 | extern chtype attributes[]; | ||
132 | |||
133 | extern const char *backtitle; | ||
134 | 136 | ||
135 | /* | 137 | /* |
136 | * Function prototypes | 138 | * Function prototypes |
137 | */ | 139 | */ |
138 | extern void create_rc(const char *filename); | ||
139 | extern int parse_rc(void); | ||
140 | |||
141 | void init_dialog(void); | 140 | void init_dialog(void); |
142 | void end_dialog(void); | 141 | void end_dialog(void); |
143 | void attr_clear(WINDOW * win, int height, int width, chtype attr); | 142 | void attr_clear(WINDOW * win, int height, int width, chtype attr); |
144 | void dialog_clear(void); | 143 | void dialog_clear(void); |
145 | void color_setup(void); | ||
146 | void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x); | 144 | void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x); |
147 | void print_button(WINDOW * win, const char *label, int y, int x, int selected); | 145 | void print_button(WINDOW * win, const char *label, int y, int x, int selected); |
148 | void print_title(WINDOW *dialog, const char *title, int width); | 146 | void print_title(WINDOW *dialog, const char *title, int width); |