Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

List.h

Go to the documentation of this file.
00001 /*
00002  *    gui - [gega user interface] the flexible solution for user interface problems
00003  *    Copyright (C) 2002  Gergely Gati
00004  *
00005  *    This program is free software; you can redistribute it and/or modify
00006  *    it under the terms of the GNU General Public License as published by
00007  *    the Free Software Foundation; version 2 of the License.
00008  *
00009  *    This program is distributed in the hope that it will be useful,
00010  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *    GNU General Public License for more details.
00013  *
00014  *    You should have received a copy of the GNU General Public License
00015  *    along with this program; if not, write to the Free Software
00016  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  *
00018  *    Gergely Gati
00019  *      email:           g.gati@freemail.hu
00020  *      AIM screenname:  GatiGergely
00021  *      ICQ number:      93131690
00022  *
00023  */
00024 /*
00025  *  Author        : Ferenc Zavacki
00026  *
00027  *  Creation date : 2001/03/02
00028  *
00029  *  Description   :
00030  *
00031  */
00032 
00033 #ifndef __LIST_H
00034 #define __LIST_H
00035 
00036 /***********************************************************************
00037 *                              Structures                              *
00038 ***********************************************************************/
00039 
00040 typedef struct Node_s Node_t;
00041 typedef struct List_s List_t;
00042 
00043 /***********************************************************************
00044 *                              Functions                               *
00045 ***********************************************************************/
00046 
00047 /* Creation and deletion functions. */
00048 
00049 List_t *list_CreateList(void);
00050 void list_DeleteList(List_t *List);
00051 Node_t *list_CreateNode(void);
00052 void list_DeleteNode(Node_t *Node);
00053 
00054 /* Insertion functions. */
00055 
00056 void list_InsertNodeHead(List_t *List, Node_t *Node);
00057 void list_InsertNodeTail(List_t *List, Node_t *Node);
00058 void list_InsertNodeNext(List_t *List, Node_t *PrevNode, Node_t *Node);
00059 void list_InsertNodePrev(List_t *List, Node_t *NextNode, Node_t *Node);
00060 
00061 /* Removal functions. */
00062 
00063 Node_t *list_RemoveNode(List_t *List, Node_t *Node);
00064 Node_t *list_RemoveNodeHead(List_t *List);
00065 Node_t *list_RemoveNodeTail(List_t *List);
00066 
00067 /* Navigational functions. */
00068 
00069 Node_t *list_GetNodeHead(List_t *List);
00070 Node_t *list_GetNodeTail(List_t *List);
00071 Node_t *list_GetNodeNext(List_t *List, Node_t *Node);
00072 Node_t *list_GetNodePrev(List_t *List, Node_t *Node);
00073 Node_t *list_GetNodeAt(List_t *List, int Index);
00074 int list_GetNodeIndex(List_t *List, Node_t *Node);
00075 
00076 /* Query functions. */
00077 
00078 int list_GetNodeCount(List_t *List);
00079 
00080 /* Data attachment and detachment functions. */
00081 
00082 void *list_GetNodeData(Node_t *Node);
00083 void list_SetNodeData(Node_t *Node, void *Data);
00084 
00085 /* Miscellaneous functions. */
00086 
00087 void list_SortNodes(List_t *List, int (*Compare)(void *Data1, void *Data2));
00088 
00089 #endif

Generated on Tue Jan 7 12:11:22 2003 for THEGUI by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002