/*
   "glue.c" - part of "RAGMAAN, een anagrammengenerator" 

   Copyright (C) 1999 Raymond Zandbergen

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU 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 General Public License for more details.

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

   The maintainer of this program is Raymond Zandbergen (ray@wirehub.nl)
 */

#ifndef	GLUE_H
#define	GLUE_H

#include <tcl.h>
#include <tk.h>

#include "search.h"

#define RM_CMD(rmcmd) \
int rmcmd (ClientData clientData, Tcl_Interp * interp, int argc, char *argv[])
#define CREATE_CMD(rmcmd) \
Tcl_CreateCommand (interp, #rmcmd, rmcmd, 0, (Tcl_CmdDeleteProc *) NULL)

typedef struct GLOBAL_DATA_S
  {
    Tcl_Interp *interp;
    Tk_Window main_win;
    int db_state;
    HASH_TABLE_T ht;
    Tcl_HashTable search_states;
    char file_name[MAX_WORD_LENGTH];
    size_t file_size;
  }
GLOBAL_DATA_T;

/* ---------------------------------------------------------------------

   declarations of all commands

   --------------------------------------------------------------------- */

extern void rm_progress2 (void *interp, double fraction);
extern void rm_progress3 (Tcl_Interp * interp, double fraction);

#endif
