XMMS2
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
includepriv
xmmspriv
xmms_list.h
Go to the documentation of this file.
1
/* GLIB - Library of useful routines for C programming
2
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3
*
4
* This library 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 of the License, or (at your option) any later version.
8
*
9
* This library 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 this library; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
18
*/
19
20
/*
21
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
22
* file for a list of people on the GLib Team. See the ChangeLog
23
* files for a list of changes. These files are distributed with
24
* GLib at ftp://ftp.gtk.org/pub/gtk/.
25
*/
26
27
#ifndef __X_LIST_H__
28
#define __X_LIST_H__
29
30
#include "xmmsclientpriv/xmmsclient_util.h"
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif
35
36
typedef
struct
_x_list_t
x_list_t
;
37
38
struct
_x_list_t
39
{
40
void
*
data
;
41
x_list_t
*
next
;
42
x_list_t
*
prev
;
43
};
44
45
/* Doubly linked lists
46
*/
47
x_list_t
*
x_list_alloc
(
void
);
48
void
x_list_free
(
x_list_t
*list);
49
void
x_list_free_1
(
x_list_t
*list);
50
x_list_t
*
x_list_append
(
x_list_t
*list,
51
void
* data);
52
x_list_t
*
x_list_prepend
(
x_list_t
*list,
53
void
* data);
54
x_list_t
*
x_list_insert
(
x_list_t
*list,
55
void
* data,
56
int
position);
57
x_list_t
*
x_list_insert_sorted
(
x_list_t
*list,
58
void
* data,
59
XCompareFunc func);
60
x_list_t
*
x_list_insert_before
(
x_list_t
*list,
61
x_list_t
*sibling,
62
void
* data);
63
x_list_t
*
x_list_concat
(
x_list_t
*list1,
64
x_list_t
*list2);
65
x_list_t
*
x_list_remove
(
x_list_t
*list,
66
const
void
* data);
67
x_list_t
*
x_list_remove_all
(
x_list_t
*list,
68
const
void
* data);
69
x_list_t
*
x_list_remove_link
(
x_list_t
*list,
70
x_list_t
*llink);
71
x_list_t
*
x_list_delete_link
(
x_list_t
*list,
72
x_list_t
*link_);
73
x_list_t
*
x_list_reverse
(
x_list_t
*list);
74
x_list_t
*
x_list_copy
(
x_list_t
*list);
75
x_list_t
*
x_list_nth
(
x_list_t
*list,
76
unsigned
int
n);
77
x_list_t
*
x_list_nth_prev
(
x_list_t
*list,
78
unsigned
int
n);
79
x_list_t
*
x_list_find
(
x_list_t
*list,
80
const
void
* data);
81
x_list_t
*
x_list_find_custom
(
x_list_t
*list,
82
const
void
* data,
83
XCompareFunc func);
84
int
x_list_position
(
x_list_t
*list,
85
x_list_t
*llink);
86
int
x_list_index
(
x_list_t
*list,
87
const
void
* data);
88
x_list_t
*
x_list_last
(
x_list_t
*list);
89
x_list_t
*
x_list_first
(
x_list_t
*list);
90
unsigned
int
x_list_length
(
x_list_t
*list);
91
void
x_list_foreach
(
x_list_t
*list,
92
XFunc func,
93
void
* user_data);
94
void
*
x_list_nth_data
(
x_list_t
*list,
95
unsigned
int
n);
96
97
#define x_list_previous(list) ((list) ? (((x_list_t *)(list))->prev) : NULL)
98
#define x_list_next(list) ((list) ? (((x_list_t *)(list))->next) : NULL)
99
100
#ifdef __cplusplus
101
}
102
#endif
103
104
#endif
/* __X_LIST_H__ */
105
Generated by
1.8.4