#ifndef RE_H
#define RE_H
#include "global.h"
#include "sysdep.h"
#include "xstuff.h"
#include "Mintrins.h"

#if  (RE_DEBUG==1)
#define RE_debug(x) printf(x)
#define RE_debug1(x,y) printf(x,y)
#define RE_debug2(x,y,z) printf(x,y,z)
#else
#define RE_debug(x) 
#define RE_debug1(x,y) 
#define RE_debug2(x,y,z) 
#endif


#ifdef __STDC__
typedef void (ReSaveFunc)(reid,AlRule,VOIDP);
typedef void (ReQuitFunc)(reid,VOIDP);
reid re_OpenEditor(Display*,AlRule,ReSaveFunc*,ReQuitFunc*,
		   int*,char**,
		   char*,XImage*,VOIDP,Pixmap,Pixmap);
NORET re_CloseEditor(reid);
NORET re_UpdateTitle(reid,char*);
#else
typedef void (ReSaveFunc)();
typedef void (ReQuitFunc)();
reid  re_OpenEditor();
NORET re_CloseEditor();
NORET re_UpdateTitle();
#endif

/* --------------------------------------------------
reid re_OpenEditor(display,Rule,SaveFunc,QuitFunc,argc,argv,title,
		   Graphic,UserData,borderP,iconP)
Display* display;
AlRule Rule;
ReSaveFunc* SaveFunc;
ReQuitFunc* QuitFunc;
int* argc;
char** argv;
char* title;
XImage* Graphic;
VOIDP UserData;
Pixmap borderP, iconP;

RETURNS-- an reid which is the ID of the newly created ruleeditor.

display         The connection to the X server.  

Rule 		The rule to be edited.  This rule is not modified by
the rule editor.  The edited rule is passed to the SaveFunc.

SaveFunc	This function is called when the user wants to save a
rule.  It is called with the reid of this ruleeditor, the edited rule,
and the application specific data.

QuotFunc	This function is called when the user wants to quit
and not save the edited rule.  It is called with the reid and the
application specific data.

argc		This is the number of command line arguments.  Make
sure this is a pointer, the ruleeditor will remove any arguments
directed towards it.

argv		The command line arguments.

title		The title to display at the top of the ruleeditor.
This should contain information about the rule set and rule being
edited.

Graphic		An XImage to be used to distinguish the ruleeditor.
Can be NULL for no image.

UserData	A pointer to any user data which should be passed to
the quit and save function.


--------------------------------------------------
re_CloseEditor(reid)
Closes the ruleeditor named by the reid.

--------------------------------------------------
re_UpdateTitle(reid,title)
Replaces the title of the ruleeditor named by the reid with the new title.

*/

#endif

