/*------------------------------------------------------------------------*
  Filename....: triangle.h


		 COPYRIGHT (C) 2001.  All Rights Reserved.
		 auto*des*sys, Inc., Columbus, Ohio, USA.
 *------------------------------------------------------------------------*/

#ifndef _TRIANGLE_H
#define _TRIANGLE_H 1

#include <math.h>
#include <float.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#include <errno.h>

#include "fzrt_api.h"
#include "fz_api.h"

#include "fz_math_api.h"
#include "fz_objt_api.h"
#include "fz_type_api.h"
#include "fz_iost_api.h"
#include "fz_notf_api.h"

#include "formz_vendor.h"

#include "fzpl_plugin.h"



/*************************************************************************
						TOOL STUFF
**************************************************************************/
/* Star Tool Plugin Identification */
/* UUID : {2bfff506-41d3-4fa8-9e54-7b45a78055bf} */

#define TRIANGLE_TOOL_PLUGIN_ID				"\x2b\xff\xf5\x06\x41\xd3\x4f\xa8\x9e\x54\x7b\x45\xa7\x80\x55\xbf"
#define TRIANGLE_TOOL_PLUGIN_VERSION		FZPL_VERS_MAKE(6,1,0,0)
#define TRIANGLE_TOOL_PLUGIN_VENDOR			FORMZ_VENDOR
#define TRIANGLE_TOOL_PLUGIN_ATTR_STR		""
#define TRIANGLE_TOOL_PLUGIN_URL			FORMZ_VENDOR_URL

/* Star Tool Id */
/* UUID : {814fac1b-4712-49bc-8dfd-e76c3aa3c0f6} */
#define TRIANGLE_TOOL_ID	"\x81\x4f\xac\x1b\x47\x12\x49\xbc\x8d\xfd\xe7\x6c\x3a\xa3\xc0\xf6"

fzrt_error_td triangle_tool_get_callback_fset ( const fzpl_fset_def_ptr fset_def, fzpl_fset_td * const fset );

/*************************************************************************
						PLUGIN STUFF
**************************************************************************/
#define TRIANGLE_STR_ID			1
enum
{
	TRIANGLE_STR_PLUGIN_NAME=1,
	TRIANGLE_STR_TOOL_NAME,
	TRIANGLE_STR_P1,
	TRIANGLE_STR_P2,
	TRIANGLE_STR_P3,

	TRIANGLE_STR_MAX
};

typedef struct
{
	const fzpl_fset_glue_fset *fsf;

	/* application provided function sets to hold on to */
	
	fz_math_fset			math_funcs;
	fz_model_fset			model_funcs;
	fz_type_fset			type_funcs;
	fz_fuim_fset			fuim_funcs;
	fz_iost_fset			iost_funcs;

	fz_fzrt_base_fset		fzrt_base_funcs;
	fz_fzrt_mem_fset		fzrt_mem_funcs;
	fz_fzrt_file_fset		fzrt_file_funcs;
	fz_fzrt_graf_fset		fzrt_graf_funcs;
	fz_fzrt_ui_fset		fzrt_ui_funcs;

	fzrt_unsigned_int			triangle_tool_plugin_runtime_id;
	fzrt_fzr_ref_td			fz_rsrc_ref_func;
	fzrt_floc_ptr			floc;
		
}  triangle_plugin_stuff;

extern triangle_plugin_stuff		plugin_stuff;

#endif /* _TRIANGLE_H */
