WKBackForwardListRef.cpp [plain text]
#include "config.h"
#include "WKBackForwardListRef.h"
#include "APIArray.h"
#include "WebBackForwardList.h"
#include "WKAPICast.h"
using namespace WebKit;
WKTypeID WKBackForwardListGetTypeID()
{
return toAPI(WebBackForwardList::APIType);
}
WKBackForwardListItemRef WKBackForwardListGetCurrentItem(WKBackForwardListRef listRef)
{
return toAPI(toImpl(listRef)->currentItem());
}
WKBackForwardListItemRef WKBackForwardListGetBackItem(WKBackForwardListRef listRef)
{
return toAPI(toImpl(listRef)->backItem());
}
WKBackForwardListItemRef WKBackForwardListGetForwardItem(WKBackForwardListRef listRef)
{
return toAPI(toImpl(listRef)->forwardItem());
}
WKBackForwardListItemRef WKBackForwardListGetItemAtIndex(WKBackForwardListRef listRef, int index)
{
return toAPI(toImpl(listRef)->itemAtIndex(index));
}
void WKBackForwardListClear(WKBackForwardListRef listRef)
{
toImpl(listRef)->clear();
}
unsigned WKBackForwardListGetBackListCount(WKBackForwardListRef listRef)
{
return toImpl(listRef)->backListCount();
}
unsigned WKBackForwardListGetForwardListCount(WKBackForwardListRef listRef)
{
return toImpl(listRef)->forwardListCount();
}
WKArrayRef WKBackForwardListCopyBackListWithLimit(WKBackForwardListRef listRef, unsigned limit)
{
return toAPI(&toImpl(listRef)->backListAsAPIArrayWithLimit(limit).leakRef());
}
WKArrayRef WKBackForwardListCopyForwardListWithLimit(WKBackForwardListRef listRef, unsigned limit)
{
return toAPI(&toImpl(listRef)->forwardListAsAPIArrayWithLimit(limit).leakRef());
}