Classes | Functions

index.c File Reference

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "index.h"

Go to the source code of this file.

Classes

struct  index

Functions

struct indexindex_new (void)
void index_free (struct index *index)
gint index_count (struct index *index)
void index_set (struct index *index, gint at, void *value)
void * index_get (struct index *index, gint at)
static void resize_to (struct index *index, gint size)
static void make_room (struct index *index, gint at, gint count)
void index_insert (struct index *index, gint at, void *value)
void index_append (struct index *index, void *value)
void index_copy_set (struct index *source, gint from, struct index *target, gint to, gint count)
void index_copy_insert (struct index *source, gint from, struct index *target, gint to, gint count)
void index_copy_append (struct index *source, gint from, struct index *target, gint count)
void index_merge_insert (struct index *first, gint at, struct index *second)
void index_merge_append (struct index *first, struct index *second)
void index_move (struct index *index, gint from, gint to, gint count)
void index_delete (struct index *index, gint at, gint count)
static gint index_compare (const void *a, const void *b, void *_compare)
void index_sort (struct index *index, gint(*compare)(const void *, const void *))
static gint index_compare_with_data (const void *a, const void *b, void *_index)
void index_sort_with_data (struct index *index, gint(*compare)(const void *a, const void *b, void *data), void *data)

Function Documentation

void index_append ( struct index index,
void *  value 
)
static gint index_compare ( const void *  a,
const void *  b,
void *  _compare 
) [static]

Definition at line 147 of file index.c.

Referenced by index_sort().

static gint index_compare_with_data ( const void *  a,
const void *  b,
void *  _index 
) [static]

Definition at line 161 of file index.c.

Referenced by index_sort_with_data().

void index_copy_append ( struct index source,
gint  from,
struct index target,
gint  count 
)

Definition at line 119 of file index.c.

Referenced by playlist_reorder().

void index_copy_insert ( struct index source,
gint  from,
struct index target,
gint  to,
gint  count 
)

Definition at line 112 of file index.c.

Referenced by index_copy_append(), index_merge_append(), and index_merge_insert().

void index_copy_set ( struct index source,
gint  from,
struct index target,
gint  to,
gint  count 
)

Definition at line 106 of file index.c.

Referenced by playlist_reorder().

gint index_count ( struct index index  ) 
void index_delete ( struct index index,
gint  at,
gint  count 
)

Definition at line 140 of file index.c.

Referenced by playlist_delete(), and playlist_entry_delete().

void index_free ( struct index index  ) 
void* index_get ( struct index index,
gint  at 
)
void index_insert ( struct index index,
gint  at,
void *  value 
)

Definition at line 95 of file index.c.

Referenced by index_append(), and playlist_insert().

void index_merge_append ( struct index first,
struct index second 
)

Definition at line 130 of file index.c.

Referenced by playlist_entry_insert_batch(), and playlist_shift().

void index_merge_insert ( struct index first,
gint  at,
struct index second 
)

Definition at line 125 of file index.c.

Referenced by playlist_entry_insert_batch().

void index_move ( struct index index,
gint  from,
gint  to,
gint  count 
)

Definition at line 135 of file index.c.

Referenced by playlist_reorder().

struct index* index_new ( void   )  [read]
void index_set ( struct index index,
gint  at,
void *  value 
)

Definition at line 61 of file index.c.

Referenced by playlist_randomize(), playlist_shift(), and sort_selected().

void index_sort ( struct index index,
gint(*)(const void *, const void *)  compare 
)

Definition at line 154 of file index.c.

Referenced by add_cb().

void index_sort_with_data ( struct index index,
gint(*)(const void *a, const void *b, void *data compare,
void *  data 
)

Definition at line 170 of file index.c.

Referenced by sort(), and sort_selected().

static void make_room ( struct index index,
gint  at,
gint  count 
) [static]

Definition at line 87 of file index.c.

Referenced by index_copy_insert(), and index_insert().

static void resize_to ( struct index index,
gint  size 
) [static]

Definition at line 71 of file index.c.

Referenced by make_room().