Home | History | Annotate | Line # | Download | only in dist
      1 /*
      2  * Copyright (c) 1984 through 2008, William LeFebvre
      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 are met:
      7  *
      8  *     * Redistributions of source code must retain the above copyright
      9  * notice, this list of conditions and the following disclaimer.
     10  *
     11  *     * Redistributions in binary form must reproduce the above
     12  * copyright notice, this list of conditions and the following disclaimer
     13  * in the documentation and/or other materials provided with the
     14  * distribution.
     15  *
     16  *     * Neither the name of William LeFebvre nor the names of other
     17  * contributors may be used to endorse or promote products derived from
     18  * this software without specific prior written permission.
     19  *
     20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31  */
     32 
     33 /* interface declaration for display.c */
     34 
     35 #ifndef _DISPLAY_H
     36 #define _DISPLAY_H
     37 
     38 #include "globalstate.h"
     39 
     40 void display_clear(void);
     41 int display_resize(void);
     42 int display_lines(void);
     43 int display_setmulti(int m);
     44 int display_columns(void);
     45 int display_init(struct statics *statics, int percpuinfo);
     46 void i_loadave(int mpid, double *avenrun);
     47 void u_loadave(int mpid, double *avenrun);
     48 void i_minibar(int (*formatter)(char *, int));
     49 void u_minibar(int (*formatter)(char *, int));
     50 void i_uptime(time_t *bt, time_t *tod);
     51 void u_uptime(time_t *bt, time_t *tod);
     52 void i_timeofday(time_t *tod);
     53 void i_procstates(int total, int *brkdn, int threads);
     54 void u_procstates(int total, int *brkdn, int threads);
     55 void i_cpustates(int *states);
     56 void u_cpustates(int *states);
     57 void z_cpustates(void);
     58 void i_kernel(int *stats);
     59 void u_kernel(int *stats);
     60 void i_memory(long *stats);
     61 void u_memory(long *stats);
     62 void i_swap(long *stats);
     63 void u_swap(long *stats);
     64 void i_message(struct timeval *now);
     65 void u_message(struct timeval *now);
     66 void i_header(char *text);
     67 void u_header(char *text);
     68 void i_process(int line, char *thisline);
     69 void u_process(int, char *);
     70 void i_endscreen(void);
     71 void u_endscreen(void);
     72 void display_header(int t);
     73 void new_message(const char *msgfmt, ...);
     74 void message_error(const char *msgfmt, ...);
     75 void message_mark(void);
     76 void message_clear(void);
     77 void message_expire(void);
     78 void message_prompt(const char *msgfmt, ...);
     79 void message_prompt_plain(const char *msgfmt, ...);
     80 int readline(char *buffer, int size, int numeric);
     81 void display_pagerstart(void);
     82 void display_pagerend(void);
     83 void display_pager(const char *fmt, ...);
     84 
     85 #endif
     86