:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / include / freetype / internal / ftlist.h
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ftlist.c                                                               */
4 /*                                                                         */
5 /*    Generic list support for FreeType (specification).                   */
6 /*                                                                         */
7 /*  Copyright 1996-2000 by                                                 */
8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
9 /*                                                                         */
10 /*  This file is part of the FreeType project, and may only be used,       */
11 /*  modified, and distributed under the terms of the FreeType project      */
12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
13 /*  this file you indicate that you have read the license and              */
14 /*  understand and accept it fully.                                        */
15 /*                                                                         */
16 /***************************************************************************/
17
18
19   /*************************************************************************/
20   /*                                                                       */
21   /*  This file implements functions relative to list processing.  Its     */
22   /*  data structures are defined in `freetype.h'.                         */
23   /*                                                                       */
24   /*************************************************************************/
25
26
27 #ifndef FTLIST_H
28 #define FTLIST_H
29
30 #include <freetype/freetype.h>
31
32 #ifdef __cplusplus
33   extern "C" {
34 #endif
35
36
37   FT_EXPORT_DEF( FT_ListNode )  FT_List_Find( FT_List  list,
38                                               void*    data );
39
40   FT_EXPORT_DEF( void )  FT_List_Add( FT_List      list,
41                                       FT_ListNode  node );
42
43   FT_EXPORT_DEF( void )  FT_List_Insert( FT_List      list,
44                                          FT_ListNode  node );
45
46   FT_EXPORT_DEF( void )  FT_List_Remove( FT_List      list,
47                                          FT_ListNode  node );
48
49   FT_EXPORT_DEF( void )  FT_List_Up( FT_List      list,
50                                      FT_ListNode  node );
51
52
53   /*************************************************************************/
54   /*                                                                       */
55   /* <FuncType>                                                            */
56   /*    FT_List_Iterator                                                   */
57   /*                                                                       */
58   /* <Description>                                                         */
59   /*    An FT_List iterator function which is called during a list parse   */
60   /*    by FT_List_Iterate().                                              */
61   /*                                                                       */
62   /* <Input>                                                               */
63   /*    node :: The current iteration list node.                           */
64   /*                                                                       */
65   /*    user :: A typeless pointer passed to FT_List_Iterate().            */
66   /*            Can be used to point to the iteration's state.             */
67   /*                                                                       */
68   typedef FT_Error  (*FT_List_Iterator)( FT_ListNode  node,
69                                          void*        user );
70
71
72   FT_EXPORT_DEF( FT_Error )  FT_List_Iterate( FT_List           list,
73                                               FT_List_Iterator  iterator,
74                                               void*             user );
75
76
77   /*************************************************************************/
78   /*                                                                       */
79   /* <FuncType>                                                            */
80   /*    FT_List_Destructor                                                 */
81   /*                                                                       */
82   /* <Description>                                                         */
83   /*    An FT_List iterator function which is called during a list         */
84   /*    finalization by FT_List_Finalize() to destroy all elements in a    */
85   /*    given list.                                                        */
86   /*                                                                       */
87   /* <Input>                                                               */
88   /*    system :: The current system object.                               */
89   /*                                                                       */
90   /*    data   :: The current object to destroy.                           */
91   /*                                                                       */
92   /*    user   :: A typeless pointer passed to FT_List_Iterate().  It can  */
93   /*              be used to point to the iteration's state.               */
94   /*                                                                       */
95   typedef void  (*FT_List_Destructor)( FT_Memory  memory,
96                                        void*      data,
97                                        void*      user );
98
99
100   FT_EXPORT_DEF( void )  FT_List_Finalize( FT_List             list,
101                                            FT_List_Destructor  destroy,
102                                            FT_Memory           memory,
103                                            void*               user );
104
105
106 #ifdef __cplusplus
107   }
108 #endif
109
110 #endif /* FTLIST_H */
111
112
113 /* END */