home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / desklib / !DeskLib / h / Resource < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-15  |  2.6 KB  |  68 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Resource.h
  12.     Author:  Copyright © 1992, 1993 Jason Williams
  13.     Version: 1.01 (15 Jul 1993)
  14.     Purpose: Resource file (files within user application directory)
  15.              management functions
  16. */
  17.  
  18.  
  19. #ifndef __dl_resource_h
  20. #define __dl_resource_h
  21.  
  22.  
  23. /* resource_pathname
  24.  * This string is used as a prefix for all pathnames in DSEdit that load
  25.  * resource files. It is set up by either of the following calls, to be either
  26.  *   "<Name$Dir>."
  27.  * or
  28.  *   "Name:"
  29.  * It is prepended to a leafname (e.g. <Floob$Dir>.Sprites or Floob:Sprites)
  30.  * by some Desklib modules in order to find the resources.
  31.  * (See Misc.c.ResInit, Misc.c.ResInitPth to see exactly what these very
  32.  * simple functions do)
  33.  */
  34.  
  35. extern char resource_pathname[32];
  36.  
  37.  
  38.   /* Resource_Initialise --------------------------------------------------
  39.    * Initialises the resource manager. Pass in the name of your application
  40.    * (e.g. if you have set <appname$Dir>, pass in "appname")
  41.    * This tells all DeskLib modules where to look for your resources
  42.    * by setting resource_pathname to "<Appname$Dir>." - this is prepended
  43.    * to all leafnames to create full resource pathnames.
  44.    * This pathname is used by various DeskLib modules (Template, Msgs, etc)
  45.    * -it adds very little code size to your program, and saves you the
  46.    * work of doing the pathname yourself. It also makes changing the
  47.    * resource directory at a later development stage far easier.
  48.    *
  49.    * See also the ALTERNATIVE call, Resource_InitialisePath()
  50.    */
  51. extern void Resource_Initialise(char *respath);
  52.  
  53.  
  54.   /* Resource_InitialisePath ----------------------------------------------
  55.    * Initialises the resource manager.
  56.    *
  57.    * If you prefer to use a path variable for your resources (for easier
  58.    * setting of language resources), then you can initialise the resources
  59.    * by calling this function.
  60.    * (Instead of setting the resource prefix to "<AppName$Dir>.", it will
  61.    *  set it to "AppName:", where "AppName" is the 'respath' parameter)
  62.    *
  63.    * See also the ALTERNATIVE call, Resource_Initialise()
  64.    */
  65. extern void Resource_InitialisePath(char *respath);
  66.  
  67. #endif
  68.