/* * 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. */ /* DO NOT EDIT !!! Generated by npic-templa from "image_prop.ct" */ /* * image_prop.c - 25/11/2008 * * Text properties for images */ #include /*--------------------- P U B L I C - I N T E R F A C E ----------------------*/ /* * Interface for properties ; see props.c * Do nothing if image is not ok. */ int NpicImageCopyProps (Npic_image *dest, Npic_image *src) { if (NpicImageIsOK (src , __func__) != NPIC_SUCCESS || NpicImageIsOK (dest, __func__) != NPIC_SUCCESS) return NPIC_ERR_NOT_OK; return NpicCopyProps (&dest->gen.props, &src->gen.props); } void NpicImageFreeProps (Npic_image *m) { if (NpicImageIsOK (m, __func__) != NPIC_SUCCESS) return ; NpicFreeProps (&m->gen.props); } int NpicImageAddProp (Npic_image *np, const char *key, const char *val) { if (NpicImageIsOK (np, __func__) != NPIC_SUCCESS) return NPIC_ERR_NOT_OK; return NpicAddProp (&np->gen.props, key, val); } int NpicImageSupprProp (Npic_image *np, const char *key) { if (NpicImageIsOK (np, __func__) != NPIC_SUCCESS) return NPIC_ERR_NOT_OK; return NpicSupprProp (&np->gen.props, key); } const char *NpicImageGetProp (Npic_image *np, const char *key) { if (NpicImageIsOK (np, __func__) != NPIC_SUCCESS) return ""; return NpicGetProp (&np->gen.props, key); } const char *NpicImageGetPropD (Npic_image *np, const char *key, const char *default_val) { if (NpicImageIsOK (np, __func__) != NPIC_SUCCESS) return ""; return NpicGetPropD (&np->gen.props, key, default_val); } int NpicImageHasProp (Npic_image *np, const char *key) { if (NpicImageIsOK (np, __func__) != NPIC_SUCCESS) return 0; return NpicHasProp (&np->gen.props, key); } void NpicImagePrintProps (Npic_image *np) { if (NpicImageIsOK (np, __func__) != NPIC_SUCCESS) return; NpicPrintProps (&np->gen.props); } /*-------------------- P R I V A T E - F U N C T I O N S ---------------------*/ /*----------------------------------------------------------------------------*/