/**************************************************************************

    This file is part of Xclass95, a Win95-looking GUI toolkit.
    Copyright (C) 1996, 1997 Ricky Ralston, Hector Peraza.

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

**************************************************************************/

#ifndef __OXSLIST_H
#define __OXSLIST_H


#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
  
class OXSNode {
public:
    int id;
    OXSNode *prev, *next;
    XPointer data;
};

class OXSList {  
public:
  OXSList(Display *dpy, XPointer data);
  virtual ~OXSList();

  virtual OXSNode *Add(int id, XPointer data);
  virtual Bool Remove(int id);
  virtual OXSNode *GetNode(int id);
  const OXSNode *GetHead() const { return _head; }
  const OXSNode *GetTail() const { return _tail; }

protected:
  Display *_dpy;
  int _nentries;
  OXSNode *_head, *_tail;
  XContext _context;
  XPointer _data;
};


#endif  // __OXSLIST_H
