eqemu

annotate libs/libimago/src/ftype_module.h @ 10:819c7ebb1bec

added libimago to avoid the external dependency
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 18 Jul 2014 05:07:40 +0300
parents
children
rev   line source
nuclear@10 1 /*
nuclear@10 2 libimago - a multi-format image file input/output library.
nuclear@10 3 Copyright (C) 2010 John Tsiombikas <nuclear@member.fsf.org>
nuclear@10 4
nuclear@10 5 This program is free software: you can redistribute it and/or modify
nuclear@10 6 it under the terms of the GNU Lesser General Public License as published
nuclear@10 7 by the Free Software Foundation, either version 3 of the License, or
nuclear@10 8 (at your option) any later version.
nuclear@10 9
nuclear@10 10 This program is distributed in the hope that it will be useful,
nuclear@10 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
nuclear@10 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
nuclear@10 13 GNU Lesser General Public License for more details.
nuclear@10 14
nuclear@10 15 You should have received a copy of the GNU Lesser General Public License
nuclear@10 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
nuclear@10 17 */
nuclear@10 18
nuclear@10 19 #ifndef FTYPE_MODULE_H_
nuclear@10 20 #define FTYPE_MODULE_H_
nuclear@10 21
nuclear@10 22 #include "imago2.h"
nuclear@10 23
nuclear@10 24 struct ftype_module {
nuclear@10 25 char *suffix; /* used for format autodetection during saving only */
nuclear@10 26
nuclear@10 27 int (*check)(struct img_io *io);
nuclear@10 28 int (*read)(struct img_pixmap *img, struct img_io *io);
nuclear@10 29 int (*write)(struct img_pixmap *img, struct img_io *io);
nuclear@10 30 };
nuclear@10 31
nuclear@10 32 int img_register_module(struct ftype_module *mod);
nuclear@10 33
nuclear@10 34 struct ftype_module *img_find_format_module(struct img_io *io);
nuclear@10 35 struct ftype_module *img_guess_format(const char *fname);
nuclear@10 36 struct ftype_module *img_get_module(int idx);
nuclear@10 37
nuclear@10 38
nuclear@10 39 #endif /* FTYPE_MODULE_H_ */