extern "C" 
{

//------------------------------------------------------------------------------------
// irr::gui::IGUIElementFactory wrappers
// do not delete a pointer to this
//------------------------------------------------------------------------------------

	bool IrrGUI_IGUIElementFactory_drop(IGUIElementFactory* unk)
	{
		if (unk)
			return unk->drop();
		else return 0;
	}
	
	const c8* IrrGUI_IGUIElementFactory_getDebugName(IGUIElementFactory* unk)
	{
		if (unk)
			return unk->getDebugName();
		else return "";
	}
	
	void IrrGUI_IGUIElementFactory_grab(IGUIElementFactory* unk)
	{
		if (unk)
			unk->grab();
	}

	IGUIElement* IrrGUI_IGUIElementFactory_addGUIElementByType(IGUIElementFactory* factory,EGUI_ELEMENT_TYPE type, IGUIElement* parent=0)
	{
		if (factory)
			return factory->addGUIElement(type,parent);
		else return 0;
	}

	IGUIElement* IrrGUI_IGUIElementFactory_addGUIElementByName(IGUIElementFactory* factory,const c8* typeName, IGUIElement* parent=0)
	{
		if (factory)
			return factory->addGUIElement(typeName,parent);
		else return 0;
	}
	
	s32 IrrGUI_IGUIElementFactory_getCreatableGUIElementTypeCount(IGUIElementFactory* factory)
	{
		if (factory)
			return factory->getCreatableGUIElementTypeCount();
		else return -1;
	}
	
	s32 IrrGUI_IGUIElementFactory_getCreateableGUIElementType(IGUIElementFactory* factory,s32 idx)
	{
		if (factory)
			return factory->getCreateableGUIElementType(idx);
		else return -1;
	}
	
	const c8* IrrGUI_IGUIElementFactory_getCreateableGUIElementTypeNameByIdx(IGUIElementFactory* factory,s32 idx)
	{
		if (factory)
			return factory->getCreateableGUIElementTypeName(idx);
		else return "";
	}
	
	const c8* IrrGUI_IGUIElementFactory_getCreateableGUIElementTypeNameByType(IGUIElementFactory* factory,EGUI_ELEMENT_TYPE type)
	{
		if (factory)
			return factory->getCreateableGUIElementTypeName(type);
		else return "";
	}
}