// // Copyright (C) 1996 Ben Ross // // You may distribute under the terms of the GNU General Public // License as specified in the COPYING file. // // $Id: XeGCTable.h,v 1.2 2001/08/04 11:43:19 ben Exp $ #ifndef _XeGCTable_H_ #define _XeGCTable_H_ #include #include #include class TableElem { private: TableElem *_prev, *_next; XGCValues _key; GC _gContext; friend class XeGCTable; }; class XeGCTable { public: XeGCTable(void); ~XeGCTable(void); GC getGC(Window w, XGCValues* key, ulong flags); void addGC(GC gc, XGCValues* key, ulong flags); GC exists(XGCValues* key, ulong flags); private: TableElem** _table; uchar charify(ulong val); uchar hash(XGCValues* key, ulong flags); bool compare(XGCValues* k1, XGCValues* k2, ulong flags); }; #endif