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

  1.  
  2. #ifndef __dl_popup_h
  3. #define __dl_popup_h
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #ifndef __dl_wimp_h
  8. #include "Wimp.h"
  9. #endif
  10. typedef int popup_handle;
  11. #define popup_ISLEAF (0x01)
  12. #define popup_ISSTATIC (0x02)
  13. #define popup_STANDALONE (0x00)
  14. #define popup_MENULEAF (0x01)
  15. #define popup_STATIC (0x02)
  16. typedef struct
  17. {
  18. int mul, div;
  19. int minmul, maxmul;
  20. int mindiv, maxdiv;
  21. } popup_magnify;
  22. typedef struct
  23. {
  24. char appname[32];
  25. char purpose[32];
  26. char author[32];
  27. char version[32];
  28. } popup_proginfo;
  29. typedef struct
  30. {
  31. struct
  32. {
  33. unsigned int cancel : 1; 
  34. unsigned int ok : 1; 
  35. unsigned int reserved : 6;
  36. unsigned int userhandle : 24; 
  37. } flags;
  38. char oktext[12]; 
  39. char canceltext[12]; 
  40. char appname[12]; 
  41. char message[188]; 
  42. } popup_report;
  43. typedef struct
  44. {
  45. char iconsprite[12]; 
  46. char filename[212]; 
  47. } popup_saveas; 
  48. typedef struct
  49. {
  50. struct
  51. unsigned int wasdragged : 1; 
  52. unsigned int shiftdown : 1; 
  53. unsigned int reserved : 30;
  54. } flags;
  55. int reserved;
  56. char filename[212]; 
  57. } popup_saveasreturn;
  58. typedef struct
  59. {
  60. char colour; 
  61. } popup_wimpcolour;
  62. typedef struct
  63. {
  64. unsigned int transparency : 8;
  65. unsigned int red : 8;
  66. unsigned int green : 8;
  67. unsigned int blue : 8;
  68. } colour_rgb;
  69. typedef struct
  70. {
  71. unsigned int value : 8; 
  72. unsigned int saturation : 8; 
  73. unsigned int hue : 16; 
  74. } colour_hsv;
  75. typedef struct
  76. {
  77. unsigned int key : 8;
  78. unsigned int yellow : 8;
  79. unsigned int magenta : 8;
  80. unsigned int cyan : 8;
  81. } colour_cmyk;
  82. #define popuptc_RGB 0
  83. #define popuptc_HSV 1
  84. #define popuptc_CMYK 2
  85. #define popuptc_TRANSPARENT0 0x00000
  86. #define popuptc_TRANSPARENT1 0x10000
  87. #define popuptc_TRANSPARENT256 0x20000
  88. typedef struct
  89. {
  90. int colourmodel; 
  91. union
  92. {
  93. colour_rgb rgb;
  94. colour_hsv hsv;
  95. colour_cmyk cmyk;
  96. } colour;
  97. int transparency; 
  98. } popup_truecolour;
  99. typedef struct
  100. {
  101. char name[12]; 
  102. wimp_point openpos; 
  103. char flags; 
  104. char reserved1, reserved2, reserved3;
  105. } popup_header;
  106. typedef union
  107. {
  108. popup_magnify magnify;
  109. popup_proginfo proginfo;
  110. popup_report report;
  111. popup_saveas saveas;
  112. popup_wimpcolour wimpcolour;
  113. popup_truecolour truecolour;
  114. } popup_data; 
  115. typedef struct
  116. {
  117. popup_magnify magnify;
  118. popup_report report;
  119. popup_saveas saveasreturn;
  120. popup_wimpcolour wimpcolour;
  121. popup_truecolour truecolour;
  122. } popup_returndata; 
  123. typedef struct
  124. {
  125. window_handle window; 
  126. wimp_point openpos; 
  127. } message_popuprequest;
  128. typedef struct
  129. {
  130. popup_handle handle; 
  131. char name[12]; 
  132. popup_returndata data; 
  133. } message_popupstate;
  134. typedef struct
  135. {
  136. popup_header header;
  137. popup_data data;
  138. } popup_block; 
  139. extern popup_handle PopUp_Open(popup_block *params);
  140. extern void PopUp_Close(popup_handle handle);
  141. extern popup_handle PopUp_ShowMenuLeaf(char *name, popup_data *definition,
  142. message_menuwarn *msg);
  143. extern popup_handle PopUp_ShowPtr(char *name, BOOL isstatic,
  144. popup_data *definition);
  145. #define PopUp_ShowStandalone(N, D) PopUp_ShowPtr(N, 0, D)
  146. #define PopUp_ShowStatic(N, D) PopUp_ShowPtr(N, 1, D)
  147. #ifdef __cplusplus
  148. }
  149. #endif
  150. #endif
  151.