| 1 | #ifndef _DISPLAY_H_ |
|---|
| 2 | #define _DISPLAY_H_ |
|---|
| 3 | |
|---|
| 4 | /* macro to render "paused" in inverse at the coords given. This is |
|---|
| 5 | * called from apachetop.cc/read_key() when pause is activated, and in each |
|---|
| 6 | * display.cc/draw_header() when pause is turned on. |
|---|
| 7 | */ |
|---|
| 8 | #define DRAW_PAUSED(x,y) attron(A_REVERSE); \ |
|---|
| 9 | mvaddstr(x, y, "paused"); \ |
|---|
| 10 | attroff(A_REVERSE) |
|---|
| 11 | |
|---|
| 12 | #define SUBMENU_LINE_NUMBER LINES_RESERVED-2 |
|---|
| 13 | |
|---|
| 14 | /* display() makes an array of these, sorts, and displays */ |
|---|
| 15 | struct itemlist { |
|---|
| 16 | unsigned int hash; |
|---|
| 17 | int item, ip_item; |
|---|
| 18 | double reqcount; |
|---|
| 19 | double bytecount; |
|---|
| 20 | time_t first, last, timespan; |
|---|
| 21 | float rps, kbps; |
|---|
| 22 | |
|---|
| 23 | struct hitinfo r_codes[6]; |
|---|
| 24 | }; |
|---|
| 25 | |
|---|
| 26 | bool display(time_t last_display); |
|---|
| 27 | |
|---|
| 28 | void display_header(); |
|---|
| 29 | |
|---|
| 30 | void display_list(); |
|---|
| 31 | void display_sub_list(short display_mode_override, |
|---|
| 32 | unsigned short offset, unsigned short limit); |
|---|
| 33 | |
|---|
| 34 | void translate_screen_to_pos(); |
|---|
| 35 | |
|---|
| 36 | void drawMarker(void); |
|---|
| 37 | |
|---|
| 38 | #define NO_INDENT 0 |
|---|
| 39 | void show_map_line(struct itemlist *item_ptr, int vert_location, map *m, |
|---|
| 40 | unsigned short indent, unsigned short number_mode); |
|---|
| 41 | |
|---|
| 42 | void shellsort_wrapper(struct itemlist *items, unsigned int size, |
|---|
| 43 | struct config pcf); |
|---|
| 44 | void shellsort(struct itemlist *items, unsigned int size, int sorttype); |
|---|
| 45 | |
|---|
| 46 | float readableNum(double num, char *suffix); |
|---|
| 47 | |
|---|
| 48 | void display_submenu_banner(char *title, int title_len, char *banner); |
|---|
| 49 | void clear_submenu_banner(void); |
|---|
| 50 | |
|---|
| 51 | void display_help(void); |
|---|
| 52 | void display_active_filters(void); |
|---|
| 53 | |
|---|
| 54 | void display_histogram(); |
|---|
| 55 | |
|---|
| 56 | #endif |
|---|