module Graphics.UI.Gtk.WebKit.WebBackForwardList (
WebViewClass,
WebBackForwardList,
WebBackForwardListClass,
webBackForwardListNewWithWebView,
webBackForwardListGoForward,
webBackForwardListGoBack,
webBackForwardListContainsItem,
webBackForwardListGoToItem,
webBackForwardListGetBackItem,
webBackForwardListGetCurrentItem,
webBackForwardListGetForwardItem,
webBackForwardListGetNthItem,
webBackForwardListGetBackLength,
webBackForwardListGetForwardLength,
webBackForwardListGetLimit,
webBackForwardListSetLimit,
webBackForwardListAddItem,
webBackForwardListGetForwardListWithLimit,
webBackForwardListGetBackListWithLimit,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.GList
import System.Glib.GError
import Graphics.UI.Gtk.Gdk.Events
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.WebKit.Types
import System.Glib.GObject
webBackForwardListNewWithWebView :: (WebViewClass webview) => webview -> IO WebBackForwardList
webBackForwardListNewWithWebView webview =
wrapNewGObject mkWebBackForwardList $
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_new_with_web_view argPtr1)
(toWebView webview)
webBackForwardListGoForward ::
WebBackForwardListClass self => self
-> IO()
webBackForwardListGoForward webbackforwardlist =
(\(WebBackForwardList arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_go_forward argPtr1) (toWebBackForwardList webbackforwardlist)
webBackForwardListGoBack ::
WebBackForwardListClass self => self
-> IO()
webBackForwardListGoBack webbackforwardlist =
(\(WebBackForwardList arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_go_back argPtr1) (toWebBackForwardList webbackforwardlist)
webBackForwardListContainsItem ::
(WebBackForwardListClass self, WebHistoryItemClass item) => self
-> item
-> IO Bool
webBackForwardListContainsItem webbackforwardlist webhistoryitem =
liftM toBool $ (\(WebBackForwardList arg1) (WebHistoryItem arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_web_back_forward_list_contains_item argPtr1 argPtr2)
(toWebBackForwardList webbackforwardlist)
(toWebHistoryItem webhistoryitem)
webBackForwardListGoToItem ::
(WebBackForwardListClass self,WebHistoryItemClass item) => self
-> item
-> IO()
webBackForwardListGoToItem webbackforwardlist webhistoryitem =
(\(WebBackForwardList arg1) (WebHistoryItem arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_web_back_forward_list_go_to_item argPtr1 argPtr2)
(toWebBackForwardList webbackforwardlist)
(toWebHistoryItem webhistoryitem)
webBackForwardListGetBackItem ::
WebBackForwardListClass self => self
-> IO (Maybe WebHistoryItem)
webBackForwardListGetBackItem webbackforwardlist =
maybeNull (makeNewGObject mkWebHistoryItem) $
(\(WebBackForwardList arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_get_back_item argPtr1)
(toWebBackForwardList webbackforwardlist)
webBackForwardListGetCurrentItem ::
WebBackForwardListClass self => self
-> IO WebHistoryItem
webBackForwardListGetCurrentItem webbackforwardlist =
makeNewGObject mkWebHistoryItem $
(\(WebBackForwardList arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_get_current_item argPtr1)
(toWebBackForwardList webbackforwardlist)
webBackForwardListGetForwardItem ::
WebBackForwardListClass self => self
-> IO (Maybe WebHistoryItem)
webBackForwardListGetForwardItem webbackforwardlist =
maybeNull (makeNewGObject mkWebHistoryItem) $
(\(WebBackForwardList arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_get_forward_item argPtr1)
(toWebBackForwardList webbackforwardlist)
webBackForwardListGetNthItem ::
WebBackForwardListClass self => self
-> Int
-> IO WebHistoryItem
webBackForwardListGetNthItem webbackforwardlist index =
makeNewGObject mkWebHistoryItem $
(\(WebBackForwardList arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_get_nth_item argPtr1 arg2)
(toWebBackForwardList webbackforwardlist)
(fromIntegral index)
webBackForwardListGetBackLength ::
WebBackForwardListClass self => self
-> IO Int
webBackForwardListGetBackLength webbackforwardlist =
liftM fromIntegral $
(\(WebBackForwardList arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_get_back_length argPtr1)
(toWebBackForwardList webbackforwardlist)
webBackForwardListGetForwardLength ::
WebBackForwardListClass self => self
-> IO Int
webBackForwardListGetForwardLength webbackforwardlist =
liftM fromIntegral $
(\(WebBackForwardList arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_get_forward_length argPtr1)
(toWebBackForwardList webbackforwardlist)
webBackForwardListGetLimit ::
WebBackForwardListClass self => self
-> IO Int
webBackForwardListGetLimit webbackforwardlist =
liftM fromIntegral $
(\(WebBackForwardList arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_get_limit argPtr1)
(toWebBackForwardList webbackforwardlist)
webBackForwardListSetLimit ::
WebBackForwardListClass self => self
-> Int
-> IO()
webBackForwardListSetLimit webbackforwardlist limit =
(\(WebBackForwardList arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_set_limit argPtr1 arg2)
(toWebBackForwardList webbackforwardlist)
(fromIntegral limit)
webBackForwardListAddItem ::
(WebBackForwardListClass self,WebHistoryItemClass item) => self
-> item
-> IO ()
webBackForwardListAddItem webbackforwardlist webhistoryitem =
(\(WebBackForwardList arg1) (WebHistoryItem arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_web_back_forward_list_add_item argPtr1 argPtr2)
(toWebBackForwardList webbackforwardlist)
(toWebHistoryItem webhistoryitem)
webBackForwardListGetForwardListWithLimit ::
WebBackForwardListClass self => self
-> Int
-> IO [WebHistoryItem]
webBackForwardListGetForwardListWithLimit webbackforwardlist limit =
(\(WebBackForwardList arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_get_forward_list_with_limit argPtr1 arg2)
(toWebBackForwardList webbackforwardlist)
(fromIntegral limit)
>>= fromGList
>>= mapM (makeNewGObject mkWebHistoryItem . return)
webBackForwardListGetBackListWithLimit ::
WebBackForwardListClass self => self
-> Int
-> IO [WebHistoryItem]
webBackForwardListGetBackListWithLimit webbackforwardlist limit =
(\(WebBackForwardList arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_back_forward_list_get_back_list_with_limit argPtr1 arg2)
(toWebBackForwardList webbackforwardlist)
(fromIntegral limit)
>>= fromGList
>>= mapM (makeNewGObject mkWebHistoryItem . return)
foreign import ccall safe "webkit_web_back_forward_list_new_with_web_view"
webkit_web_back_forward_list_new_with_web_view :: ((Ptr WebView) -> (IO (Ptr WebBackForwardList)))
foreign import ccall safe "webkit_web_back_forward_list_go_forward"
webkit_web_back_forward_list_go_forward :: ((Ptr WebBackForwardList) -> (IO ()))
foreign import ccall safe "webkit_web_back_forward_list_go_back"
webkit_web_back_forward_list_go_back :: ((Ptr WebBackForwardList) -> (IO ()))
foreign import ccall safe "webkit_web_back_forward_list_contains_item"
webkit_web_back_forward_list_contains_item :: ((Ptr WebBackForwardList) -> ((Ptr WebHistoryItem) -> (IO CInt)))
foreign import ccall safe "webkit_web_back_forward_list_go_to_item"
webkit_web_back_forward_list_go_to_item :: ((Ptr WebBackForwardList) -> ((Ptr WebHistoryItem) -> (IO ())))
foreign import ccall safe "webkit_web_back_forward_list_get_back_item"
webkit_web_back_forward_list_get_back_item :: ((Ptr WebBackForwardList) -> (IO (Ptr WebHistoryItem)))
foreign import ccall safe "webkit_web_back_forward_list_get_current_item"
webkit_web_back_forward_list_get_current_item :: ((Ptr WebBackForwardList) -> (IO (Ptr WebHistoryItem)))
foreign import ccall safe "webkit_web_back_forward_list_get_forward_item"
webkit_web_back_forward_list_get_forward_item :: ((Ptr WebBackForwardList) -> (IO (Ptr WebHistoryItem)))
foreign import ccall safe "webkit_web_back_forward_list_get_nth_item"
webkit_web_back_forward_list_get_nth_item :: ((Ptr WebBackForwardList) -> (CInt -> (IO (Ptr WebHistoryItem))))
foreign import ccall safe "webkit_web_back_forward_list_get_back_length"
webkit_web_back_forward_list_get_back_length :: ((Ptr WebBackForwardList) -> (IO CInt))
foreign import ccall safe "webkit_web_back_forward_list_get_forward_length"
webkit_web_back_forward_list_get_forward_length :: ((Ptr WebBackForwardList) -> (IO CInt))
foreign import ccall safe "webkit_web_back_forward_list_get_limit"
webkit_web_back_forward_list_get_limit :: ((Ptr WebBackForwardList) -> (IO CInt))
foreign import ccall safe "webkit_web_back_forward_list_set_limit"
webkit_web_back_forward_list_set_limit :: ((Ptr WebBackForwardList) -> (CInt -> (IO ())))
foreign import ccall safe "webkit_web_back_forward_list_add_item"
webkit_web_back_forward_list_add_item :: ((Ptr WebBackForwardList) -> ((Ptr WebHistoryItem) -> (IO ())))
foreign import ccall safe "webkit_web_back_forward_list_get_forward_list_with_limit"
webkit_web_back_forward_list_get_forward_list_with_limit :: ((Ptr WebBackForwardList) -> (CInt -> (IO (Ptr ()))))
foreign import ccall safe "webkit_web_back_forward_list_get_back_list_with_limit"
webkit_web_back_forward_list_get_back_list_with_limit :: ((Ptr WebBackForwardList) -> (CInt -> (IO (Ptr ()))))