~jderose/ubuntu/utopic/unity-settings-daemon/tune-syndaemon

« back to all changes in this revision

Viewing changes to plugins/clipboard/list.h

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2014-02-07 11:44:36 UTC
  • Revision ID: package-import@ubuntu.com-20140207114436-7t5u3yvwc4ul7w3e
Tags: upstream-14.04.0
Import upstream version 14.04.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2004 Red Hat, Inc.
 
3
 *
 
4
 * Permission to use, copy, modify, distribute, and sell this software and its
 
5
 * documentation for any purpose is hereby granted without fee, provided that
 
6
 * the above copyright notice appear in all copies and that both that
 
7
 * copyright notice and this permission notice appear in supporting
 
8
 * documentation, and that the name of Red Hat not be used in advertising or
 
9
 * publicity pertaining to distribution of the software without specific,
 
10
 * written prior permission.  Red Hat makes no representations about the
 
11
 * suitability of this software for any purpose.  It is provided "as is"
 
12
 * without express or implied warranty.
 
13
 *
 
14
 * RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT
 
16
 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
17
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 
18
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
 
19
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
20
 *
 
21
 * Author:  Matthias Clasen, Red Hat, Inc.
 
22
 */
 
23
#ifndef LIST_H
 
24
#define LIST_H
 
25
 
 
26
 
 
27
typedef struct _List      List;       
 
28
typedef void (*Callback) (void *data, 
 
29
                          void *user_data);
 
30
 
 
31
 
 
32
struct _List 
 
33
{
 
34
  void *data;
 
35
 
 
36
  List *next;
 
37
};
 
38
 
 
39
typedef int (*ListFindFunc) (void *data, 
 
40
                             void *user_data);
 
41
 
 
42
void  list_foreach (List         *list, 
 
43
                    Callback      func, 
 
44
                    void         *user_data);
 
45
List *list_prepend (List         *list,
 
46
                    void         *data);
 
47
void  list_free    (List         *list);
 
48
List *list_find    (List         *list,
 
49
                    ListFindFunc  func,
 
50
                    void         *user_data);
 
51
List *list_remove  (List         *list,
 
52
                    void         *data);
 
53
int   list_length  (List         *list);
 
54
 
 
55
List *list_copy    (List         *list);
 
56
 
 
57
#endif /* LIST_H */