
extern "C" 
{

//------------------------------------------------------------------------------------
// irr::video::IVideoModeList wrappers
//
// WARNING: this cannot be created manually.  it can be obtained by calling
// IrrlichtDevice::getVideoModeList()
//------------------------------------------------------------------------------------

	s32 IrrVideo_IVideoModeList_getVideoModeCount(IVideoModeList* modes)
	{
		if (modes)
			return modes->getVideoModeCount();
		else
			return -1;
	}
	
	dimension2d<s32>* IrrVideo_IVideoModeList_getVideoModeResolution(IVideoModeList* modes,s32 modeNumber)
	{
		if (modes)
			return new dimension2d<s32>(modes->getVideoModeResolution(modeNumber));
		else
			return 0;
	}
	
	s32 IrrVideo_IVideoModeList_getVideoModeDepth(IVideoModeList* modes,s32 modeNumber)
	{
		if (modes)
			return modes->getVideoModeDepth(modeNumber);
		else
			return -1;
	}
	
	dimension2d<s32>* IrrVideo_IVideoModeList_getDesktopResolution(IVideoModeList* modes)
	{
		if (modes)
			return new dimension2d<s32>(modes->getDesktopResolution());
		else
			return 0;
	}
	
	s32 IrrVideo_IVideoModeList_getDesktopDepth(IVideoModeList* modes)
	{
		if (modes)
			return modes->getDesktopDepth();
		else
			return -1;
	}

	bool IrrVideo_IVideoModeList_drop(IVideoModeList* unk)
	{
		if (unk)
			return unk->drop();
		else return 0;
	}
	
	const c8* IrrVideo_IVideoModeList_getDebugName(IVideoModeList* unk)
	{
		if (unk)
			return unk->getDebugName();
		else return "";
	}
	
	void IrrVideo_IVideoModeList_grab(IVideoModeList* unk)
	{
		if (unk)
			unk->grab();
	}

	// must delete
	dimension2d<s32>* IrrVideo_IVideoModeList_getVideoModeResolutionFromConstraints(IVideoModeList* modes, const dimension2d<s32>* minSize, const dimension2d<s32>* maxSize)
	{
		if (modes)
			return new dimension2d<s32>(modes->getVideoModeResolution(dimension2du(*minSize), dimension2du(*maxSize)));
		else return 0;
	}
	
}
