 
#ifndef __dl_popup_h
#define __dl_popup_h
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dl_wimp_h
#include "Wimp.h"
#endif
typedef int popup_handle;
#define popup_ISLEAF (0x01)
#define popup_ISSTATIC (0x02)
#define popup_STANDALONE (0x00)
#define popup_MENULEAF (0x01)
#define popup_STATIC (0x02)
typedef struct
{
int mul, div;
int minmul, maxmul;
int mindiv, maxdiv;
} popup_magnify;
typedef struct
{
char appname[32];
char purpose[32];
char author[32];
char version[32];
} popup_proginfo;
typedef struct
{
struct
{
unsigned int cancel : 1; 
unsigned int ok : 1; 
unsigned int reserved : 6;
unsigned int userhandle : 24; 
} flags;
char oktext[12]; 
char canceltext[12]; 
char appname[12]; 
char message[188]; 
} popup_report;
typedef struct
{
char iconsprite[12]; 
char filename[212]; 
} popup_saveas; 
typedef struct
{
struct
{ 
unsigned int wasdragged : 1; 
unsigned int shiftdown : 1; 
unsigned int reserved : 30;
} flags;
int reserved;
char filename[212]; 
} popup_saveasreturn;
typedef struct
{
char colour; 
} popup_wimpcolour;
typedef struct
{
unsigned int transparency : 8;
unsigned int red : 8;
unsigned int green : 8;
unsigned int blue : 8;
} colour_rgb;
typedef struct
{
unsigned int value : 8; 
unsigned int saturation : 8; 
unsigned int hue : 16; 
} colour_hsv;
typedef struct
{
unsigned int key : 8;
unsigned int yellow : 8;
unsigned int magenta : 8;
unsigned int cyan : 8;
} colour_cmyk;
#define popuptc_RGB 0
#define popuptc_HSV 1
#define popuptc_CMYK 2
#define popuptc_TRANSPARENT0 0x00000
#define popuptc_TRANSPARENT1 0x10000
#define popuptc_TRANSPARENT256 0x20000
typedef struct
{
int colourmodel; 
union
{
colour_rgb rgb;
colour_hsv hsv;
colour_cmyk cmyk;
} colour;
int transparency; 
} popup_truecolour;
typedef struct
{
char name[12]; 
wimp_point openpos; 
char flags; 
char reserved1, reserved2, reserved3;
} popup_header;
typedef union
{
popup_magnify magnify;
popup_proginfo proginfo;
popup_report report;
popup_saveas saveas;
popup_wimpcolour wimpcolour;
popup_truecolour truecolour;
} popup_data; 
typedef struct
{
popup_magnify magnify;
popup_report report;
popup_saveas saveasreturn;
popup_wimpcolour wimpcolour;
popup_truecolour truecolour;
} popup_returndata; 
typedef struct
{
window_handle window; 
wimp_point openpos; 
} message_popuprequest;
typedef struct
{
popup_handle handle; 
char name[12]; 
popup_returndata data; 
} message_popupstate;
typedef struct
{
popup_header header;
popup_data data;
} popup_block; 
extern popup_handle PopUp_Open(popup_block *params);
extern void PopUp_Close(popup_handle handle);
extern popup_handle PopUp_ShowMenuLeaf(char *name, popup_data *definition,
message_menuwarn *msg);
extern popup_handle PopUp_ShowPtr(char *name, BOOL isstatic,
popup_data *definition);
#define PopUp_ShowStandalone(N, D) PopUp_ShowPtr(N, 0, D)
#define PopUp_ShowStatic(N, D) PopUp_ShowPtr(N, 1, D)
#ifdef __cplusplus
}
#endif
#endif
