File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / trafshow / selector.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 16:55:18 2012 UTC (12 years, 3 months ago) by misho
Branches: trafshow, MAIN
CVS tags: v5_2_3p0, v5_2_3, HEAD
trafshow

    1: /*
    2:  *	Copyright (c) 1999,2004 Rinet Corp., Novosibirsk, Russia
    3:  *
    4:  * Redistribution and use in source forms, with and without modification,
    5:  * are permitted provided that this entire comment appears intact.
    6:  *
    7:  * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND.
    8:  */
    9: 
   10: #ifndef	_SELECTOR_H_
   11: #define	_SELECTOR_H_
   12: 
   13: typedef	struct selector {
   14: 	int window_color;
   15: 	int cursor_color;
   16: 
   17: 	int LINE;		/* first line on screen		*/
   18: 	int COL;		/* first column on screen	*/
   19: 	int LINES;		/* number of lines on screen	*/
   20: 	int COLS;		/* number of columns on screen	*/
   21: 	int items;		/* size of items array 		*/
   22: 
   23: 	int (*get_header)(char *dst, int size, const void *header);
   24: 	void *header;		/* header args pointer		*/
   25: 
   26: 	int (*get_line)(char *dst, int size, const void *list, int idx);
   27: 	void *list;		/* list args pointer		*/
   28: 
   29: 	int (*get_footer)(char *dst, int size, const void *footer);
   30: 	void *footer;		/* footer args pointer		*/
   31: 
   32: 	int index;		/* array current index		*/
   33: 	int fline;		/* first displayed line		*/
   34: 	int cline;		/* current screen line		*/
   35: } SELECTOR;
   36: 
   37: SELECTOR *selector_init();
   38: void selector_redraw(SELECTOR *sp);
   39: void selector_withdraw(SELECTOR *sp);
   40: int selector_get(SELECTOR *sp);
   41: void selector_set(int new_index, SELECTOR *sp);
   42: int selector_move(int ch, SELECTOR *sp);
   43: 
   44: #endif	/* !_SELECTOR_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>