#include "../winuser.h"
#include <stdlib.h>


// fun [S3d H3d I fun [S3d H3d Arg3D] Arg3D] I
int M3setH3dCB(mmachine m)
{
	MMpull(m);
	MMpull(m);
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}


// fun [S3d H3d I Arg3D] Arg3D
int M3execH3dCB(mmachine m)
{
	MMpull(m);
	MMpull(m);
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}


// fun [S3d H3d I] fun [S3d H3d Arg3D] Arg3D
int M3getH3dCB(mmachine m)
{
	MMpull(m);
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}

// fun [S I Arg3D] Arg3D
int concArg3D_I(mmachine m)
{
	MMpull(m);
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}



// fun [S Arg3D] I
int getArg3D_I(mmachine m)
{
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}


// fun [S F Arg3D] Arg3D
int concArg3D_F(mmachine m)
{
	MMpull(m);
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}



// fun [S Arg3D] F
int getArg3D_F(mmachine m)
{
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}



// fun [S H3d Arg3D] Arg3D
int concArg3D_H3d(mmachine m)
{
	MMpull(m);
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}



// fun [S Arg3D] H3d
int getArg3D_H3d(mmachine m)
{
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}


// fun [S HMat3d Arg3D] Arg3D
int concArg3D_HMat3d(mmachine m)
{
	MMpull(m);
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}



// fun [S Arg3D] HMat3d
int getArg3D_HMat3d(mmachine m)
{
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}

// fun [S HTx3d Arg3D] Arg3D
int concArg3D_HTx3d(mmachine m)
{
	MMpull(m);
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}



// fun [S Arg3D] HTx3d
int getArg3D_HTx3d(mmachine m)
{
	MMpull(m);
	MMset(m,0,NIL);
	return 0;
}

#define Nbcb3dPKG	14

//////////////////////////////////////////////////////////////////////////////////////////////
///		Definition des noms de fonction SCOL
//////////////////////////////////////////////////////////////////////////////////////////////
char	*cb3dName[Nbcb3dPKG] =
{
	"Arg3D",												// type Arg3D

	"M3setH3dCB",											// M3setH3dCB
	"M3execH3dCB",											// M3execH3dCB
	"M3getH3dCB",											// M3getH3dCB

	"concArg3D_I",											// concArg3D_I
	"getArg3D_I",											// getArg3D_I
	"concArg3D_F",											// concArg3D_F
	"getArg3D_F",											// getArg3D_F
	"concArg3D_H3d",										// concArg3D_H3d
	"getArg3D_H3d",											// getArg3D_H3d
	"concArg3D_HMat3d",										// concArg3D_HMat3d
	"getArg3D_HMat3d",										// getArg3D_HMat3d
	"concArg3D_HTx3d",										// concArg3D_HTx3d
	"getArg3D_HTx3d",										// getArg3D_HTx3d
};


//////////////////////////////////////////////////////////////////////////////////////////////
///		Definition des pointeurs sur fonctions
//////////////////////////////////////////////////////////////////////////////////////////////
int (*cb3dFunc[Nbcb3dPKG])(mmachine m)=
{
	NULL,													// type Arg3D

	M3setH3dCB,												// M3setH3dCB
	M3execH3dCB,											// M3execH3dCB
	M3getH3dCB,												// M3getH3dCB

	concArg3D_I,											// concArg3D_I
	getArg3D_I,												// getArg3D_I
	concArg3D_F,											// concArg3D_F
	getArg3D_F,												// getArg3D_F
	concArg3D_H3d,											// concArg3D_H3d
	getArg3D_H3d,											// getArg3D_H3d
	concArg3D_HMat3d,										// concArg3D_HMat3d
	getArg3D_HMat3d,										// getArg3D_HMat3d
	concArg3D_HTx3d,										// concArg3D_HTx3d
	getArg3D_HTx3d,											// getArg3D_HTx3d
};


//////////////////////////////////////////////////////////////////////////////////////////////
///		Definition du nombre de paramètres
//////////////////////////////////////////////////////////////////////////////////////////////
int cb3dNArg[Nbcb3dPKG]=
{
	TYPTYPE,												// type Arg3D

	4,														// M3setH3dCB
	4,														// M3execH3dCB
	3,														// M3getH3dCB

	3,														// concArg3D_I
	2,														// getArg3D_I
	3,														// concArg3D_F
	2,														// getArg3D_F
	3,														// concArg3D_H3d
	2,														// getArg3D_H3d
	3,														// concArg3D_HMat3d
	2,														// getArg3D_HMat3d
	3,														// concArg3D_HTx3d
	2,														// getArg3D_HTx3d
};



//////////////////////////////////////////////////////////////////////////////////////////////
///		Definition des grammaires fontionnelles
//////////////////////////////////////////////////////////////////////////////////////////////
char* cb3dType[Nbcb3dPKG]=
{
	NULL,													// type CBarg3D


	"fun [S3d H3d I fun [S3d H3d Arg3D] Arg3D] I",			// M3setCallback
	"fun [S3d H3d I Arg3D] Arg3D",							// M3execH3dCB
	"fun [S3d H3d I] fun [S3d H3d Arg3D] Arg3D",			// M3getH3dCB

	"fun [S I Arg3D] Arg3D",								// concArg3D_I
	"fun [S Arg3D] I",										// getArg3D_I
	"fun [S F Arg3D] Arg3D",								// concArg3D_F
	"fun [S Arg3D] F",										// getArg3D_F
	"fun [S H3d Arg3D] Arg3D",								// concArg3D_H3d
	"fun [S Arg3D] H3d",									// getArg3D_H3d
	
	"fun [S HMat3d Arg3D] Arg3D",							// concArg3D_HMat3d
	"fun [S Arg3D] HMat3d",									// getArg3D_HMat3d
	"fun [S HTx3d Arg3D] Arg3D",							// concArg3D_HTx3d
	"fun [S Arg3D] HTx3d",									// getArg3D_HTx3d
};


extern "C" int SCOLloadZooCB3D(mmachine m)
{
	return PKhardpak(m,"Callback3D",Nbcb3dPKG,cb3dName,cb3dFunc,cb3dNArg,cb3dType);
}


