/* * The Npic library * * Copyright (C) 2003 Edouard Thiel * * This library is free software under the terms of the * GNU Lesser General Public License (LGPL) version 2.1. */ /* * props.h - 02/03/2007 * * Manage text properties for images and masks */ #ifndef NPIC__PROP_H #define NPIC__PROP_H typedef struct { char *key, *val; } Npic_atom; typedef struct { int nb, tot; Npic_atom *list; } Npic_props; /* PUBLIC */ void NpicInitProps (Npic_props *props); void NpicFreeProps (Npic_props *props); int NpicCopyProps (Npic_props *dest, Npic_props *src); int NpicPropKeyIsValid (const char *key); int NpicPropValIsValid (const char *val); int NpicAddProp (Npic_props *props, const char *key, const char *val); int NpicSupprProp (Npic_props *props, const char *key); const char *NpicGetProp (Npic_props *props, const char *key); const char *NpicGetPropD (Npic_props *props, const char *key, const char *default_val); int NpicHasProp (Npic_props *props, const char *key); void NpicPrintProps (Npic_props *props); /* PRIVATE */ int NpicPropSearch (Npic_props *props, const char *key, int *ret_index); int NpicPropRead (Npic_props *props, FILE *f, char **keep_line); #endif /* NPIC__PROP_H */