#ifndef __Template__H
#define __Template__H

#include "WimpLib:std.h"
#include "WimpLib:Window.h"
#include "kernel.h"

#ifdef __cplusplus
extern "C" {
#endif

struct CTemplate
{
	CWind*  window;
	char*   workspace;
	int32_t workspacesize;
	char    name[12];
};

void throw_Templates_Templates(void);
void Templates_NotTemplates(void);
const _kernel_oserror* Templates_Load(const char* filename);
CTemplate* Templates_Find(const char* title);
CTemplate* throw_Templates_Copy(const char* title);

#define EWind_DialogWindow     0x07000002
#define EWind_NormalWindow     0x7F000002
#define EWind_PaneWindow       0x00000022
#define EWind_IconWindow       0x50000022

CTemplate* throw_Templates_Blank(int length, unsigned int flags, int minx, int miny);
CWind* Template_GetWindow(const CTemplate*);
void Templates_Remove(CTemplate*);

#ifdef __cplusplus
}
#endif

#endif
