home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / Toolbox / h / proginfo < prev    next >
Encoding:
Text File  |  1995-09-05  |  9.0 KB  |  284 lines

  1. #ifndef proginfo_H
  2. #define proginfo_H
  3.  
  4. /* C header file for ProgInfo
  5.  * written by DefMod (Aug 30 1995) on Tue Sep  5 15:14:08 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef toolbox_H
  14. #include "toolbox.h"
  15. #endif
  16.  
  17. #ifndef window_H
  18. #include "window.h"
  19. #endif
  20.  
  21. /**********************************
  22.  * SWI names and SWI reason codes *
  23.  **********************************/
  24. #undef  ProgInfo_ClassSWI
  25. #define ProgInfo_ClassSWI                       0x82B40
  26. #undef  XProgInfo_ClassSWI
  27. #define XProgInfo_ClassSWI                      0xA2B40
  28. #undef  ProgInfo_PostFilter
  29. #define ProgInfo_PostFilter                     0x82B41
  30. #undef  XProgInfo_PostFilter
  31. #define XProgInfo_PostFilter                    0xA2B41
  32. #undef  ProgInfo_PreFilter
  33. #define ProgInfo_PreFilter                      0x82B42
  34. #undef  XProgInfo_PreFilter
  35. #define XProgInfo_PreFilter                     0xA2B42
  36. #undef  ProgInfo_GetWindowID
  37. #define ProgInfo_GetWindowID                    0x0
  38. #undef  ProgInfo_SetVersion
  39. #define ProgInfo_SetVersion                     0x1
  40. #undef  ProgInfo_GetVersion
  41. #define ProgInfo_GetVersion                     0x2
  42. #undef  ProgInfo_SetLicenceType
  43. #define ProgInfo_SetLicenceType                 0x3
  44. #undef  ProgInfo_GetLicenceType
  45. #define ProgInfo_GetLicenceType                 0x4
  46. #undef  ProgInfo_SetTitle
  47. #define ProgInfo_SetTitle                       0x5
  48. #undef  ProgInfo_GetTitle
  49. #define ProgInfo_GetTitle                       0x6
  50.  
  51. /************************************
  52.  * Structure and union declarations *
  53.  ************************************/
  54. typedef struct proginfo_object                  proginfo_object;
  55. typedef struct proginfo_action_about_to_be_shown proginfo_action_about_to_be_shown;
  56.  
  57. /********************
  58.  * Type definitions *
  59.  ********************/
  60. typedef bits proginfo_flags;
  61.  
  62. typedef int proginfo_licence;
  63.  
  64. struct proginfo_object
  65.    {  proginfo_flags flags;
  66.       toolbox_msg_reference title;
  67.       int title_limit;
  68.       toolbox_msg_reference purpose;
  69.       toolbox_msg_reference author;
  70.       proginfo_licence licence_type;
  71.       toolbox_msg_reference version;
  72.       toolbox_string_reference alternative_window_name;
  73.    };
  74.  
  75. typedef toolbox_full proginfo_full;
  76.  
  77. struct proginfo_action_about_to_be_shown
  78.    {  toolbox_position_tag tag;
  79.       union
  80.       {  os_coord top_left;
  81.          proginfo_full full;
  82.       }
  83.       position;
  84.    };
  85.  
  86. /************************
  87.  * Constant definitions *
  88.  ************************/
  89. #define class_PROG_INFO                         ((toolbox_class) 0x82B40u)
  90. #define proginfo_GENERATE_ABOUT_TO_BE_SHOWN     ((proginfo_flags) 0x1u)
  91. #define proginfo_GENERATE_DIALOGUE_COMPLETED    ((proginfo_flags) 0x2u)
  92. #define proginfo_INCLUDE_LICENCE_TYPE           ((proginfo_flags) 0x4u)
  93. #define proginfo_NAME                           ((toolbox_c) 0x82B400u)
  94. #define proginfo_PURPOSE                        ((toolbox_c) 0x82B401u)
  95. #define proginfo_AUTHOR                         ((toolbox_c) 0x82B402u)
  96. #define proginfo_LICENCE_TYPE                   ((toolbox_c) 0x82B403u)
  97. #define proginfo_VERSION                        ((toolbox_c) 0x82B404u)
  98. #define proginfo_NAME_LABEL                     ((toolbox_c) 0x82B405u)
  99. #define proginfo_PURPOSE_LABEL                  ((toolbox_c) 0x82B406u)
  100. #define proginfo_AUTHOR_LABEL                   ((toolbox_c) 0x82B407u)
  101. #define proginfo_LICENCE_LABEL                  ((toolbox_c) 0x82B408u)
  102. #define proginfo_VERSION_LABEL                  ((toolbox_c) 0x82B409u)
  103. #define proginfo_LICENCE_PUBLIC_DOMAIN          ((proginfo_licence) 0x0u)
  104. #define proginfo_LICENCE_SINGLE_USER            ((proginfo_licence) 0x1u)
  105. #define proginfo_LICENCE_SINGLE_MACHINE         ((proginfo_licence) 0x2u)
  106. #define proginfo_LICENCE_SITE                   ((proginfo_licence) 0x3u)
  107. #define proginfo_LICENCE_NETWORK                ((proginfo_licence) 0x4u)
  108. #define proginfo_LICENCE_AUTHORITY              ((proginfo_licence) 0x5u)
  109. #define action_PROG_INFO_ABOUT_TO_BE_SHOWN      0x82B40u
  110. #define action_PROG_INFO_DIALOGUE_COMPLETED     0x82B41u
  111. #define error_PROG_INFO_TASKS_ACTIVE            0x80B400u
  112. #define error_PROG_INFO_ALLOC_FAILED            0x80B401u
  113. #define error_PROG_INFO_SHORT_BUFFER            0x80B402u
  114. #define error_PROG_INFO_NO_SUCH_TASK            0x80B411u
  115. #define error_PROG_INFO_NO_SUCH_METHOD          0x80B412u
  116. #define error_PROG_INFO_NO_SUCH_MISC_OP_METHOD  0x80B413u
  117.  
  118. /*************************
  119.  * Function declarations *
  120.  *************************/
  121.  
  122. #ifdef __cplusplus
  123.    extern "C" {
  124. #endif
  125.  
  126. /* ------------------------------------------------------------------------
  127.  * Function:      proginfo_get_window_id()
  128.  *
  129.  * Description:   Calls reason code 0 of SWI 0x44EC6
  130.  *
  131.  * Input:         flags - value of R0 on entry
  132.  *                prog_info - value of R1 on entry
  133.  *
  134.  * Output:        window - value of R0 on exit (X version only)
  135.  *
  136.  * Returns:       R0 (non-X version only)
  137.  *
  138.  * Other notes:   Before entry, R2 = 0x0.
  139.  */
  140.  
  141. extern os_error *xproginfo_get_window_id (bits flags,
  142.       toolbox_o prog_info,
  143.       toolbox_o *window);
  144. extern toolbox_o proginfo_get_window_id (bits flags,
  145.       toolbox_o prog_info);
  146.  
  147. /* ------------------------------------------------------------------------
  148.  * Function:      proginfo_set_version()
  149.  *
  150.  * Description:   Calls reason code 1 of SWI 0x44EC6
  151.  *
  152.  * Input:         flags - value of R0 on entry
  153.  *                prog_info - value of R1 on entry
  154.  *                version - value of R3 on entry
  155.  *
  156.  * Other notes:   Before entry, R2 = 0x1.
  157.  */
  158.  
  159. extern os_error *xproginfo_set_version (bits flags,
  160.       toolbox_o prog_info,
  161.       char const *version);
  162. extern void proginfo_set_version (bits flags,
  163.       toolbox_o prog_info,
  164.       char const *version);
  165.  
  166. /* ------------------------------------------------------------------------
  167.  * Function:      proginfo_get_version()
  168.  *
  169.  * Description:   Calls reason code 2 of SWI 0x44EC6
  170.  *
  171.  * Input:         flags - value of R0 on entry
  172.  *                prog_info - value of R1 on entry
  173.  *                buffer - value of R3 on entry
  174.  *                size - value of R4 on entry
  175.  *
  176.  * Output:        used - value of R4 on exit (X version only)
  177.  *
  178.  * Returns:       R4 (non-X version only)
  179.  *
  180.  * Other notes:   Before entry, R2 = 0x2.
  181.  */
  182.  
  183. extern os_error *xproginfo_get_version (bits flags,
  184.       toolbox_o prog_info,
  185.       char *buffer,
  186.       int size,
  187.       int *used);
  188. extern int proginfo_get_version (bits flags,
  189.       toolbox_o prog_info,
  190.       char *buffer,
  191.       int size);
  192.  
  193. /* ------------------------------------------------------------------------
  194.  * Function:      proginfo_set_licence_type()
  195.  *
  196.  * Description:   Calls reason code 3 of SWI 0x44EC6
  197.  *
  198.  * Input:         flags - value of R0 on entry
  199.  *                prog_info - value of R1 on entry
  200.  *                licence_type - value of R3 on entry
  201.  *
  202.  * Other notes:   Before entry, R2 = 0x3.
  203.  */
  204.  
  205. extern os_error *xproginfo_set_licence_type (bits flags,
  206.       toolbox_o prog_info,
  207.       proginfo_licence licence_type);
  208. extern void proginfo_set_licence_type (bits flags,
  209.       toolbox_o prog_info,
  210.       proginfo_licence licence_type);
  211.  
  212. /* ------------------------------------------------------------------------
  213.  * Function:      proginfo_get_licence_type()
  214.  *
  215.  * Description:   Calls reason code 4 of SWI 0x44EC6
  216.  *
  217.  * Input:         flags - value of R0 on entry
  218.  *                prog_info - value of R1 on entry
  219.  *
  220.  * Output:        licence_type - value of R0 on exit (X version only)
  221.  *
  222.  * Returns:       R0 (non-X version only)
  223.  *
  224.  * Other notes:   Before entry, R2 = 0x4.
  225.  */
  226.  
  227. extern os_error *xproginfo_get_licence_type (bits flags,
  228.       toolbox_o prog_info,
  229.       proginfo_licence *licence_type);
  230. extern proginfo_licence proginfo_get_licence_type (bits flags,
  231.       toolbox_o prog_info);
  232.  
  233. /* ------------------------------------------------------------------------
  234.  * Function:      proginfo_set_title()
  235.  *
  236.  * Description:   Calls reason code 5 of SWI 0x44EC6
  237.  *
  238.  * Input:         flags - value of R0 on entry
  239.  *                prog_info - value of R1 on entry
  240.  *                title - value of R3 on entry
  241.  *
  242.  * Other notes:   Before entry, R2 = 0x5.
  243.  */
  244.  
  245. extern os_error *xproginfo_set_title (bits flags,
  246.       toolbox_o prog_info,
  247.       char const *title);
  248. extern void proginfo_set_title (bits flags,
  249.       toolbox_o prog_info,
  250.       char const *title);
  251.  
  252. /* ------------------------------------------------------------------------
  253.  * Function:      proginfo_get_title()
  254.  *
  255.  * Description:   Calls reason code 6 of SWI 0x44EC6
  256.  *
  257.  * Input:         flags - value of R0 on entry
  258.  *                prog_info - value of R1 on entry
  259.  *                buffer - value of R3 on entry
  260.  *                size - value of R4 on entry
  261.  *
  262.  * Output:        used - value of R4 on exit (X version only)
  263.  *
  264.  * Returns:       R4 (non-X version only)
  265.  *
  266.  * Other notes:   Before entry, R2 = 0x6.
  267.  */
  268.  
  269. extern os_error *xproginfo_get_title (bits flags,
  270.       toolbox_o prog_info,
  271.       char *buffer,
  272.       int size,
  273.       int *used);
  274. extern int proginfo_get_title (bits flags,
  275.       toolbox_o prog_info,
  276.       char *buffer,
  277.       int size);
  278.  
  279. #ifdef __cplusplus
  280.    }
  281. #endif
  282.  
  283. #endif
  284.