home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / emulate / progs / spconv / !Spconv_h_wimputils < prev    next >
Encoding:
Text File  |  1994-09-16  |  5.6 KB  |  179 lines

  1. /* Header: wimputils.h  V2.06 - By Tim Moore (17th Sept 1994)
  2.  *
  3.  * Purpose: General wimp utilities
  4.  *
  5.  * Other Info: Most of these functions provide a simpler call strcuture
  6.  *             to RISC_OSLib by removing common code from the main programs
  7.  *             and making the calls easier to understand.
  8.  *
  9.  */
  10.  
  11. #ifndef __wimputils_h
  12. #define __wimputils_h
  13.  
  14. #ifndef BOOL
  15. #define BOOL int
  16. #define TRUE 1
  17. #define FALSE 0
  18. #endif
  19.  
  20. /**************************** DATA / STRUCTURES ***************************/
  21.  
  22. typedef struct {
  23.    int  Version_Ic;
  24.    char Version[80];
  25. } Version_Info;
  26.  
  27. /******************************* THE FUNCTIONS ****************************/
  28.  
  29. /* ----------------------- wimp_utils_create_window ------------------------
  30.  * Description:   Create the window, yielding its handle.
  31.  *
  32.  * Parameters:    char *Name -- the name of the window template
  33.  *                wimp_w Handle -- the window's handler
  34.  * Returns:       TRUE if all ok.
  35.  * Other Info:    none.
  36.  *
  37.  */
  38. BOOL Wimp_Utils_Create_Window( char *Name /*in*/ , wimp_w *Handle /*out*/);
  39.  
  40.  
  41.  
  42. /* ----------------------- wimp_utils_redraw_window ------------------------
  43.  * Description:   Event handling to deal with redrawing the window
  44.  *
  45.  * Parameters:    wimp_w Handle -- the window's handler
  46.  * Returns:       void.
  47.  * Other Info:    (future change to call a user routine?)
  48.  *
  49.  */
  50. void Wimp_Utils_Redraw_Window( wimp_w Handle /*in*/);
  51.  
  52.  
  53.  
  54. /* ----------------------- wimp_utils_open_window --------------------------
  55.  * Description:   Open a window (simpler call)
  56.  *
  57.  * Parameters:    wimp_w Handle -- the window's handler
  58.  *                BOOL Window_Limit -- if TRUE limits the number of this
  59.  *                                     window allowed to be opened to 1
  60.  *                BOOL Window_Open -- used to pass/change details of window
  61.  *                                    being open or not
  62.  * Returns:       TRUE if all ok.
  63.  * Other Info:    This is just to abstract the call and make it simpler.
  64.  *                It will always open window in front.  A seperate function
  65.  *                will be necessary to deal with more complex features.
  66.  *
  67.  */
  68. BOOL Wimp_Utils_Open_Window( wimp_w Handle /*in*/ ,BOOL Window_Limit /*in*/
  69.                                 ,BOOL Window_Open /*in*/);
  70.  
  71.  
  72.  
  73. /* ----------------------- wimp_utils_get_icon_text ------------------------
  74.  * Description:   Get text from a indirected icon
  75.  *
  76.  * Parameters:    wimp_w Window -- the window's handler
  77.  *                wimp_i Icon -- the icon number
  78.  *                char *Text -- the returned text
  79.  * Returns:       the returned text
  80.  * Other Info:    none.
  81.  *
  82.  */
  83. char *Wimp_Utils_Get_Icon_Text( wimp_w Window /*in*/, wimp_i Icon /*in*/,
  84.                                      char *Text /*out*/);
  85.  
  86.  
  87.  
  88. /* ----------------------- wimp_utils_put_icon_text ------------------------
  89.  * Description:   Put text into an indirected icon
  90.  *
  91.  * Parameters:    wimp_w Window -- the window's handler
  92.  *                wimp_i Icon -- the icon number
  93.  *                char *Text -- the text to insert
  94.  * Returns:       void.
  95.  * Other Info:    none.
  96.  *
  97.  */
  98. void Wimp_Utils_Put_Icon_Text( wimp_w Window /*in*/, wimp_i Icon /*in*/,
  99.                                  char *Text /*in*/);
  100.  
  101.  
  102.  
  103. /* ERROR IN NEXT ONE - REMOVED FOR MOMENT!!!
  104.  * BOOL wimp_utils_icon_empty( wimp_w window, wimp_i icon);
  105.  */
  106.  
  107.  
  108.  
  109. /* ----------------------- wimp_utils_disable_icon -------------------------
  110.  * Description:   Disable an icon by 'greying' it out
  111.  *
  112.  * Parameters:    wimp_w Window -- the window's handler
  113.  *                wimp_i Icon -- the icon number
  114.  * Returns:       void.
  115.  * Other Info:    none.
  116.  *
  117.  */
  118. void Wimp_Utils_Disable_Icon( wimp_w Window /*in*/, wimp_i Icon /*in*/);
  119.  
  120.  
  121.  
  122. /* ----------------------- wimp_utils_enable_icon --------------------------
  123.  * Description:   Enable an icon by 'ungreying' it
  124.  *
  125.  * Parameters:    wimp_w Window -- the window's handler
  126.  *                wimp_i Icon -- the icon number
  127.  * Returns:       void.
  128.  * Other Info:    none.
  129.  *
  130.  */
  131. void Wimp_Utils_Enable_Icon( wimp_w Window /*in*/, wimp_i Icon /*in*/);
  132.  
  133.  
  134.  
  135. /* ----------------------- wimp_utils_isselected ---------------------------
  136.  * Description:   Detects if an icon is 'selected' by user
  137.  *
  138.  * Parameters:    wimp_w Window -- the window's handler
  139.  *                wimp_i Icon -- the icon number
  140.  * Returns:       TRUE or FALSE.
  141.  * Other Info:    none.
  142.  *
  143.  */
  144. BOOL Wimp_Utils_Isselected(wimp_w Window /*in*/, wimp_i Icon /*in*/);
  145.  
  146.  
  147.  
  148. /* --------------------- wimp_utils_program_info ---------------------------
  149.  * Description:   Display the program info box - called from the menu processor. *
  150.  * Parameters:    char *Temp_Name -- name of dialogue box template
  151.  *                Version_Info The_Version_Info
  152.                                   -- The version field to fill in.
  153.  * Returns:       void.
  154.  * Other Info:    This function has just been moved away from main routines
  155.  *                to remove commonly repeated areas and things you don't need
  156.  *                to think about.  It used the object 'info_details_type'.
  157.  *
  158.  */
  159. void Wimp_Utils_Program_Info( char *Temp_Name /*in*/,
  160.                               Version_Info The_Version_Info /*in*/ );
  161.  
  162.  
  163.  
  164. /* ---------------------------- wimp_utils_help ----------------------------
  165.  * Description:   Sends messages after requests made for interactive help,
  166.  *                given the message string from the event and the text to
  167.  *                display. *
  168.  * Parameters:    char *Text -- help text to send
  169.  *                wimp_msgstr *Msg -- event details of the message string.
  170.  * Returns:       void.
  171.  * Other Info:    none.
  172.  *
  173.  */
  174. void Wimp_Utils_Help(char *Text /*in*/, wimp_msgstr *Msg /*inout*/);
  175.  
  176. #endif
  177.  
  178. /* end of wimputils.h */
  179.