110dd2532Schristos /* 210dd2532Schristos * Copyright (c) 1984 through 2008, William LeFebvre 310dd2532Schristos * All rights reserved. 410dd2532Schristos * 510dd2532Schristos * Redistribution and use in source and binary forms, with or without 610dd2532Schristos * modification, are permitted provided that the following conditions are met: 710dd2532Schristos * 810dd2532Schristos * * Redistributions of source code must retain the above copyright 910dd2532Schristos * notice, this list of conditions and the following disclaimer. 1010dd2532Schristos * 1110dd2532Schristos * * Redistributions in binary form must reproduce the above 1210dd2532Schristos * copyright notice, this list of conditions and the following disclaimer 1310dd2532Schristos * in the documentation and/or other materials provided with the 1410dd2532Schristos * distribution. 1510dd2532Schristos * 1610dd2532Schristos * * Neither the name of William LeFebvre nor the names of other 1710dd2532Schristos * contributors may be used to endorse or promote products derived from 1810dd2532Schristos * this software without specific prior written permission. 1910dd2532Schristos * 2010dd2532Schristos * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2110dd2532Schristos * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2210dd2532Schristos * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2310dd2532Schristos * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2410dd2532Schristos * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2510dd2532Schristos * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2610dd2532Schristos * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2710dd2532Schristos * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2810dd2532Schristos * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2910dd2532Schristos * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3010dd2532Schristos * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3110dd2532Schristos */ 3210dd2532Schristos 3310dd2532Schristos /* interface declaration for display.c */ 3410dd2532Schristos 3510dd2532Schristos #ifndef _DISPLAY_H 3610dd2532Schristos #define _DISPLAY_H 3710dd2532Schristos 3810dd2532Schristos #include "globalstate.h" 3910dd2532Schristos 40*213e7ef1Schristos void display_clear(void); 41*213e7ef1Schristos int display_resize(void); 42*213e7ef1Schristos int display_lines(void); 432b60e3f2Schristos int display_setmulti(int m); 44*213e7ef1Schristos int display_columns(void); 452b60e3f2Schristos int display_init(struct statics *statics, int percpuinfo); 4610dd2532Schristos void i_loadave(int mpid, double *avenrun); 4710dd2532Schristos void u_loadave(int mpid, double *avenrun); 4810dd2532Schristos void i_minibar(int (*formatter)(char *, int)); 4910dd2532Schristos void u_minibar(int (*formatter)(char *, int)); 5010dd2532Schristos void i_uptime(time_t *bt, time_t *tod); 5110dd2532Schristos void u_uptime(time_t *bt, time_t *tod); 5210dd2532Schristos void i_timeofday(time_t *tod); 5310dd2532Schristos void i_procstates(int total, int *brkdn, int threads); 5410dd2532Schristos void u_procstates(int total, int *brkdn, int threads); 5510dd2532Schristos void i_cpustates(int *states); 5610dd2532Schristos void u_cpustates(int *states); 57*213e7ef1Schristos void z_cpustates(void); 5810dd2532Schristos void i_kernel(int *stats); 5910dd2532Schristos void u_kernel(int *stats); 6010dd2532Schristos void i_memory(long *stats); 6110dd2532Schristos void u_memory(long *stats); 6210dd2532Schristos void i_swap(long *stats); 6310dd2532Schristos void u_swap(long *stats); 6410dd2532Schristos void i_message(struct timeval *now); 6510dd2532Schristos void u_message(struct timeval *now); 6610dd2532Schristos void i_header(char *text); 6710dd2532Schristos void u_header(char *text); 6810dd2532Schristos void i_process(int line, char *thisline); 6910dd2532Schristos void u_process(int, char *); 70*213e7ef1Schristos void i_endscreen(void); 71*213e7ef1Schristos void u_endscreen(void); 7210dd2532Schristos void display_header(int t); 73*213e7ef1Schristos void new_message(const char *msgfmt, ...); 74*213e7ef1Schristos void message_error(const char *msgfmt, ...); 75*213e7ef1Schristos void message_mark(void); 76*213e7ef1Schristos void message_clear(void); 77*213e7ef1Schristos void message_expire(void); 78*213e7ef1Schristos void message_prompt(const char *msgfmt, ...); 79*213e7ef1Schristos void message_prompt_plain(const char *msgfmt, ...); 8010dd2532Schristos int readline(char *buffer, int size, int numeric); 81*213e7ef1Schristos void display_pagerstart(void); 82*213e7ef1Schristos void display_pagerend(void); 83*213e7ef1Schristos void display_pager(const char *fmt, ...); 8410dd2532Schristos 8510dd2532Schristos #endif 86