display.h (2210B)
1 /* 2 * 3 * Wireless daemon for Linux 4 * 5 * Copyright (C) 2017-2019 Intel Corporation. All rights reserved. 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 * 21 */ 22 23 struct command; 24 struct command_family; 25 #define COLOR_OFF "\x1B[0m" 26 #define COLOR_BOLDGRAY(s) "\x1B[1;90m" s COLOR_OFF 27 #define COLOR_GRAY(s) "\x1b[90m" s COLOR_OFF 28 #define COLOR_GREEN(s) "\x1b[32m" s COLOR_OFF 29 #define COLOR_RED(s) "\x1B[0;91m" s COLOR_OFF 30 #define COLOR_BLUE(s) "\x1B[94m" s COLOR_OFF 31 #define COLOR_YELLOW(s) "\x1b[33m" s COLOR_OFF 32 #define CLEAR_SCREEN "\x1b[2J" 33 #define MARGIN " " 34 35 void display(const char *format, ...) 36 __attribute__((format(printf, 1, 2))); 37 void display_table_header(const char *caption, const char *fmt, ...) 38 __attribute__((format(printf, 2, 3))); 39 void display_table_row(const char *margin, unsigned int ncolumns, ...); 40 void display_table_footer(void); 41 void display_error(const char *error); 42 void display_command_line(const char *command_family, 43 const struct command *cmd); 44 45 void display_refresh_timeout_set(void); 46 void display_refresh_reset(void); 47 void display_refresh_set_cmd(const char *family, const char *entity, 48 const struct command *cmd, 49 char **argv, int argc); 50 51 void display_enable_cmd_prompt(void); 52 void display_disable_cmd_prompt(void); 53 54 void display_agent_prompt(const char *label, bool mask_input); 55 void display_agent_prompt_release(const char *label); 56 bool display_agent_is_active(void); 57 58 void display_quit(void); 59 60 void display_init(void); 61 void display_exit(void);