/* -*- Mode: C -*-
 *
 * $Header: /home/gene/library/website/docsrc/sdkskel/src/RCS/msgmap.h,v 395.1 2008/04/20 17:25:51 gene Exp $
 *
 * Copyright (c) 2006 Gene Michael Stover.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

/*
 * Private structure type
 */
typedef struct {
  WindowMessage msg;                    /* the Window message in question */
  WNDPROC wndproc;
  unsigned count;                       /* number of times it's used */
} MSGMAP_MessageTuple;

/*
 * Public structure type
 */
typedef struct {
  size_t count;                       /* number of elements allocated & used */
  MSGMAP_MessageTuple *lst;
} MsgMap;

/*
 */
MsgMap *MSGMAP_Create ();

/*
 */
WNDPROC MSGMAP_Find (WindowMessage msg, MsgMap *map);

/*
 */
void MSGMAP_Insert (WindowMessage msg, WNDPROC wndproc, MsgMap *map);

/*
 * Return NULL.
 */
MsgMap *MSGMAP_Destroy (MsgMap *map);

/* --- end of file --- */
