home *** CD-ROM | disk | FTP | other *** search
- /*
- #### # # # #
- # # # # # The FreeWare C library for
- # # ## ### # # # # ### RISC OS machines
- # # # # # # # # # # # ___________________________________
- # # #### ### ## # # # #
- # # # # # # # # # # Please refer to the accompanying
- #### ### #### # # ##### # ### documentation for conditions of use
- ________________________________________________________________________
-
- File: Resource.h
- Author: Copyright © 1992, 1993, 1994 Jason Williams
- Version: 1.02 (Dec 1994)
- Purpose: Resource file (files within user application directory)
- management functions
- Mods: Julian Smith 20 Mar 1995
- Added function veneers to global vars if _desklib_DLL is
- defined.
- */
-
-
- #ifndef __Desk_Resource_h
- #define __Desk_Resource_h
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #ifndef __Desk_Core_h
- #include "Desk.Core.h"
- #endif
-
- #ifndef __Desk_Sprite_h
- #include "Desk.Sprite.h"
- #endif
-
-
- #ifdef Desk__using_SDLS
- extern char *Desk_Resource__Ref_pathname( void);
- extern Desk_sprite_area *Desk_Resource__Ref_sprites ( void);
- #endif
-
- #if defined( Desk__using_SDLS) && !defined( Desk__making_Resource)
- #define Desk_resource_pathname Desk_Resource__Ref_pathname()
- #define Desk_resource_sprites (*Desk_Resource_Ref_sprites())
- #else
- extern char Desk_resource_pathname[32];
- /*
- * This string is used as a prefix for all pathnames in DSEdit that load
- * resource files. It is set up by either of the following calls, to be either
- * "<Name$Dir>."
- * or
- * "Name:"
- * It is prepended to a leafname (e.g. <Floob$Dir>.Sprites or Floob:Sprites)
- * by some Desklib modules in order to find the resources.
- * (See Misc.c.ResInit, Misc.c.ResInitPth to see exactly what these very
- * simple functions do)
- */
-
- extern Desk_sprite_area Desk_resource_sprites;
- #endif
-
-
-
-
- extern void Desk_Resource_Initialise(const char *respath);
- /*
- * Initialises the resource manager. Pass in the name of your application
- * (e.g. if you have set <appname$Dir>, pass in "appname")
- * This tells all DeskLib modules where to look for your resources
- * by setting Desk_resource_pathname to "<Appname$Dir>." - this is prepended
- * to all leafnames to create full resource pathnames.
- * This pathname is used by various DeskLib modules (Template, Msgs, etc)
- * -it adds very little code size to your program, and saves you the
- * work of doing the pathname yourself. It also makes changing the
- * resource directory at a later development stage far easier.
- *
- * This also calls Desk_dll_NameApp if the caller is a DLL client
- *
- * See also the ALTERNATIVE call, Desk_Resource_InitialisePath()
- */
-
-
- extern void Desk_Resource_InitialisePath(const char *respath);
- /*
- * Initialises the resource manager.
- *
- * If you prefer to use a path variable for your resources (for easier
- * setting of language resources), then you can initialise the resources
- * by calling this function.
- * (Instead of setting the resource prefix to "<AppName$Dir>.", it will
- * set it to "AppName:", where "AppName" is the 'respath' parameter)
- *
- * See also the ALTERNATIVE call, Desk_Resource_Initialise()
- */
-
-
- extern void Desk_Resource_LoadSprites(void);
- /*
- * Loads the programs 'Sprites' file from the resource path, ready for use.
- * Notes: Call this only after you have Desk_Resource_Initialise
- * To use these sprites for your templates, call
- * Desk_Template_UseSpriteArea(Desk_resource_sprites);
- * after calling this function.
- * If you do not call this function, the 'Desk_resource_sprites' area will
- * indicate the wimp sprite area.
- */
-
-
- #ifdef __cplusplus
- }
- #endif
-
-
- #endif
-