home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / c / cwl30 / cwl3demo / cwldemo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-24  |  4.3 KB  |  157 lines

  1. #ifdef CWLDEMO_GLOBAL
  2. #define EXTERN
  3. #else
  4. #define EXTERN extern
  5. #endif
  6.  
  7. #include "cwlwin.h"
  8. #include "walloc.h"
  9. #include <stdlib.h>
  10. #include <stdio.h>
  11. #include <string.h>
  12.  
  13.  
  14. /* define menus */
  15. EXTERN PULLDOWN_MENU_PTR pull;
  16. EXTERN POPUP_MENU_PTR popup[8];
  17. EXTERN BAR_MENU_PTR bar;
  18. EXTERN WPOINTER wTemp[101];
  19. EXTERN WPOINTER wOpeningScreen;
  20. EXTERN WPOINTER error_window;
  21. EXTERN POPUP_MENU_PTR funclist;
  22.  
  23. /* define window functions */
  24. int WinCreate  _PROTO_ ((POPUP_MENU_PTR, int));
  25. int WinColor   _PROTO_ ((POPUP_MENU_PTR, int));
  26. int WinBorder  _PROTO_ ((POPUP_MENU_PTR, int));
  27. int WinText    _PROTO_ ((POPUP_MENU_PTR, int));
  28. int WinTitle   _PROTO_ ((POPUP_MENU_PTR, int));
  29. int WinMove    _PROTO_ ((POPUP_MENU_PTR, int));
  30. int WinHide    _PROTO_ ((POPUP_MENU_PTR, int));
  31. int WinChild   _PROTO_ ((POPUP_MENU_PTR, int));
  32. int WinVirtual _PROTO_ ((POPUP_MENU_PTR, int));
  33. int WinEffects _PROTO_ ((POPUP_MENU_PTR, int));
  34.  
  35.  
  36. /* define Form Functions */
  37. int FormDialog _PROTO_((POPUP_MENU_PTR, int));
  38.  
  39. /* define Screen Functions */
  40. int ScreenDirect  _PROTO_ ((POPUP_MENU_PTR, int));
  41. int ScreenBIOS    _PROTO_ ((POPUP_MENU_PTR, int));
  42. int ScreenSnow    _PROTO_ ((POPUP_MENU_PTR, int));
  43. int Screen25      _PROTO_ ((POPUP_MENU_PTR, int));
  44.  
  45. /* define Event function */
  46. int EventClock    _PROTO_ ((POPUP_MENU_PTR, int ));
  47.  
  48. /* define Menu Demo functions */
  49. int PopupMenuFunc _PROTO_ ((POPUP_MENU_PTR, int));
  50. int BarMenuFunc   _PROTO_ ((POPUP_MENU_PTR, int));
  51.  
  52.  
  53. /* define List Functions function */
  54. int ListFunctions _PROTO_ ((BAR_MENU_PTR, int));
  55. int Descript _PROTO_ ((POPUP_MENU_PTR, int));
  56.  
  57. EXTERN POPUPSELECTPROC WindowFunc[]
  58. #ifdef CWLDEMO_GLOBAL
  59. = {WinCreate, WinColor, WinBorder, WinText,
  60.    WinTitle, WinMove, /*WinHide,*/ WinChild,
  61.    WinVirtual, WinEffects }
  62. #endif
  63. ;
  64.  
  65. EXTERN POPUPSELECTPROC FormFunc[]
  66. #ifdef CWLDEMO_GLOBAL
  67. =  {FormDialog}
  68. #endif
  69. ;
  70.  
  71. EXTERN POPUPSELECTPROC ScreenFunc[]
  72. #ifdef CWLDEMO_GLOBAL
  73.  = {ScreenDirect, ScreenBIOS, ScreenSnow,
  74.                                 Screen25, Screen25, Screen25 }
  75. #endif
  76. ;
  77.  
  78. EXTERN POPUPSELECTPROC EventFunc[]
  79. #ifdef CWLDEMO_GLOBAL
  80.  = {EventClock}
  81. #endif
  82. ;
  83.  
  84. EXTERN POPUPSELECTPROC MenuFunc[]
  85. #ifdef CWLDEMO_GLOBAL
  86.  = {PopupMenuFunc, BarMenuFunc}
  87. #endif
  88. ;
  89.  
  90. int BarDemoFunc _PROTO_((BAR_MENU_PTR b, int which));
  91. int PopupDemoFunc _PROTO_((POPUP_MENU_PTR b, int which));
  92.  
  93. FILE * read_file _PROTO_((VWPOINTER, char *));
  94. CWL_VOID last_function _PROTO_((CWL_VOID));
  95.  
  96. /* define colors */
  97. EXTERN unsigned menu_colors[NUMCOLORSCHEME];
  98.  
  99.  
  100. CWL_VOID Intro _PROTO_((CWL_VOID));
  101. EXTERN unsigned char *waitchars[]
  102. #ifdef CWLDEMO_GLOBAL
  103. = {"│", "/", "-", "\\"}
  104. #endif
  105. ;
  106.  
  107. #define NUMWAIT  4
  108.  
  109. #define NUMLINES 16
  110.  
  111. /* Define external functions */
  112. CWL_VOID DialogDemo();
  113. CWL_VOID DoClock();
  114.  
  115. #define YELLOWONRED    CREATE_VIDEO_ATTRIBUTE(CWLred, CWLyellow)
  116. #define WHITEONBLUE    CREATE_VIDEO_ATTRIBUTE(CWLblue, CWLwhite)
  117. #define BLUEONWHITE    CREATE_VIDEO_ATTRIBUTE(CWLwhite, CWLblue)
  118. #define BLACKONCYAN    CREATE_VIDEO_ATTRIBUTE(CWLcyan, CWLblack)
  119. #define NORM           CREATE_VIDEO_ATTRIBUTE(CWLblack, CWLwhite)
  120. #define BLACKONWHITE   CREATE_VIDEO_ATTRIBUTE(CWLwhite, CWLblack)
  121. #define WHITEONRED     CREATE_VIDEO_ATTRIBUTE(CWLred, CWLlightwhite)
  122. #define GRAYONWHITE    CREATE_VIDEO_ATTRIBUTE(CWLwhite, CWLgray)
  123. #define WHITEONBLACK   CREATE_VIDEO_ATTRIBUTE(CWLblack, CWLwhite)
  124.  
  125. /* prototype other functions */
  126. CWL_VOID InitCWL();
  127. CWL_VOID InitPulldown();
  128. CWL_VOID DoDemo();
  129. CWL_VOID UninitCWL();
  130. int delay_approx _PROTO_((int mil));
  131.  
  132. /* Screen Sizes */
  133. EXTERN int ScreenSize[]
  134. #ifdef CWLDEMO_GLOBAL
  135.  = {25,43,50}
  136. #endif
  137. ;
  138. EXTERN WPOINTER tempw, tempw2;
  139. EXTERN WPOINTER wNotAvailable;
  140. int change_screen_size _PROTO_((int numrows));
  141. CWL_VOID custom_error_func _PROTO_((int, char*, int, char*));
  142.  
  143. EXTERN char *EffectStr[]
  144. #ifdef CWLDEMO_GLOBAL
  145.        = { "No Effect...","Explosion...","Contraction...",
  146.            "Random Fill...", "Expand from Center Up/Down...",
  147.            "Expand From Top/Bottom...", "Expand From Top...",
  148.            "Expand From Bottom...","Expand From Center Left/Right...",
  149.            "Expand From Left/Right","Left To Right...","Right To Left...",
  150.            "Slide Left...", "Slide Right...", "Slide Down...", "Slide Up..."
  151.            }
  152. #endif
  153. ;
  154.  
  155. CWL_VOID NotAvailable( );
  156.  
  157.