Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
index.h
Go to the documentation of this file.
00001 /*
00002  * index.h
00003  * Copyright 2009-2011 John Lindgren
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions are met:
00007  *
00008  * 1. Redistributions of source code must retain the above copyright notice,
00009  *    this list of conditions, and the following disclaimer.
00010  *
00011  * 2. Redistributions in binary form must reproduce the above copyright notice,
00012  *    this list of conditions, and the following disclaimer in the documentation
00013  *    provided with the distribution.
00014  *
00015  * This software is provided "as is" and without any warranty, express or
00016  * implied. In no event shall the authors be liable for any damages arising from
00017  * the use of this software.
00018  */
00019 
00020 #ifndef LIBAUDCORE_INDEX_H
00021 #define LIBAUDCORE_INDEX_H
00022 
00023 struct _Index;
00024 typedef struct _Index Index;
00025 
00026 Index * index_new (void);
00027 void index_free (Index * index);
00028 int index_count (Index * index);
00029 void index_allocate (Index * index, int size);
00030 void index_set (Index * index, int at, void * value);
00031 void * index_get (Index * index, int at);
00032 void index_insert (Index * index, int at, void * value);
00033 void index_append (Index * index, void * value);
00034 void index_copy_set (Index * source, int from, Index * target, int to, int count);
00035 void index_copy_insert (Index * source, int from, Index * target, int to, int count);
00036 void index_copy_append (Index * source, int from, Index * target, int count);
00037 void index_merge_insert (Index * first, int at, Index * second);
00038 void index_merge_append (Index * first, Index * second);
00039 void index_move (Index * index, int from, int to, int count);
00040 void index_delete (Index * index, int at, int count);
00041 void index_sort (Index * index, int (* compare) (const void * a, const void * b));
00042 void index_sort_with_data (Index * index, int (* compare) (const void * a,
00043  const void * b, void * data), void * data);
00044 
00045 #endif /* LIBAUDCORE_INDEX_H */