 
#ifndef __dl_dialog_h
#define __dl_dialog_h
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dl_wimp_h
#include "Wimp.h"
#endif
#ifndef __dl_window_h
#include "Window.h"
#endif
typedef struct
{
window_handle window; 
icon_handle lastclicked; 
button_state button; 
struct
{
unsigned int stillopen : 1; 
unsigned int persist : 1; 
unsigned int isstatic : 1; 
} state;
} dialog_record;
typedef dialog_record *dialog;
#define dialog_CLOSE ((icon_handle) -1)
#define dialog_NOCHOICE ((icon_handle) -2)
extern dialog Dialog_Create(char *template_name, int maxtitlesize);
extern void Dialog_Destroy(dialog d);
extern void Dialog_Show(dialog d);
extern void Dialog_ShowAt(dialog d, int x, int y);
extern void Dialog_ShowStatic(dialog d, window_openpos openpos);
extern void Dialog_Hide(dialog d);
extern int Dialog_WaitForClick(dialog d);
#define Dialog_WindowHandle(d) ((d)->window)
#define Dialog_Persist(D) ((D)->state.persist && (D)->lastclicked >= 0)
#define Dialog_LastClicked(D) ((D)->lastclicked)
#define Dialog_StillOpen(D) ((D)->state.stillopen)
#ifdef __cplusplus
}
#endif
#endif
