00001 /* 00002 * "$Id: string-list.h,v 1.7 2004/05/26 03:16:11 rlk 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 00024 00025 #ifndef GIMP_PRINT_STRING_LIST_H 00026 #define GIMP_PRINT_STRING_LIST_H 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 struct stp_string_list; 00034 typedef struct stp_string_list stp_string_list_t; 00035 00042 typedef struct 00043 { 00044 const char *name, 00045 *text; 00046 } stp_param_string_t; 00047 00048 /**************************************************************** 00049 * * 00050 * LISTS OF STRINGS * 00051 * * 00052 ****************************************************************/ 00053 00054 /* The string_list opaque data type is defined in vars.h */ 00055 00056 extern stp_string_list_t * 00057 stp_string_list_create(void); 00058 00059 extern void 00060 stp_string_list_destroy(stp_string_list_t *list); 00061 00062 extern stp_param_string_t * 00063 stp_string_list_param(const stp_string_list_t *list, size_t element); 00064 00065 extern stp_param_string_t * 00066 stp_string_list_find(const stp_string_list_t *list, const char *name); 00067 00068 extern size_t 00069 stp_string_list_count(const stp_string_list_t *list); 00070 00071 extern stp_string_list_t * 00072 stp_string_list_create_copy(const stp_string_list_t *list); 00073 00074 extern void 00075 stp_string_list_add_string(stp_string_list_t *list, 00076 const char *name, const char *text); 00077 00078 extern void 00079 stp_string_list_remove_string(stp_string_list_t *list, const char *name); 00080 00081 extern stp_string_list_t * 00082 stp_string_list_create_from_params(const stp_param_string_t *list, 00083 size_t count); 00084 00085 extern int 00086 stp_string_list_is_present(const stp_string_list_t *list, 00087 const char *value); 00088 00089 #ifdef __cplusplus 00090 } 00091 #endif 00092 00093 #endif /* GIMP_PRINT_STRING_LIST_H */ 00094 /* 00095 * End of "$Id: string-list.h,v 1.7 2004/05/26 03:16:11 rlk Exp $". 00096 */