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

// do not delete this pointer
extern "C" {

IGUIButton* IrrGUI_IGUIWindow_getCloseButton(IGUIWindow* wnd)
{
	if (wnd)
		return wnd->getCloseButton();
	else
		return 0;
}

// do not delete this pointer
IGUIButton* IrrGUI_IGUIWindow_getMinimizeButton(IGUIWindow* wnd)
{
	if (wnd)
		return wnd->getMinimizeButton();
	else
		return 0;
}

// do not delete this pointer
IGUIButton* IrrGUI_IGUIWindow_getMaximizeButton(IGUIWindow* wnd)
{
	if (wnd)
		return wnd->getMaximizeButton();
	else
		return 0;
}

bool IrrGUI_IGUIWindow_isDraggable(IGUIWindow* wnd) {
	if (wnd)
		return wnd->isDraggable();
	else return false;
}

void IrrGUI_IGUIWindow_setDraggable(IGUIWindow* wnd, bool draggable) {
	if (wnd)
		wnd->setDraggable(draggable);
}

void IrrGUI_IGUIWindow_setDrawBackground(IGUIWindow* wnd, bool draw) {
	if (wnd)
		wnd->setDrawBackground(draw);
}

bool IrrGUI_IGUIWindow_getDrawBackground(IGUIWindow* wnd) {
	if (wnd)
		return wnd->getDrawBackground();
	else return false;
}

void IrrGUI_IGUIWindow_setDrawTitlebar(IGUIWindow* wnd, bool draw) {
	if (wnd)
		wnd->setDrawTitlebar(draw);
}

bool IrrGUI_IGUIWindow_getDrawTitlebar(IGUIWindow* wnd) {
	if (wnd)
		return wnd->getDrawTitlebar();
	else return false;
}

// must delete
rect<s32>* IrrGUI_IGUIWindow_getClientRect(IGUIWindow* wnd)
{
	if (wnd)
		return new recti(wnd->getClientRect());
	else return 0;
}

} // extern "C" 

