1 /* Function prototypes. 2 * Copyright (C) 2000, 2001, 2002, 2003, 2004 Shawn Betts <sabetts@vcn.bc.ca> 3 * 4 * This file is part of ratpoison. 5 * 6 * ratpoison is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2, or (at your option) 9 * any later version. 10 * 11 * ratpoison is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this software; see the file COPYING. If not, write to 18 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 19 * Boston, MA 02111-1307 USA 20 */ 21 22 #ifndef _RATPOISON_NUMBER_H 23 #define _RATPOISON_NUMBER_H 1 24 25 /* Keep track of a set of numbers. For frames and windows. */ 26 struct numset 27 { 28 /* A list of the numbers taken. */ 29 int *numbers_taken; 30 31 /* the number of numbers currently stored in the numbers_taken 32 array. */ 33 int num_taken; 34 35 /* the size of the numbers_taken array. */ 36 int max_taken; 37 }; 38 39 struct numset *numset_new (void); 40 void numset_free (struct numset *ns); 41 void numset_release (struct numset *ns, int n); 42 int numset_request (struct numset *ns); 43 int numset_add_num (struct numset *ns, int n); 44 void numset_clear (struct numset *ns); 45 46 #endif /* ! _RATPOISON_NUMBER_H */ 47