1 1.8 wiz /* $NetBSD: internals.h,v 1.8 2001/06/13 10:45:59 wiz Exp $ */ 2 1.1 blymn 3 1.1 blymn /*- 4 1.3 blymn * Copyright (c) 1998-1999 Brett Lymn (blymn (at) baea.com.au, brett_lymn (at) yahoo.com.au) 5 1.1 blymn * All rights reserved. 6 1.1 blymn * 7 1.1 blymn * Redistribution and use in source and binary forms, with or without 8 1.1 blymn * modification, are permitted provided that the following conditions 9 1.1 blymn * are met: 10 1.1 blymn * 1. Redistributions of source code must retain the above copyright 11 1.1 blymn * notice, this list of conditions and the following disclaimer. 12 1.1 blymn * 2. The name of the author may not be used to endorse or promote products 13 1.8 wiz * derived from this software without specific prior written permission 14 1.1 blymn * 15 1.1 blymn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 1.1 blymn * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 1.1 blymn * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 1.1 blymn * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 1.1 blymn * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 1.1 blymn * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 1.1 blymn * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 1.1 blymn * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 1.1 blymn * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 1.1 blymn * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 1.1 blymn * 26 1.1 blymn * 27 1.1 blymn */ 28 1.1 blymn 29 1.1 blymn #include <menu.h> 30 1.1 blymn 31 1.1 blymn #ifndef INTERNALS_H 32 1.1 blymn #define INTERNALS_H 33 1.1 blymn 34 1.1 blymn #define MATCH_FORWARD 1 35 1.1 blymn #define MATCH_REVERSE 2 36 1.1 blymn #define MATCH_NEXT_FORWARD 3 37 1.1 blymn #define MATCH_NEXT_REVERSE 4 38 1.1 blymn 39 1.3 blymn /* stole this from curses.h */ 40 1.3 blymn #define max(a,b) ((a) > (b) ? a : b) 41 1.3 blymn 42 1.1 blymn /* function prototypes */ 43 1.1 blymn 44 1.6 blymn void _menui_draw_item(MENU *menu, int item); 45 1.6 blymn int _menui_draw_menu(MENU *menu); 46 1.6 blymn int _menui_goto_item(MENU *menu, ITEM *item, int new_top_row); 47 1.7 itohy int _menui_match_pattern(MENU *menu, int c, int direction , 48 1.6 blymn int *item_matched); 49 1.6 blymn int _menui_match_items(MENU *menu, int direction, int *item_matched); 50 1.6 blymn void _menui_max_item_size(MENU *menu); 51 1.6 blymn int _menui_stitch_items(MENU *menu); 52 1.1 blymn 53 1.1 blymn #endif 54