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