{-# LINE 2 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}-- -*-haskell-*-------------------------------------------------------------------------------- Module : Graphics.UI.Gtk.WebKit.WebHistoryItem-- Author : Cjacker Huang-- Copyright : (c) 2009 Cjacker Huang <jzhuang@redflag-1 .com>---- This library is free software; you can redistribute it and/or-- modify it under the terms of the GNU Lesser General Public-- License as published by the Free Software Foundation; either-- version 2.1 of the License, or (at your option) any later version.---- This library is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU-- Lesser General Public License for more details.---- |-- Maintainer : gtk2hs-users@lists.sourceforge.net-- Stability : provisional-- Portability : portable (depends on GHC)---- One item of the 'WebBackForwardList' and or global history-----------------------------------------------------------------------------moduleGraphics.UI.Gtk.WebKit.WebHistoryItem(-- * TypesWebHistoryItem,WebHistoryItemClass,-- * ConstructorswebHistoryItemNew,webHistoryItemNewWithData,-- * AttributeswebHistoryItemTitle,webHistoryItemAlternateTitle,webHistoryItemUri,webHistoryItemOriginalUri,webHistoryItemLastVisitedTime,-- * MethodswebHistoryItemGetTitle,webHistoryItemGetAlternateTitle,webHistoryItemSetAlternateTitle,webHistoryItemGetUri,webHistoryItemGetOriginalUri,webHistoryItemGetLastVisitedTime,webHistoryItemCopy,)whereimportControl.Monad(liftM)importSystem.Glib.FFIimportSystem.Glib.UTFStringimportSystem.Glib.GListimportSystem.Glib.GErrorimportSystem.Glib.AttributesimportGraphics.UI.Gtk.Gdk.EventsimportGraphics.UI.Gtk.Abstract.Object(makeNewObject)importGraphics.UI.Gtk.WebKit.Types{-# LINE 65 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}importSystem.Glib.GObject{-# LINE 66 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}{-# LINE 68 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}-------------------- Constructors-- | Create a new 'WebHistoryItem' instance.---- A history item consists out of a title and a uri,-- it can be part of the WebBackForwardList and the global history.---- The global history is used for coloring the links of visited sites.-- 'WebHistoryItem' constructed with 'webHistoryItemNew' are-- automatically added to the global history.webHistoryItemNew::IOWebHistoryItemwebHistoryItemNew=constructNewGObjectmkWebHistoryItem$webkit_web_history_item_new{-# LINE 85 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}-- | Create a new 'WebHistoryItem' instance with the given @uri@ and @title@.---- 'WebHistoryItem' constructed with 'webHistoryItemNewWithData' are-- automatically added to the global history.webHistoryItemNewWithData::String-- ^ @uri@ - the uri of the item->String-- ^ @title@ - the title of the item->IOWebHistoryItemwebHistoryItemNewWithDataurititle=withCStringuri$\uriPtr->withCStringtitle$\titlePtr->constructNewGObjectmkWebHistoryItem$webkit_web_history_item_new_with_data{-# LINE 100 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}uriPtrtitlePtr-- | Return the title of 'WebHistoryItem'.webHistoryItemGetTitle::WebHistoryItemClassself=>self->IO(MaybeString)-- ^ the title or @Nothing@ in case failed.webHistoryItemGetTitlewebhistoryitem=(\(WebHistoryItemarg1)->withForeignPtrarg1$\argPtr1->webkit_web_history_item_get_titleargPtr1){-# LINE 110 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}(toWebHistoryItemwebhistoryitem)>>=maybePeekpeekCString-- | Return the alternate title of WebHistoryItem.webHistoryItemGetAlternateTitle::WebHistoryItemClassself=>self->IO(MaybeString)-- ^ the alternate title or @Nothing@ in case failed.webHistoryItemGetAlternateTitlewebhistoryitem=(\(WebHistoryItemarg1)->withForeignPtrarg1$\argPtr1->webkit_web_history_item_get_alternate_titleargPtr1){-# LINE 119 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}(toWebHistoryItemwebhistoryitem)>>=maybePeekpeekCString-- | Set an alternate title for WebHistoryItem.webHistoryItemSetAlternateTitle::WebHistoryItemClassself=>self->(MaybeString)-- ^ @title@ - the alternate title for this history item.->IO()webHistoryItemSetAlternateTitlewebhistoryitemtitle=maybeWithwithCStringtitle$\titlePtr->(\(WebHistoryItemarg1)arg2->withForeignPtrarg1$\argPtr1->webkit_web_history_item_set_alternate_titleargPtr1arg2){-# LINE 130 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}(toWebHistoryItemwebhistoryitem)titlePtr-- | Return the URI of WebHistoryItem.webHistoryItemGetUri::WebHistoryItemClassself=>self->IO(MaybeString)-- ^ the URI or @Nothing@ in case failed.webHistoryItemGetUriwebhistoryitem=(\(WebHistoryItemarg1)->withForeignPtrarg1$\argPtr1->webkit_web_history_item_get_uriargPtr1){-# LINE 139 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}(toWebHistoryItemwebhistoryitem)>>=maybePeekpeekCString-- | Return the original URI of WebHistoryItem.webHistoryItemGetOriginalUri::WebHistoryItemClassself=>self->IO(MaybeString)-- ^ the URI or @Nothing@ in case failedwebHistoryItemGetOriginalUriwebhistoryitem=(\(WebHistoryItemarg1)->withForeignPtrarg1$\argPtr1->webkit_web_history_item_get_original_uriargPtr1){-# LINE 148 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}(toWebHistoryItemwebhistoryitem)>>=maybePeekpeekCString-- | Return the last visited time of WebHistoryItem.webHistoryItemGetLastVisitedTime::WebHistoryItemClassself=>self->IODouble-- ^ the last visited time of this history item.webHistoryItemGetLastVisitedTimewebhistoryitem=liftMrealToFrac$(\(WebHistoryItemarg1)->withForeignPtrarg1$\argPtr1->webkit_web_history_item_get_last_visited_timeargPtr1){-# LINE 158 "./Graphics/UI/Gtk/WebKit/WebHistoryItem.chs" #-}(toWebHistoryItemwebhistoryitem)-- | Makes a copy of the item for use with other WebView objects.---- * Since 1.1.18webHistoryItemCopy::WebHistoryItemClassself=>self->IOWebHistoryItemwebHistoryItemCopywebhistoryitem=makeNewGObjectmkWebHistoryItem$(\(WebHistoryItemarg1)->withForeignPtrarg1$\argPtr1->webkit_web_history_item_copyargPtr1)(toWebHistoryItemwebhistoryitem)-- | The title of the 'WebHistoryItem'---- Default value: @Nothing@webHistoryItemTitle::(WebHistoryItemClassself)=>ReadAttrself(MaybeString)webHistoryItemTitle=readAttrwebHistoryItemGetTitle-- | The alternate title of the history item.---- Default value: @Nothing@webHistoryItemAlternateTitle::(WebHistoryItemClassself)=>Attrself(MaybeString)webHistoryItemAlternateTitle=newAttrwebHistoryItemGetAlternateTitlewebHistoryItemSetAlternateTitle-- | The URI of the history item.---- Default value: @Nothing@webHistoryItemUri::(WebHistoryItemClassself)=>ReadAttrself(MaybeString)webHistoryItemUri=readAttrwebHistoryItemGetUri-- | The original URI of the history item.---- Default value: @Nothing@webHistoryItemOriginalUri::(WebHistoryItemClassself)=>ReadAttrself(MaybeString)webHistoryItemOriginalUri=readAttrwebHistoryItemGetOriginalUri-- | The time at which the history item was last visited.---- Allowed values: >= 0---- Default value: 0webHistoryItemLastVisitedTime::(WebHistoryItemClassself)=>ReadAttrselfDoublewebHistoryItemLastVisitedTime=readAttrwebHistoryItemGetLastVisitedTimeforeignimportccallsafe"webkit_web_history_item_new"webkit_web_history_item_new::(IO(PtrWebHistoryItem))foreignimportccallsafe"webkit_web_history_item_new_with_data"webkit_web_history_item_new_with_data::((PtrCChar)->((PtrCChar)->(IO(PtrWebHistoryItem))))foreignimportccallsafe"webkit_web_history_item_get_title"webkit_web_history_item_get_title::((PtrWebHistoryItem)->(IO(PtrCChar)))foreignimportccallsafe"webkit_web_history_item_get_alternate_title"webkit_web_history_item_get_alternate_title::((PtrWebHistoryItem)->(IO(PtrCChar)))foreignimportccallsafe"webkit_web_history_item_set_alternate_title"webkit_web_history_item_set_alternate_title::((PtrWebHistoryItem)->((PtrCChar)->(IO())))foreignimportccallsafe"webkit_web_history_item_get_uri"webkit_web_history_item_get_uri::((PtrWebHistoryItem)->(IO(PtrCChar)))foreignimportccallsafe"webkit_web_history_item_get_original_uri"webkit_web_history_item_get_original_uri::((PtrWebHistoryItem)->(IO(PtrCChar)))foreignimportccallsafe"webkit_web_history_item_get_last_visited_time"webkit_web_history_item_get_last_visited_time::((PtrWebHistoryItem)->(IOCDouble))foreignimportccallsafe"webkit_web_history_item_copy"webkit_web_history_item_copy::((PtrWebHistoryItem)->(IO(PtrWebHistoryItem)))