#ifndef _XIMDB_H
#define _XIMDB_H

#include <X11/Xaw/Viewport.h>

extern char errorbuf[];
extern Widget viewer;
extern Widget topLevel;
extern Widget title;
extern Widget url_text;
extern Widget pcbar;
extern Widget vport;
extern Widget backbutton, forwardbutton, historybutton;
extern Cursor busyCursor;
extern Cursor unBusyCursor;
extern XtAppContext app_context;
extern Boolean search_in_progress;
typedef struct {
	Boolean showprogress;
#ifdef CRASHME
	int crashme;
#endif
	int casttab;
	int chartab;
	int techtab;
	int quotetab;
	int hangingIndent;
	int substringMax;
	String popupPosition;
	int historyMax;
	Boolean alphaSort;
#ifdef NAME_COMPLETION
	String nameCompletion;
#endif
	Boolean laserDisc;
	String imdbSite;
    int keywordInitial;
	} AppData, *AppDataPtr;

extern AppData app_data;
extern char *imdbsite;

void enableSearch(void);
void disableSearch(void);
void SetTitle(char*);

/* CONSTANTS */
/* --------- */

/* return values */

#define SEARCH_OK 			0
#define SEARCH_OVERFLOW		1
#define SEARCH_ABORTED		2
#define SEARCH_BUFFERFULL	3


/* search types */

#define SEARCH_EXACT 		0
#define SEARCH_SUBSTRING	1
#define SEARCH_SUBSTRING_SELECTED 	2

#ifndef IMDBSITE
#define IMDBSITE "http://www.imdb.com"
#endif

#define COPYRIGHT_END_YEAR 1999
#define COPYRIGHT_TEMPLATE "Copyright 1990-%d The Internet Movie Database Ltd."

extern char COPYRIGHT[];

#endif
