home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / code / desklib / DeskLib / !DeskLib / h / Dialog < prev    next >
Encoding:
Text File  |  1995-07-17  |  1.1 KB  |  43 lines

  1.  
  2. #ifndef __dl_dialog_h
  3. #define __dl_dialog_h
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #ifndef __dl_wimp_h
  8. #include "Wimp.h"
  9. #endif
  10. #ifndef __dl_window_h
  11. #include "Window.h"
  12. #endif
  13. typedef struct
  14. {
  15. window_handle window; 
  16. icon_handle lastclicked; 
  17. button_state button; 
  18. struct
  19. {
  20. unsigned int stillopen : 1; 
  21. unsigned int persist : 1; 
  22. unsigned int isstatic : 1; 
  23. } state;
  24. } dialog_record;
  25. typedef dialog_record *dialog;
  26. #define dialog_CLOSE ((icon_handle) -1)
  27. #define dialog_NOCHOICE ((icon_handle) -2)
  28. extern dialog Dialog_Create(char *template_name, int maxtitlesize);
  29. extern void Dialog_Destroy(dialog d);
  30. extern void Dialog_Show(dialog d);
  31. extern void Dialog_ShowAt(dialog d, int x, int y);
  32. extern void Dialog_ShowStatic(dialog d, window_openpos openpos);
  33. extern void Dialog_Hide(dialog d);
  34. extern int Dialog_WaitForClick(dialog d);
  35. #define Dialog_WindowHandle(d) ((d)->window)
  36. #define Dialog_Persist(D) ((D)->state.persist && (D)->lastclicked >= 0)
  37. #define Dialog_LastClicked(D) ((D)->lastclicked)
  38. #define Dialog_StillOpen(D) ((D)->state.stillopen)
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif
  43.