⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gui.h

📁 * A ncurses user interface. * Network statistics to view the amount of packets and data in many
💻 H
字号:
/* *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU Library General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Author: *	NAME:	James Stevenson *	EMAIL:	mistral@stev.org *	WWW:	http://www.stev.org */#ifndef _GUI_H#define _GUI_H#include <ncurses.h>#include "list.h"/* structs */struct gui_t {	WINDOW *twin;	/* the top window */	WINDOW *fwin;	/* footer window */	WINDOW *cwin;	/* the current window */	struct list_t *windows;	/* a list of windows */	unsigned char color:1,	/* do we have color ? */					res:7;	char *footer;};struct gui_menu_t {	char *text;		/* text to display in the window */	char *des;		/* text to display in the footer */	int type; 		/* the type of entry */	void (*func) (struct gui_t *p, int x, int y); /* function pointer */};/* Defines *//* Colors */#define COL_BACK 1#define COL_FOOTER 2#define COL_SELECT 3/* Scroll */#define GUI_SCROLL_PAGE 8	/* scroll 8 lines a page *//* Menu Options */#define GUI_MENU_SEP 0		/* Menu Seperator */#define GUI_MENU_SUB 1		/* A Sub menu */#define GUI_MENU_FUNC 2		/* Call a function */#define GUI_MENU_END 3		/* end of menu *//* Message box options */#define GUI_MSG_ANY 0		/* press any key to continue */#define GUI_MSG_OK 1		/* OK Button */#define GUI_MSG_CANCEL 2	/* Cancel Button */#define GUI_MSG_IGNORE 4	/* Ignore Button *//* Functions */extern void gui_print		(WINDOW *win, char *fmt, ...);extern int gui_scroll		(int usec, int sec, int height, int *offset);extern int gui_menu			(struct gui_t *p, struct gui_menu_t menu[], int y, int x, int height, int width);extern void gui_menu_line	(WINDOW *in, int y, struct gui_menu_t *p);extern int gui_msg			(struct gui_t *p, char *msg, int opts, int y, int x, int height, int width);extern int gui_wait			(int usecs, int seconds);extern int gui_footer		(struct gui_t *p, char *footer);extern int gui_redraw		(struct gui_t *p);extern struct gui_t *gui_setup( void );extern int gui_end			(struct gui_t *p);#endif	/* _GUI_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -