00001 /* 00002 * "$Id: string-list.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" 00003 * 00004 * libgimpprint string list functions. 00005 * 00006 * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and 00007 * Robert Krawitz (rlk@alum.mit.edu) 00008 * 00009 * This program is free software; you can redistribute it and/or modify it 00010 * under the terms of the GNU General Public License as published by the Free 00011 * Software Foundation; either version 2 of the License, or (at your option) 00012 * any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, but 00015 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00016 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00017 * for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 00029 #ifndef GUTENPRINT_STRING_LIST_H 00030 #define GUTENPRINT_STRING_LIST_H 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 struct stp_string_list; 00038 typedef struct stp_string_list stp_string_list_t; 00039 00046 typedef struct 00047 { 00048 const char *name, 00049 *text; 00050 } stp_param_string_t; 00051 00052 /**************************************************************** 00053 * * 00054 * LISTS OF STRINGS * 00055 * * 00056 ****************************************************************/ 00057 00058 /* The string_list opaque data type is defined in vars.h */ 00059 00060 extern stp_string_list_t * 00061 stp_string_list_create(void); 00062 00063 extern void 00064 stp_string_list_destroy(stp_string_list_t *list); 00065 00066 extern stp_param_string_t * 00067 stp_string_list_param(const stp_string_list_t *list, size_t element); 00068 00069 extern stp_param_string_t * 00070 stp_string_list_find(const stp_string_list_t *list, const char *name); 00071 00072 extern size_t 00073 stp_string_list_count(const stp_string_list_t *list); 00074 00075 extern stp_string_list_t * 00076 stp_string_list_create_copy(const stp_string_list_t *list); 00077 00078 extern void 00079 stp_string_list_add_string(stp_string_list_t *list, 00080 const char *name, const char *text); 00081 00082 extern void 00083 stp_string_list_remove_string(stp_string_list_t *list, const char *name); 00084 00085 extern stp_string_list_t * 00086 stp_string_list_create_from_params(const stp_param_string_t *list, 00087 size_t count); 00088 00089 extern int 00090 stp_string_list_is_present(const stp_string_list_t *list, 00091 const char *value); 00092 00093 #ifdef __cplusplus 00094 } 00095 #endif 00096 00097 #endif /* GUTENPRINT_STRING_LIST_H */ 00098 /* 00099 * End of "$Id: string-list.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $". 00100 */