home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / desklib / PopUps / Docs / ExampleSrc / h / TempDefs < prev   
Encoding:
Text File  |  1993-05-15  |  2.4 KB  |  92 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.  
  19. #ifndef __dl_tempdefs_h
  20. #define __dl_tempdefs_h
  21.  
  22. #include <stdlib.h>
  23. #include <stdio.h>
  24. #include <string.h>
  25.  
  26. #ifndef __dl_linklist_h
  27. #include "LinkList.h"
  28. #endif
  29.  
  30. #ifndef __dl_wimpswis_h
  31. #include "WimpSWIs.h"
  32. #endif
  33.  
  34. #ifndef __dl_error_h
  35. #include "Error.h"
  36. #endif
  37.  
  38. #ifndef __resource_h
  39. #include "Resource.h"
  40. #endif
  41.  
  42. #ifndef __dl_template_h
  43. #include "Template.h"
  44. #endif
  45.  
  46. #ifndef __dl_strlencr_h
  47. #include "stringcr.h"
  48. #endif
  49.  
  50.  
  51. #define ERRBASE 1
  52. #define ERR1 ERRBASE+0
  53. #define ERRMESS1 "Not enough memory to copy template"
  54. #define ERR2 ERRBASE+1
  55. #define ERRMESS2 "Template '%s' not found"
  56. #define ERR3 ERRBASE+2
  57. #define ERRMESS3 "Not enough memory to load templates"
  58. #define ERR4 ERRBASE+3
  59. #define ERRMESS4 "Template file corrupt"
  60. #define ERR5 ERRBASE+4
  61. #define ERRMESS5 "Error reading template file"
  62. #define ERR6 ERRBASE+5
  63. #define ERRMESS6 "Can't find template body"
  64. #define ERR7 ERRBASE+6
  65. #define ERRMESS7 "Unable to find template file"
  66. #define ERR8 ERRBASE+7
  67. #define ERRMESS8 "Template file is empty"
  68.  
  69. #define HEADER_SIZE 16
  70. #define INDEX_SIZE  24
  71.               
  72.  
  73. typedef struct
  74. {
  75.   linklist_header header;
  76.   char            identifier[wimp_MAXNAME + 1];
  77.   window_block    *windowdef;
  78.   int             dataoffset;
  79.   int             templatesize;    /* size of window+icons+indirect data */
  80.   int             indirectsize;    /* size of expanded indirect data     */
  81.   char            *indirectdata;
  82. } template_record;
  83.  
  84.  
  85. extern linklist_header template_list;
  86. extern font_array      *template_fontarray;
  87.  
  88.  
  89. extern template_record *Template__FindTemplate(char *name);
  90.  
  91. #endif
  92.