loaders: PNG: Handle gamma on 16bpp conversion
[gfxprim.git] / demos / spiv / image_list.h
blob783552686885a892b58eaf32373e27be3fdf02ea
1 /*****************************************************************************
2 * This file is part of gfxprim library. *
3 * *
4 * Gfxprim is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU Lesser General Public *
6 * License as published by the Free Software Foundation; either *
7 * version 2.1 of the License, or (at your option) any later version. *
8 * *
9 * Gfxprim is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
12 * Lesser General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU Lesser General Public *
15 * License along with gfxprim; if not, write to the Free Software *
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
17 * Boston, MA 02110-1301 USA *
18 * *
19 * Copyright (C) 2009-2013 Cyril Hrubis <metan@ucw.cz> *
20 * *
21 *****************************************************************************/
25 Image list.
29 #ifndef __IMAGE_LIST_H__
30 #define __IMAGE_LIST_H__
32 struct image_list;
35 * Takes NULL-terminated array of paths as parameter
37 struct image_list *image_list_create(const char *args[]);
40 void image_list_destroy(struct image_list *self);
43 * Returns path to the current image.
45 const char *image_list_img_path(struct image_list *self);
48 * Moves the current image direction images and returns pointer to current
49 * path.
51 const char *image_list_move(struct image_list *self, int direction);
54 * If we are in directory:
55 * if direction > 0: move to its end and if allready there, to the next arg
56 * if direction < 0: move to its begining and if allready there, to the previous arg
58 * If we aren't in directory move by one in corresponding direction.
60 const char *image_list_dir_move(struct image_list *self, int direction);
63 * Move to the first image in the list.
65 const char *image_list_first(struct image_list *self);
68 * Move to the last image in the list.
70 const char *image_list_last(struct image_list *self);
73 * Counts images int the list.
75 unsigned int image_list_count(struct image_list *self);
78 * Returns current position in list, i.e. number between 0 and count - 1.
80 unsigned int image_list_pos(struct image_list *self);
83 * Returns numbe of images in current dir or 0 if current arg is file.
85 unsigned int image_list_dir_count(struct image_list *self);
88 * Returns current position in current dir or 0 if current arg is file.
90 unsigned int image_list_dir_pos(struct image_list *self);
92 #endif /* __IMAGE_LIST_H__ */