Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
index.h
Go to the documentation of this file.
1 /*
2  * index.h
3  * Copyright 2009-2011 John Lindgren
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions, and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions, and the following disclaimer in the documentation
13  * provided with the distribution.
14  *
15  * This software is provided "as is" and without any warranty, express or
16  * implied. In no event shall the authors be liable for any damages arising from
17  * the use of this software.
18  */
19 
20 #ifndef LIBAUDCORE_INDEX_H
21 #define LIBAUDCORE_INDEX_H
22 
23 struct _Index;
24 typedef struct _Index Index;
25 
26 Index * index_new (void);
27 void index_free (Index * index);
28 int index_count (Index * index);
29 void index_allocate (Index * index, int size);
30 void index_set (Index * index, int at, void * value);
31 void * index_get (Index * index, int at);
32 void index_insert (Index * index, int at, void * value);
33 void index_append (Index * index, void * value);
34 void index_copy_set (Index * source, int from, Index * target, int to, int count);
35 void index_copy_insert (Index * source, int from, Index * target, int to, int count);
36 void index_copy_append (Index * source, int from, Index * target, int count);
37 void index_merge_insert (Index * first, int at, Index * second);
38 void index_merge_append (Index * first, Index * second);
39 void index_move (Index * index, int from, int to, int count);
40 void index_delete (Index * index, int at, int count);
41 void index_sort (Index * index, int (* compare) (const void * a, const void * b));
42 void index_sort_with_data (Index * index, int (* compare) (const void * a,
43  const void * b, void * data), void * data);
44 
45 #endif /* LIBAUDCORE_INDEX_H */