/* * template.c * * Loading and manipulation of window templates * * © 1994-1998 Straylight */ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Steel library. * * Steel is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * Steel is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Steel. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __template_h #define __template_h /* --- Acorn stupidly decided to make this public --- */ typedef struct template__str { struct template__str *next; char *workspace; int workspacesize; char *font; char name[12]; wimp_wind window; } template; /* --- The actual functions --- */ /* * template *template_copy(template *from) * * Use * Copies a template field-for-field and fixes up new indirected data for * it. */ template *template_copy(template *from); /* * BOOL template_readfile(char *name) * * Use * Loads the template file named into memory, and sorts out all its * indirected data. * * Template entries with strange identifiers are ignored. Other entry * types may be supported later. * * Parameters * char *name == the name of the template file to load (a resource file) * * Returns * FALSE if the file contained no sprite icons. No, I don't understand * the use of this either. It's not my problem though. I just write the * code. */ BOOL template_readfile(char *file); /* * void template_init(void) * * Use * Loads the application's `Templates' file. */ void template_init(void); /* * void template_use_fancyfonts(void) * * Use * Does absolutely nothing at all. Fancy font support happens anyway. */ void template_use_fancyfonts(void); /* * BOOL template_exists(char *name) * * Use * Returns TRUE if the named template is known at the moment, or FALSE * otherwise */ BOOL template_exists(char *name); /* * template *template_find(char *name) * * Use * Locates a named template and returns a pointer to it */ template *template_find(char *name); /* * wimp_wind *template_syshandle(char *name) * * Use * Not very much, if the truth be known. It returns a pointer to a named * window definition. */ wimp_wind *template_syshandle(char *name); /* * BOOL template_loaded(void) * * Use * Returns TRUE if we have templates on board. */ BOOL template_loaded(void); #endif