#include "eproperty.h"

using namespace event;

const char* EProperty::eventType="Property";
const EField* EProperty::eventFields[]=
{
	&EField::SERIAL,
	&EField::ID,
	&EField::TIME,
	&EField::ROOT_WINDOW,
	&EField::SUB_WINDOW,
	&EField::TYPE,
	&EField::WIDGET_PATHNAME,
	&EField::SENDEVENT,
	
	&EField::PROPERTY_ATOM_NAME,

	&EField::END
};

int EProperty::preprocessEvent(EHeader& header,Tcl_Interp* interp,int objc,Tcl_Obj* CONST objv[])
{
	string propertyAtomName;

	int index=10;

	propertyAtomName=Tcl_GetString(objv[index++]);
  
	for(t_listeners::iterator it=listeners.begin();it!=listeners.end();it++)
	{
		(*it)->onProperty(header,propertyAtomName);
	}

	return TCL_OK;
}


