#ifndef _ALPOP_H_
#define _ALPOP_H_
#include "Mintrins.h"
#include "useful.h"

#ifdef __STDC__
typedef enum AlPopType_enum {ALPOP_INFO, ALPOP_ERROR, ALPOP_QUESTION,
			       ALPOP_WARNING, ALPOP_MESSAGE} AlPopType;
typedef enum AlPopHangType_enum { ALPOP_HANG_BOTTOM_RIGHT,
				    ALPOP_HANG_BOTTOM_LEFT,
				    ALPOP_HANG_BELOW } AlPopHangDirection;
#else
typedef int AlPopType;
#define ALPOP_INFO     1
#define ALPOP_ERROR    2
#define ALPOP_QUESTION 3
#define ALPOP_WARNING  4
#define ALPOP_MESSAGE  5
typedef int AlPopHangDirection;
#define ALPOP_HANG_BOTTOM_RIGHT 1
#define ALPOP_HANG_BOTTOM_LEFT  2
#define ALPOP_HANG_BELOW        3
#endif

/* These masks are used to determine which buttons will appear on the popup. */
 /* Is the last argument to AlPop_Query */

#define ALPOP_CANCEL     (1<<0)
#define ALPOP_OK         (1<<1)
#define ALPOP_HELP       (1<<2)

VOIDP AlPop_Query PROTOTYPE((AlPopType, /* what kind of pop */
			     char*,     /* the message */
			     char*,     /* help message (if help is pressed) */
			     Widget,    /* widget to use as parent */
			     AlPopHangDirection, /* where to popup */
			                         /* in relation to */
			                         /* parent widget */
			     Display*, /* used if widget==NULL */
			     int));    /* mask of which buttons to use */
                                       /* the name of the message box widget */
				       /* created is "argus-pop-dialog" */
     
VOIDP AlPop_Query_named
  PROTOTYPE((AlPopType, /* what kind of pop */
	     char*,     /* the message */
	     char*,     /* help message (if help is pressed) */
	     Widget,    /* widget to use as parent */
	     AlPopHangDirection, /* where to popup */
	                         /* in relation to */
			         /* parent widget */
	     Display*, /* used if widget==NULL */
	     int,      /* mask of which buttons to use */
	     char*));  /* name of the message box widget to create */
     
					
NORET AlPop_make_hang_coordinates PROTOTYPE((Widget,
					     AlPopHangDirection,
					     int, /*the shell units*/
					     int*,
					     int*));

/* each of the ALPOP_ types defined for AlPopType will create a dialog in */
 /* the style of its motif equivalent.  The dialogs have 3 standard buttons, */
 /* o.k., cancel, and help.  This function is designed to be used */
 /* in-line.  It will directly return a value depending on which button the */
 /* user pressed.  the bindings are

    o.k.   --> 1
    cancel --> 2
    
    when the user presses the help key an information dialog will be created
    containing the help message passed to your original dialog. 

    Note that the motif WORKING dialog type is not supported because its
    semantics do not fit with the alpop semantics.
    
    Also, if you pass in NULL for the Widget it will popup the dialog where
    the pointer is in the display specified. */



#endif
