home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / Libraries / Template / h / TempDefs
Encoding:
Text File  |  1993-06-28  |  2.6 KB  |  96 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:    Template.TempDefs.h
  12.     Author:  Copyright © 1992 Jason Williams
  13.              Thanks to John Winters for supplying the code that I hacked
  14.              changed, hacked, rewrote, and then wrote again from scratch!
  15.     Version: 1.10 (16 May 1993)
  16.     Purpose: Definitions and stuff for internal template routines
  17.  
  18.     NOTE:    If you make changes to this header you must also fix the
  19.              file Window.h.TempDefs, which is a duplicate of this file, and
  20.              is used by Window.c.ModeChange.
  21. */
  22.  
  23. #ifndef __dl_tempdefs_h
  24. #define __dl_tempdefs_h
  25.  
  26. #include <stdlib.h>
  27. #include <stdio.h>
  28. #include <string.h>
  29.  
  30. #ifndef __dl_linklist_h
  31. #include "DeskLib:LinkList.h"
  32. #endif
  33.  
  34. #ifndef __dl_wimpswis_h
  35. #include "DeskLib:WimpSWIs.h"
  36. #endif
  37.  
  38. #ifndef __dl_error_h
  39. #include "DeskLib:Error.h"
  40. #endif
  41.  
  42. #ifndef __resource_h
  43. #include "DeskLib:Resource.h"
  44. #endif
  45.  
  46. #ifndef __dl_template_h
  47. #include "DeskLib:Template.h"
  48. #endif
  49.  
  50. #ifndef __dl_strlencr_h
  51. #include "DeskLib:StringCR.h"
  52. #endif
  53.  
  54.  
  55. #define ERRBASE 1
  56. #define ERR1 ERRBASE+0
  57. #define ERRMESS1 "Not enough memory to copy template"
  58. #define ERR2 ERRBASE+1
  59. #define ERRMESS2 "Template '%s' not found"
  60. #define ERR3 ERRBASE+2
  61. #define ERRMESS3 "Not enough memory to load templates"
  62. #define ERR4 ERRBASE+3
  63. #define ERRMESS4 "Template file corrupt"
  64. #define ERR5 ERRBASE+4
  65. #define ERRMESS5 "Error reading template file"
  66. #define ERR6 ERRBASE+5
  67. #define ERRMESS6 "Can't find template body"
  68. #define ERR7 ERRBASE+6
  69. #define ERRMESS7 "Unable to find template file"
  70. #define ERR8 ERRBASE+7
  71. #define ERRMESS8 "Template file is empty"
  72.  
  73. #define HEADER_SIZE 16
  74. #define INDEX_SIZE  24
  75.               
  76.  
  77. typedef struct
  78. {
  79.   linklist_header header;
  80.   char            identifier[wimp_MAXNAME + 1];
  81.   window_block    *windowdef;
  82.   int             dataoffset;
  83.   int             templatesize;    /* size of window+icons+indirect data */
  84.   int             indirectsize;    /* size of expanded indirect data     */
  85.   char            *indirectdata;
  86. } template_record;
  87.  
  88.  
  89. extern linklist_header template_list;
  90. extern font_array      *template_fontarray;
  91.  
  92.  
  93. extern template_record *Template__FindTemplate(char *name);
  94.  
  95. #endif
  96.