/** * Create a new history item with given URI and title. * * @param uri where this resource is located. * @param title resource title. * * @return newly allocated history item or @c NULL on errors. You must * free this item with ewk_history_item_free(). */ Ewk_History_Item* ewk_history_item_new(const char* uri, const char* title) { WTF::String u = WTF::String::fromUTF8(uri); WTF::String t = WTF::String::fromUTF8(title); WTF::RefPtr<WebCore::HistoryItem> core = WebCore::HistoryItem::create(u, t, 0); Ewk_History_Item* item = _ewk_history_item_new(core.release().releaseRef()); return item; }
Ewk_History_Item* ewk_history_item_new(const char* uri, const char* title) { WTF::String historyUri = WTF::String::fromUTF8(uri); WTF::String historyTitle = WTF::String::fromUTF8(title); WTF::RefPtr<WebCore::HistoryItem> core = WebCore::HistoryItem::create(historyUri, historyTitle, 0); Ewk_History_Item* item = ewk_history_item_new_from_core(core.release().leakRef()); return item; }