{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.WebKit2.Objects.WebView
    ( 

-- * Exported types
    WebView(..)                             ,
    IsWebView                               ,
    toWebView                               ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [activate]("GI.Gtk.Objects.Widget#g:method:activate"), [add]("GI.Gtk.Objects.Container#g:method:add"), [addAccelerator]("GI.Gtk.Objects.Widget#g:method:addAccelerator"), [addChild]("GI.Gtk.Interfaces.Buildable#g:method:addChild"), [addDeviceEvents]("GI.Gtk.Objects.Widget#g:method:addDeviceEvents"), [addEvents]("GI.Gtk.Objects.Widget#g:method:addEvents"), [addMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:addMnemonicLabel"), [addTickCallback]("GI.Gtk.Objects.Widget#g:method:addTickCallback"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [canActivateAccel]("GI.Gtk.Objects.Widget#g:method:canActivateAccel"), [canExecuteEditingCommand]("GI.WebKit2.Objects.WebView#g:method:canExecuteEditingCommand"), [canExecuteEditingCommandFinish]("GI.WebKit2.Objects.WebView#g:method:canExecuteEditingCommandFinish"), [canGoBack]("GI.WebKit2.Objects.WebView#g:method:canGoBack"), [canGoForward]("GI.WebKit2.Objects.WebView#g:method:canGoForward"), [canShowMimeType]("GI.WebKit2.Objects.WebView#g:method:canShowMimeType"), [checkResize]("GI.Gtk.Objects.Container#g:method:checkResize"), [childFocus]("GI.Gtk.Objects.Widget#g:method:childFocus"), [childGetProperty]("GI.Gtk.Objects.Container#g:method:childGetProperty"), [childNotify]("GI.Gtk.Objects.Container#g:method:childNotify"), [childNotifyByPspec]("GI.Gtk.Objects.Container#g:method:childNotifyByPspec"), [childSetProperty]("GI.Gtk.Objects.Container#g:method:childSetProperty"), [childType]("GI.Gtk.Objects.Container#g:method:childType"), [classPath]("GI.Gtk.Objects.Widget#g:method:classPath"), [computeExpand]("GI.Gtk.Objects.Widget#g:method:computeExpand"), [constructChild]("GI.Gtk.Interfaces.Buildable#g:method:constructChild"), [createPangoContext]("GI.Gtk.Objects.Widget#g:method:createPangoContext"), [createPangoLayout]("GI.Gtk.Objects.Widget#g:method:createPangoLayout"), [customFinished]("GI.Gtk.Interfaces.Buildable#g:method:customFinished"), [customTagEnd]("GI.Gtk.Interfaces.Buildable#g:method:customTagEnd"), [customTagStart]("GI.Gtk.Interfaces.Buildable#g:method:customTagStart"), [destroy]("GI.Gtk.Objects.Widget#g:method:destroy"), [destroyed]("GI.Gtk.Objects.Widget#g:method:destroyed"), [deviceIsShadowed]("GI.Gtk.Objects.Widget#g:method:deviceIsShadowed"), [downloadUri]("GI.WebKit2.Objects.WebView#g:method:downloadUri"), [dragBegin]("GI.Gtk.Objects.Widget#g:method:dragBegin"), [dragBeginWithCoordinates]("GI.Gtk.Objects.Widget#g:method:dragBeginWithCoordinates"), [dragCheckThreshold]("GI.Gtk.Objects.Widget#g:method:dragCheckThreshold"), [dragDestAddImageTargets]("GI.Gtk.Objects.Widget#g:method:dragDestAddImageTargets"), [dragDestAddTextTargets]("GI.Gtk.Objects.Widget#g:method:dragDestAddTextTargets"), [dragDestAddUriTargets]("GI.Gtk.Objects.Widget#g:method:dragDestAddUriTargets"), [dragDestFindTarget]("GI.Gtk.Objects.Widget#g:method:dragDestFindTarget"), [dragDestGetTargetList]("GI.Gtk.Objects.Widget#g:method:dragDestGetTargetList"), [dragDestGetTrackMotion]("GI.Gtk.Objects.Widget#g:method:dragDestGetTrackMotion"), [dragDestSet]("GI.Gtk.Objects.Widget#g:method:dragDestSet"), [dragDestSetProxy]("GI.Gtk.Objects.Widget#g:method:dragDestSetProxy"), [dragDestSetTargetList]("GI.Gtk.Objects.Widget#g:method:dragDestSetTargetList"), [dragDestSetTrackMotion]("GI.Gtk.Objects.Widget#g:method:dragDestSetTrackMotion"), [dragDestUnset]("GI.Gtk.Objects.Widget#g:method:dragDestUnset"), [dragGetData]("GI.Gtk.Objects.Widget#g:method:dragGetData"), [dragHighlight]("GI.Gtk.Objects.Widget#g:method:dragHighlight"), [dragSourceAddImageTargets]("GI.Gtk.Objects.Widget#g:method:dragSourceAddImageTargets"), [dragSourceAddTextTargets]("GI.Gtk.Objects.Widget#g:method:dragSourceAddTextTargets"), [dragSourceAddUriTargets]("GI.Gtk.Objects.Widget#g:method:dragSourceAddUriTargets"), [dragSourceGetTargetList]("GI.Gtk.Objects.Widget#g:method:dragSourceGetTargetList"), [dragSourceSet]("GI.Gtk.Objects.Widget#g:method:dragSourceSet"), [dragSourceSetIconGicon]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconGicon"), [dragSourceSetIconName]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconName"), [dragSourceSetIconPixbuf]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconPixbuf"), [dragSourceSetIconStock]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconStock"), [dragSourceSetTargetList]("GI.Gtk.Objects.Widget#g:method:dragSourceSetTargetList"), [dragSourceUnset]("GI.Gtk.Objects.Widget#g:method:dragSourceUnset"), [dragUnhighlight]("GI.Gtk.Objects.Widget#g:method:dragUnhighlight"), [draw]("GI.Gtk.Objects.Widget#g:method:draw"), [ensureStyle]("GI.Gtk.Objects.Widget#g:method:ensureStyle"), [errorBell]("GI.Gtk.Objects.Widget#g:method:errorBell"), [event]("GI.Gtk.Objects.Widget#g:method:event"), [executeEditingCommand]("GI.WebKit2.Objects.WebView#g:method:executeEditingCommand"), [executeEditingCommandWithArgument]("GI.WebKit2.Objects.WebView#g:method:executeEditingCommandWithArgument"), [forall]("GI.Gtk.Objects.Container#g:method:forall"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [foreach]("GI.Gtk.Objects.Container#g:method:foreach"), [freezeChildNotify]("GI.Gtk.Objects.Widget#g:method:freezeChildNotify"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [goBack]("GI.WebKit2.Objects.WebView#g:method:goBack"), [goForward]("GI.WebKit2.Objects.WebView#g:method:goForward"), [goToBackForwardListItem]("GI.WebKit2.Objects.WebView#g:method:goToBackForwardListItem"), [grabAdd]("GI.Gtk.Objects.Widget#g:method:grabAdd"), [grabDefault]("GI.Gtk.Objects.Widget#g:method:grabDefault"), [grabFocus]("GI.Gtk.Objects.Widget#g:method:grabFocus"), [grabRemove]("GI.Gtk.Objects.Widget#g:method:grabRemove"), [hasDefault]("GI.Gtk.Objects.Widget#g:method:hasDefault"), [hasFocus]("GI.Gtk.Objects.Widget#g:method:hasFocus"), [hasGrab]("GI.Gtk.Objects.Widget#g:method:hasGrab"), [hasRcStyle]("GI.Gtk.Objects.Widget#g:method:hasRcStyle"), [hasScreen]("GI.Gtk.Objects.Widget#g:method:hasScreen"), [hasVisibleFocus]("GI.Gtk.Objects.Widget#g:method:hasVisibleFocus"), [hide]("GI.Gtk.Objects.Widget#g:method:hide"), [hideOnDelete]("GI.Gtk.Objects.Widget#g:method:hideOnDelete"), [inDestruction]("GI.Gtk.Objects.Widget#g:method:inDestruction"), [initTemplate]("GI.Gtk.Objects.Widget#g:method:initTemplate"), [inputShapeCombineRegion]("GI.Gtk.Objects.Widget#g:method:inputShapeCombineRegion"), [insertActionGroup]("GI.Gtk.Objects.Widget#g:method:insertActionGroup"), [intersect]("GI.Gtk.Objects.Widget#g:method:intersect"), [isAncestor]("GI.Gtk.Objects.Widget#g:method:isAncestor"), [isComposited]("GI.Gtk.Objects.Widget#g:method:isComposited"), [isControlledByAutomation]("GI.WebKit2.Objects.WebView#g:method:isControlledByAutomation"), [isDrawable]("GI.Gtk.Objects.Widget#g:method:isDrawable"), [isEditable]("GI.WebKit2.Objects.WebView#g:method:isEditable"), [isEphemeral]("GI.WebKit2.Objects.WebView#g:method:isEphemeral"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isFocus]("GI.Gtk.Objects.Widget#g:method:isFocus"), [isLoading]("GI.WebKit2.Objects.WebView#g:method:isLoading"), [isPlayingAudio]("GI.WebKit2.Objects.WebView#g:method:isPlayingAudio"), [isSensitive]("GI.Gtk.Objects.Widget#g:method:isSensitive"), [isToplevel]("GI.Gtk.Objects.Widget#g:method:isToplevel"), [isVisible]("GI.Gtk.Objects.Widget#g:method:isVisible"), [keynavFailed]("GI.Gtk.Objects.Widget#g:method:keynavFailed"), [listAccelClosures]("GI.Gtk.Objects.Widget#g:method:listAccelClosures"), [listActionPrefixes]("GI.Gtk.Objects.Widget#g:method:listActionPrefixes"), [listMnemonicLabels]("GI.Gtk.Objects.Widget#g:method:listMnemonicLabels"), [loadAlternateHtml]("GI.WebKit2.Objects.WebView#g:method:loadAlternateHtml"), [loadBytes]("GI.WebKit2.Objects.WebView#g:method:loadBytes"), [loadHtml]("GI.WebKit2.Objects.WebView#g:method:loadHtml"), [loadPlainText]("GI.WebKit2.Objects.WebView#g:method:loadPlainText"), [loadRequest]("GI.WebKit2.Objects.WebView#g:method:loadRequest"), [loadUri]("GI.WebKit2.Objects.WebView#g:method:loadUri"), [map]("GI.Gtk.Objects.Widget#g:method:map"), [mnemonicActivate]("GI.Gtk.Objects.Widget#g:method:mnemonicActivate"), [modifyBase]("GI.Gtk.Objects.Widget#g:method:modifyBase"), [modifyBg]("GI.Gtk.Objects.Widget#g:method:modifyBg"), [modifyCursor]("GI.Gtk.Objects.Widget#g:method:modifyCursor"), [modifyFg]("GI.Gtk.Objects.Widget#g:method:modifyFg"), [modifyFont]("GI.Gtk.Objects.Widget#g:method:modifyFont"), [modifyStyle]("GI.Gtk.Objects.Widget#g:method:modifyStyle"), [modifyText]("GI.Gtk.Objects.Widget#g:method:modifyText"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [overrideBackgroundColor]("GI.Gtk.Objects.Widget#g:method:overrideBackgroundColor"), [overrideColor]("GI.Gtk.Objects.Widget#g:method:overrideColor"), [overrideCursor]("GI.Gtk.Objects.Widget#g:method:overrideCursor"), [overrideFont]("GI.Gtk.Objects.Widget#g:method:overrideFont"), [overrideSymbolicColor]("GI.Gtk.Objects.Widget#g:method:overrideSymbolicColor"), [parserFinished]("GI.Gtk.Interfaces.Buildable#g:method:parserFinished"), [path]("GI.Gtk.Objects.Widget#g:method:path"), [propagateDraw]("GI.Gtk.Objects.Container#g:method:propagateDraw"), [queueAllocate]("GI.Gtk.Objects.Widget#g:method:queueAllocate"), [queueComputeExpand]("GI.Gtk.Objects.Widget#g:method:queueComputeExpand"), [queueDraw]("GI.Gtk.Objects.Widget#g:method:queueDraw"), [queueDrawArea]("GI.Gtk.Objects.Widget#g:method:queueDrawArea"), [queueDrawRegion]("GI.Gtk.Objects.Widget#g:method:queueDrawRegion"), [queueResize]("GI.Gtk.Objects.Widget#g:method:queueResize"), [queueResizeNoRedraw]("GI.Gtk.Objects.Widget#g:method:queueResizeNoRedraw"), [realize]("GI.Gtk.Objects.Widget#g:method:realize"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [regionIntersect]("GI.Gtk.Objects.Widget#g:method:regionIntersect"), [registerWindow]("GI.Gtk.Objects.Widget#g:method:registerWindow"), [reload]("GI.WebKit2.Objects.WebView#g:method:reload"), [reloadBypassCache]("GI.WebKit2.Objects.WebView#g:method:reloadBypassCache"), [remove]("GI.Gtk.Objects.Container#g:method:remove"), [removeAccelerator]("GI.Gtk.Objects.Widget#g:method:removeAccelerator"), [removeMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:removeMnemonicLabel"), [removeTickCallback]("GI.Gtk.Objects.Widget#g:method:removeTickCallback"), [renderIcon]("GI.Gtk.Objects.Widget#g:method:renderIcon"), [renderIconPixbuf]("GI.Gtk.Objects.Widget#g:method:renderIconPixbuf"), [reparent]("GI.Gtk.Objects.Widget#g:method:reparent"), [resetRcStyles]("GI.Gtk.Objects.Widget#g:method:resetRcStyles"), [resetStyle]("GI.Gtk.Objects.Widget#g:method:resetStyle"), [resizeChildren]("GI.Gtk.Objects.Container#g:method:resizeChildren"), [restoreSessionState]("GI.WebKit2.Objects.WebView#g:method:restoreSessionState"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [runJavascript]("GI.WebKit2.Objects.WebView#g:method:runJavascript"), [runJavascriptFinish]("GI.WebKit2.Objects.WebView#g:method:runJavascriptFinish"), [runJavascriptFromGresource]("GI.WebKit2.Objects.WebView#g:method:runJavascriptFromGresource"), [runJavascriptFromGresourceFinish]("GI.WebKit2.Objects.WebView#g:method:runJavascriptFromGresourceFinish"), [runJavascriptInWorld]("GI.WebKit2.Objects.WebView#g:method:runJavascriptInWorld"), [runJavascriptInWorldFinish]("GI.WebKit2.Objects.WebView#g:method:runJavascriptInWorldFinish"), [save]("GI.WebKit2.Objects.WebView#g:method:save"), [saveFinish]("GI.WebKit2.Objects.WebView#g:method:saveFinish"), [saveToFile]("GI.WebKit2.Objects.WebView#g:method:saveToFile"), [saveToFileFinish]("GI.WebKit2.Objects.WebView#g:method:saveToFileFinish"), [sendExpose]("GI.Gtk.Objects.Widget#g:method:sendExpose"), [sendFocusChange]("GI.Gtk.Objects.Widget#g:method:sendFocusChange"), [sendMessageToPage]("GI.WebKit2.Objects.WebView#g:method:sendMessageToPage"), [sendMessageToPageFinish]("GI.WebKit2.Objects.WebView#g:method:sendMessageToPageFinish"), [shapeCombineRegion]("GI.Gtk.Objects.Widget#g:method:shapeCombineRegion"), [show]("GI.Gtk.Objects.Widget#g:method:show"), [showAll]("GI.Gtk.Objects.Widget#g:method:showAll"), [showNow]("GI.Gtk.Objects.Widget#g:method:showNow"), [sizeAllocate]("GI.Gtk.Objects.Widget#g:method:sizeAllocate"), [sizeAllocateWithBaseline]("GI.Gtk.Objects.Widget#g:method:sizeAllocateWithBaseline"), [sizeRequest]("GI.Gtk.Objects.Widget#g:method:sizeRequest"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [stopLoading]("GI.WebKit2.Objects.WebView#g:method:stopLoading"), [styleAttach]("GI.Gtk.Objects.Widget#g:method:styleAttach"), [styleGetProperty]("GI.Gtk.Objects.Widget#g:method:styleGetProperty"), [thawChildNotify]("GI.Gtk.Objects.Widget#g:method:thawChildNotify"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [translateCoordinates]("GI.Gtk.Objects.Widget#g:method:translateCoordinates"), [triggerTooltipQuery]("GI.Gtk.Objects.Widget#g:method:triggerTooltipQuery"), [tryClose]("GI.WebKit2.Objects.WebView#g:method:tryClose"), [unmap]("GI.Gtk.Objects.Widget#g:method:unmap"), [unparent]("GI.Gtk.Objects.Widget#g:method:unparent"), [unrealize]("GI.Gtk.Objects.Widget#g:method:unrealize"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [unregisterWindow]("GI.Gtk.Objects.Widget#g:method:unregisterWindow"), [unsetFocusChain]("GI.Gtk.Objects.Container#g:method:unsetFocusChain"), [unsetStateFlags]("GI.Gtk.Objects.Widget#g:method:unsetStateFlags"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAccessible]("GI.Gtk.Objects.Widget#g:method:getAccessible"), [getActionGroup]("GI.Gtk.Objects.Widget#g:method:getActionGroup"), [getAllocatedBaseline]("GI.Gtk.Objects.Widget#g:method:getAllocatedBaseline"), [getAllocatedHeight]("GI.Gtk.Objects.Widget#g:method:getAllocatedHeight"), [getAllocatedSize]("GI.Gtk.Objects.Widget#g:method:getAllocatedSize"), [getAllocatedWidth]("GI.Gtk.Objects.Widget#g:method:getAllocatedWidth"), [getAllocation]("GI.Gtk.Objects.Widget#g:method:getAllocation"), [getAncestor]("GI.Gtk.Objects.Widget#g:method:getAncestor"), [getAppPaintable]("GI.Gtk.Objects.Widget#g:method:getAppPaintable"), [getAutomationPresentationType]("GI.WebKit2.Objects.WebView#g:method:getAutomationPresentationType"), [getBackForwardList]("GI.WebKit2.Objects.WebView#g:method:getBackForwardList"), [getBackgroundColor]("GI.WebKit2.Objects.WebView#g:method:getBackgroundColor"), [getBorderWidth]("GI.Gtk.Objects.Container#g:method:getBorderWidth"), [getCanDefault]("GI.Gtk.Objects.Widget#g:method:getCanDefault"), [getCanFocus]("GI.Gtk.Objects.Widget#g:method:getCanFocus"), [getChildRequisition]("GI.Gtk.Objects.Widget#g:method:getChildRequisition"), [getChildVisible]("GI.Gtk.Objects.Widget#g:method:getChildVisible"), [getChildren]("GI.Gtk.Objects.Container#g:method:getChildren"), [getClip]("GI.Gtk.Objects.Widget#g:method:getClip"), [getClipboard]("GI.Gtk.Objects.Widget#g:method:getClipboard"), [getCompositeName]("GI.Gtk.Objects.Widget#g:method:getCompositeName"), [getContext]("GI.WebKit2.Objects.WebView#g:method:getContext"), [getCustomCharset]("GI.WebKit2.Objects.WebView#g:method:getCustomCharset"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDeviceEnabled]("GI.Gtk.Objects.Widget#g:method:getDeviceEnabled"), [getDeviceEvents]("GI.Gtk.Objects.Widget#g:method:getDeviceEvents"), [getDirection]("GI.Gtk.Objects.Widget#g:method:getDirection"), [getDisplay]("GI.Gtk.Objects.Widget#g:method:getDisplay"), [getDoubleBuffered]("GI.Gtk.Objects.Widget#g:method:getDoubleBuffered"), [getEditorState]("GI.WebKit2.Objects.WebView#g:method:getEditorState"), [getEstimatedLoadProgress]("GI.WebKit2.Objects.WebView#g:method:getEstimatedLoadProgress"), [getEvents]("GI.Gtk.Objects.Widget#g:method:getEvents"), [getFavicon]("GI.WebKit2.Objects.WebView#g:method:getFavicon"), [getFindController]("GI.WebKit2.Objects.WebView#g:method:getFindController"), [getFocusChain]("GI.Gtk.Objects.Container#g:method:getFocusChain"), [getFocusChild]("GI.Gtk.Objects.Container#g:method:getFocusChild"), [getFocusHadjustment]("GI.Gtk.Objects.Container#g:method:getFocusHadjustment"), [getFocusOnClick]("GI.Gtk.Objects.Widget#g:method:getFocusOnClick"), [getFocusVadjustment]("GI.Gtk.Objects.Container#g:method:getFocusVadjustment"), [getFontMap]("GI.Gtk.Objects.Widget#g:method:getFontMap"), [getFontOptions]("GI.Gtk.Objects.Widget#g:method:getFontOptions"), [getFrameClock]("GI.Gtk.Objects.Widget#g:method:getFrameClock"), [getHalign]("GI.Gtk.Objects.Widget#g:method:getHalign"), [getHasTooltip]("GI.Gtk.Objects.Widget#g:method:getHasTooltip"), [getHasWindow]("GI.Gtk.Objects.Widget#g:method:getHasWindow"), [getHexpand]("GI.Gtk.Objects.Widget#g:method:getHexpand"), [getHexpandSet]("GI.Gtk.Objects.Widget#g:method:getHexpandSet"), [getInputMethodContext]("GI.WebKit2.Objects.WebView#g:method:getInputMethodContext"), [getInspector]("GI.WebKit2.Objects.WebView#g:method:getInspector"), [getInternalChild]("GI.Gtk.Interfaces.Buildable#g:method:getInternalChild"), [getIsMuted]("GI.WebKit2.Objects.WebView#g:method:getIsMuted"), [getMainResource]("GI.WebKit2.Objects.WebView#g:method:getMainResource"), [getMapped]("GI.Gtk.Objects.Widget#g:method:getMapped"), [getMarginBottom]("GI.Gtk.Objects.Widget#g:method:getMarginBottom"), [getMarginEnd]("GI.Gtk.Objects.Widget#g:method:getMarginEnd"), [getMarginLeft]("GI.Gtk.Objects.Widget#g:method:getMarginLeft"), [getMarginRight]("GI.Gtk.Objects.Widget#g:method:getMarginRight"), [getMarginStart]("GI.Gtk.Objects.Widget#g:method:getMarginStart"), [getMarginTop]("GI.Gtk.Objects.Widget#g:method:getMarginTop"), [getModifierMask]("GI.Gtk.Objects.Widget#g:method:getModifierMask"), [getModifierStyle]("GI.Gtk.Objects.Widget#g:method:getModifierStyle"), [getName]("GI.Gtk.Objects.Widget#g:method:getName"), [getNoShowAll]("GI.Gtk.Objects.Widget#g:method:getNoShowAll"), [getOpacity]("GI.Gtk.Objects.Widget#g:method:getOpacity"), [getPageId]("GI.WebKit2.Objects.WebView#g:method:getPageId"), [getPangoContext]("GI.Gtk.Objects.Widget#g:method:getPangoContext"), [getParent]("GI.Gtk.Objects.Widget#g:method:getParent"), [getParentWindow]("GI.Gtk.Objects.Widget#g:method:getParentWindow"), [getPath]("GI.Gtk.Objects.Widget#g:method:getPath"), [getPathForChild]("GI.Gtk.Objects.Container#g:method:getPathForChild"), [getPointer]("GI.Gtk.Objects.Widget#g:method:getPointer"), [getPreferredHeight]("GI.Gtk.Objects.Widget#g:method:getPreferredHeight"), [getPreferredHeightAndBaselineForWidth]("GI.Gtk.Objects.Widget#g:method:getPreferredHeightAndBaselineForWidth"), [getPreferredHeightForWidth]("GI.Gtk.Objects.Widget#g:method:getPreferredHeightForWidth"), [getPreferredSize]("GI.Gtk.Objects.Widget#g:method:getPreferredSize"), [getPreferredWidth]("GI.Gtk.Objects.Widget#g:method:getPreferredWidth"), [getPreferredWidthForHeight]("GI.Gtk.Objects.Widget#g:method:getPreferredWidthForHeight"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRealized]("GI.Gtk.Objects.Widget#g:method:getRealized"), [getReceivesDefault]("GI.Gtk.Objects.Widget#g:method:getReceivesDefault"), [getRequestMode]("GI.Gtk.Objects.Widget#g:method:getRequestMode"), [getRequisition]("GI.Gtk.Objects.Widget#g:method:getRequisition"), [getResizeMode]("GI.Gtk.Objects.Container#g:method:getResizeMode"), [getRootWindow]("GI.Gtk.Objects.Widget#g:method:getRootWindow"), [getScaleFactor]("GI.Gtk.Objects.Widget#g:method:getScaleFactor"), [getScreen]("GI.Gtk.Objects.Widget#g:method:getScreen"), [getSensitive]("GI.Gtk.Objects.Widget#g:method:getSensitive"), [getSessionState]("GI.WebKit2.Objects.WebView#g:method:getSessionState"), [getSettings]("GI.WebKit2.Objects.WebView#g:method:getSettings"), [getSizeRequest]("GI.Gtk.Objects.Widget#g:method:getSizeRequest"), [getSnapshot]("GI.WebKit2.Objects.WebView#g:method:getSnapshot"), [getSnapshotFinish]("GI.WebKit2.Objects.WebView#g:method:getSnapshotFinish"), [getState]("GI.Gtk.Objects.Widget#g:method:getState"), [getStateFlags]("GI.Gtk.Objects.Widget#g:method:getStateFlags"), [getStyle]("GI.Gtk.Objects.Widget#g:method:getStyle"), [getStyleContext]("GI.Gtk.Objects.Widget#g:method:getStyleContext"), [getSupportMultidevice]("GI.Gtk.Objects.Widget#g:method:getSupportMultidevice"), [getTemplateChild]("GI.Gtk.Objects.Widget#g:method:getTemplateChild"), [getTitle]("GI.WebKit2.Objects.WebView#g:method:getTitle"), [getTlsInfo]("GI.WebKit2.Objects.WebView#g:method:getTlsInfo"), [getTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:getTooltipMarkup"), [getTooltipText]("GI.Gtk.Objects.Widget#g:method:getTooltipText"), [getTooltipWindow]("GI.Gtk.Objects.Widget#g:method:getTooltipWindow"), [getToplevel]("GI.Gtk.Objects.Widget#g:method:getToplevel"), [getUri]("GI.WebKit2.Objects.WebView#g:method:getUri"), [getUserContentManager]("GI.WebKit2.Objects.WebView#g:method:getUserContentManager"), [getValign]("GI.Gtk.Objects.Widget#g:method:getValign"), [getValignWithBaseline]("GI.Gtk.Objects.Widget#g:method:getValignWithBaseline"), [getVexpand]("GI.Gtk.Objects.Widget#g:method:getVexpand"), [getVexpandSet]("GI.Gtk.Objects.Widget#g:method:getVexpandSet"), [getVisible]("GI.Gtk.Objects.Widget#g:method:getVisible"), [getVisual]("GI.Gtk.Objects.Widget#g:method:getVisual"), [getWebsiteDataManager]("GI.WebKit2.Objects.WebView#g:method:getWebsiteDataManager"), [getWebsitePolicies]("GI.WebKit2.Objects.WebView#g:method:getWebsitePolicies"), [getWindow]("GI.Gtk.Objects.Widget#g:method:getWindow"), [getWindowProperties]("GI.WebKit2.Objects.WebView#g:method:getWindowProperties"), [getZoomLevel]("GI.WebKit2.Objects.WebView#g:method:getZoomLevel").
-- 
-- ==== Setters
-- [setAccelPath]("GI.Gtk.Objects.Widget#g:method:setAccelPath"), [setAllocation]("GI.Gtk.Objects.Widget#g:method:setAllocation"), [setAppPaintable]("GI.Gtk.Objects.Widget#g:method:setAppPaintable"), [setBackgroundColor]("GI.WebKit2.Objects.WebView#g:method:setBackgroundColor"), [setBorderWidth]("GI.Gtk.Objects.Container#g:method:setBorderWidth"), [setBuildableProperty]("GI.Gtk.Interfaces.Buildable#g:method:setBuildableProperty"), [setCanDefault]("GI.Gtk.Objects.Widget#g:method:setCanDefault"), [setCanFocus]("GI.Gtk.Objects.Widget#g:method:setCanFocus"), [setChildVisible]("GI.Gtk.Objects.Widget#g:method:setChildVisible"), [setClip]("GI.Gtk.Objects.Widget#g:method:setClip"), [setCompositeName]("GI.Gtk.Objects.Widget#g:method:setCompositeName"), [setCustomCharset]("GI.WebKit2.Objects.WebView#g:method:setCustomCharset"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDeviceEnabled]("GI.Gtk.Objects.Widget#g:method:setDeviceEnabled"), [setDeviceEvents]("GI.Gtk.Objects.Widget#g:method:setDeviceEvents"), [setDirection]("GI.Gtk.Objects.Widget#g:method:setDirection"), [setDoubleBuffered]("GI.Gtk.Objects.Widget#g:method:setDoubleBuffered"), [setEditable]("GI.WebKit2.Objects.WebView#g:method:setEditable"), [setEvents]("GI.Gtk.Objects.Widget#g:method:setEvents"), [setFocusChain]("GI.Gtk.Objects.Container#g:method:setFocusChain"), [setFocusChild]("GI.Gtk.Objects.Container#g:method:setFocusChild"), [setFocusHadjustment]("GI.Gtk.Objects.Container#g:method:setFocusHadjustment"), [setFocusOnClick]("GI.Gtk.Objects.Widget#g:method:setFocusOnClick"), [setFocusVadjustment]("GI.Gtk.Objects.Container#g:method:setFocusVadjustment"), [setFontMap]("GI.Gtk.Objects.Widget#g:method:setFontMap"), [setFontOptions]("GI.Gtk.Objects.Widget#g:method:setFontOptions"), [setHalign]("GI.Gtk.Objects.Widget#g:method:setHalign"), [setHasTooltip]("GI.Gtk.Objects.Widget#g:method:setHasTooltip"), [setHasWindow]("GI.Gtk.Objects.Widget#g:method:setHasWindow"), [setHexpand]("GI.Gtk.Objects.Widget#g:method:setHexpand"), [setHexpandSet]("GI.Gtk.Objects.Widget#g:method:setHexpandSet"), [setInputMethodContext]("GI.WebKit2.Objects.WebView#g:method:setInputMethodContext"), [setIsMuted]("GI.WebKit2.Objects.WebView#g:method:setIsMuted"), [setMapped]("GI.Gtk.Objects.Widget#g:method:setMapped"), [setMarginBottom]("GI.Gtk.Objects.Widget#g:method:setMarginBottom"), [setMarginEnd]("GI.Gtk.Objects.Widget#g:method:setMarginEnd"), [setMarginLeft]("GI.Gtk.Objects.Widget#g:method:setMarginLeft"), [setMarginRight]("GI.Gtk.Objects.Widget#g:method:setMarginRight"), [setMarginStart]("GI.Gtk.Objects.Widget#g:method:setMarginStart"), [setMarginTop]("GI.Gtk.Objects.Widget#g:method:setMarginTop"), [setName]("GI.Gtk.Objects.Widget#g:method:setName"), [setNoShowAll]("GI.Gtk.Objects.Widget#g:method:setNoShowAll"), [setOpacity]("GI.Gtk.Objects.Widget#g:method:setOpacity"), [setParent]("GI.Gtk.Objects.Widget#g:method:setParent"), [setParentWindow]("GI.Gtk.Objects.Widget#g:method:setParentWindow"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setRealized]("GI.Gtk.Objects.Widget#g:method:setRealized"), [setReallocateRedraws]("GI.Gtk.Objects.Container#g:method:setReallocateRedraws"), [setReceivesDefault]("GI.Gtk.Objects.Widget#g:method:setReceivesDefault"), [setRedrawOnAllocate]("GI.Gtk.Objects.Widget#g:method:setRedrawOnAllocate"), [setResizeMode]("GI.Gtk.Objects.Container#g:method:setResizeMode"), [setSensitive]("GI.Gtk.Objects.Widget#g:method:setSensitive"), [setSettings]("GI.WebKit2.Objects.WebView#g:method:setSettings"), [setSizeRequest]("GI.Gtk.Objects.Widget#g:method:setSizeRequest"), [setState]("GI.Gtk.Objects.Widget#g:method:setState"), [setStateFlags]("GI.Gtk.Objects.Widget#g:method:setStateFlags"), [setStyle]("GI.Gtk.Objects.Widget#g:method:setStyle"), [setSupportMultidevice]("GI.Gtk.Objects.Widget#g:method:setSupportMultidevice"), [setTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:setTooltipMarkup"), [setTooltipText]("GI.Gtk.Objects.Widget#g:method:setTooltipText"), [setTooltipWindow]("GI.Gtk.Objects.Widget#g:method:setTooltipWindow"), [setValign]("GI.Gtk.Objects.Widget#g:method:setValign"), [setVexpand]("GI.Gtk.Objects.Widget#g:method:setVexpand"), [setVexpandSet]("GI.Gtk.Objects.Widget#g:method:setVexpandSet"), [setVisible]("GI.Gtk.Objects.Widget#g:method:setVisible"), [setVisual]("GI.Gtk.Objects.Widget#g:method:setVisual"), [setWindow]("GI.Gtk.Objects.Widget#g:method:setWindow"), [setZoomLevel]("GI.WebKit2.Objects.WebView#g:method:setZoomLevel").

#if defined(ENABLE_OVERLOADING)
    ResolveWebViewMethod                    ,
#endif

-- ** canExecuteEditingCommand #method:canExecuteEditingCommand#

#if defined(ENABLE_OVERLOADING)
    WebViewCanExecuteEditingCommandMethodInfo,
#endif
    webViewCanExecuteEditingCommand         ,


-- ** canExecuteEditingCommandFinish #method:canExecuteEditingCommandFinish#

#if defined(ENABLE_OVERLOADING)
    WebViewCanExecuteEditingCommandFinishMethodInfo,
#endif
    webViewCanExecuteEditingCommandFinish   ,


-- ** canGoBack #method:canGoBack#

#if defined(ENABLE_OVERLOADING)
    WebViewCanGoBackMethodInfo              ,
#endif
    webViewCanGoBack                        ,


-- ** canGoForward #method:canGoForward#

#if defined(ENABLE_OVERLOADING)
    WebViewCanGoForwardMethodInfo           ,
#endif
    webViewCanGoForward                     ,


-- ** canShowMimeType #method:canShowMimeType#

#if defined(ENABLE_OVERLOADING)
    WebViewCanShowMimeTypeMethodInfo        ,
#endif
    webViewCanShowMimeType                  ,


-- ** downloadUri #method:downloadUri#

#if defined(ENABLE_OVERLOADING)
    WebViewDownloadUriMethodInfo            ,
#endif
    webViewDownloadUri                      ,


-- ** executeEditingCommand #method:executeEditingCommand#

#if defined(ENABLE_OVERLOADING)
    WebViewExecuteEditingCommandMethodInfo  ,
#endif
    webViewExecuteEditingCommand            ,


-- ** executeEditingCommandWithArgument #method:executeEditingCommandWithArgument#

#if defined(ENABLE_OVERLOADING)
    WebViewExecuteEditingCommandWithArgumentMethodInfo,
#endif
    webViewExecuteEditingCommandWithArgument,


-- ** getAutomationPresentationType #method:getAutomationPresentationType#

#if defined(ENABLE_OVERLOADING)
    WebViewGetAutomationPresentationTypeMethodInfo,
#endif
    webViewGetAutomationPresentationType    ,


-- ** getBackForwardList #method:getBackForwardList#

#if defined(ENABLE_OVERLOADING)
    WebViewGetBackForwardListMethodInfo     ,
#endif
    webViewGetBackForwardList               ,


-- ** getBackgroundColor #method:getBackgroundColor#

#if defined(ENABLE_OVERLOADING)
    WebViewGetBackgroundColorMethodInfo     ,
#endif
    webViewGetBackgroundColor               ,


-- ** getContext #method:getContext#

#if defined(ENABLE_OVERLOADING)
    WebViewGetContextMethodInfo             ,
#endif
    webViewGetContext                       ,


-- ** getCustomCharset #method:getCustomCharset#

#if defined(ENABLE_OVERLOADING)
    WebViewGetCustomCharsetMethodInfo       ,
#endif
    webViewGetCustomCharset                 ,


-- ** getEditorState #method:getEditorState#

#if defined(ENABLE_OVERLOADING)
    WebViewGetEditorStateMethodInfo         ,
#endif
    webViewGetEditorState                   ,


-- ** getEstimatedLoadProgress #method:getEstimatedLoadProgress#

#if defined(ENABLE_OVERLOADING)
    WebViewGetEstimatedLoadProgressMethodInfo,
#endif
    webViewGetEstimatedLoadProgress         ,


-- ** getFavicon #method:getFavicon#

#if defined(ENABLE_OVERLOADING)
    WebViewGetFaviconMethodInfo             ,
#endif
    webViewGetFavicon                       ,


-- ** getFindController #method:getFindController#

#if defined(ENABLE_OVERLOADING)
    WebViewGetFindControllerMethodInfo      ,
#endif
    webViewGetFindController                ,


-- ** getInputMethodContext #method:getInputMethodContext#

#if defined(ENABLE_OVERLOADING)
    WebViewGetInputMethodContextMethodInfo  ,
#endif
    webViewGetInputMethodContext            ,


-- ** getInspector #method:getInspector#

#if defined(ENABLE_OVERLOADING)
    WebViewGetInspectorMethodInfo           ,
#endif
    webViewGetInspector                     ,


-- ** getIsMuted #method:getIsMuted#

#if defined(ENABLE_OVERLOADING)
    WebViewGetIsMutedMethodInfo             ,
#endif
    webViewGetIsMuted                       ,


-- ** getMainResource #method:getMainResource#

#if defined(ENABLE_OVERLOADING)
    WebViewGetMainResourceMethodInfo        ,
#endif
    webViewGetMainResource                  ,


-- ** getPageId #method:getPageId#

#if defined(ENABLE_OVERLOADING)
    WebViewGetPageIdMethodInfo              ,
#endif
    webViewGetPageId                        ,


-- ** getSessionState #method:getSessionState#

#if defined(ENABLE_OVERLOADING)
    WebViewGetSessionStateMethodInfo        ,
#endif
    webViewGetSessionState                  ,


-- ** getSettings #method:getSettings#

#if defined(ENABLE_OVERLOADING)
    WebViewGetSettingsMethodInfo            ,
#endif
    webViewGetSettings                      ,


-- ** getSnapshot #method:getSnapshot#

#if defined(ENABLE_OVERLOADING)
    WebViewGetSnapshotMethodInfo            ,
#endif
    webViewGetSnapshot                      ,


-- ** getSnapshotFinish #method:getSnapshotFinish#

#if defined(ENABLE_OVERLOADING)
    WebViewGetSnapshotFinishMethodInfo      ,
#endif
    webViewGetSnapshotFinish                ,


-- ** getTitle #method:getTitle#

#if defined(ENABLE_OVERLOADING)
    WebViewGetTitleMethodInfo               ,
#endif
    webViewGetTitle                         ,


-- ** getTlsInfo #method:getTlsInfo#

#if defined(ENABLE_OVERLOADING)
    WebViewGetTlsInfoMethodInfo             ,
#endif
    webViewGetTlsInfo                       ,


-- ** getUri #method:getUri#

#if defined(ENABLE_OVERLOADING)
    WebViewGetUriMethodInfo                 ,
#endif
    webViewGetUri                           ,


-- ** getUserContentManager #method:getUserContentManager#

#if defined(ENABLE_OVERLOADING)
    WebViewGetUserContentManagerMethodInfo  ,
#endif
    webViewGetUserContentManager            ,


-- ** getWebsiteDataManager #method:getWebsiteDataManager#

#if defined(ENABLE_OVERLOADING)
    WebViewGetWebsiteDataManagerMethodInfo  ,
#endif
    webViewGetWebsiteDataManager            ,


-- ** getWebsitePolicies #method:getWebsitePolicies#

#if defined(ENABLE_OVERLOADING)
    WebViewGetWebsitePoliciesMethodInfo     ,
#endif
    webViewGetWebsitePolicies               ,


-- ** getWindowProperties #method:getWindowProperties#

#if defined(ENABLE_OVERLOADING)
    WebViewGetWindowPropertiesMethodInfo    ,
#endif
    webViewGetWindowProperties              ,


-- ** getZoomLevel #method:getZoomLevel#

#if defined(ENABLE_OVERLOADING)
    WebViewGetZoomLevelMethodInfo           ,
#endif
    webViewGetZoomLevel                     ,


-- ** goBack #method:goBack#

#if defined(ENABLE_OVERLOADING)
    WebViewGoBackMethodInfo                 ,
#endif
    webViewGoBack                           ,


-- ** goForward #method:goForward#

#if defined(ENABLE_OVERLOADING)
    WebViewGoForwardMethodInfo              ,
#endif
    webViewGoForward                        ,


-- ** goToBackForwardListItem #method:goToBackForwardListItem#

#if defined(ENABLE_OVERLOADING)
    WebViewGoToBackForwardListItemMethodInfo,
#endif
    webViewGoToBackForwardListItem          ,


-- ** isControlledByAutomation #method:isControlledByAutomation#

#if defined(ENABLE_OVERLOADING)
    WebViewIsControlledByAutomationMethodInfo,
#endif
    webViewIsControlledByAutomation         ,


-- ** isEditable #method:isEditable#

#if defined(ENABLE_OVERLOADING)
    WebViewIsEditableMethodInfo             ,
#endif
    webViewIsEditable                       ,


-- ** isEphemeral #method:isEphemeral#

#if defined(ENABLE_OVERLOADING)
    WebViewIsEphemeralMethodInfo            ,
#endif
    webViewIsEphemeral                      ,


-- ** isLoading #method:isLoading#

#if defined(ENABLE_OVERLOADING)
    WebViewIsLoadingMethodInfo              ,
#endif
    webViewIsLoading                        ,


-- ** isPlayingAudio #method:isPlayingAudio#

#if defined(ENABLE_OVERLOADING)
    WebViewIsPlayingAudioMethodInfo         ,
#endif
    webViewIsPlayingAudio                   ,


-- ** loadAlternateHtml #method:loadAlternateHtml#

#if defined(ENABLE_OVERLOADING)
    WebViewLoadAlternateHtmlMethodInfo      ,
#endif
    webViewLoadAlternateHtml                ,


-- ** loadBytes #method:loadBytes#

#if defined(ENABLE_OVERLOADING)
    WebViewLoadBytesMethodInfo              ,
#endif
    webViewLoadBytes                        ,


-- ** loadHtml #method:loadHtml#

#if defined(ENABLE_OVERLOADING)
    WebViewLoadHtmlMethodInfo               ,
#endif
    webViewLoadHtml                         ,


-- ** loadPlainText #method:loadPlainText#

#if defined(ENABLE_OVERLOADING)
    WebViewLoadPlainTextMethodInfo          ,
#endif
    webViewLoadPlainText                    ,


-- ** loadRequest #method:loadRequest#

#if defined(ENABLE_OVERLOADING)
    WebViewLoadRequestMethodInfo            ,
#endif
    webViewLoadRequest                      ,


-- ** loadUri #method:loadUri#

#if defined(ENABLE_OVERLOADING)
    WebViewLoadUriMethodInfo                ,
#endif
    webViewLoadUri                          ,


-- ** new #method:new#

    webViewNew                              ,


-- ** newWithContext #method:newWithContext#

    webViewNewWithContext                   ,


-- ** newWithRelatedView #method:newWithRelatedView#

    webViewNewWithRelatedView               ,


-- ** newWithSettings #method:newWithSettings#

    webViewNewWithSettings                  ,


-- ** newWithUserContentManager #method:newWithUserContentManager#

    webViewNewWithUserContentManager        ,


-- ** reload #method:reload#

#if defined(ENABLE_OVERLOADING)
    WebViewReloadMethodInfo                 ,
#endif
    webViewReload                           ,


-- ** reloadBypassCache #method:reloadBypassCache#

#if defined(ENABLE_OVERLOADING)
    WebViewReloadBypassCacheMethodInfo      ,
#endif
    webViewReloadBypassCache                ,


-- ** restoreSessionState #method:restoreSessionState#

#if defined(ENABLE_OVERLOADING)
    WebViewRestoreSessionStateMethodInfo    ,
#endif
    webViewRestoreSessionState              ,


-- ** runJavascript #method:runJavascript#

#if defined(ENABLE_OVERLOADING)
    WebViewRunJavascriptMethodInfo          ,
#endif
    webViewRunJavascript                    ,


-- ** runJavascriptFinish #method:runJavascriptFinish#

#if defined(ENABLE_OVERLOADING)
    WebViewRunJavascriptFinishMethodInfo    ,
#endif
    webViewRunJavascriptFinish              ,


-- ** runJavascriptFromGresource #method:runJavascriptFromGresource#

#if defined(ENABLE_OVERLOADING)
    WebViewRunJavascriptFromGresourceMethodInfo,
#endif
    webViewRunJavascriptFromGresource       ,


-- ** runJavascriptFromGresourceFinish #method:runJavascriptFromGresourceFinish#

#if defined(ENABLE_OVERLOADING)
    WebViewRunJavascriptFromGresourceFinishMethodInfo,
#endif
    webViewRunJavascriptFromGresourceFinish ,


-- ** runJavascriptInWorld #method:runJavascriptInWorld#

#if defined(ENABLE_OVERLOADING)
    WebViewRunJavascriptInWorldMethodInfo   ,
#endif
    webViewRunJavascriptInWorld             ,


-- ** runJavascriptInWorldFinish #method:runJavascriptInWorldFinish#

#if defined(ENABLE_OVERLOADING)
    WebViewRunJavascriptInWorldFinishMethodInfo,
#endif
    webViewRunJavascriptInWorldFinish       ,


-- ** save #method:save#

#if defined(ENABLE_OVERLOADING)
    WebViewSaveMethodInfo                   ,
#endif
    webViewSave                             ,


-- ** saveFinish #method:saveFinish#

#if defined(ENABLE_OVERLOADING)
    WebViewSaveFinishMethodInfo             ,
#endif
    webViewSaveFinish                       ,


-- ** saveToFile #method:saveToFile#

#if defined(ENABLE_OVERLOADING)
    WebViewSaveToFileMethodInfo             ,
#endif
    webViewSaveToFile                       ,


-- ** saveToFileFinish #method:saveToFileFinish#

#if defined(ENABLE_OVERLOADING)
    WebViewSaveToFileFinishMethodInfo       ,
#endif
    webViewSaveToFileFinish                 ,


-- ** sendMessageToPage #method:sendMessageToPage#

#if defined(ENABLE_OVERLOADING)
    WebViewSendMessageToPageMethodInfo      ,
#endif
    webViewSendMessageToPage                ,


-- ** sendMessageToPageFinish #method:sendMessageToPageFinish#

#if defined(ENABLE_OVERLOADING)
    WebViewSendMessageToPageFinishMethodInfo,
#endif
    webViewSendMessageToPageFinish          ,


-- ** setBackgroundColor #method:setBackgroundColor#

#if defined(ENABLE_OVERLOADING)
    WebViewSetBackgroundColorMethodInfo     ,
#endif
    webViewSetBackgroundColor               ,


-- ** setCustomCharset #method:setCustomCharset#

#if defined(ENABLE_OVERLOADING)
    WebViewSetCustomCharsetMethodInfo       ,
#endif
    webViewSetCustomCharset                 ,


-- ** setEditable #method:setEditable#

#if defined(ENABLE_OVERLOADING)
    WebViewSetEditableMethodInfo            ,
#endif
    webViewSetEditable                      ,


-- ** setInputMethodContext #method:setInputMethodContext#

#if defined(ENABLE_OVERLOADING)
    WebViewSetInputMethodContextMethodInfo  ,
#endif
    webViewSetInputMethodContext            ,


-- ** setIsMuted #method:setIsMuted#

#if defined(ENABLE_OVERLOADING)
    WebViewSetIsMutedMethodInfo             ,
#endif
    webViewSetIsMuted                       ,


-- ** setSettings #method:setSettings#

#if defined(ENABLE_OVERLOADING)
    WebViewSetSettingsMethodInfo            ,
#endif
    webViewSetSettings                      ,


-- ** setZoomLevel #method:setZoomLevel#

#if defined(ENABLE_OVERLOADING)
    WebViewSetZoomLevelMethodInfo           ,
#endif
    webViewSetZoomLevel                     ,


-- ** stopLoading #method:stopLoading#

#if defined(ENABLE_OVERLOADING)
    WebViewStopLoadingMethodInfo            ,
#endif
    webViewStopLoading                      ,


-- ** tryClose #method:tryClose#

#if defined(ENABLE_OVERLOADING)
    WebViewTryCloseMethodInfo               ,
#endif
    webViewTryClose                         ,




 -- * Properties


-- ** automationPresentationType #attr:automationPresentationType#
-- | The t'GI.WebKit2.Enums.AutomationBrowsingContextPresentation' of t'GI.WebKit2.Objects.WebView.WebView'. This should only be used when
-- creating a new t'GI.WebKit2.Objects.WebView.WebView' as a response to [createWebView]("GI.WebKit2.Objects.AutomationSession#g:signal:createWebView")
-- signal request. If the new WebView was added to a new tab of current browsing context window
-- 'GI.WebKit2.Enums.AutomationBrowsingContextPresentationTab' should be used.
-- 
-- /Since: 2.28/

#if defined(ENABLE_OVERLOADING)
    WebViewAutomationPresentationTypePropertyInfo,
#endif
    constructWebViewAutomationPresentationType,
    getWebViewAutomationPresentationType    ,
#if defined(ENABLE_OVERLOADING)
    webViewAutomationPresentationType       ,
#endif


-- ** editable #attr:editable#
-- | Whether the pages loaded inside t'GI.WebKit2.Objects.WebView.WebView' are editable. For more
-- information see 'GI.WebKit2.Objects.WebView.webViewSetEditable'.
-- 
-- /Since: 2.8/

#if defined(ENABLE_OVERLOADING)
    WebViewEditablePropertyInfo             ,
#endif
    constructWebViewEditable                ,
    getWebViewEditable                      ,
    setWebViewEditable                      ,
#if defined(ENABLE_OVERLOADING)
    webViewEditable                         ,
#endif


-- ** estimatedLoadProgress #attr:estimatedLoadProgress#
-- | An estimate of the percent completion for the current loading operation.
-- This value will range from 0.0 to 1.0 and, once a load completes,
-- will remain at 1.0 until a new load starts, at which point it
-- will be reset to 0.0.
-- The value is an estimate based on the total number of bytes expected
-- to be received for a document, including all its possible subresources
-- and child documents.

#if defined(ENABLE_OVERLOADING)
    WebViewEstimatedLoadProgressPropertyInfo,
#endif
    getWebViewEstimatedLoadProgress         ,
#if defined(ENABLE_OVERLOADING)
    webViewEstimatedLoadProgress            ,
#endif


-- ** favicon #attr:favicon#
-- | The favicon currently associated to the t'GI.WebKit2.Objects.WebView.WebView'.
-- See 'GI.WebKit2.Objects.WebView.webViewGetFavicon' for more details.

#if defined(ENABLE_OVERLOADING)
    WebViewFaviconPropertyInfo              ,
#endif
    getWebViewFavicon                       ,
#if defined(ENABLE_OVERLOADING)
    webViewFavicon                          ,
#endif


-- ** isControlledByAutomation #attr:isControlledByAutomation#
-- | Whether the t'GI.WebKit2.Objects.WebView.WebView' is controlled by automation. This should only be used when
-- creating a new t'GI.WebKit2.Objects.WebView.WebView' as a response to [createWebView]("GI.WebKit2.Objects.AutomationSession#g:signal:createWebView")
-- signal request.
-- 
-- /Since: 2.18/

#if defined(ENABLE_OVERLOADING)
    WebViewIsControlledByAutomationPropertyInfo,
#endif
    constructWebViewIsControlledByAutomation,
    getWebViewIsControlledByAutomation      ,


-- ** isEphemeral #attr:isEphemeral#
-- | Whether the t'GI.WebKit2.Objects.WebView.WebView' is ephemeral. An ephemeral web view never writes
-- website data to the client storage, no matter what t'GI.WebKit2.Objects.WebsiteDataManager.WebsiteDataManager'
-- its context is using. This is normally used to implement private browsing mode.
-- This is a 'GI.GObject.Flags.ParamFlagsConstructOnly' property, so you have to create a ephemeral
-- t'GI.WebKit2.Objects.WebView.WebView' and it can\'t be changed. Note that all t'GI.WebKit2.Objects.WebView.WebView's
-- created with an ephemeral t'GI.WebKit2.Objects.WebContext.WebContext' will be ephemeral automatically.
-- See also 'GI.WebKit2.Objects.WebContext.webContextNewEphemeral'.
-- 
-- /Since: 2.16/

#if defined(ENABLE_OVERLOADING)
    WebViewIsEphemeralPropertyInfo          ,
#endif
    constructWebViewIsEphemeral             ,
    getWebViewIsEphemeral                   ,


-- ** isLoading #attr:isLoading#
-- | Whether the t'GI.WebKit2.Objects.WebView.WebView' is currently loading a page. This property becomes
-- 'P.True' as soon as a new load operation is requested and before the
-- [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") signal is emitted with 'GI.WebKit2.Enums.LoadEventStarted' and
-- at that point the active URI is the requested one.
-- When the load operation finishes the property is set to 'P.False' before
-- [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") is emitted with 'GI.WebKit2.Enums.LoadEventFinished'.

#if defined(ENABLE_OVERLOADING)
    WebViewIsLoadingPropertyInfo            ,
#endif
    getWebViewIsLoading                     ,


-- ** isMuted #attr:isMuted#
-- | Whether the t'GI.WebKit2.Objects.WebView.WebView' audio is muted. When 'P.True', audio is silenced.
-- It may still be playing, i.e. t'GI.WebKit2.Objects.WebView.WebView':@/is-playing-audio/@ may be 'P.True'.
-- 
-- /Since: 2.30/

#if defined(ENABLE_OVERLOADING)
    WebViewIsMutedPropertyInfo              ,
#endif
    constructWebViewIsMuted                 ,
    getWebViewIsMuted                       ,
    setWebViewIsMuted                       ,
#if defined(ENABLE_OVERLOADING)
    webViewIsMuted                          ,
#endif


-- ** isPlayingAudio #attr:isPlayingAudio#
-- | Whether the t'GI.WebKit2.Objects.WebView.WebView' is currently playing audio from a page.
-- This property becomes 'P.True' as soon as web content starts playing any
-- kind of audio. When a page is no longer playing any kind of sound,
-- the property is set back to 'P.False'.
-- 
-- /Since: 2.8/

#if defined(ENABLE_OVERLOADING)
    WebViewIsPlayingAudioPropertyInfo       ,
#endif
    getWebViewIsPlayingAudio                ,


-- ** pageId #attr:pageId#
-- | The identifier of the @/WebKitWebPage/@ corresponding to the t'GI.WebKit2.Objects.WebView.WebView'.
-- 
-- /Since: 2.28/

#if defined(ENABLE_OVERLOADING)
    WebViewPageIdPropertyInfo               ,
#endif
    getWebViewPageId                        ,
#if defined(ENABLE_OVERLOADING)
    webViewPageId                           ,
#endif


-- ** relatedView #attr:relatedView#
-- | The related t'GI.WebKit2.Objects.WebView.WebView' used when creating the view to share the
-- same web process. This property is not readable because the related
-- web view is only valid during the object construction.
-- 
-- /Since: 2.4/

#if defined(ENABLE_OVERLOADING)
    WebViewRelatedViewPropertyInfo          ,
#endif
    constructWebViewRelatedView             ,
#if defined(ENABLE_OVERLOADING)
    webViewRelatedView                      ,
#endif


-- ** settings #attr:settings#
-- | The t'GI.WebKit2.Objects.Settings.Settings' of the view.
-- 
-- /Since: 2.6/

#if defined(ENABLE_OVERLOADING)
    WebViewSettingsPropertyInfo             ,
#endif
    constructWebViewSettings                ,
    setWebViewSettings                      ,
#if defined(ENABLE_OVERLOADING)
    webViewSettings                         ,
#endif


-- ** title #attr:title#
-- | The main frame document title of this t'GI.WebKit2.Objects.WebView.WebView'. If
-- the title has not been received yet, it will be 'P.Nothing'.

#if defined(ENABLE_OVERLOADING)
    WebViewTitlePropertyInfo                ,
#endif
    getWebViewTitle                         ,
#if defined(ENABLE_OVERLOADING)
    webViewTitle                            ,
#endif


-- ** uri #attr:uri#
-- | The current active URI of the t'GI.WebKit2.Objects.WebView.WebView'.
-- See 'GI.WebKit2.Objects.WebView.webViewGetUri' for more details.

#if defined(ENABLE_OVERLOADING)
    WebViewUriPropertyInfo                  ,
#endif
    getWebViewUri                           ,
#if defined(ENABLE_OVERLOADING)
    webViewUri                              ,
#endif


-- ** userContentManager #attr:userContentManager#
-- | The t'GI.WebKit2.Objects.UserContentManager.UserContentManager' of the view.
-- 
-- /Since: 2.6/

#if defined(ENABLE_OVERLOADING)
    WebViewUserContentManagerPropertyInfo   ,
#endif
    constructWebViewUserContentManager      ,
    getWebViewUserContentManager            ,
#if defined(ENABLE_OVERLOADING)
    webViewUserContentManager               ,
#endif


-- ** webContext #attr:webContext#
-- | The t'GI.WebKit2.Objects.WebContext.WebContext' of the view.

#if defined(ENABLE_OVERLOADING)
    WebViewWebContextPropertyInfo           ,
#endif
    constructWebViewWebContext              ,
    getWebViewWebContext                    ,
#if defined(ENABLE_OVERLOADING)
    webViewWebContext                       ,
#endif


-- ** websitePolicies #attr:websitePolicies#
-- | The t'GI.WebKit2.Objects.WebsitePolicies.WebsitePolicies' for the view.
-- 
-- /Since: 2.30/

#if defined(ENABLE_OVERLOADING)
    WebViewWebsitePoliciesPropertyInfo      ,
#endif
    constructWebViewWebsitePolicies         ,
    getWebViewWebsitePolicies               ,
#if defined(ENABLE_OVERLOADING)
    webViewWebsitePolicies                  ,
#endif


-- ** zoomLevel #attr:zoomLevel#
-- | The zoom level of the t'GI.WebKit2.Objects.WebView.WebView' content.
-- See 'GI.WebKit2.Objects.WebView.webViewSetZoomLevel' for more details.

#if defined(ENABLE_OVERLOADING)
    WebViewZoomLevelPropertyInfo            ,
#endif
    constructWebViewZoomLevel               ,
    getWebViewZoomLevel                     ,
    setWebViewZoomLevel                     ,
#if defined(ENABLE_OVERLOADING)
    webViewZoomLevel                        ,
#endif




 -- * Signals


-- ** authenticate #signal:authenticate#

    C_WebViewAuthenticateCallback           ,
    WebViewAuthenticateCallback             ,
#if defined(ENABLE_OVERLOADING)
    WebViewAuthenticateSignalInfo           ,
#endif
    afterWebViewAuthenticate                ,
    genClosure_WebViewAuthenticate          ,
    mk_WebViewAuthenticateCallback          ,
    noWebViewAuthenticateCallback           ,
    onWebViewAuthenticate                   ,
    wrap_WebViewAuthenticateCallback        ,


-- ** close #signal:close#

    C_WebViewCloseCallback                  ,
    WebViewCloseCallback                    ,
#if defined(ENABLE_OVERLOADING)
    WebViewCloseSignalInfo                  ,
#endif
    afterWebViewClose                       ,
    genClosure_WebViewClose                 ,
    mk_WebViewCloseCallback                 ,
    noWebViewCloseCallback                  ,
    onWebViewClose                          ,
    wrap_WebViewCloseCallback               ,


-- ** contextMenu #signal:contextMenu#

    C_WebViewContextMenuCallback            ,
    WebViewContextMenuCallback              ,
#if defined(ENABLE_OVERLOADING)
    WebViewContextMenuSignalInfo            ,
#endif
    afterWebViewContextMenu                 ,
    genClosure_WebViewContextMenu           ,
    mk_WebViewContextMenuCallback           ,
    noWebViewContextMenuCallback            ,
    onWebViewContextMenu                    ,
    wrap_WebViewContextMenuCallback         ,


-- ** contextMenuDismissed #signal:contextMenuDismissed#

    C_WebViewContextMenuDismissedCallback   ,
    WebViewContextMenuDismissedCallback     ,
#if defined(ENABLE_OVERLOADING)
    WebViewContextMenuDismissedSignalInfo   ,
#endif
    afterWebViewContextMenuDismissed        ,
    genClosure_WebViewContextMenuDismissed  ,
    mk_WebViewContextMenuDismissedCallback  ,
    noWebViewContextMenuDismissedCallback   ,
    onWebViewContextMenuDismissed           ,
    wrap_WebViewContextMenuDismissedCallback,


-- ** create #signal:create#

    C_WebViewCreateCallback                 ,
    WebViewCreateCallback                   ,
#if defined(ENABLE_OVERLOADING)
    WebViewCreateSignalInfo                 ,
#endif
    afterWebViewCreate                      ,
    genClosure_WebViewCreate                ,
    mk_WebViewCreateCallback                ,
    noWebViewCreateCallback                 ,
    onWebViewCreate                         ,
    wrap_WebViewCreateCallback              ,


-- ** decidePolicy #signal:decidePolicy#

    C_WebViewDecidePolicyCallback           ,
    WebViewDecidePolicyCallback             ,
#if defined(ENABLE_OVERLOADING)
    WebViewDecidePolicySignalInfo           ,
#endif
    afterWebViewDecidePolicy                ,
    genClosure_WebViewDecidePolicy          ,
    mk_WebViewDecidePolicyCallback          ,
    noWebViewDecidePolicyCallback           ,
    onWebViewDecidePolicy                   ,
    wrap_WebViewDecidePolicyCallback        ,


-- ** enterFullscreen #signal:enterFullscreen#

    C_WebViewEnterFullscreenCallback        ,
    WebViewEnterFullscreenCallback          ,
#if defined(ENABLE_OVERLOADING)
    WebViewEnterFullscreenSignalInfo        ,
#endif
    afterWebViewEnterFullscreen             ,
    genClosure_WebViewEnterFullscreen       ,
    mk_WebViewEnterFullscreenCallback       ,
    noWebViewEnterFullscreenCallback        ,
    onWebViewEnterFullscreen                ,
    wrap_WebViewEnterFullscreenCallback     ,


-- ** insecureContentDetected #signal:insecureContentDetected#

    C_WebViewInsecureContentDetectedCallback,
    WebViewInsecureContentDetectedCallback  ,
#if defined(ENABLE_OVERLOADING)
    WebViewInsecureContentDetectedSignalInfo,
#endif
    afterWebViewInsecureContentDetected     ,
    genClosure_WebViewInsecureContentDetected,
    mk_WebViewInsecureContentDetectedCallback,
    noWebViewInsecureContentDetectedCallback,
    onWebViewInsecureContentDetected        ,
    wrap_WebViewInsecureContentDetectedCallback,


-- ** leaveFullscreen #signal:leaveFullscreen#

    C_WebViewLeaveFullscreenCallback        ,
    WebViewLeaveFullscreenCallback          ,
#if defined(ENABLE_OVERLOADING)
    WebViewLeaveFullscreenSignalInfo        ,
#endif
    afterWebViewLeaveFullscreen             ,
    genClosure_WebViewLeaveFullscreen       ,
    mk_WebViewLeaveFullscreenCallback       ,
    noWebViewLeaveFullscreenCallback        ,
    onWebViewLeaveFullscreen                ,
    wrap_WebViewLeaveFullscreenCallback     ,


-- ** loadChanged #signal:loadChanged#

    C_WebViewLoadChangedCallback            ,
    WebViewLoadChangedCallback              ,
#if defined(ENABLE_OVERLOADING)
    WebViewLoadChangedSignalInfo            ,
#endif
    afterWebViewLoadChanged                 ,
    genClosure_WebViewLoadChanged           ,
    mk_WebViewLoadChangedCallback           ,
    noWebViewLoadChangedCallback            ,
    onWebViewLoadChanged                    ,
    wrap_WebViewLoadChangedCallback         ,


-- ** loadFailed #signal:loadFailed#

    C_WebViewLoadFailedCallback             ,
    WebViewLoadFailedCallback               ,
#if defined(ENABLE_OVERLOADING)
    WebViewLoadFailedSignalInfo             ,
#endif
    afterWebViewLoadFailed                  ,
    genClosure_WebViewLoadFailed            ,
    mk_WebViewLoadFailedCallback            ,
    noWebViewLoadFailedCallback             ,
    onWebViewLoadFailed                     ,
    wrap_WebViewLoadFailedCallback          ,


-- ** loadFailedWithTlsErrors #signal:loadFailedWithTlsErrors#

    C_WebViewLoadFailedWithTlsErrorsCallback,
    WebViewLoadFailedWithTlsErrorsCallback  ,
#if defined(ENABLE_OVERLOADING)
    WebViewLoadFailedWithTlsErrorsSignalInfo,
#endif
    afterWebViewLoadFailedWithTlsErrors     ,
    genClosure_WebViewLoadFailedWithTlsErrors,
    mk_WebViewLoadFailedWithTlsErrorsCallback,
    noWebViewLoadFailedWithTlsErrorsCallback,
    onWebViewLoadFailedWithTlsErrors        ,
    wrap_WebViewLoadFailedWithTlsErrorsCallback,


-- ** mouseTargetChanged #signal:mouseTargetChanged#

    C_WebViewMouseTargetChangedCallback     ,
    WebViewMouseTargetChangedCallback       ,
#if defined(ENABLE_OVERLOADING)
    WebViewMouseTargetChangedSignalInfo     ,
#endif
    afterWebViewMouseTargetChanged          ,
    genClosure_WebViewMouseTargetChanged    ,
    mk_WebViewMouseTargetChangedCallback    ,
    noWebViewMouseTargetChangedCallback     ,
    onWebViewMouseTargetChanged             ,
    wrap_WebViewMouseTargetChangedCallback  ,


-- ** permissionRequest #signal:permissionRequest#

    C_WebViewPermissionRequestCallback      ,
    WebViewPermissionRequestCallback        ,
#if defined(ENABLE_OVERLOADING)
    WebViewPermissionRequestSignalInfo      ,
#endif
    afterWebViewPermissionRequest           ,
    genClosure_WebViewPermissionRequest     ,
    mk_WebViewPermissionRequestCallback     ,
    noWebViewPermissionRequestCallback      ,
    onWebViewPermissionRequest              ,
    wrap_WebViewPermissionRequestCallback   ,


-- ** print #signal:print#

    C_WebViewPrintCallback                  ,
    WebViewPrintCallback                    ,
#if defined(ENABLE_OVERLOADING)
    WebViewPrintSignalInfo                  ,
#endif
    afterWebViewPrint                       ,
    genClosure_WebViewPrint                 ,
    mk_WebViewPrintCallback                 ,
    noWebViewPrintCallback                  ,
    onWebViewPrint                          ,
    wrap_WebViewPrintCallback               ,


-- ** readyToShow #signal:readyToShow#

    C_WebViewReadyToShowCallback            ,
    WebViewReadyToShowCallback              ,
#if defined(ENABLE_OVERLOADING)
    WebViewReadyToShowSignalInfo            ,
#endif
    afterWebViewReadyToShow                 ,
    genClosure_WebViewReadyToShow           ,
    mk_WebViewReadyToShowCallback           ,
    noWebViewReadyToShowCallback            ,
    onWebViewReadyToShow                    ,
    wrap_WebViewReadyToShowCallback         ,


-- ** resourceLoadStarted #signal:resourceLoadStarted#

    C_WebViewResourceLoadStartedCallback    ,
    WebViewResourceLoadStartedCallback      ,
#if defined(ENABLE_OVERLOADING)
    WebViewResourceLoadStartedSignalInfo    ,
#endif
    afterWebViewResourceLoadStarted         ,
    genClosure_WebViewResourceLoadStarted   ,
    mk_WebViewResourceLoadStartedCallback   ,
    noWebViewResourceLoadStartedCallback    ,
    onWebViewResourceLoadStarted            ,
    wrap_WebViewResourceLoadStartedCallback ,


-- ** runAsModal #signal:runAsModal#

    C_WebViewRunAsModalCallback             ,
    WebViewRunAsModalCallback               ,
#if defined(ENABLE_OVERLOADING)
    WebViewRunAsModalSignalInfo             ,
#endif
    afterWebViewRunAsModal                  ,
    genClosure_WebViewRunAsModal            ,
    mk_WebViewRunAsModalCallback            ,
    noWebViewRunAsModalCallback             ,
    onWebViewRunAsModal                     ,
    wrap_WebViewRunAsModalCallback          ,


-- ** runColorChooser #signal:runColorChooser#

    C_WebViewRunColorChooserCallback        ,
    WebViewRunColorChooserCallback          ,
#if defined(ENABLE_OVERLOADING)
    WebViewRunColorChooserSignalInfo        ,
#endif
    afterWebViewRunColorChooser             ,
    genClosure_WebViewRunColorChooser       ,
    mk_WebViewRunColorChooserCallback       ,
    noWebViewRunColorChooserCallback        ,
    onWebViewRunColorChooser                ,
    wrap_WebViewRunColorChooserCallback     ,


-- ** runFileChooser #signal:runFileChooser#

    C_WebViewRunFileChooserCallback         ,
    WebViewRunFileChooserCallback           ,
#if defined(ENABLE_OVERLOADING)
    WebViewRunFileChooserSignalInfo         ,
#endif
    afterWebViewRunFileChooser              ,
    genClosure_WebViewRunFileChooser        ,
    mk_WebViewRunFileChooserCallback        ,
    noWebViewRunFileChooserCallback         ,
    onWebViewRunFileChooser                 ,
    wrap_WebViewRunFileChooserCallback      ,


-- ** scriptDialog #signal:scriptDialog#

    C_WebViewScriptDialogCallback           ,
    WebViewScriptDialogCallback             ,
#if defined(ENABLE_OVERLOADING)
    WebViewScriptDialogSignalInfo           ,
#endif
    afterWebViewScriptDialog                ,
    genClosure_WebViewScriptDialog          ,
    mk_WebViewScriptDialogCallback          ,
    noWebViewScriptDialogCallback           ,
    onWebViewScriptDialog                   ,
    wrap_WebViewScriptDialogCallback        ,


-- ** showNotification #signal:showNotification#

    C_WebViewShowNotificationCallback       ,
    WebViewShowNotificationCallback         ,
#if defined(ENABLE_OVERLOADING)
    WebViewShowNotificationSignalInfo       ,
#endif
    afterWebViewShowNotification            ,
    genClosure_WebViewShowNotification      ,
    mk_WebViewShowNotificationCallback      ,
    noWebViewShowNotificationCallback       ,
    onWebViewShowNotification               ,
    wrap_WebViewShowNotificationCallback    ,


-- ** showOptionMenu #signal:showOptionMenu#

    C_WebViewShowOptionMenuCallback         ,
    WebViewShowOptionMenuCallback           ,
#if defined(ENABLE_OVERLOADING)
    WebViewShowOptionMenuSignalInfo         ,
#endif
    afterWebViewShowOptionMenu              ,
    genClosure_WebViewShowOptionMenu        ,
    mk_WebViewShowOptionMenuCallback        ,
    noWebViewShowOptionMenuCallback         ,
    onWebViewShowOptionMenu                 ,
    wrap_WebViewShowOptionMenuCallback      ,


-- ** submitForm #signal:submitForm#

    C_WebViewSubmitFormCallback             ,
    WebViewSubmitFormCallback               ,
#if defined(ENABLE_OVERLOADING)
    WebViewSubmitFormSignalInfo             ,
#endif
    afterWebViewSubmitForm                  ,
    genClosure_WebViewSubmitForm            ,
    mk_WebViewSubmitFormCallback            ,
    noWebViewSubmitFormCallback             ,
    onWebViewSubmitForm                     ,
    wrap_WebViewSubmitFormCallback          ,


-- ** userMessageReceived #signal:userMessageReceived#

    C_WebViewUserMessageReceivedCallback    ,
    WebViewUserMessageReceivedCallback      ,
#if defined(ENABLE_OVERLOADING)
    WebViewUserMessageReceivedSignalInfo    ,
#endif
    afterWebViewUserMessageReceived         ,
    genClosure_WebViewUserMessageReceived   ,
    mk_WebViewUserMessageReceivedCallback   ,
    noWebViewUserMessageReceivedCallback    ,
    onWebViewUserMessageReceived            ,
    wrap_WebViewUserMessageReceivedCallback ,


-- ** webProcessCrashed #signal:webProcessCrashed#

    C_WebViewWebProcessCrashedCallback      ,
    WebViewWebProcessCrashedCallback        ,
#if defined(ENABLE_OVERLOADING)
    WebViewWebProcessCrashedSignalInfo      ,
#endif
    afterWebViewWebProcessCrashed           ,
    genClosure_WebViewWebProcessCrashed     ,
    mk_WebViewWebProcessCrashedCallback     ,
    noWebViewWebProcessCrashedCallback      ,
    onWebViewWebProcessCrashed              ,
    wrap_WebViewWebProcessCrashedCallback   ,


-- ** webProcessTerminated #signal:webProcessTerminated#

    C_WebViewWebProcessTerminatedCallback   ,
    WebViewWebProcessTerminatedCallback     ,
#if defined(ENABLE_OVERLOADING)
    WebViewWebProcessTerminatedSignalInfo   ,
#endif
    afterWebViewWebProcessTerminated        ,
    genClosure_WebViewWebProcessTerminated  ,
    mk_WebViewWebProcessTerminatedCallback  ,
    noWebViewWebProcessTerminatedCallback   ,
    onWebViewWebProcessTerminated           ,
    wrap_WebViewWebProcessTerminatedCallback,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.Atk.Interfaces.ImplementorIface as Atk.ImplementorIface
import qualified GI.Cairo.Structs.Surface as Cairo.Surface
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gdk.Unions.Event as Gdk.Event
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Flags as Gio.Flags
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.InputStream as Gio.InputStream
import qualified GI.Gio.Objects.TlsCertificate as Gio.TlsCertificate
import qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import qualified GI.Gtk.Objects.Container as Gtk.Container
import qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.WebKit2.Enums as WebKit2.Enums
import {-# SOURCE #-} qualified GI.WebKit2.Flags as WebKit2.Flags
import {-# SOURCE #-} qualified GI.WebKit2.Interfaces.PermissionRequest as WebKit2.PermissionRequest
import {-# SOURCE #-} qualified GI.WebKit2.Objects.AuthenticationRequest as WebKit2.AuthenticationRequest
import {-# SOURCE #-} qualified GI.WebKit2.Objects.BackForwardList as WebKit2.BackForwardList
import {-# SOURCE #-} qualified GI.WebKit2.Objects.BackForwardListItem as WebKit2.BackForwardListItem
import {-# SOURCE #-} qualified GI.WebKit2.Objects.ColorChooserRequest as WebKit2.ColorChooserRequest
import {-# SOURCE #-} qualified GI.WebKit2.Objects.ContextMenu as WebKit2.ContextMenu
import {-# SOURCE #-} qualified GI.WebKit2.Objects.Download as WebKit2.Download
import {-# SOURCE #-} qualified GI.WebKit2.Objects.EditorState as WebKit2.EditorState
import {-# SOURCE #-} qualified GI.WebKit2.Objects.FileChooserRequest as WebKit2.FileChooserRequest
import {-# SOURCE #-} qualified GI.WebKit2.Objects.FindController as WebKit2.FindController
import {-# SOURCE #-} qualified GI.WebKit2.Objects.FormSubmissionRequest as WebKit2.FormSubmissionRequest
import {-# SOURCE #-} qualified GI.WebKit2.Objects.HitTestResult as WebKit2.HitTestResult
import {-# SOURCE #-} qualified GI.WebKit2.Objects.InputMethodContext as WebKit2.InputMethodContext
import {-# SOURCE #-} qualified GI.WebKit2.Objects.Notification as WebKit2.Notification
import {-# SOURCE #-} qualified GI.WebKit2.Objects.OptionMenu as WebKit2.OptionMenu
import {-# SOURCE #-} qualified GI.WebKit2.Objects.PolicyDecision as WebKit2.PolicyDecision
import {-# SOURCE #-} qualified GI.WebKit2.Objects.PrintOperation as WebKit2.PrintOperation
import {-# SOURCE #-} qualified GI.WebKit2.Objects.Settings as WebKit2.Settings
import {-# SOURCE #-} qualified GI.WebKit2.Objects.URIRequest as WebKit2.URIRequest
import {-# SOURCE #-} qualified GI.WebKit2.Objects.UserContentManager as WebKit2.UserContentManager
import {-# SOURCE #-} qualified GI.WebKit2.Objects.UserMessage as WebKit2.UserMessage
import {-# SOURCE #-} qualified GI.WebKit2.Objects.WebContext as WebKit2.WebContext
import {-# SOURCE #-} qualified GI.WebKit2.Objects.WebInspector as WebKit2.WebInspector
import {-# SOURCE #-} qualified GI.WebKit2.Objects.WebResource as WebKit2.WebResource
import {-# SOURCE #-} qualified GI.WebKit2.Objects.WebViewBase as WebKit2.WebViewBase
import {-# SOURCE #-} qualified GI.WebKit2.Objects.WebsiteDataManager as WebKit2.WebsiteDataManager
import {-# SOURCE #-} qualified GI.WebKit2.Objects.WebsitePolicies as WebKit2.WebsitePolicies
import {-# SOURCE #-} qualified GI.WebKit2.Objects.WindowProperties as WebKit2.WindowProperties
import {-# SOURCE #-} qualified GI.WebKit2.Structs.JavascriptResult as WebKit2.JavascriptResult
import {-# SOURCE #-} qualified GI.WebKit2.Structs.NavigationAction as WebKit2.NavigationAction
import {-# SOURCE #-} qualified GI.WebKit2.Structs.ScriptDialog as WebKit2.ScriptDialog
import {-# SOURCE #-} qualified GI.WebKit2.Structs.WebViewSessionState as WebKit2.WebViewSessionState

-- | Memory-managed wrapper type.
newtype WebView = WebView (SP.ManagedPtr WebView)
    deriving (WebView -> WebView -> Bool
(WebView -> WebView -> Bool)
-> (WebView -> WebView -> Bool) -> Eq WebView
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WebView -> WebView -> Bool
$c/= :: WebView -> WebView -> Bool
== :: WebView -> WebView -> Bool
$c== :: WebView -> WebView -> Bool
Eq)

instance SP.ManagedPtrNewtype WebView where
    toManagedPtr :: WebView -> ManagedPtr WebView
toManagedPtr (WebView ManagedPtr WebView
p) = ManagedPtr WebView
p

foreign import ccall "webkit_web_view_get_type"
    c_webkit_web_view_get_type :: IO B.Types.GType

instance B.Types.TypedObject WebView where
    glibType :: IO GType
glibType = IO GType
c_webkit_web_view_get_type

instance B.Types.GObject WebView

-- | Type class for types which can be safely cast to `WebView`, for instance with `toWebView`.
class (SP.GObject o, O.IsDescendantOf WebView o) => IsWebView o
instance (SP.GObject o, O.IsDescendantOf WebView o) => IsWebView o

instance O.HasParentTypes WebView
type instance O.ParentTypes WebView = '[WebKit2.WebViewBase.WebViewBase, Gtk.Container.Container, Gtk.Widget.Widget, GObject.Object.Object, Atk.ImplementorIface.ImplementorIface, Gtk.Buildable.Buildable]

-- | Cast to `WebView`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toWebView :: (MIO.MonadIO m, IsWebView o) => o -> m WebView
toWebView :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m WebView
toWebView = IO WebView -> m WebView
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO WebView -> m WebView) -> (o -> IO WebView) -> o -> m WebView
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr WebView -> WebView) -> o -> IO WebView
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr WebView -> WebView
WebView

-- | Convert 'WebView' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe WebView) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_webkit_web_view_get_type
    gvalueSet_ :: Ptr GValue -> Maybe WebView -> IO ()
gvalueSet_ Ptr GValue
gv Maybe WebView
P.Nothing = Ptr GValue -> Ptr WebView -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr WebView
forall a. Ptr a
FP.nullPtr :: FP.Ptr WebView)
    gvalueSet_ Ptr GValue
gv (P.Just WebView
obj) = WebView -> (Ptr WebView -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr WebView
obj (Ptr GValue -> Ptr WebView -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe WebView)
gvalueGet_ Ptr GValue
gv = do
        Ptr WebView
ptr <- Ptr GValue -> IO (Ptr WebView)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr WebView)
        if Ptr WebView
ptr Ptr WebView -> Ptr WebView -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr WebView
forall a. Ptr a
FP.nullPtr
        then WebView -> Maybe WebView
forall a. a -> Maybe a
P.Just (WebView -> Maybe WebView) -> IO WebView -> IO (Maybe WebView)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr WebView -> WebView) -> Ptr WebView -> IO WebView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr WebView -> WebView
WebView Ptr WebView
ptr
        else Maybe WebView -> IO (Maybe WebView)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe WebView
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveWebViewMethod (t :: Symbol) (o :: *) :: * where
    ResolveWebViewMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
    ResolveWebViewMethod "add" o = Gtk.Container.ContainerAddMethodInfo
    ResolveWebViewMethod "addAccelerator" o = Gtk.Widget.WidgetAddAcceleratorMethodInfo
    ResolveWebViewMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
    ResolveWebViewMethod "addDeviceEvents" o = Gtk.Widget.WidgetAddDeviceEventsMethodInfo
    ResolveWebViewMethod "addEvents" o = Gtk.Widget.WidgetAddEventsMethodInfo
    ResolveWebViewMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
    ResolveWebViewMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
    ResolveWebViewMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveWebViewMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveWebViewMethod "canActivateAccel" o = Gtk.Widget.WidgetCanActivateAccelMethodInfo
    ResolveWebViewMethod "canExecuteEditingCommand" o = WebViewCanExecuteEditingCommandMethodInfo
    ResolveWebViewMethod "canExecuteEditingCommandFinish" o = WebViewCanExecuteEditingCommandFinishMethodInfo
    ResolveWebViewMethod "canGoBack" o = WebViewCanGoBackMethodInfo
    ResolveWebViewMethod "canGoForward" o = WebViewCanGoForwardMethodInfo
    ResolveWebViewMethod "canShowMimeType" o = WebViewCanShowMimeTypeMethodInfo
    ResolveWebViewMethod "checkResize" o = Gtk.Container.ContainerCheckResizeMethodInfo
    ResolveWebViewMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
    ResolveWebViewMethod "childGetProperty" o = Gtk.Container.ContainerChildGetPropertyMethodInfo
    ResolveWebViewMethod "childNotify" o = Gtk.Container.ContainerChildNotifyMethodInfo
    ResolveWebViewMethod "childNotifyByPspec" o = Gtk.Container.ContainerChildNotifyByPspecMethodInfo
    ResolveWebViewMethod "childSetProperty" o = Gtk.Container.ContainerChildSetPropertyMethodInfo
    ResolveWebViewMethod "childType" o = Gtk.Container.ContainerChildTypeMethodInfo
    ResolveWebViewMethod "classPath" o = Gtk.Widget.WidgetClassPathMethodInfo
    ResolveWebViewMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
    ResolveWebViewMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
    ResolveWebViewMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
    ResolveWebViewMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
    ResolveWebViewMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
    ResolveWebViewMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
    ResolveWebViewMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
    ResolveWebViewMethod "destroy" o = Gtk.Widget.WidgetDestroyMethodInfo
    ResolveWebViewMethod "destroyed" o = Gtk.Widget.WidgetDestroyedMethodInfo
    ResolveWebViewMethod "deviceIsShadowed" o = Gtk.Widget.WidgetDeviceIsShadowedMethodInfo
    ResolveWebViewMethod "downloadUri" o = WebViewDownloadUriMethodInfo
    ResolveWebViewMethod "dragBegin" o = Gtk.Widget.WidgetDragBeginMethodInfo
    ResolveWebViewMethod "dragBeginWithCoordinates" o = Gtk.Widget.WidgetDragBeginWithCoordinatesMethodInfo
    ResolveWebViewMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
    ResolveWebViewMethod "dragDestAddImageTargets" o = Gtk.Widget.WidgetDragDestAddImageTargetsMethodInfo
    ResolveWebViewMethod "dragDestAddTextTargets" o = Gtk.Widget.WidgetDragDestAddTextTargetsMethodInfo
    ResolveWebViewMethod "dragDestAddUriTargets" o = Gtk.Widget.WidgetDragDestAddUriTargetsMethodInfo
    ResolveWebViewMethod "dragDestFindTarget" o = Gtk.Widget.WidgetDragDestFindTargetMethodInfo
    ResolveWebViewMethod "dragDestGetTargetList" o = Gtk.Widget.WidgetDragDestGetTargetListMethodInfo
    ResolveWebViewMethod "dragDestGetTrackMotion" o = Gtk.Widget.WidgetDragDestGetTrackMotionMethodInfo
    ResolveWebViewMethod "dragDestSet" o = Gtk.Widget.WidgetDragDestSetMethodInfo
    ResolveWebViewMethod "dragDestSetProxy" o = Gtk.Widget.WidgetDragDestSetProxyMethodInfo
    ResolveWebViewMethod "dragDestSetTargetList" o = Gtk.Widget.WidgetDragDestSetTargetListMethodInfo
    ResolveWebViewMethod "dragDestSetTrackMotion" o = Gtk.Widget.WidgetDragDestSetTrackMotionMethodInfo
    ResolveWebViewMethod "dragDestUnset" o = Gtk.Widget.WidgetDragDestUnsetMethodInfo
    ResolveWebViewMethod "dragGetData" o = Gtk.Widget.WidgetDragGetDataMethodInfo
    ResolveWebViewMethod "dragHighlight" o = Gtk.Widget.WidgetDragHighlightMethodInfo
    ResolveWebViewMethod "dragSourceAddImageTargets" o = Gtk.Widget.WidgetDragSourceAddImageTargetsMethodInfo
    ResolveWebViewMethod "dragSourceAddTextTargets" o = Gtk.Widget.WidgetDragSourceAddTextTargetsMethodInfo
    ResolveWebViewMethod "dragSourceAddUriTargets" o = Gtk.Widget.WidgetDragSourceAddUriTargetsMethodInfo
    ResolveWebViewMethod "dragSourceGetTargetList" o = Gtk.Widget.WidgetDragSourceGetTargetListMethodInfo
    ResolveWebViewMethod "dragSourceSet" o = Gtk.Widget.WidgetDragSourceSetMethodInfo
    ResolveWebViewMethod "dragSourceSetIconGicon" o = Gtk.Widget.WidgetDragSourceSetIconGiconMethodInfo
    ResolveWebViewMethod "dragSourceSetIconName" o = Gtk.Widget.WidgetDragSourceSetIconNameMethodInfo
    ResolveWebViewMethod "dragSourceSetIconPixbuf" o = Gtk.Widget.WidgetDragSourceSetIconPixbufMethodInfo
    ResolveWebViewMethod "dragSourceSetIconStock" o = Gtk.Widget.WidgetDragSourceSetIconStockMethodInfo
    ResolveWebViewMethod "dragSourceSetTargetList" o = Gtk.Widget.WidgetDragSourceSetTargetListMethodInfo
    ResolveWebViewMethod "dragSourceUnset" o = Gtk.Widget.WidgetDragSourceUnsetMethodInfo
    ResolveWebViewMethod "dragUnhighlight" o = Gtk.Widget.WidgetDragUnhighlightMethodInfo
    ResolveWebViewMethod "draw" o = Gtk.Widget.WidgetDrawMethodInfo
    ResolveWebViewMethod "ensureStyle" o = Gtk.Widget.WidgetEnsureStyleMethodInfo
    ResolveWebViewMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
    ResolveWebViewMethod "event" o = Gtk.Widget.WidgetEventMethodInfo
    ResolveWebViewMethod "executeEditingCommand" o = WebViewExecuteEditingCommandMethodInfo
    ResolveWebViewMethod "executeEditingCommandWithArgument" o = WebViewExecuteEditingCommandWithArgumentMethodInfo
    ResolveWebViewMethod "forall" o = Gtk.Container.ContainerForallMethodInfo
    ResolveWebViewMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveWebViewMethod "foreach" o = Gtk.Container.ContainerForeachMethodInfo
    ResolveWebViewMethod "freezeChildNotify" o = Gtk.Widget.WidgetFreezeChildNotifyMethodInfo
    ResolveWebViewMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveWebViewMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveWebViewMethod "goBack" o = WebViewGoBackMethodInfo
    ResolveWebViewMethod "goForward" o = WebViewGoForwardMethodInfo
    ResolveWebViewMethod "goToBackForwardListItem" o = WebViewGoToBackForwardListItemMethodInfo
    ResolveWebViewMethod "grabAdd" o = Gtk.Widget.WidgetGrabAddMethodInfo
    ResolveWebViewMethod "grabDefault" o = Gtk.Widget.WidgetGrabDefaultMethodInfo
    ResolveWebViewMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
    ResolveWebViewMethod "grabRemove" o = Gtk.Widget.WidgetGrabRemoveMethodInfo
    ResolveWebViewMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
    ResolveWebViewMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
    ResolveWebViewMethod "hasGrab" o = Gtk.Widget.WidgetHasGrabMethodInfo
    ResolveWebViewMethod "hasRcStyle" o = Gtk.Widget.WidgetHasRcStyleMethodInfo
    ResolveWebViewMethod "hasScreen" o = Gtk.Widget.WidgetHasScreenMethodInfo
    ResolveWebViewMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
    ResolveWebViewMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
    ResolveWebViewMethod "hideOnDelete" o = Gtk.Widget.WidgetHideOnDeleteMethodInfo
    ResolveWebViewMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
    ResolveWebViewMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
    ResolveWebViewMethod "inputShapeCombineRegion" o = Gtk.Widget.WidgetInputShapeCombineRegionMethodInfo
    ResolveWebViewMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
    ResolveWebViewMethod "intersect" o = Gtk.Widget.WidgetIntersectMethodInfo
    ResolveWebViewMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
    ResolveWebViewMethod "isComposited" o = Gtk.Widget.WidgetIsCompositedMethodInfo
    ResolveWebViewMethod "isControlledByAutomation" o = WebViewIsControlledByAutomationMethodInfo
    ResolveWebViewMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
    ResolveWebViewMethod "isEditable" o = WebViewIsEditableMethodInfo
    ResolveWebViewMethod "isEphemeral" o = WebViewIsEphemeralMethodInfo
    ResolveWebViewMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveWebViewMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
    ResolveWebViewMethod "isLoading" o = WebViewIsLoadingMethodInfo
    ResolveWebViewMethod "isPlayingAudio" o = WebViewIsPlayingAudioMethodInfo
    ResolveWebViewMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
    ResolveWebViewMethod "isToplevel" o = Gtk.Widget.WidgetIsToplevelMethodInfo
    ResolveWebViewMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
    ResolveWebViewMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
    ResolveWebViewMethod "listAccelClosures" o = Gtk.Widget.WidgetListAccelClosuresMethodInfo
    ResolveWebViewMethod "listActionPrefixes" o = Gtk.Widget.WidgetListActionPrefixesMethodInfo
    ResolveWebViewMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
    ResolveWebViewMethod "loadAlternateHtml" o = WebViewLoadAlternateHtmlMethodInfo
    ResolveWebViewMethod "loadBytes" o = WebViewLoadBytesMethodInfo
    ResolveWebViewMethod "loadHtml" o = WebViewLoadHtmlMethodInfo
    ResolveWebViewMethod "loadPlainText" o = WebViewLoadPlainTextMethodInfo
    ResolveWebViewMethod "loadRequest" o = WebViewLoadRequestMethodInfo
    ResolveWebViewMethod "loadUri" o = WebViewLoadUriMethodInfo
    ResolveWebViewMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
    ResolveWebViewMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
    ResolveWebViewMethod "modifyBase" o = Gtk.Widget.WidgetModifyBaseMethodInfo
    ResolveWebViewMethod "modifyBg" o = Gtk.Widget.WidgetModifyBgMethodInfo
    ResolveWebViewMethod "modifyCursor" o = Gtk.Widget.WidgetModifyCursorMethodInfo
    ResolveWebViewMethod "modifyFg" o = Gtk.Widget.WidgetModifyFgMethodInfo
    ResolveWebViewMethod "modifyFont" o = Gtk.Widget.WidgetModifyFontMethodInfo
    ResolveWebViewMethod "modifyStyle" o = Gtk.Widget.WidgetModifyStyleMethodInfo
    ResolveWebViewMethod "modifyText" o = Gtk.Widget.WidgetModifyTextMethodInfo
    ResolveWebViewMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveWebViewMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveWebViewMethod "overrideBackgroundColor" o = Gtk.Widget.WidgetOverrideBackgroundColorMethodInfo
    ResolveWebViewMethod "overrideColor" o = Gtk.Widget.WidgetOverrideColorMethodInfo
    ResolveWebViewMethod "overrideCursor" o = Gtk.Widget.WidgetOverrideCursorMethodInfo
    ResolveWebViewMethod "overrideFont" o = Gtk.Widget.WidgetOverrideFontMethodInfo
    ResolveWebViewMethod "overrideSymbolicColor" o = Gtk.Widget.WidgetOverrideSymbolicColorMethodInfo
    ResolveWebViewMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
    ResolveWebViewMethod "path" o = Gtk.Widget.WidgetPathMethodInfo
    ResolveWebViewMethod "propagateDraw" o = Gtk.Container.ContainerPropagateDrawMethodInfo
    ResolveWebViewMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
    ResolveWebViewMethod "queueComputeExpand" o = Gtk.Widget.WidgetQueueComputeExpandMethodInfo
    ResolveWebViewMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
    ResolveWebViewMethod "queueDrawArea" o = Gtk.Widget.WidgetQueueDrawAreaMethodInfo
    ResolveWebViewMethod "queueDrawRegion" o = Gtk.Widget.WidgetQueueDrawRegionMethodInfo
    ResolveWebViewMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
    ResolveWebViewMethod "queueResizeNoRedraw" o = Gtk.Widget.WidgetQueueResizeNoRedrawMethodInfo
    ResolveWebViewMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
    ResolveWebViewMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveWebViewMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveWebViewMethod "regionIntersect" o = Gtk.Widget.WidgetRegionIntersectMethodInfo
    ResolveWebViewMethod "registerWindow" o = Gtk.Widget.WidgetRegisterWindowMethodInfo
    ResolveWebViewMethod "reload" o = WebViewReloadMethodInfo
    ResolveWebViewMethod "reloadBypassCache" o = WebViewReloadBypassCacheMethodInfo
    ResolveWebViewMethod "remove" o = Gtk.Container.ContainerRemoveMethodInfo
    ResolveWebViewMethod "removeAccelerator" o = Gtk.Widget.WidgetRemoveAcceleratorMethodInfo
    ResolveWebViewMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
    ResolveWebViewMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
    ResolveWebViewMethod "renderIcon" o = Gtk.Widget.WidgetRenderIconMethodInfo
    ResolveWebViewMethod "renderIconPixbuf" o = Gtk.Widget.WidgetRenderIconPixbufMethodInfo
    ResolveWebViewMethod "reparent" o = Gtk.Widget.WidgetReparentMethodInfo
    ResolveWebViewMethod "resetRcStyles" o = Gtk.Widget.WidgetResetRcStylesMethodInfo
    ResolveWebViewMethod "resetStyle" o = Gtk.Widget.WidgetResetStyleMethodInfo
    ResolveWebViewMethod "resizeChildren" o = Gtk.Container.ContainerResizeChildrenMethodInfo
    ResolveWebViewMethod "restoreSessionState" o = WebViewRestoreSessionStateMethodInfo
    ResolveWebViewMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveWebViewMethod "runJavascript" o = WebViewRunJavascriptMethodInfo
    ResolveWebViewMethod "runJavascriptFinish" o = WebViewRunJavascriptFinishMethodInfo
    ResolveWebViewMethod "runJavascriptFromGresource" o = WebViewRunJavascriptFromGresourceMethodInfo
    ResolveWebViewMethod "runJavascriptFromGresourceFinish" o = WebViewRunJavascriptFromGresourceFinishMethodInfo
    ResolveWebViewMethod "runJavascriptInWorld" o = WebViewRunJavascriptInWorldMethodInfo
    ResolveWebViewMethod "runJavascriptInWorldFinish" o = WebViewRunJavascriptInWorldFinishMethodInfo
    ResolveWebViewMethod "save" o = WebViewSaveMethodInfo
    ResolveWebViewMethod "saveFinish" o = WebViewSaveFinishMethodInfo
    ResolveWebViewMethod "saveToFile" o = WebViewSaveToFileMethodInfo
    ResolveWebViewMethod "saveToFileFinish" o = WebViewSaveToFileFinishMethodInfo
    ResolveWebViewMethod "sendExpose" o = Gtk.Widget.WidgetSendExposeMethodInfo
    ResolveWebViewMethod "sendFocusChange" o = Gtk.Widget.WidgetSendFocusChangeMethodInfo
    ResolveWebViewMethod "sendMessageToPage" o = WebViewSendMessageToPageMethodInfo
    ResolveWebViewMethod "sendMessageToPageFinish" o = WebViewSendMessageToPageFinishMethodInfo
    ResolveWebViewMethod "shapeCombineRegion" o = Gtk.Widget.WidgetShapeCombineRegionMethodInfo
    ResolveWebViewMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
    ResolveWebViewMethod "showAll" o = Gtk.Widget.WidgetShowAllMethodInfo
    ResolveWebViewMethod "showNow" o = Gtk.Widget.WidgetShowNowMethodInfo
    ResolveWebViewMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
    ResolveWebViewMethod "sizeAllocateWithBaseline" o = Gtk.Widget.WidgetSizeAllocateWithBaselineMethodInfo
    ResolveWebViewMethod "sizeRequest" o = Gtk.Widget.WidgetSizeRequestMethodInfo
    ResolveWebViewMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveWebViewMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveWebViewMethod "stopLoading" o = WebViewStopLoadingMethodInfo
    ResolveWebViewMethod "styleAttach" o = Gtk.Widget.WidgetStyleAttachMethodInfo
    ResolveWebViewMethod "styleGetProperty" o = Gtk.Widget.WidgetStyleGetPropertyMethodInfo
    ResolveWebViewMethod "thawChildNotify" o = Gtk.Widget.WidgetThawChildNotifyMethodInfo
    ResolveWebViewMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveWebViewMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
    ResolveWebViewMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
    ResolveWebViewMethod "tryClose" o = WebViewTryCloseMethodInfo
    ResolveWebViewMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
    ResolveWebViewMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
    ResolveWebViewMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
    ResolveWebViewMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveWebViewMethod "unregisterWindow" o = Gtk.Widget.WidgetUnregisterWindowMethodInfo
    ResolveWebViewMethod "unsetFocusChain" o = Gtk.Container.ContainerUnsetFocusChainMethodInfo
    ResolveWebViewMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
    ResolveWebViewMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveWebViewMethod "getAccessible" o = Gtk.Widget.WidgetGetAccessibleMethodInfo
    ResolveWebViewMethod "getActionGroup" o = Gtk.Widget.WidgetGetActionGroupMethodInfo
    ResolveWebViewMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
    ResolveWebViewMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
    ResolveWebViewMethod "getAllocatedSize" o = Gtk.Widget.WidgetGetAllocatedSizeMethodInfo
    ResolveWebViewMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
    ResolveWebViewMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
    ResolveWebViewMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
    ResolveWebViewMethod "getAppPaintable" o = Gtk.Widget.WidgetGetAppPaintableMethodInfo
    ResolveWebViewMethod "getAutomationPresentationType" o = WebViewGetAutomationPresentationTypeMethodInfo
    ResolveWebViewMethod "getBackForwardList" o = WebViewGetBackForwardListMethodInfo
    ResolveWebViewMethod "getBackgroundColor" o = WebViewGetBackgroundColorMethodInfo
    ResolveWebViewMethod "getBorderWidth" o = Gtk.Container.ContainerGetBorderWidthMethodInfo
    ResolveWebViewMethod "getCanDefault" o = Gtk.Widget.WidgetGetCanDefaultMethodInfo
    ResolveWebViewMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
    ResolveWebViewMethod "getChildRequisition" o = Gtk.Widget.WidgetGetChildRequisitionMethodInfo
    ResolveWebViewMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
    ResolveWebViewMethod "getChildren" o = Gtk.Container.ContainerGetChildrenMethodInfo
    ResolveWebViewMethod "getClip" o = Gtk.Widget.WidgetGetClipMethodInfo
    ResolveWebViewMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
    ResolveWebViewMethod "getCompositeName" o = Gtk.Widget.WidgetGetCompositeNameMethodInfo
    ResolveWebViewMethod "getContext" o = WebViewGetContextMethodInfo
    ResolveWebViewMethod "getCustomCharset" o = WebViewGetCustomCharsetMethodInfo
    ResolveWebViewMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveWebViewMethod "getDeviceEnabled" o = Gtk.Widget.WidgetGetDeviceEnabledMethodInfo
    ResolveWebViewMethod "getDeviceEvents" o = Gtk.Widget.WidgetGetDeviceEventsMethodInfo
    ResolveWebViewMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
    ResolveWebViewMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
    ResolveWebViewMethod "getDoubleBuffered" o = Gtk.Widget.WidgetGetDoubleBufferedMethodInfo
    ResolveWebViewMethod "getEditorState" o = WebViewGetEditorStateMethodInfo
    ResolveWebViewMethod "getEstimatedLoadProgress" o = WebViewGetEstimatedLoadProgressMethodInfo
    ResolveWebViewMethod "getEvents" o = Gtk.Widget.WidgetGetEventsMethodInfo
    ResolveWebViewMethod "getFavicon" o = WebViewGetFaviconMethodInfo
    ResolveWebViewMethod "getFindController" o = WebViewGetFindControllerMethodInfo
    ResolveWebViewMethod "getFocusChain" o = Gtk.Container.ContainerGetFocusChainMethodInfo
    ResolveWebViewMethod "getFocusChild" o = Gtk.Container.ContainerGetFocusChildMethodInfo
    ResolveWebViewMethod "getFocusHadjustment" o = Gtk.Container.ContainerGetFocusHadjustmentMethodInfo
    ResolveWebViewMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
    ResolveWebViewMethod "getFocusVadjustment" o = Gtk.Container.ContainerGetFocusVadjustmentMethodInfo
    ResolveWebViewMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
    ResolveWebViewMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
    ResolveWebViewMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
    ResolveWebViewMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
    ResolveWebViewMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
    ResolveWebViewMethod "getHasWindow" o = Gtk.Widget.WidgetGetHasWindowMethodInfo
    ResolveWebViewMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
    ResolveWebViewMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
    ResolveWebViewMethod "getInputMethodContext" o = WebViewGetInputMethodContextMethodInfo
    ResolveWebViewMethod "getInspector" o = WebViewGetInspectorMethodInfo
    ResolveWebViewMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
    ResolveWebViewMethod "getIsMuted" o = WebViewGetIsMutedMethodInfo
    ResolveWebViewMethod "getMainResource" o = WebViewGetMainResourceMethodInfo
    ResolveWebViewMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
    ResolveWebViewMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
    ResolveWebViewMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
    ResolveWebViewMethod "getMarginLeft" o = Gtk.Widget.WidgetGetMarginLeftMethodInfo
    ResolveWebViewMethod "getMarginRight" o = Gtk.Widget.WidgetGetMarginRightMethodInfo
    ResolveWebViewMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
    ResolveWebViewMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
    ResolveWebViewMethod "getModifierMask" o = Gtk.Widget.WidgetGetModifierMaskMethodInfo
    ResolveWebViewMethod "getModifierStyle" o = Gtk.Widget.WidgetGetModifierStyleMethodInfo
    ResolveWebViewMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
    ResolveWebViewMethod "getNoShowAll" o = Gtk.Widget.WidgetGetNoShowAllMethodInfo
    ResolveWebViewMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
    ResolveWebViewMethod "getPageId" o = WebViewGetPageIdMethodInfo
    ResolveWebViewMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
    ResolveWebViewMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
    ResolveWebViewMethod "getParentWindow" o = Gtk.Widget.WidgetGetParentWindowMethodInfo
    ResolveWebViewMethod "getPath" o = Gtk.Widget.WidgetGetPathMethodInfo
    ResolveWebViewMethod "getPathForChild" o = Gtk.Container.ContainerGetPathForChildMethodInfo
    ResolveWebViewMethod "getPointer" o = Gtk.Widget.WidgetGetPointerMethodInfo
    ResolveWebViewMethod "getPreferredHeight" o = Gtk.Widget.WidgetGetPreferredHeightMethodInfo
    ResolveWebViewMethod "getPreferredHeightAndBaselineForWidth" o = Gtk.Widget.WidgetGetPreferredHeightAndBaselineForWidthMethodInfo
    ResolveWebViewMethod "getPreferredHeightForWidth" o = Gtk.Widget.WidgetGetPreferredHeightForWidthMethodInfo
    ResolveWebViewMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
    ResolveWebViewMethod "getPreferredWidth" o = Gtk.Widget.WidgetGetPreferredWidthMethodInfo
    ResolveWebViewMethod "getPreferredWidthForHeight" o = Gtk.Widget.WidgetGetPreferredWidthForHeightMethodInfo
    ResolveWebViewMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveWebViewMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveWebViewMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
    ResolveWebViewMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
    ResolveWebViewMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
    ResolveWebViewMethod "getRequisition" o = Gtk.Widget.WidgetGetRequisitionMethodInfo
    ResolveWebViewMethod "getResizeMode" o = Gtk.Container.ContainerGetResizeModeMethodInfo
    ResolveWebViewMethod "getRootWindow" o = Gtk.Widget.WidgetGetRootWindowMethodInfo
    ResolveWebViewMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
    ResolveWebViewMethod "getScreen" o = Gtk.Widget.WidgetGetScreenMethodInfo
    ResolveWebViewMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
    ResolveWebViewMethod "getSessionState" o = WebViewGetSessionStateMethodInfo
    ResolveWebViewMethod "getSettings" o = WebViewGetSettingsMethodInfo
    ResolveWebViewMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
    ResolveWebViewMethod "getSnapshot" o = WebViewGetSnapshotMethodInfo
    ResolveWebViewMethod "getSnapshotFinish" o = WebViewGetSnapshotFinishMethodInfo
    ResolveWebViewMethod "getState" o = Gtk.Widget.WidgetGetStateMethodInfo
    ResolveWebViewMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
    ResolveWebViewMethod "getStyle" o = Gtk.Widget.WidgetGetStyleMethodInfo
    ResolveWebViewMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
    ResolveWebViewMethod "getSupportMultidevice" o = Gtk.Widget.WidgetGetSupportMultideviceMethodInfo
    ResolveWebViewMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
    ResolveWebViewMethod "getTitle" o = WebViewGetTitleMethodInfo
    ResolveWebViewMethod "getTlsInfo" o = WebViewGetTlsInfoMethodInfo
    ResolveWebViewMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
    ResolveWebViewMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
    ResolveWebViewMethod "getTooltipWindow" o = Gtk.Widget.WidgetGetTooltipWindowMethodInfo
    ResolveWebViewMethod "getToplevel" o = Gtk.Widget.WidgetGetToplevelMethodInfo
    ResolveWebViewMethod "getUri" o = WebViewGetUriMethodInfo
    ResolveWebViewMethod "getUserContentManager" o = WebViewGetUserContentManagerMethodInfo
    ResolveWebViewMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
    ResolveWebViewMethod "getValignWithBaseline" o = Gtk.Widget.WidgetGetValignWithBaselineMethodInfo
    ResolveWebViewMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
    ResolveWebViewMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
    ResolveWebViewMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
    ResolveWebViewMethod "getVisual" o = Gtk.Widget.WidgetGetVisualMethodInfo
    ResolveWebViewMethod "getWebsiteDataManager" o = WebViewGetWebsiteDataManagerMethodInfo
    ResolveWebViewMethod "getWebsitePolicies" o = WebViewGetWebsitePoliciesMethodInfo
    ResolveWebViewMethod "getWindow" o = Gtk.Widget.WidgetGetWindowMethodInfo
    ResolveWebViewMethod "getWindowProperties" o = WebViewGetWindowPropertiesMethodInfo
    ResolveWebViewMethod "getZoomLevel" o = WebViewGetZoomLevelMethodInfo
    ResolveWebViewMethod "setAccelPath" o = Gtk.Widget.WidgetSetAccelPathMethodInfo
    ResolveWebViewMethod "setAllocation" o = Gtk.Widget.WidgetSetAllocationMethodInfo
    ResolveWebViewMethod "setAppPaintable" o = Gtk.Widget.WidgetSetAppPaintableMethodInfo
    ResolveWebViewMethod "setBackgroundColor" o = WebViewSetBackgroundColorMethodInfo
    ResolveWebViewMethod "setBorderWidth" o = Gtk.Container.ContainerSetBorderWidthMethodInfo
    ResolveWebViewMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
    ResolveWebViewMethod "setCanDefault" o = Gtk.Widget.WidgetSetCanDefaultMethodInfo
    ResolveWebViewMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
    ResolveWebViewMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
    ResolveWebViewMethod "setClip" o = Gtk.Widget.WidgetSetClipMethodInfo
    ResolveWebViewMethod "setCompositeName" o = Gtk.Widget.WidgetSetCompositeNameMethodInfo
    ResolveWebViewMethod "setCustomCharset" o = WebViewSetCustomCharsetMethodInfo
    ResolveWebViewMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveWebViewMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveWebViewMethod "setDeviceEnabled" o = Gtk.Widget.WidgetSetDeviceEnabledMethodInfo
    ResolveWebViewMethod "setDeviceEvents" o = Gtk.Widget.WidgetSetDeviceEventsMethodInfo
    ResolveWebViewMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
    ResolveWebViewMethod "setDoubleBuffered" o = Gtk.Widget.WidgetSetDoubleBufferedMethodInfo
    ResolveWebViewMethod "setEditable" o = WebViewSetEditableMethodInfo
    ResolveWebViewMethod "setEvents" o = Gtk.Widget.WidgetSetEventsMethodInfo
    ResolveWebViewMethod "setFocusChain" o = Gtk.Container.ContainerSetFocusChainMethodInfo
    ResolveWebViewMethod "setFocusChild" o = Gtk.Container.ContainerSetFocusChildMethodInfo
    ResolveWebViewMethod "setFocusHadjustment" o = Gtk.Container.ContainerSetFocusHadjustmentMethodInfo
    ResolveWebViewMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
    ResolveWebViewMethod "setFocusVadjustment" o = Gtk.Container.ContainerSetFocusVadjustmentMethodInfo
    ResolveWebViewMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
    ResolveWebViewMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
    ResolveWebViewMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
    ResolveWebViewMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
    ResolveWebViewMethod "setHasWindow" o = Gtk.Widget.WidgetSetHasWindowMethodInfo
    ResolveWebViewMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
    ResolveWebViewMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
    ResolveWebViewMethod "setInputMethodContext" o = WebViewSetInputMethodContextMethodInfo
    ResolveWebViewMethod "setIsMuted" o = WebViewSetIsMutedMethodInfo
    ResolveWebViewMethod "setMapped" o = Gtk.Widget.WidgetSetMappedMethodInfo
    ResolveWebViewMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
    ResolveWebViewMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
    ResolveWebViewMethod "setMarginLeft" o = Gtk.Widget.WidgetSetMarginLeftMethodInfo
    ResolveWebViewMethod "setMarginRight" o = Gtk.Widget.WidgetSetMarginRightMethodInfo
    ResolveWebViewMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
    ResolveWebViewMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
    ResolveWebViewMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
    ResolveWebViewMethod "setNoShowAll" o = Gtk.Widget.WidgetSetNoShowAllMethodInfo
    ResolveWebViewMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
    ResolveWebViewMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
    ResolveWebViewMethod "setParentWindow" o = Gtk.Widget.WidgetSetParentWindowMethodInfo
    ResolveWebViewMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveWebViewMethod "setRealized" o = Gtk.Widget.WidgetSetRealizedMethodInfo
    ResolveWebViewMethod "setReallocateRedraws" o = Gtk.Container.ContainerSetReallocateRedrawsMethodInfo
    ResolveWebViewMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
    ResolveWebViewMethod "setRedrawOnAllocate" o = Gtk.Widget.WidgetSetRedrawOnAllocateMethodInfo
    ResolveWebViewMethod "setResizeMode" o = Gtk.Container.ContainerSetResizeModeMethodInfo
    ResolveWebViewMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
    ResolveWebViewMethod "setSettings" o = WebViewSetSettingsMethodInfo
    ResolveWebViewMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
    ResolveWebViewMethod "setState" o = Gtk.Widget.WidgetSetStateMethodInfo
    ResolveWebViewMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
    ResolveWebViewMethod "setStyle" o = Gtk.Widget.WidgetSetStyleMethodInfo
    ResolveWebViewMethod "setSupportMultidevice" o = Gtk.Widget.WidgetSetSupportMultideviceMethodInfo
    ResolveWebViewMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
    ResolveWebViewMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
    ResolveWebViewMethod "setTooltipWindow" o = Gtk.Widget.WidgetSetTooltipWindowMethodInfo
    ResolveWebViewMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
    ResolveWebViewMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
    ResolveWebViewMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
    ResolveWebViewMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
    ResolveWebViewMethod "setVisual" o = Gtk.Widget.WidgetSetVisualMethodInfo
    ResolveWebViewMethod "setWindow" o = Gtk.Widget.WidgetSetWindowMethodInfo
    ResolveWebViewMethod "setZoomLevel" o = WebViewSetZoomLevelMethodInfo
    ResolveWebViewMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveWebViewMethod t WebView, O.OverloadedMethod info WebView p) => OL.IsLabel t (WebView -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveWebViewMethod t WebView, O.OverloadedMethod info WebView p, R.HasField t WebView p) => R.HasField t WebView p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveWebViewMethod t WebView, O.OverloadedMethodInfo info WebView) => OL.IsLabel t (O.MethodProxy info WebView) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- signal WebView::authenticate
-- | This signal is emitted when the user is challenged with HTTP
-- authentication. To let the  application access or supply
-- the credentials as well as to allow the client application
-- to either cancel the request or perform the authentication,
-- the signal will pass an instance of the
-- t'GI.WebKit2.Objects.AuthenticationRequest.AuthenticationRequest' in the /@request@/ argument.
-- To handle this signal asynchronously you should keep a ref
-- of the request and return 'P.True'. To disable HTTP authentication
-- entirely, connect to this signal and simply return 'P.True'.
-- 
-- The default signal handler will run a default authentication
-- dialog asynchronously for the user to interact with.
-- 
-- /Since: 2.2/
type WebViewAuthenticateCallback =
    WebKit2.AuthenticationRequest.AuthenticationRequest
    -- ^ /@request@/: a t'GI.WebKit2.Objects.AuthenticationRequest.AuthenticationRequest'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewAuthenticateCallback`@.
noWebViewAuthenticateCallback :: Maybe WebViewAuthenticateCallback
noWebViewAuthenticateCallback :: Maybe WebViewAuthenticateCallback
noWebViewAuthenticateCallback = Maybe WebViewAuthenticateCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewAuthenticateCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.AuthenticationRequest.AuthenticationRequest ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewAuthenticateCallback`.
foreign import ccall "wrapper"
    mk_WebViewAuthenticateCallback :: C_WebViewAuthenticateCallback -> IO (FunPtr C_WebViewAuthenticateCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewAuthenticate :: MonadIO m => WebViewAuthenticateCallback -> m (GClosure C_WebViewAuthenticateCallback)
genClosure_WebViewAuthenticate :: forall (m :: * -> *).
MonadIO m =>
WebViewAuthenticateCallback
-> m (GClosure C_WebViewAuthenticateCallback)
genClosure_WebViewAuthenticate WebViewAuthenticateCallback
cb = IO (GClosure C_WebViewAuthenticateCallback)
-> m (GClosure C_WebViewAuthenticateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewAuthenticateCallback)
 -> m (GClosure C_WebViewAuthenticateCallback))
-> IO (GClosure C_WebViewAuthenticateCallback)
-> m (GClosure C_WebViewAuthenticateCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewAuthenticateCallback
cb' = WebViewAuthenticateCallback -> C_WebViewAuthenticateCallback
wrap_WebViewAuthenticateCallback WebViewAuthenticateCallback
cb
    C_WebViewAuthenticateCallback
-> IO (FunPtr C_WebViewAuthenticateCallback)
mk_WebViewAuthenticateCallback C_WebViewAuthenticateCallback
cb' IO (FunPtr C_WebViewAuthenticateCallback)
-> (FunPtr C_WebViewAuthenticateCallback
    -> IO (GClosure C_WebViewAuthenticateCallback))
-> IO (GClosure C_WebViewAuthenticateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewAuthenticateCallback
-> IO (GClosure C_WebViewAuthenticateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewAuthenticateCallback` into a `C_WebViewAuthenticateCallback`.
wrap_WebViewAuthenticateCallback ::
    WebViewAuthenticateCallback ->
    C_WebViewAuthenticateCallback
wrap_WebViewAuthenticateCallback :: WebViewAuthenticateCallback -> C_WebViewAuthenticateCallback
wrap_WebViewAuthenticateCallback WebViewAuthenticateCallback
_cb Ptr ()
_ Ptr AuthenticationRequest
request Ptr ()
_ = do
    AuthenticationRequest
request' <- ((ManagedPtr AuthenticationRequest -> AuthenticationRequest)
-> Ptr AuthenticationRequest -> IO AuthenticationRequest
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr AuthenticationRequest -> AuthenticationRequest
WebKit2.AuthenticationRequest.AuthenticationRequest) Ptr AuthenticationRequest
request
    Bool
result <- WebViewAuthenticateCallback
_cb  AuthenticationRequest
request'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [authenticate](#signal:authenticate) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #authenticate callback
-- @
-- 
-- 
onWebViewAuthenticate :: (IsWebView a, MonadIO m) => a -> WebViewAuthenticateCallback -> m SignalHandlerId
onWebViewAuthenticate :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewAuthenticateCallback -> m SignalHandlerId
onWebViewAuthenticate a
obj WebViewAuthenticateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewAuthenticateCallback
cb' = WebViewAuthenticateCallback -> C_WebViewAuthenticateCallback
wrap_WebViewAuthenticateCallback WebViewAuthenticateCallback
cb
    FunPtr C_WebViewAuthenticateCallback
cb'' <- C_WebViewAuthenticateCallback
-> IO (FunPtr C_WebViewAuthenticateCallback)
mk_WebViewAuthenticateCallback C_WebViewAuthenticateCallback
cb'
    a
-> Text
-> FunPtr C_WebViewAuthenticateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"authenticate" FunPtr C_WebViewAuthenticateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [authenticate](#signal:authenticate) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #authenticate callback
-- @
-- 
-- 
afterWebViewAuthenticate :: (IsWebView a, MonadIO m) => a -> WebViewAuthenticateCallback -> m SignalHandlerId
afterWebViewAuthenticate :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewAuthenticateCallback -> m SignalHandlerId
afterWebViewAuthenticate a
obj WebViewAuthenticateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewAuthenticateCallback
cb' = WebViewAuthenticateCallback -> C_WebViewAuthenticateCallback
wrap_WebViewAuthenticateCallback WebViewAuthenticateCallback
cb
    FunPtr C_WebViewAuthenticateCallback
cb'' <- C_WebViewAuthenticateCallback
-> IO (FunPtr C_WebViewAuthenticateCallback)
mk_WebViewAuthenticateCallback C_WebViewAuthenticateCallback
cb'
    a
-> Text
-> FunPtr C_WebViewAuthenticateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"authenticate" FunPtr C_WebViewAuthenticateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewAuthenticateSignalInfo
instance SignalInfo WebViewAuthenticateSignalInfo where
    type HaskellCallbackType WebViewAuthenticateSignalInfo = WebViewAuthenticateCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewAuthenticateCallback cb
        cb'' <- mk_WebViewAuthenticateCallback cb'
        connectSignalFunPtr obj "authenticate" cb'' connectMode detail

#endif

-- signal WebView::close
-- | Emitted when closing a t'GI.WebKit2.Objects.WebView.WebView' is requested. This occurs when a
-- call is made from JavaScript\'s \<function>window.close\<\/function> function or
-- after trying to close the /@webView@/ with 'GI.WebKit2.Objects.WebView.webViewTryClose'.
-- It is the owner\'s responsibility to handle this signal to hide or
-- destroy the t'GI.WebKit2.Objects.WebView.WebView', if necessary.
type WebViewCloseCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewCloseCallback`@.
noWebViewCloseCallback :: Maybe WebViewCloseCallback
noWebViewCloseCallback :: Maybe (IO ())
noWebViewCloseCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewCloseCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebViewCloseCallback`.
foreign import ccall "wrapper"
    mk_WebViewCloseCallback :: C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewClose :: MonadIO m => WebViewCloseCallback -> m (GClosure C_WebViewCloseCallback)
genClosure_WebViewClose :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_WebViewCloseCallback)
genClosure_WebViewClose IO ()
cb = IO (GClosure C_WebViewCloseCallback)
-> m (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewCloseCallback)
 -> m (GClosure C_WebViewCloseCallback))
-> IO (GClosure C_WebViewCloseCallback)
-> m (GClosure C_WebViewCloseCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewCloseCallback IO ()
cb
    C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewCloseCallback C_WebViewCloseCallback
cb' IO (FunPtr C_WebViewCloseCallback)
-> (FunPtr C_WebViewCloseCallback
    -> IO (GClosure C_WebViewCloseCallback))
-> IO (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewCloseCallback
-> IO (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewCloseCallback` into a `C_WebViewCloseCallback`.
wrap_WebViewCloseCallback ::
    WebViewCloseCallback ->
    C_WebViewCloseCallback
wrap_WebViewCloseCallback :: IO () -> C_WebViewCloseCallback
wrap_WebViewCloseCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [close](#signal:close) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #close callback
-- @
-- 
-- 
onWebViewClose :: (IsWebView a, MonadIO m) => a -> WebViewCloseCallback -> m SignalHandlerId
onWebViewClose :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onWebViewClose a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewCloseCallback IO ()
cb
    FunPtr C_WebViewCloseCallback
cb'' <- C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewCloseCallback C_WebViewCloseCallback
cb'
    a
-> Text
-> FunPtr C_WebViewCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"close" FunPtr C_WebViewCloseCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [close](#signal:close) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #close callback
-- @
-- 
-- 
afterWebViewClose :: (IsWebView a, MonadIO m) => a -> WebViewCloseCallback -> m SignalHandlerId
afterWebViewClose :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterWebViewClose a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewCloseCallback IO ()
cb
    FunPtr C_WebViewCloseCallback
cb'' <- C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewCloseCallback C_WebViewCloseCallback
cb'
    a
-> Text
-> FunPtr C_WebViewCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"close" FunPtr C_WebViewCloseCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewCloseSignalInfo
instance SignalInfo WebViewCloseSignalInfo where
    type HaskellCallbackType WebViewCloseSignalInfo = WebViewCloseCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewCloseCallback cb
        cb'' <- mk_WebViewCloseCallback cb'
        connectSignalFunPtr obj "close" cb'' connectMode detail

#endif

-- signal WebView::context-menu
-- | Emitted when a context menu is about to be displayed to give the application
-- a chance to customize the proposed menu, prevent the menu from being displayed,
-- or build its own context menu.
-- \<itemizedlist>
-- \<listitem>\<para>
--  To customize the proposed menu you can use 'GI.WebKit2.Objects.ContextMenu.contextMenuPrepend',
--  'GI.WebKit2.Objects.ContextMenu.contextMenuAppend' or 'GI.WebKit2.Objects.ContextMenu.contextMenuInsert' to add new
--  t'GI.WebKit2.Objects.ContextMenuItem.ContextMenuItem's to /@contextMenu@/, 'GI.WebKit2.Objects.ContextMenu.contextMenuMoveItem'
--  to reorder existing items, or 'GI.WebKit2.Objects.ContextMenu.contextMenuRemove' to remove an
--  existing item. The signal handler should return 'P.False', and the menu represented
--  by /@contextMenu@/ will be shown.
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
--  To prevent the menu from being displayed you can just connect to this signal
--  and return 'P.True' so that the proposed menu will not be shown.
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
--  To build your own menu, you can remove all items from the proposed menu with
--  'GI.WebKit2.Objects.ContextMenu.contextMenuRemoveAll', add your own items and return 'P.False' so
--  that the menu will be shown. You can also ignore the proposed t'GI.WebKit2.Objects.ContextMenu.ContextMenu',
--  build your own t'GI.Gtk.Objects.Menu.Menu' and return 'P.True' to prevent the proposed menu from being shown.
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
--  If you just want the default menu to be shown always, simply don\'t connect to this
--  signal because showing the proposed context menu is the default behaviour.
-- \<\/para>\<\/listitem>
-- \<\/itemizedlist>
-- 
-- The /@event@/ is expected to be one of the following types:
-- \<itemizedlist>
-- \<listitem>\<para>
-- a t'GI.Gdk.Structs.EventButton.EventButton' of type 'GI.Gdk.Enums.EventTypeButtonPress' when the context menu
-- was triggered with mouse.
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
-- a t'GI.Gdk.Structs.EventKey.EventKey' of type 'GI.Gdk.Enums.EventTypeKeyPress' if the keyboard was used to show
-- the menu.
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
-- a generic t'GI.Gdk.Unions.Event.Event' of type 'GI.Gdk.Enums.EventTypeNothing' when the [popupMenu]("GI.Gtk.Objects.Widget#g:signal:popupMenu")
-- signal was used to show the context menu.
-- \<\/para>\<\/listitem>
-- \<\/itemizedlist>
-- 
-- If the signal handler returns 'P.False' the context menu represented by /@contextMenu@/
-- will be shown, if it return 'P.True' the context menu will not be shown.
-- 
-- The proposed t'GI.WebKit2.Objects.ContextMenu.ContextMenu' passed in /@contextMenu@/ argument is only valid
-- during the signal emission.
type WebViewContextMenuCallback =
    WebKit2.ContextMenu.ContextMenu
    -- ^ /@contextMenu@/: the proposed t'GI.WebKit2.Objects.ContextMenu.ContextMenu'
    -> Gdk.Event.Event
    -- ^ /@event@/: the t'GI.Gdk.Unions.Event.Event' that triggered the context menu
    -> WebKit2.HitTestResult.HitTestResult
    -- ^ /@hitTestResult@/: a t'GI.WebKit2.Objects.HitTestResult.HitTestResult'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --    'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewContextMenuCallback`@.
noWebViewContextMenuCallback :: Maybe WebViewContextMenuCallback
noWebViewContextMenuCallback :: Maybe WebViewContextMenuCallback
noWebViewContextMenuCallback = Maybe WebViewContextMenuCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewContextMenuCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.ContextMenu.ContextMenu ->
    Ptr Gdk.Event.Event ->
    Ptr WebKit2.HitTestResult.HitTestResult ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewContextMenuCallback`.
foreign import ccall "wrapper"
    mk_WebViewContextMenuCallback :: C_WebViewContextMenuCallback -> IO (FunPtr C_WebViewContextMenuCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewContextMenu :: MonadIO m => WebViewContextMenuCallback -> m (GClosure C_WebViewContextMenuCallback)
genClosure_WebViewContextMenu :: forall (m :: * -> *).
MonadIO m =>
WebViewContextMenuCallback
-> m (GClosure C_WebViewContextMenuCallback)
genClosure_WebViewContextMenu WebViewContextMenuCallback
cb = IO (GClosure C_WebViewContextMenuCallback)
-> m (GClosure C_WebViewContextMenuCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewContextMenuCallback)
 -> m (GClosure C_WebViewContextMenuCallback))
-> IO (GClosure C_WebViewContextMenuCallback)
-> m (GClosure C_WebViewContextMenuCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewContextMenuCallback
cb' = WebViewContextMenuCallback -> C_WebViewContextMenuCallback
wrap_WebViewContextMenuCallback WebViewContextMenuCallback
cb
    C_WebViewContextMenuCallback
-> IO (FunPtr C_WebViewContextMenuCallback)
mk_WebViewContextMenuCallback C_WebViewContextMenuCallback
cb' IO (FunPtr C_WebViewContextMenuCallback)
-> (FunPtr C_WebViewContextMenuCallback
    -> IO (GClosure C_WebViewContextMenuCallback))
-> IO (GClosure C_WebViewContextMenuCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewContextMenuCallback
-> IO (GClosure C_WebViewContextMenuCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewContextMenuCallback` into a `C_WebViewContextMenuCallback`.
wrap_WebViewContextMenuCallback ::
    WebViewContextMenuCallback ->
    C_WebViewContextMenuCallback
wrap_WebViewContextMenuCallback :: WebViewContextMenuCallback -> C_WebViewContextMenuCallback
wrap_WebViewContextMenuCallback WebViewContextMenuCallback
_cb Ptr ()
_ Ptr ContextMenu
contextMenu Ptr Event
event Ptr HitTestResult
hitTestResult Ptr ()
_ = do
    ContextMenu
contextMenu' <- ((ManagedPtr ContextMenu -> ContextMenu)
-> Ptr ContextMenu -> IO ContextMenu
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ContextMenu -> ContextMenu
WebKit2.ContextMenu.ContextMenu) Ptr ContextMenu
contextMenu
    (ManagedPtr Event -> Event)
-> Ptr Event -> (Event -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr Event -> Event
Gdk.Event.Event Ptr Event
event ((Event -> IO CInt) -> IO CInt) -> (Event -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Event
event' -> do
        HitTestResult
hitTestResult' <- ((ManagedPtr HitTestResult -> HitTestResult)
-> Ptr HitTestResult -> IO HitTestResult
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr HitTestResult -> HitTestResult
WebKit2.HitTestResult.HitTestResult) Ptr HitTestResult
hitTestResult
        Bool
result <- WebViewContextMenuCallback
_cb  ContextMenu
contextMenu' Event
event' HitTestResult
hitTestResult'
        let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
        CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [contextMenu](#signal:contextMenu) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #contextMenu callback
-- @
-- 
-- 
onWebViewContextMenu :: (IsWebView a, MonadIO m) => a -> WebViewContextMenuCallback -> m SignalHandlerId
onWebViewContextMenu :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewContextMenuCallback -> m SignalHandlerId
onWebViewContextMenu a
obj WebViewContextMenuCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewContextMenuCallback
cb' = WebViewContextMenuCallback -> C_WebViewContextMenuCallback
wrap_WebViewContextMenuCallback WebViewContextMenuCallback
cb
    FunPtr C_WebViewContextMenuCallback
cb'' <- C_WebViewContextMenuCallback
-> IO (FunPtr C_WebViewContextMenuCallback)
mk_WebViewContextMenuCallback C_WebViewContextMenuCallback
cb'
    a
-> Text
-> FunPtr C_WebViewContextMenuCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"context-menu" FunPtr C_WebViewContextMenuCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [contextMenu](#signal:contextMenu) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #contextMenu callback
-- @
-- 
-- 
afterWebViewContextMenu :: (IsWebView a, MonadIO m) => a -> WebViewContextMenuCallback -> m SignalHandlerId
afterWebViewContextMenu :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewContextMenuCallback -> m SignalHandlerId
afterWebViewContextMenu a
obj WebViewContextMenuCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewContextMenuCallback
cb' = WebViewContextMenuCallback -> C_WebViewContextMenuCallback
wrap_WebViewContextMenuCallback WebViewContextMenuCallback
cb
    FunPtr C_WebViewContextMenuCallback
cb'' <- C_WebViewContextMenuCallback
-> IO (FunPtr C_WebViewContextMenuCallback)
mk_WebViewContextMenuCallback C_WebViewContextMenuCallback
cb'
    a
-> Text
-> FunPtr C_WebViewContextMenuCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"context-menu" FunPtr C_WebViewContextMenuCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewContextMenuSignalInfo
instance SignalInfo WebViewContextMenuSignalInfo where
    type HaskellCallbackType WebViewContextMenuSignalInfo = WebViewContextMenuCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewContextMenuCallback cb
        cb'' <- mk_WebViewContextMenuCallback cb'
        connectSignalFunPtr obj "context-menu" cb'' connectMode detail

#endif

-- signal WebView::context-menu-dismissed
-- | Emitted after [contextMenu]("GI.WebKit2.Objects.WebView#g:signal:contextMenu") signal, if the context menu is shown,
-- to notify that the context menu is dismissed.
type WebViewContextMenuDismissedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewContextMenuDismissedCallback`@.
noWebViewContextMenuDismissedCallback :: Maybe WebViewContextMenuDismissedCallback
noWebViewContextMenuDismissedCallback :: Maybe (IO ())
noWebViewContextMenuDismissedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewContextMenuDismissedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebViewContextMenuDismissedCallback`.
foreign import ccall "wrapper"
    mk_WebViewContextMenuDismissedCallback :: C_WebViewContextMenuDismissedCallback -> IO (FunPtr C_WebViewContextMenuDismissedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewContextMenuDismissed :: MonadIO m => WebViewContextMenuDismissedCallback -> m (GClosure C_WebViewContextMenuDismissedCallback)
genClosure_WebViewContextMenuDismissed :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_WebViewCloseCallback)
genClosure_WebViewContextMenuDismissed IO ()
cb = IO (GClosure C_WebViewCloseCallback)
-> m (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewCloseCallback)
 -> m (GClosure C_WebViewCloseCallback))
-> IO (GClosure C_WebViewCloseCallback)
-> m (GClosure C_WebViewCloseCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewContextMenuDismissedCallback IO ()
cb
    C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewContextMenuDismissedCallback C_WebViewCloseCallback
cb' IO (FunPtr C_WebViewCloseCallback)
-> (FunPtr C_WebViewCloseCallback
    -> IO (GClosure C_WebViewCloseCallback))
-> IO (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewCloseCallback
-> IO (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewContextMenuDismissedCallback` into a `C_WebViewContextMenuDismissedCallback`.
wrap_WebViewContextMenuDismissedCallback ::
    WebViewContextMenuDismissedCallback ->
    C_WebViewContextMenuDismissedCallback
wrap_WebViewContextMenuDismissedCallback :: IO () -> C_WebViewCloseCallback
wrap_WebViewContextMenuDismissedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [contextMenuDismissed](#signal:contextMenuDismissed) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #contextMenuDismissed callback
-- @
-- 
-- 
onWebViewContextMenuDismissed :: (IsWebView a, MonadIO m) => a -> WebViewContextMenuDismissedCallback -> m SignalHandlerId
onWebViewContextMenuDismissed :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onWebViewContextMenuDismissed a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewContextMenuDismissedCallback IO ()
cb
    FunPtr C_WebViewCloseCallback
cb'' <- C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewContextMenuDismissedCallback C_WebViewCloseCallback
cb'
    a
-> Text
-> FunPtr C_WebViewCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"context-menu-dismissed" FunPtr C_WebViewCloseCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [contextMenuDismissed](#signal:contextMenuDismissed) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #contextMenuDismissed callback
-- @
-- 
-- 
afterWebViewContextMenuDismissed :: (IsWebView a, MonadIO m) => a -> WebViewContextMenuDismissedCallback -> m SignalHandlerId
afterWebViewContextMenuDismissed :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterWebViewContextMenuDismissed a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewContextMenuDismissedCallback IO ()
cb
    FunPtr C_WebViewCloseCallback
cb'' <- C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewContextMenuDismissedCallback C_WebViewCloseCallback
cb'
    a
-> Text
-> FunPtr C_WebViewCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"context-menu-dismissed" FunPtr C_WebViewCloseCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewContextMenuDismissedSignalInfo
instance SignalInfo WebViewContextMenuDismissedSignalInfo where
    type HaskellCallbackType WebViewContextMenuDismissedSignalInfo = WebViewContextMenuDismissedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewContextMenuDismissedCallback cb
        cb'' <- mk_WebViewContextMenuDismissedCallback cb'
        connectSignalFunPtr obj "context-menu-dismissed" cb'' connectMode detail

#endif

-- signal WebView::create
-- | Emitted when the creation of a new t'GI.WebKit2.Objects.WebView.WebView' is requested.
-- If this signal is handled the signal handler should return the
-- newly created t'GI.WebKit2.Objects.WebView.WebView'.
-- 
-- The t'GI.WebKit2.Structs.NavigationAction.NavigationAction' parameter contains information about the
-- navigation action that triggered this signal.
-- 
-- The new t'GI.WebKit2.Objects.WebView.WebView' must be related to /@webView@/, see
-- 'GI.WebKit2.Objects.WebView.webViewNewWithRelatedView' for more details.
-- 
-- The new t'GI.WebKit2.Objects.WebView.WebView' should not be displayed to the user
-- until the [readyToShow]("GI.WebKit2.Objects.WebView#g:signal:readyToShow") signal is emitted.
type WebViewCreateCallback =
    WebKit2.NavigationAction.NavigationAction
    -- ^ /@navigationAction@/: a t'GI.WebKit2.Structs.NavigationAction.NavigationAction'
    -> IO Gtk.Widget.Widget
    -- ^ __Returns:__ a newly allocated t'GI.WebKit2.Objects.WebView.WebView' widget
    --    or 'P.Nothing' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewCreateCallback`@.
noWebViewCreateCallback :: Maybe WebViewCreateCallback
noWebViewCreateCallback :: Maybe WebViewCreateCallback
noWebViewCreateCallback = Maybe WebViewCreateCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewCreateCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.NavigationAction.NavigationAction ->
    Ptr () ->                               -- user_data
    IO (Ptr Gtk.Widget.Widget)

-- | Generate a function pointer callable from C code, from a `C_WebViewCreateCallback`.
foreign import ccall "wrapper"
    mk_WebViewCreateCallback :: C_WebViewCreateCallback -> IO (FunPtr C_WebViewCreateCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewCreate :: MonadIO m => WebViewCreateCallback -> m (GClosure C_WebViewCreateCallback)
genClosure_WebViewCreate :: forall (m :: * -> *).
MonadIO m =>
WebViewCreateCallback -> m (GClosure C_WebViewCreateCallback)
genClosure_WebViewCreate WebViewCreateCallback
cb = IO (GClosure C_WebViewCreateCallback)
-> m (GClosure C_WebViewCreateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewCreateCallback)
 -> m (GClosure C_WebViewCreateCallback))
-> IO (GClosure C_WebViewCreateCallback)
-> m (GClosure C_WebViewCreateCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCreateCallback
cb' = WebViewCreateCallback -> C_WebViewCreateCallback
wrap_WebViewCreateCallback WebViewCreateCallback
cb
    C_WebViewCreateCallback -> IO (FunPtr C_WebViewCreateCallback)
mk_WebViewCreateCallback C_WebViewCreateCallback
cb' IO (FunPtr C_WebViewCreateCallback)
-> (FunPtr C_WebViewCreateCallback
    -> IO (GClosure C_WebViewCreateCallback))
-> IO (GClosure C_WebViewCreateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewCreateCallback
-> IO (GClosure C_WebViewCreateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewCreateCallback` into a `C_WebViewCreateCallback`.
wrap_WebViewCreateCallback ::
    WebViewCreateCallback ->
    C_WebViewCreateCallback
wrap_WebViewCreateCallback :: WebViewCreateCallback -> C_WebViewCreateCallback
wrap_WebViewCreateCallback WebViewCreateCallback
_cb Ptr ()
_ Ptr NavigationAction
navigationAction Ptr ()
_ = do
    (ManagedPtr NavigationAction -> NavigationAction)
-> Ptr NavigationAction
-> (NavigationAction -> IO (Ptr Widget))
-> IO (Ptr Widget)
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr NavigationAction -> NavigationAction
WebKit2.NavigationAction.NavigationAction Ptr NavigationAction
navigationAction ((NavigationAction -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (NavigationAction -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \NavigationAction
navigationAction' -> do
        Widget
result <- WebViewCreateCallback
_cb  NavigationAction
navigationAction'
        Ptr Widget
result' <- Widget -> IO (Ptr Widget)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject Widget
result
        Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
result'


-- | Connect a signal handler for the [create](#signal:create) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #create callback
-- @
-- 
-- 
onWebViewCreate :: (IsWebView a, MonadIO m) => a -> WebViewCreateCallback -> m SignalHandlerId
onWebViewCreate :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewCreateCallback -> m SignalHandlerId
onWebViewCreate a
obj WebViewCreateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCreateCallback
cb' = WebViewCreateCallback -> C_WebViewCreateCallback
wrap_WebViewCreateCallback WebViewCreateCallback
cb
    FunPtr C_WebViewCreateCallback
cb'' <- C_WebViewCreateCallback -> IO (FunPtr C_WebViewCreateCallback)
mk_WebViewCreateCallback C_WebViewCreateCallback
cb'
    a
-> Text
-> FunPtr C_WebViewCreateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"create" FunPtr C_WebViewCreateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [create](#signal:create) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #create callback
-- @
-- 
-- 
afterWebViewCreate :: (IsWebView a, MonadIO m) => a -> WebViewCreateCallback -> m SignalHandlerId
afterWebViewCreate :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewCreateCallback -> m SignalHandlerId
afterWebViewCreate a
obj WebViewCreateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCreateCallback
cb' = WebViewCreateCallback -> C_WebViewCreateCallback
wrap_WebViewCreateCallback WebViewCreateCallback
cb
    FunPtr C_WebViewCreateCallback
cb'' <- C_WebViewCreateCallback -> IO (FunPtr C_WebViewCreateCallback)
mk_WebViewCreateCallback C_WebViewCreateCallback
cb'
    a
-> Text
-> FunPtr C_WebViewCreateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"create" FunPtr C_WebViewCreateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewCreateSignalInfo
instance SignalInfo WebViewCreateSignalInfo where
    type HaskellCallbackType WebViewCreateSignalInfo = WebViewCreateCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewCreateCallback cb
        cb'' <- mk_WebViewCreateCallback cb'
        connectSignalFunPtr obj "create" cb'' connectMode detail

#endif

-- signal WebView::decide-policy
-- | This signal is emitted when WebKit is requesting the client to decide a policy
-- decision, such as whether to navigate to a page, open a new window or whether or
-- not to download a resource. The t'GI.WebKit2.Objects.NavigationPolicyDecision.NavigationPolicyDecision' passed in the
-- /@decision@/ argument is a generic type, but should be casted to a more
-- specific type when making the decision. For example:
-- 
-- \<informalexample>\<programlisting>
-- static gboolean
-- decide_policy_cb (WebKitWebView *web_view,
--                   WebKitPolicyDecision *decision,
--                   WebKitPolicyDecisionType type)
-- {
--     switch (type) {
--     case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: {
--         WebKitNavigationPolicyDecision *navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision);
--         \/\<!-- -->* Make a policy decision here. *\<!-- -->\/
--         break;
--     }
--     case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION: {
--         WebKitNavigationPolicyDecision *navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision);
--         \/\<!-- -->* Make a policy decision here. *\<!-- -->\/
--         break;
--     }
--     case WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
--         WebKitResponsePolicyDecision *response = WEBKIT_RESPONSE_POLICY_DECISION (decision);
--         \/\<!-- -->* Make a policy decision here. *\<!-- -->\/
--         break;
--     default:
--         \/\<!-- -->* Making no decision results in 'GI.WebKit2.Objects.PolicyDecision.policyDecisionUse'. *\<!-- -->\/
--         return FALSE;
--     }
--     return TRUE;
-- }
-- \<\/programlisting>\<\/informalexample>
-- 
-- It is possible to make policy decision asynchronously, by simply calling 'GI.GObject.Objects.Object.objectRef'
-- on the /@decision@/ argument and returning 'P.True' to block the default signal handler.
-- If the last reference is removed on a t'GI.WebKit2.Objects.PolicyDecision.PolicyDecision' and no decision has been
-- made explicitly, 'GI.WebKit2.Objects.PolicyDecision.policyDecisionUse' will be the default policy decision. The
-- default signal handler will simply call 'GI.WebKit2.Objects.PolicyDecision.policyDecisionUse'. Only the first
-- policy decision chosen for a given t'GI.WebKit2.Objects.PolicyDecision.PolicyDecision' will have any affect.
type WebViewDecidePolicyCallback =
    WebKit2.PolicyDecision.PolicyDecision
    -- ^ /@decision@/: the t'GI.WebKit2.Objects.PolicyDecision.PolicyDecision'
    -> WebKit2.Enums.PolicyDecisionType
    -- ^ /@decisionType@/: a t'GI.WebKit2.Enums.PolicyDecisionType' denoting the type of /@decision@/
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewDecidePolicyCallback`@.
noWebViewDecidePolicyCallback :: Maybe WebViewDecidePolicyCallback
noWebViewDecidePolicyCallback :: Maybe WebViewDecidePolicyCallback
noWebViewDecidePolicyCallback = Maybe WebViewDecidePolicyCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewDecidePolicyCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.PolicyDecision.PolicyDecision ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewDecidePolicyCallback`.
foreign import ccall "wrapper"
    mk_WebViewDecidePolicyCallback :: C_WebViewDecidePolicyCallback -> IO (FunPtr C_WebViewDecidePolicyCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewDecidePolicy :: MonadIO m => WebViewDecidePolicyCallback -> m (GClosure C_WebViewDecidePolicyCallback)
genClosure_WebViewDecidePolicy :: forall (m :: * -> *).
MonadIO m =>
WebViewDecidePolicyCallback
-> m (GClosure C_WebViewDecidePolicyCallback)
genClosure_WebViewDecidePolicy WebViewDecidePolicyCallback
cb = IO (GClosure C_WebViewDecidePolicyCallback)
-> m (GClosure C_WebViewDecidePolicyCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewDecidePolicyCallback)
 -> m (GClosure C_WebViewDecidePolicyCallback))
-> IO (GClosure C_WebViewDecidePolicyCallback)
-> m (GClosure C_WebViewDecidePolicyCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewDecidePolicyCallback
cb' = WebViewDecidePolicyCallback -> C_WebViewDecidePolicyCallback
wrap_WebViewDecidePolicyCallback WebViewDecidePolicyCallback
cb
    C_WebViewDecidePolicyCallback
-> IO (FunPtr C_WebViewDecidePolicyCallback)
mk_WebViewDecidePolicyCallback C_WebViewDecidePolicyCallback
cb' IO (FunPtr C_WebViewDecidePolicyCallback)
-> (FunPtr C_WebViewDecidePolicyCallback
    -> IO (GClosure C_WebViewDecidePolicyCallback))
-> IO (GClosure C_WebViewDecidePolicyCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewDecidePolicyCallback
-> IO (GClosure C_WebViewDecidePolicyCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewDecidePolicyCallback` into a `C_WebViewDecidePolicyCallback`.
wrap_WebViewDecidePolicyCallback ::
    WebViewDecidePolicyCallback ->
    C_WebViewDecidePolicyCallback
wrap_WebViewDecidePolicyCallback :: WebViewDecidePolicyCallback -> C_WebViewDecidePolicyCallback
wrap_WebViewDecidePolicyCallback WebViewDecidePolicyCallback
_cb Ptr ()
_ Ptr PolicyDecision
decision CUInt
decisionType Ptr ()
_ = do
    PolicyDecision
decision' <- ((ManagedPtr PolicyDecision -> PolicyDecision)
-> Ptr PolicyDecision -> IO PolicyDecision
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PolicyDecision -> PolicyDecision
WebKit2.PolicyDecision.PolicyDecision) Ptr PolicyDecision
decision
    let decisionType' :: PolicyDecisionType
decisionType' = (Int -> PolicyDecisionType
forall a. Enum a => Int -> a
toEnum (Int -> PolicyDecisionType)
-> (CUInt -> Int) -> CUInt -> PolicyDecisionType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
decisionType
    Bool
result <- WebViewDecidePolicyCallback
_cb  PolicyDecision
decision' PolicyDecisionType
decisionType'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [decidePolicy](#signal:decidePolicy) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #decidePolicy callback
-- @
-- 
-- 
onWebViewDecidePolicy :: (IsWebView a, MonadIO m) => a -> WebViewDecidePolicyCallback -> m SignalHandlerId
onWebViewDecidePolicy :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewDecidePolicyCallback -> m SignalHandlerId
onWebViewDecidePolicy a
obj WebViewDecidePolicyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewDecidePolicyCallback
cb' = WebViewDecidePolicyCallback -> C_WebViewDecidePolicyCallback
wrap_WebViewDecidePolicyCallback WebViewDecidePolicyCallback
cb
    FunPtr C_WebViewDecidePolicyCallback
cb'' <- C_WebViewDecidePolicyCallback
-> IO (FunPtr C_WebViewDecidePolicyCallback)
mk_WebViewDecidePolicyCallback C_WebViewDecidePolicyCallback
cb'
    a
-> Text
-> FunPtr C_WebViewDecidePolicyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"decide-policy" FunPtr C_WebViewDecidePolicyCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [decidePolicy](#signal:decidePolicy) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #decidePolicy callback
-- @
-- 
-- 
afterWebViewDecidePolicy :: (IsWebView a, MonadIO m) => a -> WebViewDecidePolicyCallback -> m SignalHandlerId
afterWebViewDecidePolicy :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewDecidePolicyCallback -> m SignalHandlerId
afterWebViewDecidePolicy a
obj WebViewDecidePolicyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewDecidePolicyCallback
cb' = WebViewDecidePolicyCallback -> C_WebViewDecidePolicyCallback
wrap_WebViewDecidePolicyCallback WebViewDecidePolicyCallback
cb
    FunPtr C_WebViewDecidePolicyCallback
cb'' <- C_WebViewDecidePolicyCallback
-> IO (FunPtr C_WebViewDecidePolicyCallback)
mk_WebViewDecidePolicyCallback C_WebViewDecidePolicyCallback
cb'
    a
-> Text
-> FunPtr C_WebViewDecidePolicyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"decide-policy" FunPtr C_WebViewDecidePolicyCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewDecidePolicySignalInfo
instance SignalInfo WebViewDecidePolicySignalInfo where
    type HaskellCallbackType WebViewDecidePolicySignalInfo = WebViewDecidePolicyCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewDecidePolicyCallback cb
        cb'' <- mk_WebViewDecidePolicyCallback cb'
        connectSignalFunPtr obj "decide-policy" cb'' connectMode detail

#endif

-- signal WebView::enter-fullscreen
-- | Emitted when JavaScript code calls
-- \<function>element.webkitRequestFullScreen\<\/function>. If the
-- signal is not handled the t'GI.WebKit2.Objects.WebView.WebView' will proceed to full screen
-- its top level window. This signal can be used by client code to
-- request permission to the user prior doing the full screen
-- transition and eventually prepare the top-level window
-- (e.g. hide some widgets that would otherwise be part of the
-- full screen window).
type WebViewEnterFullscreenCallback =
    IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --    'P.False' to continue emission of the event.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewEnterFullscreenCallback`@.
noWebViewEnterFullscreenCallback :: Maybe WebViewEnterFullscreenCallback
noWebViewEnterFullscreenCallback :: Maybe WebViewEnterFullscreenCallback
noWebViewEnterFullscreenCallback = Maybe WebViewEnterFullscreenCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewEnterFullscreenCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewEnterFullscreenCallback`.
foreign import ccall "wrapper"
    mk_WebViewEnterFullscreenCallback :: C_WebViewEnterFullscreenCallback -> IO (FunPtr C_WebViewEnterFullscreenCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewEnterFullscreen :: MonadIO m => WebViewEnterFullscreenCallback -> m (GClosure C_WebViewEnterFullscreenCallback)
genClosure_WebViewEnterFullscreen :: forall (m :: * -> *).
MonadIO m =>
WebViewEnterFullscreenCallback
-> m (GClosure C_WebViewEnterFullscreenCallback)
genClosure_WebViewEnterFullscreen WebViewEnterFullscreenCallback
cb = IO (GClosure C_WebViewEnterFullscreenCallback)
-> m (GClosure C_WebViewEnterFullscreenCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewEnterFullscreenCallback)
 -> m (GClosure C_WebViewEnterFullscreenCallback))
-> IO (GClosure C_WebViewEnterFullscreenCallback)
-> m (GClosure C_WebViewEnterFullscreenCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewEnterFullscreenCallback
cb' = WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewEnterFullscreenCallback WebViewEnterFullscreenCallback
cb
    C_WebViewEnterFullscreenCallback
-> IO (FunPtr C_WebViewEnterFullscreenCallback)
mk_WebViewEnterFullscreenCallback C_WebViewEnterFullscreenCallback
cb' IO (FunPtr C_WebViewEnterFullscreenCallback)
-> (FunPtr C_WebViewEnterFullscreenCallback
    -> IO (GClosure C_WebViewEnterFullscreenCallback))
-> IO (GClosure C_WebViewEnterFullscreenCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewEnterFullscreenCallback
-> IO (GClosure C_WebViewEnterFullscreenCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewEnterFullscreenCallback` into a `C_WebViewEnterFullscreenCallback`.
wrap_WebViewEnterFullscreenCallback ::
    WebViewEnterFullscreenCallback ->
    C_WebViewEnterFullscreenCallback
wrap_WebViewEnterFullscreenCallback :: WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewEnterFullscreenCallback WebViewEnterFullscreenCallback
_cb Ptr ()
_ Ptr ()
_ = do
    Bool
result <- WebViewEnterFullscreenCallback
_cb 
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [enterFullscreen](#signal:enterFullscreen) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #enterFullscreen callback
-- @
-- 
-- 
onWebViewEnterFullscreen :: (IsWebView a, MonadIO m) => a -> WebViewEnterFullscreenCallback -> m SignalHandlerId
onWebViewEnterFullscreen :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewEnterFullscreenCallback -> m SignalHandlerId
onWebViewEnterFullscreen a
obj WebViewEnterFullscreenCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewEnterFullscreenCallback
cb' = WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewEnterFullscreenCallback WebViewEnterFullscreenCallback
cb
    FunPtr C_WebViewEnterFullscreenCallback
cb'' <- C_WebViewEnterFullscreenCallback
-> IO (FunPtr C_WebViewEnterFullscreenCallback)
mk_WebViewEnterFullscreenCallback C_WebViewEnterFullscreenCallback
cb'
    a
-> Text
-> FunPtr C_WebViewEnterFullscreenCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"enter-fullscreen" FunPtr C_WebViewEnterFullscreenCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [enterFullscreen](#signal:enterFullscreen) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #enterFullscreen callback
-- @
-- 
-- 
afterWebViewEnterFullscreen :: (IsWebView a, MonadIO m) => a -> WebViewEnterFullscreenCallback -> m SignalHandlerId
afterWebViewEnterFullscreen :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewEnterFullscreenCallback -> m SignalHandlerId
afterWebViewEnterFullscreen a
obj WebViewEnterFullscreenCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewEnterFullscreenCallback
cb' = WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewEnterFullscreenCallback WebViewEnterFullscreenCallback
cb
    FunPtr C_WebViewEnterFullscreenCallback
cb'' <- C_WebViewEnterFullscreenCallback
-> IO (FunPtr C_WebViewEnterFullscreenCallback)
mk_WebViewEnterFullscreenCallback C_WebViewEnterFullscreenCallback
cb'
    a
-> Text
-> FunPtr C_WebViewEnterFullscreenCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"enter-fullscreen" FunPtr C_WebViewEnterFullscreenCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewEnterFullscreenSignalInfo
instance SignalInfo WebViewEnterFullscreenSignalInfo where
    type HaskellCallbackType WebViewEnterFullscreenSignalInfo = WebViewEnterFullscreenCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewEnterFullscreenCallback cb
        cb'' <- mk_WebViewEnterFullscreenCallback cb'
        connectSignalFunPtr obj "enter-fullscreen" cb'' connectMode detail

#endif

-- signal WebView::insecure-content-detected
-- | This signal is emitted when insecure content has been detected
-- in a page loaded through a secure connection. This typically
-- means that a external resource from an unstrusted source has
-- been run or displayed, resulting in a mix of HTTPS and
-- non-HTTPS content.
-- 
-- You can check the /@event@/ parameter to know exactly which kind
-- of event has been detected (see t'GI.WebKit2.Enums.InsecureContentEvent').
type WebViewInsecureContentDetectedCallback =
    WebKit2.Enums.InsecureContentEvent
    -- ^ /@event@/: the t'GI.WebKit2.Enums.InsecureContentEvent'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewInsecureContentDetectedCallback`@.
noWebViewInsecureContentDetectedCallback :: Maybe WebViewInsecureContentDetectedCallback
noWebViewInsecureContentDetectedCallback :: Maybe WebViewInsecureContentDetectedCallback
noWebViewInsecureContentDetectedCallback = Maybe WebViewInsecureContentDetectedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewInsecureContentDetectedCallback =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebViewInsecureContentDetectedCallback`.
foreign import ccall "wrapper"
    mk_WebViewInsecureContentDetectedCallback :: C_WebViewInsecureContentDetectedCallback -> IO (FunPtr C_WebViewInsecureContentDetectedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewInsecureContentDetected :: MonadIO m => WebViewInsecureContentDetectedCallback -> m (GClosure C_WebViewInsecureContentDetectedCallback)
genClosure_WebViewInsecureContentDetected :: forall (m :: * -> *).
MonadIO m =>
WebViewInsecureContentDetectedCallback
-> m (GClosure C_WebViewInsecureContentDetectedCallback)
genClosure_WebViewInsecureContentDetected WebViewInsecureContentDetectedCallback
cb = IO (GClosure C_WebViewInsecureContentDetectedCallback)
-> m (GClosure C_WebViewInsecureContentDetectedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewInsecureContentDetectedCallback)
 -> m (GClosure C_WebViewInsecureContentDetectedCallback))
-> IO (GClosure C_WebViewInsecureContentDetectedCallback)
-> m (GClosure C_WebViewInsecureContentDetectedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewInsecureContentDetectedCallback
cb' = WebViewInsecureContentDetectedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewInsecureContentDetectedCallback WebViewInsecureContentDetectedCallback
cb
    C_WebViewInsecureContentDetectedCallback
-> IO (FunPtr C_WebViewInsecureContentDetectedCallback)
mk_WebViewInsecureContentDetectedCallback C_WebViewInsecureContentDetectedCallback
cb' IO (FunPtr C_WebViewInsecureContentDetectedCallback)
-> (FunPtr C_WebViewInsecureContentDetectedCallback
    -> IO (GClosure C_WebViewInsecureContentDetectedCallback))
-> IO (GClosure C_WebViewInsecureContentDetectedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewInsecureContentDetectedCallback
-> IO (GClosure C_WebViewInsecureContentDetectedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewInsecureContentDetectedCallback` into a `C_WebViewInsecureContentDetectedCallback`.
wrap_WebViewInsecureContentDetectedCallback ::
    WebViewInsecureContentDetectedCallback ->
    C_WebViewInsecureContentDetectedCallback
wrap_WebViewInsecureContentDetectedCallback :: WebViewInsecureContentDetectedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewInsecureContentDetectedCallback WebViewInsecureContentDetectedCallback
_cb Ptr ()
_ CUInt
event Ptr ()
_ = do
    let event' :: InsecureContentEvent
event' = (Int -> InsecureContentEvent
forall a. Enum a => Int -> a
toEnum (Int -> InsecureContentEvent)
-> (CUInt -> Int) -> CUInt -> InsecureContentEvent
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
event
    WebViewInsecureContentDetectedCallback
_cb  InsecureContentEvent
event'


-- | Connect a signal handler for the [insecureContentDetected](#signal:insecureContentDetected) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #insecureContentDetected callback
-- @
-- 
-- 
onWebViewInsecureContentDetected :: (IsWebView a, MonadIO m) => a -> WebViewInsecureContentDetectedCallback -> m SignalHandlerId
onWebViewInsecureContentDetected :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewInsecureContentDetectedCallback -> m SignalHandlerId
onWebViewInsecureContentDetected a
obj WebViewInsecureContentDetectedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewInsecureContentDetectedCallback
cb' = WebViewInsecureContentDetectedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewInsecureContentDetectedCallback WebViewInsecureContentDetectedCallback
cb
    FunPtr C_WebViewInsecureContentDetectedCallback
cb'' <- C_WebViewInsecureContentDetectedCallback
-> IO (FunPtr C_WebViewInsecureContentDetectedCallback)
mk_WebViewInsecureContentDetectedCallback C_WebViewInsecureContentDetectedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewInsecureContentDetectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"insecure-content-detected" FunPtr C_WebViewInsecureContentDetectedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [insecureContentDetected](#signal:insecureContentDetected) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #insecureContentDetected callback
-- @
-- 
-- 
afterWebViewInsecureContentDetected :: (IsWebView a, MonadIO m) => a -> WebViewInsecureContentDetectedCallback -> m SignalHandlerId
afterWebViewInsecureContentDetected :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewInsecureContentDetectedCallback -> m SignalHandlerId
afterWebViewInsecureContentDetected a
obj WebViewInsecureContentDetectedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewInsecureContentDetectedCallback
cb' = WebViewInsecureContentDetectedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewInsecureContentDetectedCallback WebViewInsecureContentDetectedCallback
cb
    FunPtr C_WebViewInsecureContentDetectedCallback
cb'' <- C_WebViewInsecureContentDetectedCallback
-> IO (FunPtr C_WebViewInsecureContentDetectedCallback)
mk_WebViewInsecureContentDetectedCallback C_WebViewInsecureContentDetectedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewInsecureContentDetectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"insecure-content-detected" FunPtr C_WebViewInsecureContentDetectedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewInsecureContentDetectedSignalInfo
instance SignalInfo WebViewInsecureContentDetectedSignalInfo where
    type HaskellCallbackType WebViewInsecureContentDetectedSignalInfo = WebViewInsecureContentDetectedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewInsecureContentDetectedCallback cb
        cb'' <- mk_WebViewInsecureContentDetectedCallback cb'
        connectSignalFunPtr obj "insecure-content-detected" cb'' connectMode detail

#endif

-- signal WebView::leave-fullscreen
-- | Emitted when the t'GI.WebKit2.Objects.WebView.WebView' is about to restore its top level
-- window out of its full screen state. This signal can be used by
-- client code to restore widgets hidden during the
-- [enterFullscreen]("GI.WebKit2.Objects.WebView#g:signal:enterFullscreen") stage for instance.
type WebViewLeaveFullscreenCallback =
    IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --    'P.False' to continue emission of the event.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewLeaveFullscreenCallback`@.
noWebViewLeaveFullscreenCallback :: Maybe WebViewLeaveFullscreenCallback
noWebViewLeaveFullscreenCallback :: Maybe WebViewEnterFullscreenCallback
noWebViewLeaveFullscreenCallback = Maybe WebViewEnterFullscreenCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewLeaveFullscreenCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewLeaveFullscreenCallback`.
foreign import ccall "wrapper"
    mk_WebViewLeaveFullscreenCallback :: C_WebViewLeaveFullscreenCallback -> IO (FunPtr C_WebViewLeaveFullscreenCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewLeaveFullscreen :: MonadIO m => WebViewLeaveFullscreenCallback -> m (GClosure C_WebViewLeaveFullscreenCallback)
genClosure_WebViewLeaveFullscreen :: forall (m :: * -> *).
MonadIO m =>
WebViewEnterFullscreenCallback
-> m (GClosure C_WebViewEnterFullscreenCallback)
genClosure_WebViewLeaveFullscreen WebViewEnterFullscreenCallback
cb = IO (GClosure C_WebViewEnterFullscreenCallback)
-> m (GClosure C_WebViewEnterFullscreenCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewEnterFullscreenCallback)
 -> m (GClosure C_WebViewEnterFullscreenCallback))
-> IO (GClosure C_WebViewEnterFullscreenCallback)
-> m (GClosure C_WebViewEnterFullscreenCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewEnterFullscreenCallback
cb' = WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewLeaveFullscreenCallback WebViewEnterFullscreenCallback
cb
    C_WebViewEnterFullscreenCallback
-> IO (FunPtr C_WebViewEnterFullscreenCallback)
mk_WebViewLeaveFullscreenCallback C_WebViewEnterFullscreenCallback
cb' IO (FunPtr C_WebViewEnterFullscreenCallback)
-> (FunPtr C_WebViewEnterFullscreenCallback
    -> IO (GClosure C_WebViewEnterFullscreenCallback))
-> IO (GClosure C_WebViewEnterFullscreenCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewEnterFullscreenCallback
-> IO (GClosure C_WebViewEnterFullscreenCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewLeaveFullscreenCallback` into a `C_WebViewLeaveFullscreenCallback`.
wrap_WebViewLeaveFullscreenCallback ::
    WebViewLeaveFullscreenCallback ->
    C_WebViewLeaveFullscreenCallback
wrap_WebViewLeaveFullscreenCallback :: WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewLeaveFullscreenCallback WebViewEnterFullscreenCallback
_cb Ptr ()
_ Ptr ()
_ = do
    Bool
result <- WebViewEnterFullscreenCallback
_cb 
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [leaveFullscreen](#signal:leaveFullscreen) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #leaveFullscreen callback
-- @
-- 
-- 
onWebViewLeaveFullscreen :: (IsWebView a, MonadIO m) => a -> WebViewLeaveFullscreenCallback -> m SignalHandlerId
onWebViewLeaveFullscreen :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewEnterFullscreenCallback -> m SignalHandlerId
onWebViewLeaveFullscreen a
obj WebViewEnterFullscreenCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewEnterFullscreenCallback
cb' = WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewLeaveFullscreenCallback WebViewEnterFullscreenCallback
cb
    FunPtr C_WebViewEnterFullscreenCallback
cb'' <- C_WebViewEnterFullscreenCallback
-> IO (FunPtr C_WebViewEnterFullscreenCallback)
mk_WebViewLeaveFullscreenCallback C_WebViewEnterFullscreenCallback
cb'
    a
-> Text
-> FunPtr C_WebViewEnterFullscreenCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"leave-fullscreen" FunPtr C_WebViewEnterFullscreenCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [leaveFullscreen](#signal:leaveFullscreen) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #leaveFullscreen callback
-- @
-- 
-- 
afterWebViewLeaveFullscreen :: (IsWebView a, MonadIO m) => a -> WebViewLeaveFullscreenCallback -> m SignalHandlerId
afterWebViewLeaveFullscreen :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewEnterFullscreenCallback -> m SignalHandlerId
afterWebViewLeaveFullscreen a
obj WebViewEnterFullscreenCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewEnterFullscreenCallback
cb' = WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewLeaveFullscreenCallback WebViewEnterFullscreenCallback
cb
    FunPtr C_WebViewEnterFullscreenCallback
cb'' <- C_WebViewEnterFullscreenCallback
-> IO (FunPtr C_WebViewEnterFullscreenCallback)
mk_WebViewLeaveFullscreenCallback C_WebViewEnterFullscreenCallback
cb'
    a
-> Text
-> FunPtr C_WebViewEnterFullscreenCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"leave-fullscreen" FunPtr C_WebViewEnterFullscreenCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewLeaveFullscreenSignalInfo
instance SignalInfo WebViewLeaveFullscreenSignalInfo where
    type HaskellCallbackType WebViewLeaveFullscreenSignalInfo = WebViewLeaveFullscreenCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewLeaveFullscreenCallback cb
        cb'' <- mk_WebViewLeaveFullscreenCallback cb'
        connectSignalFunPtr obj "leave-fullscreen" cb'' connectMode detail

#endif

-- signal WebView::load-changed
-- | Emitted when a load operation in /@webView@/ changes.
-- The signal is always emitted with 'GI.WebKit2.Enums.LoadEventStarted' when a
-- new load request is made and 'GI.WebKit2.Enums.LoadEventFinished' when the load
-- finishes successfully or due to an error. When the ongoing load
-- operation fails [loadFailed]("GI.WebKit2.Objects.WebView#g:signal:loadFailed") signal is emitted
-- before [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") is emitted with
-- 'GI.WebKit2.Enums.LoadEventFinished'.
-- If a redirection is received from the server, this signal is emitted
-- with 'GI.WebKit2.Enums.LoadEventRedirected' after the initial emission with
-- 'GI.WebKit2.Enums.LoadEventStarted' and before 'GI.WebKit2.Enums.LoadEventCommitted'.
-- When the page content starts arriving the signal is emitted with
-- 'GI.WebKit2.Enums.LoadEventCommitted' event.
-- 
-- You can handle this signal and use a switch to track any ongoing
-- load operation.
-- 
-- \<informalexample>\<programlisting>
-- static void web_view_load_changed (WebKitWebView  *web_view,
--                                    WebKitLoadEvent load_event,
--                                    gpointer        user_data)
-- {
--     switch (load_event) {
--     case WEBKIT_LOAD_STARTED:
--         \/\<!-- -->* New load, we have now a provisional URI *\<!-- -->\/
--         provisional_uri = webkit_web_view_get_uri (web_view);
--         \/\<!-- -->* Here we could start a spinner or update the
--          \<!-- -->* location bar with the provisional URI *\<!-- -->\/
--         break;
--     case WEBKIT_LOAD_REDIRECTED:
--         redirected_uri = webkit_web_view_get_uri (web_view);
--         break;
--     case WEBKIT_LOAD_COMMITTED:
--         \/\<!-- -->* The load is being performed. Current URI is
--          \<!-- -->* the final one and it won\'t change unless a new
--          \<!-- -->* load is requested or a navigation within the
--          \<!-- -->* same page is performed *\<!-- -->\/
--         uri = webkit_web_view_get_uri (web_view);
--         break;
--     case WEBKIT_LOAD_FINISHED:
--         \/\<!-- -->* Load finished, we can now stop the spinner *\<!-- -->\/
--         break;
--     }
-- }
-- \<\/programlisting>\<\/informalexample>
type WebViewLoadChangedCallback =
    WebKit2.Enums.LoadEvent
    -- ^ /@loadEvent@/: the t'GI.WebKit2.Enums.LoadEvent'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewLoadChangedCallback`@.
noWebViewLoadChangedCallback :: Maybe WebViewLoadChangedCallback
noWebViewLoadChangedCallback :: Maybe WebViewLoadChangedCallback
noWebViewLoadChangedCallback = Maybe WebViewLoadChangedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewLoadChangedCallback =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebViewLoadChangedCallback`.
foreign import ccall "wrapper"
    mk_WebViewLoadChangedCallback :: C_WebViewLoadChangedCallback -> IO (FunPtr C_WebViewLoadChangedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewLoadChanged :: MonadIO m => WebViewLoadChangedCallback -> m (GClosure C_WebViewLoadChangedCallback)
genClosure_WebViewLoadChanged :: forall (m :: * -> *).
MonadIO m =>
WebViewLoadChangedCallback
-> m (GClosure C_WebViewInsecureContentDetectedCallback)
genClosure_WebViewLoadChanged WebViewLoadChangedCallback
cb = IO (GClosure C_WebViewInsecureContentDetectedCallback)
-> m (GClosure C_WebViewInsecureContentDetectedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewInsecureContentDetectedCallback)
 -> m (GClosure C_WebViewInsecureContentDetectedCallback))
-> IO (GClosure C_WebViewInsecureContentDetectedCallback)
-> m (GClosure C_WebViewInsecureContentDetectedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewInsecureContentDetectedCallback
cb' = WebViewLoadChangedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewLoadChangedCallback WebViewLoadChangedCallback
cb
    C_WebViewInsecureContentDetectedCallback
-> IO (FunPtr C_WebViewInsecureContentDetectedCallback)
mk_WebViewLoadChangedCallback C_WebViewInsecureContentDetectedCallback
cb' IO (FunPtr C_WebViewInsecureContentDetectedCallback)
-> (FunPtr C_WebViewInsecureContentDetectedCallback
    -> IO (GClosure C_WebViewInsecureContentDetectedCallback))
-> IO (GClosure C_WebViewInsecureContentDetectedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewInsecureContentDetectedCallback
-> IO (GClosure C_WebViewInsecureContentDetectedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewLoadChangedCallback` into a `C_WebViewLoadChangedCallback`.
wrap_WebViewLoadChangedCallback ::
    WebViewLoadChangedCallback ->
    C_WebViewLoadChangedCallback
wrap_WebViewLoadChangedCallback :: WebViewLoadChangedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewLoadChangedCallback WebViewLoadChangedCallback
_cb Ptr ()
_ CUInt
loadEvent Ptr ()
_ = do
    let loadEvent' :: LoadEvent
loadEvent' = (Int -> LoadEvent
forall a. Enum a => Int -> a
toEnum (Int -> LoadEvent) -> (CUInt -> Int) -> CUInt -> LoadEvent
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
loadEvent
    WebViewLoadChangedCallback
_cb  LoadEvent
loadEvent'


-- | Connect a signal handler for the [loadChanged](#signal:loadChanged) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #loadChanged callback
-- @
-- 
-- 
onWebViewLoadChanged :: (IsWebView a, MonadIO m) => a -> WebViewLoadChangedCallback -> m SignalHandlerId
onWebViewLoadChanged :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewLoadChangedCallback -> m SignalHandlerId
onWebViewLoadChanged a
obj WebViewLoadChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewInsecureContentDetectedCallback
cb' = WebViewLoadChangedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewLoadChangedCallback WebViewLoadChangedCallback
cb
    FunPtr C_WebViewInsecureContentDetectedCallback
cb'' <- C_WebViewInsecureContentDetectedCallback
-> IO (FunPtr C_WebViewInsecureContentDetectedCallback)
mk_WebViewLoadChangedCallback C_WebViewInsecureContentDetectedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewInsecureContentDetectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"load-changed" FunPtr C_WebViewInsecureContentDetectedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [loadChanged](#signal:loadChanged) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #loadChanged callback
-- @
-- 
-- 
afterWebViewLoadChanged :: (IsWebView a, MonadIO m) => a -> WebViewLoadChangedCallback -> m SignalHandlerId
afterWebViewLoadChanged :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewLoadChangedCallback -> m SignalHandlerId
afterWebViewLoadChanged a
obj WebViewLoadChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewInsecureContentDetectedCallback
cb' = WebViewLoadChangedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewLoadChangedCallback WebViewLoadChangedCallback
cb
    FunPtr C_WebViewInsecureContentDetectedCallback
cb'' <- C_WebViewInsecureContentDetectedCallback
-> IO (FunPtr C_WebViewInsecureContentDetectedCallback)
mk_WebViewLoadChangedCallback C_WebViewInsecureContentDetectedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewInsecureContentDetectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"load-changed" FunPtr C_WebViewInsecureContentDetectedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewLoadChangedSignalInfo
instance SignalInfo WebViewLoadChangedSignalInfo where
    type HaskellCallbackType WebViewLoadChangedSignalInfo = WebViewLoadChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewLoadChangedCallback cb
        cb'' <- mk_WebViewLoadChangedCallback cb'
        connectSignalFunPtr obj "load-changed" cb'' connectMode detail

#endif

-- signal WebView::load-failed
-- | Emitted when an error occurs during a load operation.
-- If the error happened when starting to load data for a page
-- /@loadEvent@/ will be 'GI.WebKit2.Enums.LoadEventStarted'. If it happened while
-- loading a committed data source /@loadEvent@/ will be 'GI.WebKit2.Enums.LoadEventCommitted'.
-- Since a load error causes the load operation to finish, the signal
-- WebKitWebView[loadChanged](#g:signal:loadChanged) will always be emitted with
-- 'GI.WebKit2.Enums.LoadEventFinished' event right after this one.
-- 
-- By default, if the signal is not handled, a stock error page will be displayed.
-- You need to handle the signal if you want to provide your own error page.
type WebViewLoadFailedCallback =
    WebKit2.Enums.LoadEvent
    -- ^ /@loadEvent@/: the t'GI.WebKit2.Enums.LoadEvent' of the load operation
    -> T.Text
    -- ^ /@failingUri@/: the URI that failed to load
    -> GError
    -- ^ /@error@/: the t'GError' that was triggered
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --    'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewLoadFailedCallback`@.
noWebViewLoadFailedCallback :: Maybe WebViewLoadFailedCallback
noWebViewLoadFailedCallback :: Maybe WebViewLoadFailedCallback
noWebViewLoadFailedCallback = Maybe WebViewLoadFailedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewLoadFailedCallback =
    Ptr () ->                               -- object
    CUInt ->
    CString ->
    Ptr GError ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewLoadFailedCallback`.
foreign import ccall "wrapper"
    mk_WebViewLoadFailedCallback :: C_WebViewLoadFailedCallback -> IO (FunPtr C_WebViewLoadFailedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewLoadFailed :: MonadIO m => WebViewLoadFailedCallback -> m (GClosure C_WebViewLoadFailedCallback)
genClosure_WebViewLoadFailed :: forall (m :: * -> *).
MonadIO m =>
WebViewLoadFailedCallback
-> m (GClosure C_WebViewLoadFailedCallback)
genClosure_WebViewLoadFailed WebViewLoadFailedCallback
cb = IO (GClosure C_WebViewLoadFailedCallback)
-> m (GClosure C_WebViewLoadFailedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewLoadFailedCallback)
 -> m (GClosure C_WebViewLoadFailedCallback))
-> IO (GClosure C_WebViewLoadFailedCallback)
-> m (GClosure C_WebViewLoadFailedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewLoadFailedCallback
cb' = WebViewLoadFailedCallback -> C_WebViewLoadFailedCallback
wrap_WebViewLoadFailedCallback WebViewLoadFailedCallback
cb
    C_WebViewLoadFailedCallback
-> IO (FunPtr C_WebViewLoadFailedCallback)
mk_WebViewLoadFailedCallback C_WebViewLoadFailedCallback
cb' IO (FunPtr C_WebViewLoadFailedCallback)
-> (FunPtr C_WebViewLoadFailedCallback
    -> IO (GClosure C_WebViewLoadFailedCallback))
-> IO (GClosure C_WebViewLoadFailedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewLoadFailedCallback
-> IO (GClosure C_WebViewLoadFailedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewLoadFailedCallback` into a `C_WebViewLoadFailedCallback`.
wrap_WebViewLoadFailedCallback ::
    WebViewLoadFailedCallback ->
    C_WebViewLoadFailedCallback
wrap_WebViewLoadFailedCallback :: WebViewLoadFailedCallback -> C_WebViewLoadFailedCallback
wrap_WebViewLoadFailedCallback WebViewLoadFailedCallback
_cb Ptr ()
_ CUInt
loadEvent CString
failingUri Ptr GError
error_ Ptr ()
_ = do
    let loadEvent' :: LoadEvent
loadEvent' = (Int -> LoadEvent
forall a. Enum a => Int -> a
toEnum (Int -> LoadEvent) -> (CUInt -> Int) -> CUInt -> LoadEvent
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
loadEvent
    Text
failingUri' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
failingUri
    GError
error_' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
error_
    Bool
result <- WebViewLoadFailedCallback
_cb  LoadEvent
loadEvent' Text
failingUri' GError
error_'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [loadFailed](#signal:loadFailed) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #loadFailed callback
-- @
-- 
-- 
onWebViewLoadFailed :: (IsWebView a, MonadIO m) => a -> WebViewLoadFailedCallback -> m SignalHandlerId
onWebViewLoadFailed :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewLoadFailedCallback -> m SignalHandlerId
onWebViewLoadFailed a
obj WebViewLoadFailedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewLoadFailedCallback
cb' = WebViewLoadFailedCallback -> C_WebViewLoadFailedCallback
wrap_WebViewLoadFailedCallback WebViewLoadFailedCallback
cb
    FunPtr C_WebViewLoadFailedCallback
cb'' <- C_WebViewLoadFailedCallback
-> IO (FunPtr C_WebViewLoadFailedCallback)
mk_WebViewLoadFailedCallback C_WebViewLoadFailedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewLoadFailedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"load-failed" FunPtr C_WebViewLoadFailedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [loadFailed](#signal:loadFailed) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #loadFailed callback
-- @
-- 
-- 
afterWebViewLoadFailed :: (IsWebView a, MonadIO m) => a -> WebViewLoadFailedCallback -> m SignalHandlerId
afterWebViewLoadFailed :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewLoadFailedCallback -> m SignalHandlerId
afterWebViewLoadFailed a
obj WebViewLoadFailedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewLoadFailedCallback
cb' = WebViewLoadFailedCallback -> C_WebViewLoadFailedCallback
wrap_WebViewLoadFailedCallback WebViewLoadFailedCallback
cb
    FunPtr C_WebViewLoadFailedCallback
cb'' <- C_WebViewLoadFailedCallback
-> IO (FunPtr C_WebViewLoadFailedCallback)
mk_WebViewLoadFailedCallback C_WebViewLoadFailedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewLoadFailedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"load-failed" FunPtr C_WebViewLoadFailedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewLoadFailedSignalInfo
instance SignalInfo WebViewLoadFailedSignalInfo where
    type HaskellCallbackType WebViewLoadFailedSignalInfo = WebViewLoadFailedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewLoadFailedCallback cb
        cb'' <- mk_WebViewLoadFailedCallback cb'
        connectSignalFunPtr obj "load-failed" cb'' connectMode detail

#endif

-- signal WebView::load-failed-with-tls-errors
-- | Emitted when a TLS error occurs during a load operation.
-- To allow an exception for this /@certificate@/
-- and the host of /@failingUri@/ use 'GI.WebKit2.Objects.WebContext.webContextAllowTlsCertificateForHost'.
-- 
-- To handle this signal asynchronously you should call 'GI.GObject.Objects.Object.objectRef' on /@certificate@/
-- and return 'P.True'.
-- 
-- If 'P.False' is returned, [loadFailed]("GI.WebKit2.Objects.WebView#g:signal:loadFailed") will be emitted. The load
-- will finish regardless of the returned value.
-- 
-- /Since: 2.6/
type WebViewLoadFailedWithTlsErrorsCallback =
    T.Text
    -- ^ /@failingUri@/: the URI that failed to load
    -> Gio.TlsCertificate.TlsCertificate
    -- ^ /@certificate@/: a t'GI.Gio.Objects.TlsCertificate.TlsCertificate'
    -> [Gio.Flags.TlsCertificateFlags]
    -- ^ /@errors@/: a t'GI.Gio.Flags.TlsCertificateFlags' with the verification status of /@certificate@/
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewLoadFailedWithTlsErrorsCallback`@.
noWebViewLoadFailedWithTlsErrorsCallback :: Maybe WebViewLoadFailedWithTlsErrorsCallback
noWebViewLoadFailedWithTlsErrorsCallback :: Maybe WebViewLoadFailedWithTlsErrorsCallback
noWebViewLoadFailedWithTlsErrorsCallback = Maybe WebViewLoadFailedWithTlsErrorsCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewLoadFailedWithTlsErrorsCallback =
    Ptr () ->                               -- object
    CString ->
    Ptr Gio.TlsCertificate.TlsCertificate ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewLoadFailedWithTlsErrorsCallback`.
foreign import ccall "wrapper"
    mk_WebViewLoadFailedWithTlsErrorsCallback :: C_WebViewLoadFailedWithTlsErrorsCallback -> IO (FunPtr C_WebViewLoadFailedWithTlsErrorsCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewLoadFailedWithTlsErrors :: MonadIO m => WebViewLoadFailedWithTlsErrorsCallback -> m (GClosure C_WebViewLoadFailedWithTlsErrorsCallback)
genClosure_WebViewLoadFailedWithTlsErrors :: forall (m :: * -> *).
MonadIO m =>
WebViewLoadFailedWithTlsErrorsCallback
-> m (GClosure C_WebViewLoadFailedWithTlsErrorsCallback)
genClosure_WebViewLoadFailedWithTlsErrors WebViewLoadFailedWithTlsErrorsCallback
cb = IO (GClosure C_WebViewLoadFailedWithTlsErrorsCallback)
-> m (GClosure C_WebViewLoadFailedWithTlsErrorsCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewLoadFailedWithTlsErrorsCallback)
 -> m (GClosure C_WebViewLoadFailedWithTlsErrorsCallback))
-> IO (GClosure C_WebViewLoadFailedWithTlsErrorsCallback)
-> m (GClosure C_WebViewLoadFailedWithTlsErrorsCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewLoadFailedWithTlsErrorsCallback
cb' = WebViewLoadFailedWithTlsErrorsCallback
-> C_WebViewLoadFailedWithTlsErrorsCallback
wrap_WebViewLoadFailedWithTlsErrorsCallback WebViewLoadFailedWithTlsErrorsCallback
cb
    C_WebViewLoadFailedWithTlsErrorsCallback
-> IO (FunPtr C_WebViewLoadFailedWithTlsErrorsCallback)
mk_WebViewLoadFailedWithTlsErrorsCallback C_WebViewLoadFailedWithTlsErrorsCallback
cb' IO (FunPtr C_WebViewLoadFailedWithTlsErrorsCallback)
-> (FunPtr C_WebViewLoadFailedWithTlsErrorsCallback
    -> IO (GClosure C_WebViewLoadFailedWithTlsErrorsCallback))
-> IO (GClosure C_WebViewLoadFailedWithTlsErrorsCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewLoadFailedWithTlsErrorsCallback
-> IO (GClosure C_WebViewLoadFailedWithTlsErrorsCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewLoadFailedWithTlsErrorsCallback` into a `C_WebViewLoadFailedWithTlsErrorsCallback`.
wrap_WebViewLoadFailedWithTlsErrorsCallback ::
    WebViewLoadFailedWithTlsErrorsCallback ->
    C_WebViewLoadFailedWithTlsErrorsCallback
wrap_WebViewLoadFailedWithTlsErrorsCallback :: WebViewLoadFailedWithTlsErrorsCallback
-> C_WebViewLoadFailedWithTlsErrorsCallback
wrap_WebViewLoadFailedWithTlsErrorsCallback WebViewLoadFailedWithTlsErrorsCallback
_cb Ptr ()
_ CString
failingUri Ptr TlsCertificate
certificate CUInt
errors Ptr ()
_ = do
    Text
failingUri' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
failingUri
    TlsCertificate
certificate' <- ((ManagedPtr TlsCertificate -> TlsCertificate)
-> Ptr TlsCertificate -> IO TlsCertificate
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate) Ptr TlsCertificate
certificate
    let errors' :: [TlsCertificateFlags]
errors' = CUInt -> [TlsCertificateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
errors
    Bool
result <- WebViewLoadFailedWithTlsErrorsCallback
_cb  Text
failingUri' TlsCertificate
certificate' [TlsCertificateFlags]
errors'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [loadFailedWithTlsErrors](#signal:loadFailedWithTlsErrors) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #loadFailedWithTlsErrors callback
-- @
-- 
-- 
onWebViewLoadFailedWithTlsErrors :: (IsWebView a, MonadIO m) => a -> WebViewLoadFailedWithTlsErrorsCallback -> m SignalHandlerId
onWebViewLoadFailedWithTlsErrors :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewLoadFailedWithTlsErrorsCallback -> m SignalHandlerId
onWebViewLoadFailedWithTlsErrors a
obj WebViewLoadFailedWithTlsErrorsCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewLoadFailedWithTlsErrorsCallback
cb' = WebViewLoadFailedWithTlsErrorsCallback
-> C_WebViewLoadFailedWithTlsErrorsCallback
wrap_WebViewLoadFailedWithTlsErrorsCallback WebViewLoadFailedWithTlsErrorsCallback
cb
    FunPtr C_WebViewLoadFailedWithTlsErrorsCallback
cb'' <- C_WebViewLoadFailedWithTlsErrorsCallback
-> IO (FunPtr C_WebViewLoadFailedWithTlsErrorsCallback)
mk_WebViewLoadFailedWithTlsErrorsCallback C_WebViewLoadFailedWithTlsErrorsCallback
cb'
    a
-> Text
-> FunPtr C_WebViewLoadFailedWithTlsErrorsCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"load-failed-with-tls-errors" FunPtr C_WebViewLoadFailedWithTlsErrorsCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [loadFailedWithTlsErrors](#signal:loadFailedWithTlsErrors) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #loadFailedWithTlsErrors callback
-- @
-- 
-- 
afterWebViewLoadFailedWithTlsErrors :: (IsWebView a, MonadIO m) => a -> WebViewLoadFailedWithTlsErrorsCallback -> m SignalHandlerId
afterWebViewLoadFailedWithTlsErrors :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewLoadFailedWithTlsErrorsCallback -> m SignalHandlerId
afterWebViewLoadFailedWithTlsErrors a
obj WebViewLoadFailedWithTlsErrorsCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewLoadFailedWithTlsErrorsCallback
cb' = WebViewLoadFailedWithTlsErrorsCallback
-> C_WebViewLoadFailedWithTlsErrorsCallback
wrap_WebViewLoadFailedWithTlsErrorsCallback WebViewLoadFailedWithTlsErrorsCallback
cb
    FunPtr C_WebViewLoadFailedWithTlsErrorsCallback
cb'' <- C_WebViewLoadFailedWithTlsErrorsCallback
-> IO (FunPtr C_WebViewLoadFailedWithTlsErrorsCallback)
mk_WebViewLoadFailedWithTlsErrorsCallback C_WebViewLoadFailedWithTlsErrorsCallback
cb'
    a
-> Text
-> FunPtr C_WebViewLoadFailedWithTlsErrorsCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"load-failed-with-tls-errors" FunPtr C_WebViewLoadFailedWithTlsErrorsCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewLoadFailedWithTlsErrorsSignalInfo
instance SignalInfo WebViewLoadFailedWithTlsErrorsSignalInfo where
    type HaskellCallbackType WebViewLoadFailedWithTlsErrorsSignalInfo = WebViewLoadFailedWithTlsErrorsCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewLoadFailedWithTlsErrorsCallback cb
        cb'' <- mk_WebViewLoadFailedWithTlsErrorsCallback cb'
        connectSignalFunPtr obj "load-failed-with-tls-errors" cb'' connectMode detail

#endif

-- signal WebView::mouse-target-changed
-- | This signal is emitted when the mouse cursor moves over an
-- element such as a link, image or a media element. To determine
-- what type of element the mouse cursor is over, a Hit Test is performed
-- on the current mouse coordinates and the result is passed in the
-- /@hitTestResult@/ argument. The /@modifiers@/ argument is a bitmask of
-- t'GI.Gdk.Flags.ModifierType' flags indicating the state of modifier keys.
-- The signal is emitted again when the mouse is moved out of the
-- current element with a new /@hitTestResult@/.
type WebViewMouseTargetChangedCallback =
    WebKit2.HitTestResult.HitTestResult
    -- ^ /@hitTestResult@/: a t'GI.WebKit2.Objects.HitTestResult.HitTestResult'
    -> Word32
    -- ^ /@modifiers@/: a bitmask of t'GI.Gdk.Flags.ModifierType'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewMouseTargetChangedCallback`@.
noWebViewMouseTargetChangedCallback :: Maybe WebViewMouseTargetChangedCallback
noWebViewMouseTargetChangedCallback :: Maybe WebViewMouseTargetChangedCallback
noWebViewMouseTargetChangedCallback = Maybe WebViewMouseTargetChangedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewMouseTargetChangedCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.HitTestResult.HitTestResult ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebViewMouseTargetChangedCallback`.
foreign import ccall "wrapper"
    mk_WebViewMouseTargetChangedCallback :: C_WebViewMouseTargetChangedCallback -> IO (FunPtr C_WebViewMouseTargetChangedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewMouseTargetChanged :: MonadIO m => WebViewMouseTargetChangedCallback -> m (GClosure C_WebViewMouseTargetChangedCallback)
genClosure_WebViewMouseTargetChanged :: forall (m :: * -> *).
MonadIO m =>
WebViewMouseTargetChangedCallback
-> m (GClosure C_WebViewMouseTargetChangedCallback)
genClosure_WebViewMouseTargetChanged WebViewMouseTargetChangedCallback
cb = IO (GClosure C_WebViewMouseTargetChangedCallback)
-> m (GClosure C_WebViewMouseTargetChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewMouseTargetChangedCallback)
 -> m (GClosure C_WebViewMouseTargetChangedCallback))
-> IO (GClosure C_WebViewMouseTargetChangedCallback)
-> m (GClosure C_WebViewMouseTargetChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewMouseTargetChangedCallback
cb' = WebViewMouseTargetChangedCallback
-> C_WebViewMouseTargetChangedCallback
wrap_WebViewMouseTargetChangedCallback WebViewMouseTargetChangedCallback
cb
    C_WebViewMouseTargetChangedCallback
-> IO (FunPtr C_WebViewMouseTargetChangedCallback)
mk_WebViewMouseTargetChangedCallback C_WebViewMouseTargetChangedCallback
cb' IO (FunPtr C_WebViewMouseTargetChangedCallback)
-> (FunPtr C_WebViewMouseTargetChangedCallback
    -> IO (GClosure C_WebViewMouseTargetChangedCallback))
-> IO (GClosure C_WebViewMouseTargetChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewMouseTargetChangedCallback
-> IO (GClosure C_WebViewMouseTargetChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewMouseTargetChangedCallback` into a `C_WebViewMouseTargetChangedCallback`.
wrap_WebViewMouseTargetChangedCallback ::
    WebViewMouseTargetChangedCallback ->
    C_WebViewMouseTargetChangedCallback
wrap_WebViewMouseTargetChangedCallback :: WebViewMouseTargetChangedCallback
-> C_WebViewMouseTargetChangedCallback
wrap_WebViewMouseTargetChangedCallback WebViewMouseTargetChangedCallback
_cb Ptr ()
_ Ptr HitTestResult
hitTestResult Word32
modifiers Ptr ()
_ = do
    HitTestResult
hitTestResult' <- ((ManagedPtr HitTestResult -> HitTestResult)
-> Ptr HitTestResult -> IO HitTestResult
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr HitTestResult -> HitTestResult
WebKit2.HitTestResult.HitTestResult) Ptr HitTestResult
hitTestResult
    WebViewMouseTargetChangedCallback
_cb  HitTestResult
hitTestResult' Word32
modifiers


-- | Connect a signal handler for the [mouseTargetChanged](#signal:mouseTargetChanged) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #mouseTargetChanged callback
-- @
-- 
-- 
onWebViewMouseTargetChanged :: (IsWebView a, MonadIO m) => a -> WebViewMouseTargetChangedCallback -> m SignalHandlerId
onWebViewMouseTargetChanged :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewMouseTargetChangedCallback -> m SignalHandlerId
onWebViewMouseTargetChanged a
obj WebViewMouseTargetChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewMouseTargetChangedCallback
cb' = WebViewMouseTargetChangedCallback
-> C_WebViewMouseTargetChangedCallback
wrap_WebViewMouseTargetChangedCallback WebViewMouseTargetChangedCallback
cb
    FunPtr C_WebViewMouseTargetChangedCallback
cb'' <- C_WebViewMouseTargetChangedCallback
-> IO (FunPtr C_WebViewMouseTargetChangedCallback)
mk_WebViewMouseTargetChangedCallback C_WebViewMouseTargetChangedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewMouseTargetChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"mouse-target-changed" FunPtr C_WebViewMouseTargetChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [mouseTargetChanged](#signal:mouseTargetChanged) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #mouseTargetChanged callback
-- @
-- 
-- 
afterWebViewMouseTargetChanged :: (IsWebView a, MonadIO m) => a -> WebViewMouseTargetChangedCallback -> m SignalHandlerId
afterWebViewMouseTargetChanged :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewMouseTargetChangedCallback -> m SignalHandlerId
afterWebViewMouseTargetChanged a
obj WebViewMouseTargetChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewMouseTargetChangedCallback
cb' = WebViewMouseTargetChangedCallback
-> C_WebViewMouseTargetChangedCallback
wrap_WebViewMouseTargetChangedCallback WebViewMouseTargetChangedCallback
cb
    FunPtr C_WebViewMouseTargetChangedCallback
cb'' <- C_WebViewMouseTargetChangedCallback
-> IO (FunPtr C_WebViewMouseTargetChangedCallback)
mk_WebViewMouseTargetChangedCallback C_WebViewMouseTargetChangedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewMouseTargetChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"mouse-target-changed" FunPtr C_WebViewMouseTargetChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewMouseTargetChangedSignalInfo
instance SignalInfo WebViewMouseTargetChangedSignalInfo where
    type HaskellCallbackType WebViewMouseTargetChangedSignalInfo = WebViewMouseTargetChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewMouseTargetChangedCallback cb
        cb'' <- mk_WebViewMouseTargetChangedCallback cb'
        connectSignalFunPtr obj "mouse-target-changed" cb'' connectMode detail

#endif

-- signal WebView::permission-request
-- | This signal is emitted when WebKit is requesting the client to
-- decide about a permission request, such as allowing the browser
-- to switch to fullscreen mode, sharing its location or similar
-- operations.
-- 
-- A possible way to use this signal could be through a dialog
-- allowing the user decide what to do with the request:
-- 
-- \<informalexample>\<programlisting>
-- static gboolean permission_request_cb (WebKitWebView *web_view,
--                                        WebKitPermissionRequest *request,
--                                        GtkWindow *parent_window)
-- {
--     GtkWidget *dialog = gtk_message_dialog_new (parent_window,
--                                                 GTK_DIALOG_MODAL,
--                                                 GTK_MESSAGE_QUESTION,
--                                                 GTK_BUTTONS_YES_NO,
--                                                 \"Allow Permission Request?\");
--     gtk_widget_show (dialog);
--     gint result = gtk_dialog_run (GTK_DIALOG (dialog));
-- 
--     switch (result) {
--     case GTK_RESPONSE_YES:
--         webkit_permission_request_allow (request);
--         break;
--     default:
--         webkit_permission_request_deny (request);
--         break;
--     }
--     gtk_widget_destroy (dialog);
-- 
--     return TRUE;
-- }
-- \<\/programlisting>\<\/informalexample>
-- 
-- It is possible to handle permission requests asynchronously, by
-- simply calling 'GI.GObject.Objects.Object.objectRef' on the /@request@/ argument and
-- returning 'P.True' to block the default signal handler.  If the
-- last reference is removed on a t'GI.WebKit2.Interfaces.PermissionRequest.PermissionRequest' and the
-- request has not been handled, 'GI.WebKit2.Interfaces.PermissionRequest.permissionRequestDeny'
-- will be the default action.
-- 
-- If the signal is not handled, the /@request@/ will be completed automatically
-- by the specific t'GI.WebKit2.Interfaces.PermissionRequest.PermissionRequest' that could allow or deny it. Check the
-- documentation of classes implementing t'GI.WebKit2.Interfaces.PermissionRequest.PermissionRequest' interface to know
-- their default action.
type WebViewPermissionRequestCallback =
    WebKit2.PermissionRequest.PermissionRequest
    -- ^ /@request@/: the t'GI.WebKit2.Interfaces.PermissionRequest.PermissionRequest'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewPermissionRequestCallback`@.
noWebViewPermissionRequestCallback :: Maybe WebViewPermissionRequestCallback
noWebViewPermissionRequestCallback :: Maybe WebViewPermissionRequestCallback
noWebViewPermissionRequestCallback = Maybe WebViewPermissionRequestCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewPermissionRequestCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.PermissionRequest.PermissionRequest ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewPermissionRequestCallback`.
foreign import ccall "wrapper"
    mk_WebViewPermissionRequestCallback :: C_WebViewPermissionRequestCallback -> IO (FunPtr C_WebViewPermissionRequestCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewPermissionRequest :: MonadIO m => WebViewPermissionRequestCallback -> m (GClosure C_WebViewPermissionRequestCallback)
genClosure_WebViewPermissionRequest :: forall (m :: * -> *).
MonadIO m =>
WebViewPermissionRequestCallback
-> m (GClosure C_WebViewPermissionRequestCallback)
genClosure_WebViewPermissionRequest WebViewPermissionRequestCallback
cb = IO (GClosure C_WebViewPermissionRequestCallback)
-> m (GClosure C_WebViewPermissionRequestCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewPermissionRequestCallback)
 -> m (GClosure C_WebViewPermissionRequestCallback))
-> IO (GClosure C_WebViewPermissionRequestCallback)
-> m (GClosure C_WebViewPermissionRequestCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewPermissionRequestCallback
cb' = WebViewPermissionRequestCallback
-> C_WebViewPermissionRequestCallback
wrap_WebViewPermissionRequestCallback WebViewPermissionRequestCallback
cb
    C_WebViewPermissionRequestCallback
-> IO (FunPtr C_WebViewPermissionRequestCallback)
mk_WebViewPermissionRequestCallback C_WebViewPermissionRequestCallback
cb' IO (FunPtr C_WebViewPermissionRequestCallback)
-> (FunPtr C_WebViewPermissionRequestCallback
    -> IO (GClosure C_WebViewPermissionRequestCallback))
-> IO (GClosure C_WebViewPermissionRequestCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewPermissionRequestCallback
-> IO (GClosure C_WebViewPermissionRequestCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewPermissionRequestCallback` into a `C_WebViewPermissionRequestCallback`.
wrap_WebViewPermissionRequestCallback ::
    WebViewPermissionRequestCallback ->
    C_WebViewPermissionRequestCallback
wrap_WebViewPermissionRequestCallback :: WebViewPermissionRequestCallback
-> C_WebViewPermissionRequestCallback
wrap_WebViewPermissionRequestCallback WebViewPermissionRequestCallback
_cb Ptr ()
_ Ptr PermissionRequest
request Ptr ()
_ = do
    PermissionRequest
request' <- ((ManagedPtr PermissionRequest -> PermissionRequest)
-> Ptr PermissionRequest -> IO PermissionRequest
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PermissionRequest -> PermissionRequest
WebKit2.PermissionRequest.PermissionRequest) Ptr PermissionRequest
request
    Bool
result <- WebViewPermissionRequestCallback
_cb  PermissionRequest
request'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [permissionRequest](#signal:permissionRequest) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #permissionRequest callback
-- @
-- 
-- 
onWebViewPermissionRequest :: (IsWebView a, MonadIO m) => a -> WebViewPermissionRequestCallback -> m SignalHandlerId
onWebViewPermissionRequest :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewPermissionRequestCallback -> m SignalHandlerId
onWebViewPermissionRequest a
obj WebViewPermissionRequestCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewPermissionRequestCallback
cb' = WebViewPermissionRequestCallback
-> C_WebViewPermissionRequestCallback
wrap_WebViewPermissionRequestCallback WebViewPermissionRequestCallback
cb
    FunPtr C_WebViewPermissionRequestCallback
cb'' <- C_WebViewPermissionRequestCallback
-> IO (FunPtr C_WebViewPermissionRequestCallback)
mk_WebViewPermissionRequestCallback C_WebViewPermissionRequestCallback
cb'
    a
-> Text
-> FunPtr C_WebViewPermissionRequestCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"permission-request" FunPtr C_WebViewPermissionRequestCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [permissionRequest](#signal:permissionRequest) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #permissionRequest callback
-- @
-- 
-- 
afterWebViewPermissionRequest :: (IsWebView a, MonadIO m) => a -> WebViewPermissionRequestCallback -> m SignalHandlerId
afterWebViewPermissionRequest :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewPermissionRequestCallback -> m SignalHandlerId
afterWebViewPermissionRequest a
obj WebViewPermissionRequestCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewPermissionRequestCallback
cb' = WebViewPermissionRequestCallback
-> C_WebViewPermissionRequestCallback
wrap_WebViewPermissionRequestCallback WebViewPermissionRequestCallback
cb
    FunPtr C_WebViewPermissionRequestCallback
cb'' <- C_WebViewPermissionRequestCallback
-> IO (FunPtr C_WebViewPermissionRequestCallback)
mk_WebViewPermissionRequestCallback C_WebViewPermissionRequestCallback
cb'
    a
-> Text
-> FunPtr C_WebViewPermissionRequestCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"permission-request" FunPtr C_WebViewPermissionRequestCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewPermissionRequestSignalInfo
instance SignalInfo WebViewPermissionRequestSignalInfo where
    type HaskellCallbackType WebViewPermissionRequestSignalInfo = WebViewPermissionRequestCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewPermissionRequestCallback cb
        cb'' <- mk_WebViewPermissionRequestCallback cb'
        connectSignalFunPtr obj "permission-request" cb'' connectMode detail

#endif

-- signal WebView::print
-- | Emitted when printing is requested on /@webView@/, usually by a JavaScript call,
-- before the print dialog is shown. This signal can be used to set the initial
-- print settings and page setup of /@printOperation@/ to be used as default values in
-- the print dialog. You can call 'GI.WebKit2.Objects.PrintOperation.printOperationSetPrintSettings' and
-- 'GI.WebKit2.Objects.PrintOperation.printOperationSetPageSetup' and then return 'P.False' to propagate the
-- event so that the print dialog is shown.
-- 
-- You can connect to this signal and return 'P.True' to cancel the print operation
-- or implement your own print dialog.
type WebViewPrintCallback =
    WebKit2.PrintOperation.PrintOperation
    -- ^ /@printOperation@/: the t'GI.WebKit2.Objects.PrintOperation.PrintOperation' that will handle the print request
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --    'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewPrintCallback`@.
noWebViewPrintCallback :: Maybe WebViewPrintCallback
noWebViewPrintCallback :: Maybe WebViewPrintCallback
noWebViewPrintCallback = Maybe WebViewPrintCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewPrintCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.PrintOperation.PrintOperation ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewPrintCallback`.
foreign import ccall "wrapper"
    mk_WebViewPrintCallback :: C_WebViewPrintCallback -> IO (FunPtr C_WebViewPrintCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewPrint :: MonadIO m => WebViewPrintCallback -> m (GClosure C_WebViewPrintCallback)
genClosure_WebViewPrint :: forall (m :: * -> *).
MonadIO m =>
WebViewPrintCallback -> m (GClosure C_WebViewPrintCallback)
genClosure_WebViewPrint WebViewPrintCallback
cb = IO (GClosure C_WebViewPrintCallback)
-> m (GClosure C_WebViewPrintCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewPrintCallback)
 -> m (GClosure C_WebViewPrintCallback))
-> IO (GClosure C_WebViewPrintCallback)
-> m (GClosure C_WebViewPrintCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewPrintCallback
cb' = WebViewPrintCallback -> C_WebViewPrintCallback
wrap_WebViewPrintCallback WebViewPrintCallback
cb
    C_WebViewPrintCallback -> IO (FunPtr C_WebViewPrintCallback)
mk_WebViewPrintCallback C_WebViewPrintCallback
cb' IO (FunPtr C_WebViewPrintCallback)
-> (FunPtr C_WebViewPrintCallback
    -> IO (GClosure C_WebViewPrintCallback))
-> IO (GClosure C_WebViewPrintCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewPrintCallback
-> IO (GClosure C_WebViewPrintCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewPrintCallback` into a `C_WebViewPrintCallback`.
wrap_WebViewPrintCallback ::
    WebViewPrintCallback ->
    C_WebViewPrintCallback
wrap_WebViewPrintCallback :: WebViewPrintCallback -> C_WebViewPrintCallback
wrap_WebViewPrintCallback WebViewPrintCallback
_cb Ptr ()
_ Ptr PrintOperation
printOperation Ptr ()
_ = do
    PrintOperation
printOperation' <- ((ManagedPtr PrintOperation -> PrintOperation)
-> Ptr PrintOperation -> IO PrintOperation
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PrintOperation -> PrintOperation
WebKit2.PrintOperation.PrintOperation) Ptr PrintOperation
printOperation
    Bool
result <- WebViewPrintCallback
_cb  PrintOperation
printOperation'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [print](#signal:print) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #print callback
-- @
-- 
-- 
onWebViewPrint :: (IsWebView a, MonadIO m) => a -> WebViewPrintCallback -> m SignalHandlerId
onWebViewPrint :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewPrintCallback -> m SignalHandlerId
onWebViewPrint a
obj WebViewPrintCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewPrintCallback
cb' = WebViewPrintCallback -> C_WebViewPrintCallback
wrap_WebViewPrintCallback WebViewPrintCallback
cb
    FunPtr C_WebViewPrintCallback
cb'' <- C_WebViewPrintCallback -> IO (FunPtr C_WebViewPrintCallback)
mk_WebViewPrintCallback C_WebViewPrintCallback
cb'
    a
-> Text
-> FunPtr C_WebViewPrintCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"print" FunPtr C_WebViewPrintCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [print](#signal:print) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #print callback
-- @
-- 
-- 
afterWebViewPrint :: (IsWebView a, MonadIO m) => a -> WebViewPrintCallback -> m SignalHandlerId
afterWebViewPrint :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewPrintCallback -> m SignalHandlerId
afterWebViewPrint a
obj WebViewPrintCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewPrintCallback
cb' = WebViewPrintCallback -> C_WebViewPrintCallback
wrap_WebViewPrintCallback WebViewPrintCallback
cb
    FunPtr C_WebViewPrintCallback
cb'' <- C_WebViewPrintCallback -> IO (FunPtr C_WebViewPrintCallback)
mk_WebViewPrintCallback C_WebViewPrintCallback
cb'
    a
-> Text
-> FunPtr C_WebViewPrintCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"print" FunPtr C_WebViewPrintCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewPrintSignalInfo
instance SignalInfo WebViewPrintSignalInfo where
    type HaskellCallbackType WebViewPrintSignalInfo = WebViewPrintCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewPrintCallback cb
        cb'' <- mk_WebViewPrintCallback cb'
        connectSignalFunPtr obj "print" cb'' connectMode detail

#endif

-- signal WebView::ready-to-show
-- | Emitted after [create]("GI.WebKit2.Objects.WebView#g:signal:create") on the newly created t'GI.WebKit2.Objects.WebView.WebView'
-- when it should be displayed to the user. When this signal is emitted
-- all the information about how the window should look, including
-- size, position, whether the location, status and scrollbars
-- should be displayed, is already set on the t'GI.WebKit2.Objects.WindowProperties.WindowProperties'
-- of /@webView@/. See also 'GI.WebKit2.Objects.WebView.webViewGetWindowProperties'.
type WebViewReadyToShowCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewReadyToShowCallback`@.
noWebViewReadyToShowCallback :: Maybe WebViewReadyToShowCallback
noWebViewReadyToShowCallback :: Maybe (IO ())
noWebViewReadyToShowCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewReadyToShowCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebViewReadyToShowCallback`.
foreign import ccall "wrapper"
    mk_WebViewReadyToShowCallback :: C_WebViewReadyToShowCallback -> IO (FunPtr C_WebViewReadyToShowCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewReadyToShow :: MonadIO m => WebViewReadyToShowCallback -> m (GClosure C_WebViewReadyToShowCallback)
genClosure_WebViewReadyToShow :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_WebViewCloseCallback)
genClosure_WebViewReadyToShow IO ()
cb = IO (GClosure C_WebViewCloseCallback)
-> m (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewCloseCallback)
 -> m (GClosure C_WebViewCloseCallback))
-> IO (GClosure C_WebViewCloseCallback)
-> m (GClosure C_WebViewCloseCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewReadyToShowCallback IO ()
cb
    C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewReadyToShowCallback C_WebViewCloseCallback
cb' IO (FunPtr C_WebViewCloseCallback)
-> (FunPtr C_WebViewCloseCallback
    -> IO (GClosure C_WebViewCloseCallback))
-> IO (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewCloseCallback
-> IO (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewReadyToShowCallback` into a `C_WebViewReadyToShowCallback`.
wrap_WebViewReadyToShowCallback ::
    WebViewReadyToShowCallback ->
    C_WebViewReadyToShowCallback
wrap_WebViewReadyToShowCallback :: IO () -> C_WebViewCloseCallback
wrap_WebViewReadyToShowCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [readyToShow](#signal:readyToShow) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #readyToShow callback
-- @
-- 
-- 
onWebViewReadyToShow :: (IsWebView a, MonadIO m) => a -> WebViewReadyToShowCallback -> m SignalHandlerId
onWebViewReadyToShow :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onWebViewReadyToShow a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewReadyToShowCallback IO ()
cb
    FunPtr C_WebViewCloseCallback
cb'' <- C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewReadyToShowCallback C_WebViewCloseCallback
cb'
    a
-> Text
-> FunPtr C_WebViewCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"ready-to-show" FunPtr C_WebViewCloseCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [readyToShow](#signal:readyToShow) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #readyToShow callback
-- @
-- 
-- 
afterWebViewReadyToShow :: (IsWebView a, MonadIO m) => a -> WebViewReadyToShowCallback -> m SignalHandlerId
afterWebViewReadyToShow :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterWebViewReadyToShow a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewReadyToShowCallback IO ()
cb
    FunPtr C_WebViewCloseCallback
cb'' <- C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewReadyToShowCallback C_WebViewCloseCallback
cb'
    a
-> Text
-> FunPtr C_WebViewCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"ready-to-show" FunPtr C_WebViewCloseCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewReadyToShowSignalInfo
instance SignalInfo WebViewReadyToShowSignalInfo where
    type HaskellCallbackType WebViewReadyToShowSignalInfo = WebViewReadyToShowCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewReadyToShowCallback cb
        cb'' <- mk_WebViewReadyToShowCallback cb'
        connectSignalFunPtr obj "ready-to-show" cb'' connectMode detail

#endif

-- signal WebView::resource-load-started
-- | Emitted when a new resource is going to be loaded. The /@request@/ parameter
-- contains the t'GI.WebKit2.Objects.URIRequest.URIRequest' that will be sent to the server.
-- You can monitor the load operation by connecting to the different signals
-- of /@resource@/.
type WebViewResourceLoadStartedCallback =
    WebKit2.WebResource.WebResource
    -- ^ /@resource@/: a t'GI.WebKit2.Objects.WebResource.WebResource'
    -> WebKit2.URIRequest.URIRequest
    -- ^ /@request@/: a t'GI.WebKit2.Objects.URIRequest.URIRequest'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewResourceLoadStartedCallback`@.
noWebViewResourceLoadStartedCallback :: Maybe WebViewResourceLoadStartedCallback
noWebViewResourceLoadStartedCallback :: Maybe WebViewResourceLoadStartedCallback
noWebViewResourceLoadStartedCallback = Maybe WebViewResourceLoadStartedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewResourceLoadStartedCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.WebResource.WebResource ->
    Ptr WebKit2.URIRequest.URIRequest ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebViewResourceLoadStartedCallback`.
foreign import ccall "wrapper"
    mk_WebViewResourceLoadStartedCallback :: C_WebViewResourceLoadStartedCallback -> IO (FunPtr C_WebViewResourceLoadStartedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewResourceLoadStarted :: MonadIO m => WebViewResourceLoadStartedCallback -> m (GClosure C_WebViewResourceLoadStartedCallback)
genClosure_WebViewResourceLoadStarted :: forall (m :: * -> *).
MonadIO m =>
WebViewResourceLoadStartedCallback
-> m (GClosure C_WebViewResourceLoadStartedCallback)
genClosure_WebViewResourceLoadStarted WebViewResourceLoadStartedCallback
cb = IO (GClosure C_WebViewResourceLoadStartedCallback)
-> m (GClosure C_WebViewResourceLoadStartedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewResourceLoadStartedCallback)
 -> m (GClosure C_WebViewResourceLoadStartedCallback))
-> IO (GClosure C_WebViewResourceLoadStartedCallback)
-> m (GClosure C_WebViewResourceLoadStartedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewResourceLoadStartedCallback
cb' = WebViewResourceLoadStartedCallback
-> C_WebViewResourceLoadStartedCallback
wrap_WebViewResourceLoadStartedCallback WebViewResourceLoadStartedCallback
cb
    C_WebViewResourceLoadStartedCallback
-> IO (FunPtr C_WebViewResourceLoadStartedCallback)
mk_WebViewResourceLoadStartedCallback C_WebViewResourceLoadStartedCallback
cb' IO (FunPtr C_WebViewResourceLoadStartedCallback)
-> (FunPtr C_WebViewResourceLoadStartedCallback
    -> IO (GClosure C_WebViewResourceLoadStartedCallback))
-> IO (GClosure C_WebViewResourceLoadStartedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewResourceLoadStartedCallback
-> IO (GClosure C_WebViewResourceLoadStartedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewResourceLoadStartedCallback` into a `C_WebViewResourceLoadStartedCallback`.
wrap_WebViewResourceLoadStartedCallback ::
    WebViewResourceLoadStartedCallback ->
    C_WebViewResourceLoadStartedCallback
wrap_WebViewResourceLoadStartedCallback :: WebViewResourceLoadStartedCallback
-> C_WebViewResourceLoadStartedCallback
wrap_WebViewResourceLoadStartedCallback WebViewResourceLoadStartedCallback
_cb Ptr ()
_ Ptr WebResource
resource Ptr URIRequest
request Ptr ()
_ = do
    WebResource
resource' <- ((ManagedPtr WebResource -> WebResource)
-> Ptr WebResource -> IO WebResource
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebResource -> WebResource
WebKit2.WebResource.WebResource) Ptr WebResource
resource
    URIRequest
request' <- ((ManagedPtr URIRequest -> URIRequest)
-> Ptr URIRequest -> IO URIRequest
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr URIRequest -> URIRequest
WebKit2.URIRequest.URIRequest) Ptr URIRequest
request
    WebViewResourceLoadStartedCallback
_cb  WebResource
resource' URIRequest
request'


-- | Connect a signal handler for the [resourceLoadStarted](#signal:resourceLoadStarted) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #resourceLoadStarted callback
-- @
-- 
-- 
onWebViewResourceLoadStarted :: (IsWebView a, MonadIO m) => a -> WebViewResourceLoadStartedCallback -> m SignalHandlerId
onWebViewResourceLoadStarted :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewResourceLoadStartedCallback -> m SignalHandlerId
onWebViewResourceLoadStarted a
obj WebViewResourceLoadStartedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewResourceLoadStartedCallback
cb' = WebViewResourceLoadStartedCallback
-> C_WebViewResourceLoadStartedCallback
wrap_WebViewResourceLoadStartedCallback WebViewResourceLoadStartedCallback
cb
    FunPtr C_WebViewResourceLoadStartedCallback
cb'' <- C_WebViewResourceLoadStartedCallback
-> IO (FunPtr C_WebViewResourceLoadStartedCallback)
mk_WebViewResourceLoadStartedCallback C_WebViewResourceLoadStartedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewResourceLoadStartedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"resource-load-started" FunPtr C_WebViewResourceLoadStartedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [resourceLoadStarted](#signal:resourceLoadStarted) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #resourceLoadStarted callback
-- @
-- 
-- 
afterWebViewResourceLoadStarted :: (IsWebView a, MonadIO m) => a -> WebViewResourceLoadStartedCallback -> m SignalHandlerId
afterWebViewResourceLoadStarted :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewResourceLoadStartedCallback -> m SignalHandlerId
afterWebViewResourceLoadStarted a
obj WebViewResourceLoadStartedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewResourceLoadStartedCallback
cb' = WebViewResourceLoadStartedCallback
-> C_WebViewResourceLoadStartedCallback
wrap_WebViewResourceLoadStartedCallback WebViewResourceLoadStartedCallback
cb
    FunPtr C_WebViewResourceLoadStartedCallback
cb'' <- C_WebViewResourceLoadStartedCallback
-> IO (FunPtr C_WebViewResourceLoadStartedCallback)
mk_WebViewResourceLoadStartedCallback C_WebViewResourceLoadStartedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewResourceLoadStartedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"resource-load-started" FunPtr C_WebViewResourceLoadStartedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewResourceLoadStartedSignalInfo
instance SignalInfo WebViewResourceLoadStartedSignalInfo where
    type HaskellCallbackType WebViewResourceLoadStartedSignalInfo = WebViewResourceLoadStartedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewResourceLoadStartedCallback cb
        cb'' <- mk_WebViewResourceLoadStartedCallback cb'
        connectSignalFunPtr obj "resource-load-started" cb'' connectMode detail

#endif

-- signal WebView::run-as-modal
-- | Emitted after [readyToShow]("GI.WebKit2.Objects.WebView#g:signal:readyToShow") on the newly
-- created t'GI.WebKit2.Objects.WebView.WebView' when JavaScript code calls
-- \<function>window.showModalDialog\<\/function>. The purpose of
-- this signal is to allow the client application to prepare the
-- new view to behave as modal. Once the signal is emitted a new
-- main loop will be run to block user interaction in the parent
-- t'GI.WebKit2.Objects.WebView.WebView' until the new dialog is closed.
type WebViewRunAsModalCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewRunAsModalCallback`@.
noWebViewRunAsModalCallback :: Maybe WebViewRunAsModalCallback
noWebViewRunAsModalCallback :: Maybe (IO ())
noWebViewRunAsModalCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewRunAsModalCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebViewRunAsModalCallback`.
foreign import ccall "wrapper"
    mk_WebViewRunAsModalCallback :: C_WebViewRunAsModalCallback -> IO (FunPtr C_WebViewRunAsModalCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewRunAsModal :: MonadIO m => WebViewRunAsModalCallback -> m (GClosure C_WebViewRunAsModalCallback)
genClosure_WebViewRunAsModal :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_WebViewCloseCallback)
genClosure_WebViewRunAsModal IO ()
cb = IO (GClosure C_WebViewCloseCallback)
-> m (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewCloseCallback)
 -> m (GClosure C_WebViewCloseCallback))
-> IO (GClosure C_WebViewCloseCallback)
-> m (GClosure C_WebViewCloseCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewRunAsModalCallback IO ()
cb
    C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewRunAsModalCallback C_WebViewCloseCallback
cb' IO (FunPtr C_WebViewCloseCallback)
-> (FunPtr C_WebViewCloseCallback
    -> IO (GClosure C_WebViewCloseCallback))
-> IO (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewCloseCallback
-> IO (GClosure C_WebViewCloseCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewRunAsModalCallback` into a `C_WebViewRunAsModalCallback`.
wrap_WebViewRunAsModalCallback ::
    WebViewRunAsModalCallback ->
    C_WebViewRunAsModalCallback
wrap_WebViewRunAsModalCallback :: IO () -> C_WebViewCloseCallback
wrap_WebViewRunAsModalCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [runAsModal](#signal:runAsModal) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #runAsModal callback
-- @
-- 
-- 
onWebViewRunAsModal :: (IsWebView a, MonadIO m) => a -> WebViewRunAsModalCallback -> m SignalHandlerId
onWebViewRunAsModal :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onWebViewRunAsModal a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewRunAsModalCallback IO ()
cb
    FunPtr C_WebViewCloseCallback
cb'' <- C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewRunAsModalCallback C_WebViewCloseCallback
cb'
    a
-> Text
-> FunPtr C_WebViewCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"run-as-modal" FunPtr C_WebViewCloseCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [runAsModal](#signal:runAsModal) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #runAsModal callback
-- @
-- 
-- 
afterWebViewRunAsModal :: (IsWebView a, MonadIO m) => a -> WebViewRunAsModalCallback -> m SignalHandlerId
afterWebViewRunAsModal :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterWebViewRunAsModal a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewCloseCallback
cb' = IO () -> C_WebViewCloseCallback
wrap_WebViewRunAsModalCallback IO ()
cb
    FunPtr C_WebViewCloseCallback
cb'' <- C_WebViewCloseCallback -> IO (FunPtr C_WebViewCloseCallback)
mk_WebViewRunAsModalCallback C_WebViewCloseCallback
cb'
    a
-> Text
-> FunPtr C_WebViewCloseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"run-as-modal" FunPtr C_WebViewCloseCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewRunAsModalSignalInfo
instance SignalInfo WebViewRunAsModalSignalInfo where
    type HaskellCallbackType WebViewRunAsModalSignalInfo = WebViewRunAsModalCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewRunAsModalCallback cb
        cb'' <- mk_WebViewRunAsModalCallback cb'
        connectSignalFunPtr obj "run-as-modal" cb'' connectMode detail

#endif

-- signal WebView::run-color-chooser
-- | This signal is emitted when the user interacts with a &lt;input
-- type=\'color\' \/&gt; HTML element, requesting from WebKit to show
-- a dialog to select a color. To let the application know the details of
-- the color chooser, as well as to allow the client application to either
-- cancel the request or perform an actual color selection, the signal will
-- pass an instance of the t'GI.WebKit2.Objects.ColorChooserRequest.ColorChooserRequest' in the /@request@/
-- argument.
-- 
-- It is possible to handle this request asynchronously by increasing the
-- reference count of the request.
-- 
-- The default signal handler will asynchronously run a regular
-- t'GI.Gtk.Interfaces.ColorChooser.ColorChooser' for the user to interact with.
-- 
-- /Since: 2.8/
type WebViewRunColorChooserCallback =
    WebKit2.ColorChooserRequest.ColorChooserRequest
    -- ^ /@request@/: a t'GI.WebKit2.Objects.ColorChooserRequest.ColorChooserRequest'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewRunColorChooserCallback`@.
noWebViewRunColorChooserCallback :: Maybe WebViewRunColorChooserCallback
noWebViewRunColorChooserCallback :: Maybe WebViewRunColorChooserCallback
noWebViewRunColorChooserCallback = Maybe WebViewRunColorChooserCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewRunColorChooserCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.ColorChooserRequest.ColorChooserRequest ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewRunColorChooserCallback`.
foreign import ccall "wrapper"
    mk_WebViewRunColorChooserCallback :: C_WebViewRunColorChooserCallback -> IO (FunPtr C_WebViewRunColorChooserCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewRunColorChooser :: MonadIO m => WebViewRunColorChooserCallback -> m (GClosure C_WebViewRunColorChooserCallback)
genClosure_WebViewRunColorChooser :: forall (m :: * -> *).
MonadIO m =>
WebViewRunColorChooserCallback
-> m (GClosure C_WebViewRunColorChooserCallback)
genClosure_WebViewRunColorChooser WebViewRunColorChooserCallback
cb = IO (GClosure C_WebViewRunColorChooserCallback)
-> m (GClosure C_WebViewRunColorChooserCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewRunColorChooserCallback)
 -> m (GClosure C_WebViewRunColorChooserCallback))
-> IO (GClosure C_WebViewRunColorChooserCallback)
-> m (GClosure C_WebViewRunColorChooserCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewRunColorChooserCallback
cb' = WebViewRunColorChooserCallback -> C_WebViewRunColorChooserCallback
wrap_WebViewRunColorChooserCallback WebViewRunColorChooserCallback
cb
    C_WebViewRunColorChooserCallback
-> IO (FunPtr C_WebViewRunColorChooserCallback)
mk_WebViewRunColorChooserCallback C_WebViewRunColorChooserCallback
cb' IO (FunPtr C_WebViewRunColorChooserCallback)
-> (FunPtr C_WebViewRunColorChooserCallback
    -> IO (GClosure C_WebViewRunColorChooserCallback))
-> IO (GClosure C_WebViewRunColorChooserCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewRunColorChooserCallback
-> IO (GClosure C_WebViewRunColorChooserCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewRunColorChooserCallback` into a `C_WebViewRunColorChooserCallback`.
wrap_WebViewRunColorChooserCallback ::
    WebViewRunColorChooserCallback ->
    C_WebViewRunColorChooserCallback
wrap_WebViewRunColorChooserCallback :: WebViewRunColorChooserCallback -> C_WebViewRunColorChooserCallback
wrap_WebViewRunColorChooserCallback WebViewRunColorChooserCallback
_cb Ptr ()
_ Ptr ColorChooserRequest
request Ptr ()
_ = do
    ColorChooserRequest
request' <- ((ManagedPtr ColorChooserRequest -> ColorChooserRequest)
-> Ptr ColorChooserRequest -> IO ColorChooserRequest
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ColorChooserRequest -> ColorChooserRequest
WebKit2.ColorChooserRequest.ColorChooserRequest) Ptr ColorChooserRequest
request
    Bool
result <- WebViewRunColorChooserCallback
_cb  ColorChooserRequest
request'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [runColorChooser](#signal:runColorChooser) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #runColorChooser callback
-- @
-- 
-- 
onWebViewRunColorChooser :: (IsWebView a, MonadIO m) => a -> WebViewRunColorChooserCallback -> m SignalHandlerId
onWebViewRunColorChooser :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewRunColorChooserCallback -> m SignalHandlerId
onWebViewRunColorChooser a
obj WebViewRunColorChooserCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewRunColorChooserCallback
cb' = WebViewRunColorChooserCallback -> C_WebViewRunColorChooserCallback
wrap_WebViewRunColorChooserCallback WebViewRunColorChooserCallback
cb
    FunPtr C_WebViewRunColorChooserCallback
cb'' <- C_WebViewRunColorChooserCallback
-> IO (FunPtr C_WebViewRunColorChooserCallback)
mk_WebViewRunColorChooserCallback C_WebViewRunColorChooserCallback
cb'
    a
-> Text
-> FunPtr C_WebViewRunColorChooserCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"run-color-chooser" FunPtr C_WebViewRunColorChooserCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [runColorChooser](#signal:runColorChooser) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #runColorChooser callback
-- @
-- 
-- 
afterWebViewRunColorChooser :: (IsWebView a, MonadIO m) => a -> WebViewRunColorChooserCallback -> m SignalHandlerId
afterWebViewRunColorChooser :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewRunColorChooserCallback -> m SignalHandlerId
afterWebViewRunColorChooser a
obj WebViewRunColorChooserCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewRunColorChooserCallback
cb' = WebViewRunColorChooserCallback -> C_WebViewRunColorChooserCallback
wrap_WebViewRunColorChooserCallback WebViewRunColorChooserCallback
cb
    FunPtr C_WebViewRunColorChooserCallback
cb'' <- C_WebViewRunColorChooserCallback
-> IO (FunPtr C_WebViewRunColorChooserCallback)
mk_WebViewRunColorChooserCallback C_WebViewRunColorChooserCallback
cb'
    a
-> Text
-> FunPtr C_WebViewRunColorChooserCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"run-color-chooser" FunPtr C_WebViewRunColorChooserCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewRunColorChooserSignalInfo
instance SignalInfo WebViewRunColorChooserSignalInfo where
    type HaskellCallbackType WebViewRunColorChooserSignalInfo = WebViewRunColorChooserCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewRunColorChooserCallback cb
        cb'' <- mk_WebViewRunColorChooserCallback cb'
        connectSignalFunPtr obj "run-color-chooser" cb'' connectMode detail

#endif

-- signal WebView::run-file-chooser
-- | This signal is emitted when the user interacts with a &lt;input
-- type=\'file\' \/&gt; HTML element, requesting from WebKit to show
-- a dialog to select one or more files to be uploaded. To let the
-- application know the details of the file chooser, as well as to
-- allow the client application to either cancel the request or
-- perform an actual selection of files, the signal will pass an
-- instance of the t'GI.WebKit2.Objects.FileChooserRequest.FileChooserRequest' in the /@request@/
-- argument.
-- 
-- The default signal handler will asynchronously run a regular
-- t'GI.Gtk.Objects.FileChooserDialog.FileChooserDialog' for the user to interact with.
type WebViewRunFileChooserCallback =
    WebKit2.FileChooserRequest.FileChooserRequest
    -- ^ /@request@/: a t'GI.WebKit2.Objects.FileChooserRequest.FileChooserRequest'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewRunFileChooserCallback`@.
noWebViewRunFileChooserCallback :: Maybe WebViewRunFileChooserCallback
noWebViewRunFileChooserCallback :: Maybe WebViewRunFileChooserCallback
noWebViewRunFileChooserCallback = Maybe WebViewRunFileChooserCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewRunFileChooserCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.FileChooserRequest.FileChooserRequest ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewRunFileChooserCallback`.
foreign import ccall "wrapper"
    mk_WebViewRunFileChooserCallback :: C_WebViewRunFileChooserCallback -> IO (FunPtr C_WebViewRunFileChooserCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewRunFileChooser :: MonadIO m => WebViewRunFileChooserCallback -> m (GClosure C_WebViewRunFileChooserCallback)
genClosure_WebViewRunFileChooser :: forall (m :: * -> *).
MonadIO m =>
WebViewRunFileChooserCallback
-> m (GClosure C_WebViewRunFileChooserCallback)
genClosure_WebViewRunFileChooser WebViewRunFileChooserCallback
cb = IO (GClosure C_WebViewRunFileChooserCallback)
-> m (GClosure C_WebViewRunFileChooserCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewRunFileChooserCallback)
 -> m (GClosure C_WebViewRunFileChooserCallback))
-> IO (GClosure C_WebViewRunFileChooserCallback)
-> m (GClosure C_WebViewRunFileChooserCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewRunFileChooserCallback
cb' = WebViewRunFileChooserCallback -> C_WebViewRunFileChooserCallback
wrap_WebViewRunFileChooserCallback WebViewRunFileChooserCallback
cb
    C_WebViewRunFileChooserCallback
-> IO (FunPtr C_WebViewRunFileChooserCallback)
mk_WebViewRunFileChooserCallback C_WebViewRunFileChooserCallback
cb' IO (FunPtr C_WebViewRunFileChooserCallback)
-> (FunPtr C_WebViewRunFileChooserCallback
    -> IO (GClosure C_WebViewRunFileChooserCallback))
-> IO (GClosure C_WebViewRunFileChooserCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewRunFileChooserCallback
-> IO (GClosure C_WebViewRunFileChooserCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewRunFileChooserCallback` into a `C_WebViewRunFileChooserCallback`.
wrap_WebViewRunFileChooserCallback ::
    WebViewRunFileChooserCallback ->
    C_WebViewRunFileChooserCallback
wrap_WebViewRunFileChooserCallback :: WebViewRunFileChooserCallback -> C_WebViewRunFileChooserCallback
wrap_WebViewRunFileChooserCallback WebViewRunFileChooserCallback
_cb Ptr ()
_ Ptr FileChooserRequest
request Ptr ()
_ = do
    FileChooserRequest
request' <- ((ManagedPtr FileChooserRequest -> FileChooserRequest)
-> Ptr FileChooserRequest -> IO FileChooserRequest
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FileChooserRequest -> FileChooserRequest
WebKit2.FileChooserRequest.FileChooserRequest) Ptr FileChooserRequest
request
    Bool
result <- WebViewRunFileChooserCallback
_cb  FileChooserRequest
request'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [runFileChooser](#signal:runFileChooser) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #runFileChooser callback
-- @
-- 
-- 
onWebViewRunFileChooser :: (IsWebView a, MonadIO m) => a -> WebViewRunFileChooserCallback -> m SignalHandlerId
onWebViewRunFileChooser :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewRunFileChooserCallback -> m SignalHandlerId
onWebViewRunFileChooser a
obj WebViewRunFileChooserCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewRunFileChooserCallback
cb' = WebViewRunFileChooserCallback -> C_WebViewRunFileChooserCallback
wrap_WebViewRunFileChooserCallback WebViewRunFileChooserCallback
cb
    FunPtr C_WebViewRunFileChooserCallback
cb'' <- C_WebViewRunFileChooserCallback
-> IO (FunPtr C_WebViewRunFileChooserCallback)
mk_WebViewRunFileChooserCallback C_WebViewRunFileChooserCallback
cb'
    a
-> Text
-> FunPtr C_WebViewRunFileChooserCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"run-file-chooser" FunPtr C_WebViewRunFileChooserCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [runFileChooser](#signal:runFileChooser) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #runFileChooser callback
-- @
-- 
-- 
afterWebViewRunFileChooser :: (IsWebView a, MonadIO m) => a -> WebViewRunFileChooserCallback -> m SignalHandlerId
afterWebViewRunFileChooser :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewRunFileChooserCallback -> m SignalHandlerId
afterWebViewRunFileChooser a
obj WebViewRunFileChooserCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewRunFileChooserCallback
cb' = WebViewRunFileChooserCallback -> C_WebViewRunFileChooserCallback
wrap_WebViewRunFileChooserCallback WebViewRunFileChooserCallback
cb
    FunPtr C_WebViewRunFileChooserCallback
cb'' <- C_WebViewRunFileChooserCallback
-> IO (FunPtr C_WebViewRunFileChooserCallback)
mk_WebViewRunFileChooserCallback C_WebViewRunFileChooserCallback
cb'
    a
-> Text
-> FunPtr C_WebViewRunFileChooserCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"run-file-chooser" FunPtr C_WebViewRunFileChooserCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewRunFileChooserSignalInfo
instance SignalInfo WebViewRunFileChooserSignalInfo where
    type HaskellCallbackType WebViewRunFileChooserSignalInfo = WebViewRunFileChooserCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewRunFileChooserCallback cb
        cb'' <- mk_WebViewRunFileChooserCallback cb'
        connectSignalFunPtr obj "run-file-chooser" cb'' connectMode detail

#endif

-- signal WebView::script-dialog
-- | Emitted when JavaScript code calls \<function>window.alert\<\/function>,
-- \<function>window.confirm\<\/function> or \<function>window.prompt\<\/function>,
-- or when \<function>onbeforeunload\<\/function> event is fired.
-- The /@dialog@/ parameter should be used to build the dialog.
-- If the signal is not handled a different dialog will be built and shown depending
-- on the dialog type:
-- \<itemizedlist>
-- \<listitem>\<para>
--  'GI.WebKit2.Enums.ScriptDialogTypeAlert': message dialog with a single Close button.
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
--  'GI.WebKit2.Enums.ScriptDialogTypeConfirm': message dialog with OK and Cancel buttons.
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
--  'GI.WebKit2.Enums.ScriptDialogTypePrompt': message dialog with OK and Cancel buttons and
--  a text entry with the default text.
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
--  'GI.WebKit2.Enums.ScriptDialogTypeBeforeUnloadConfirm': message dialog with Stay and Leave buttons.
-- \<\/para>\<\/listitem>
-- \<\/itemizedlist>
-- 
-- It is possible to handle the script dialog request asynchronously, by simply
-- caling 'GI.WebKit2.Structs.ScriptDialog.scriptDialogRef' on the /@dialog@/ argument and calling
-- 'GI.WebKit2.Structs.ScriptDialog.scriptDialogClose' when done.
-- If the last reference is removed on a t'GI.WebKit2.Structs.ScriptDialog.ScriptDialog' and the dialog has not been
-- closed, 'GI.WebKit2.Structs.ScriptDialog.scriptDialogClose' will be called.
type WebViewScriptDialogCallback =
    WebKit2.ScriptDialog.ScriptDialog
    -- ^ /@dialog@/: the t'GI.WebKit2.Structs.ScriptDialog.ScriptDialog' to show
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --    'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewScriptDialogCallback`@.
noWebViewScriptDialogCallback :: Maybe WebViewScriptDialogCallback
noWebViewScriptDialogCallback :: Maybe WebViewScriptDialogCallback
noWebViewScriptDialogCallback = Maybe WebViewScriptDialogCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewScriptDialogCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.ScriptDialog.ScriptDialog ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewScriptDialogCallback`.
foreign import ccall "wrapper"
    mk_WebViewScriptDialogCallback :: C_WebViewScriptDialogCallback -> IO (FunPtr C_WebViewScriptDialogCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewScriptDialog :: MonadIO m => WebViewScriptDialogCallback -> m (GClosure C_WebViewScriptDialogCallback)
genClosure_WebViewScriptDialog :: forall (m :: * -> *).
MonadIO m =>
WebViewScriptDialogCallback
-> m (GClosure C_WebViewScriptDialogCallback)
genClosure_WebViewScriptDialog WebViewScriptDialogCallback
cb = IO (GClosure C_WebViewScriptDialogCallback)
-> m (GClosure C_WebViewScriptDialogCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewScriptDialogCallback)
 -> m (GClosure C_WebViewScriptDialogCallback))
-> IO (GClosure C_WebViewScriptDialogCallback)
-> m (GClosure C_WebViewScriptDialogCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewScriptDialogCallback
cb' = WebViewScriptDialogCallback -> C_WebViewScriptDialogCallback
wrap_WebViewScriptDialogCallback WebViewScriptDialogCallback
cb
    C_WebViewScriptDialogCallback
-> IO (FunPtr C_WebViewScriptDialogCallback)
mk_WebViewScriptDialogCallback C_WebViewScriptDialogCallback
cb' IO (FunPtr C_WebViewScriptDialogCallback)
-> (FunPtr C_WebViewScriptDialogCallback
    -> IO (GClosure C_WebViewScriptDialogCallback))
-> IO (GClosure C_WebViewScriptDialogCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewScriptDialogCallback
-> IO (GClosure C_WebViewScriptDialogCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewScriptDialogCallback` into a `C_WebViewScriptDialogCallback`.
wrap_WebViewScriptDialogCallback ::
    WebViewScriptDialogCallback ->
    C_WebViewScriptDialogCallback
wrap_WebViewScriptDialogCallback :: WebViewScriptDialogCallback -> C_WebViewScriptDialogCallback
wrap_WebViewScriptDialogCallback WebViewScriptDialogCallback
_cb Ptr ()
_ Ptr ScriptDialog
dialog Ptr ()
_ = do
    (ManagedPtr ScriptDialog -> ScriptDialog)
-> Ptr ScriptDialog -> (ScriptDialog -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr ScriptDialog -> ScriptDialog
WebKit2.ScriptDialog.ScriptDialog Ptr ScriptDialog
dialog ((ScriptDialog -> IO CInt) -> IO CInt)
-> (ScriptDialog -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \ScriptDialog
dialog' -> do
        Bool
result <- WebViewScriptDialogCallback
_cb  ScriptDialog
dialog'
        let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
        CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [scriptDialog](#signal:scriptDialog) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #scriptDialog callback
-- @
-- 
-- 
onWebViewScriptDialog :: (IsWebView a, MonadIO m) => a -> WebViewScriptDialogCallback -> m SignalHandlerId
onWebViewScriptDialog :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewScriptDialogCallback -> m SignalHandlerId
onWebViewScriptDialog a
obj WebViewScriptDialogCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewScriptDialogCallback
cb' = WebViewScriptDialogCallback -> C_WebViewScriptDialogCallback
wrap_WebViewScriptDialogCallback WebViewScriptDialogCallback
cb
    FunPtr C_WebViewScriptDialogCallback
cb'' <- C_WebViewScriptDialogCallback
-> IO (FunPtr C_WebViewScriptDialogCallback)
mk_WebViewScriptDialogCallback C_WebViewScriptDialogCallback
cb'
    a
-> Text
-> FunPtr C_WebViewScriptDialogCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"script-dialog" FunPtr C_WebViewScriptDialogCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [scriptDialog](#signal:scriptDialog) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #scriptDialog callback
-- @
-- 
-- 
afterWebViewScriptDialog :: (IsWebView a, MonadIO m) => a -> WebViewScriptDialogCallback -> m SignalHandlerId
afterWebViewScriptDialog :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewScriptDialogCallback -> m SignalHandlerId
afterWebViewScriptDialog a
obj WebViewScriptDialogCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewScriptDialogCallback
cb' = WebViewScriptDialogCallback -> C_WebViewScriptDialogCallback
wrap_WebViewScriptDialogCallback WebViewScriptDialogCallback
cb
    FunPtr C_WebViewScriptDialogCallback
cb'' <- C_WebViewScriptDialogCallback
-> IO (FunPtr C_WebViewScriptDialogCallback)
mk_WebViewScriptDialogCallback C_WebViewScriptDialogCallback
cb'
    a
-> Text
-> FunPtr C_WebViewScriptDialogCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"script-dialog" FunPtr C_WebViewScriptDialogCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewScriptDialogSignalInfo
instance SignalInfo WebViewScriptDialogSignalInfo where
    type HaskellCallbackType WebViewScriptDialogSignalInfo = WebViewScriptDialogCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewScriptDialogCallback cb
        cb'' <- mk_WebViewScriptDialogCallback cb'
        connectSignalFunPtr obj "script-dialog" cb'' connectMode detail

#endif

-- signal WebView::show-notification
-- | This signal is emitted when a notification should be presented to the
-- user. The /@notification@/ is kept alive until either: 1) the web page cancels it
-- or 2) a navigation happens.
-- 
-- The default handler will emit a notification using libnotify, if built with
-- support for it.
-- 
-- /Since: 2.8/
type WebViewShowNotificationCallback =
    WebKit2.Notification.Notification
    -- ^ /@notification@/: a t'GI.WebKit2.Objects.Notification.Notification'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked. 'P.False' otherwise.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewShowNotificationCallback`@.
noWebViewShowNotificationCallback :: Maybe WebViewShowNotificationCallback
noWebViewShowNotificationCallback :: Maybe WebViewShowNotificationCallback
noWebViewShowNotificationCallback = Maybe WebViewShowNotificationCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewShowNotificationCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.Notification.Notification ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewShowNotificationCallback`.
foreign import ccall "wrapper"
    mk_WebViewShowNotificationCallback :: C_WebViewShowNotificationCallback -> IO (FunPtr C_WebViewShowNotificationCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewShowNotification :: MonadIO m => WebViewShowNotificationCallback -> m (GClosure C_WebViewShowNotificationCallback)
genClosure_WebViewShowNotification :: forall (m :: * -> *).
MonadIO m =>
WebViewShowNotificationCallback
-> m (GClosure C_WebViewShowNotificationCallback)
genClosure_WebViewShowNotification WebViewShowNotificationCallback
cb = IO (GClosure C_WebViewShowNotificationCallback)
-> m (GClosure C_WebViewShowNotificationCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewShowNotificationCallback)
 -> m (GClosure C_WebViewShowNotificationCallback))
-> IO (GClosure C_WebViewShowNotificationCallback)
-> m (GClosure C_WebViewShowNotificationCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewShowNotificationCallback
cb' = WebViewShowNotificationCallback
-> C_WebViewShowNotificationCallback
wrap_WebViewShowNotificationCallback WebViewShowNotificationCallback
cb
    C_WebViewShowNotificationCallback
-> IO (FunPtr C_WebViewShowNotificationCallback)
mk_WebViewShowNotificationCallback C_WebViewShowNotificationCallback
cb' IO (FunPtr C_WebViewShowNotificationCallback)
-> (FunPtr C_WebViewShowNotificationCallback
    -> IO (GClosure C_WebViewShowNotificationCallback))
-> IO (GClosure C_WebViewShowNotificationCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewShowNotificationCallback
-> IO (GClosure C_WebViewShowNotificationCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewShowNotificationCallback` into a `C_WebViewShowNotificationCallback`.
wrap_WebViewShowNotificationCallback ::
    WebViewShowNotificationCallback ->
    C_WebViewShowNotificationCallback
wrap_WebViewShowNotificationCallback :: WebViewShowNotificationCallback
-> C_WebViewShowNotificationCallback
wrap_WebViewShowNotificationCallback WebViewShowNotificationCallback
_cb Ptr ()
_ Ptr Notification
notification Ptr ()
_ = do
    Notification
notification' <- ((ManagedPtr Notification -> Notification)
-> Ptr Notification -> IO Notification
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Notification -> Notification
WebKit2.Notification.Notification) Ptr Notification
notification
    Bool
result <- WebViewShowNotificationCallback
_cb  Notification
notification'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [showNotification](#signal:showNotification) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #showNotification callback
-- @
-- 
-- 
onWebViewShowNotification :: (IsWebView a, MonadIO m) => a -> WebViewShowNotificationCallback -> m SignalHandlerId
onWebViewShowNotification :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewShowNotificationCallback -> m SignalHandlerId
onWebViewShowNotification a
obj WebViewShowNotificationCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewShowNotificationCallback
cb' = WebViewShowNotificationCallback
-> C_WebViewShowNotificationCallback
wrap_WebViewShowNotificationCallback WebViewShowNotificationCallback
cb
    FunPtr C_WebViewShowNotificationCallback
cb'' <- C_WebViewShowNotificationCallback
-> IO (FunPtr C_WebViewShowNotificationCallback)
mk_WebViewShowNotificationCallback C_WebViewShowNotificationCallback
cb'
    a
-> Text
-> FunPtr C_WebViewShowNotificationCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"show-notification" FunPtr C_WebViewShowNotificationCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [showNotification](#signal:showNotification) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #showNotification callback
-- @
-- 
-- 
afterWebViewShowNotification :: (IsWebView a, MonadIO m) => a -> WebViewShowNotificationCallback -> m SignalHandlerId
afterWebViewShowNotification :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewShowNotificationCallback -> m SignalHandlerId
afterWebViewShowNotification a
obj WebViewShowNotificationCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewShowNotificationCallback
cb' = WebViewShowNotificationCallback
-> C_WebViewShowNotificationCallback
wrap_WebViewShowNotificationCallback WebViewShowNotificationCallback
cb
    FunPtr C_WebViewShowNotificationCallback
cb'' <- C_WebViewShowNotificationCallback
-> IO (FunPtr C_WebViewShowNotificationCallback)
mk_WebViewShowNotificationCallback C_WebViewShowNotificationCallback
cb'
    a
-> Text
-> FunPtr C_WebViewShowNotificationCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"show-notification" FunPtr C_WebViewShowNotificationCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewShowNotificationSignalInfo
instance SignalInfo WebViewShowNotificationSignalInfo where
    type HaskellCallbackType WebViewShowNotificationSignalInfo = WebViewShowNotificationCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewShowNotificationCallback cb
        cb'' <- mk_WebViewShowNotificationCallback cb'
        connectSignalFunPtr obj "show-notification" cb'' connectMode detail

#endif

-- signal WebView::show-option-menu
-- | This signal is emitted when a select element in /@webView@/ needs to display a
-- dropdown menu. This signal can be used to show a custom menu, using /@menu@/ to get
-- the details of all items that should be displayed. The area of the element in the
-- t'GI.WebKit2.Objects.WebView.WebView' is given as /@rectangle@/ parameter, it can be used to position the
-- menu.
-- To handle this signal asynchronously you should keep a ref of the /@menu@/.
-- 
-- /Since: 2.28/
type WebViewShowOptionMenuCallback =
    WebKit2.OptionMenu.OptionMenu
    -> Gdk.Event.Event
    -> Gdk.Rectangle.Rectangle
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewShowOptionMenuCallback`@.
noWebViewShowOptionMenuCallback :: Maybe WebViewShowOptionMenuCallback
noWebViewShowOptionMenuCallback :: Maybe WebViewShowOptionMenuCallback
noWebViewShowOptionMenuCallback = Maybe WebViewShowOptionMenuCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewShowOptionMenuCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.OptionMenu.OptionMenu ->
    Ptr Gdk.Event.Event ->
    Ptr Gdk.Rectangle.Rectangle ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewShowOptionMenuCallback`.
foreign import ccall "wrapper"
    mk_WebViewShowOptionMenuCallback :: C_WebViewShowOptionMenuCallback -> IO (FunPtr C_WebViewShowOptionMenuCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewShowOptionMenu :: MonadIO m => WebViewShowOptionMenuCallback -> m (GClosure C_WebViewShowOptionMenuCallback)
genClosure_WebViewShowOptionMenu :: forall (m :: * -> *).
MonadIO m =>
WebViewShowOptionMenuCallback
-> m (GClosure C_WebViewShowOptionMenuCallback)
genClosure_WebViewShowOptionMenu WebViewShowOptionMenuCallback
cb = IO (GClosure C_WebViewShowOptionMenuCallback)
-> m (GClosure C_WebViewShowOptionMenuCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewShowOptionMenuCallback)
 -> m (GClosure C_WebViewShowOptionMenuCallback))
-> IO (GClosure C_WebViewShowOptionMenuCallback)
-> m (GClosure C_WebViewShowOptionMenuCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewShowOptionMenuCallback
cb' = WebViewShowOptionMenuCallback -> C_WebViewShowOptionMenuCallback
wrap_WebViewShowOptionMenuCallback WebViewShowOptionMenuCallback
cb
    C_WebViewShowOptionMenuCallback
-> IO (FunPtr C_WebViewShowOptionMenuCallback)
mk_WebViewShowOptionMenuCallback C_WebViewShowOptionMenuCallback
cb' IO (FunPtr C_WebViewShowOptionMenuCallback)
-> (FunPtr C_WebViewShowOptionMenuCallback
    -> IO (GClosure C_WebViewShowOptionMenuCallback))
-> IO (GClosure C_WebViewShowOptionMenuCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewShowOptionMenuCallback
-> IO (GClosure C_WebViewShowOptionMenuCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewShowOptionMenuCallback` into a `C_WebViewShowOptionMenuCallback`.
wrap_WebViewShowOptionMenuCallback ::
    WebViewShowOptionMenuCallback ->
    C_WebViewShowOptionMenuCallback
wrap_WebViewShowOptionMenuCallback :: WebViewShowOptionMenuCallback -> C_WebViewShowOptionMenuCallback
wrap_WebViewShowOptionMenuCallback WebViewShowOptionMenuCallback
_cb Ptr ()
_ Ptr OptionMenu
object Ptr Event
p0 Ptr Rectangle
p1 Ptr ()
_ = do
    OptionMenu
object' <- ((ManagedPtr OptionMenu -> OptionMenu)
-> Ptr OptionMenu -> IO OptionMenu
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr OptionMenu -> OptionMenu
WebKit2.OptionMenu.OptionMenu) Ptr OptionMenu
object
    (ManagedPtr Event -> Event)
-> Ptr Event -> (Event -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr Event -> Event
Gdk.Event.Event Ptr Event
p0 ((Event -> IO CInt) -> IO CInt) -> (Event -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Event
p0' -> do
        (ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> (Rectangle -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr Rectangle -> Rectangle
Gdk.Rectangle.Rectangle Ptr Rectangle
p1 ((Rectangle -> IO CInt) -> IO CInt)
-> (Rectangle -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Rectangle
p1' -> do
            Bool
result <- WebViewShowOptionMenuCallback
_cb  OptionMenu
object' Event
p0' Rectangle
p1'
            let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
            CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [showOptionMenu](#signal:showOptionMenu) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #showOptionMenu callback
-- @
-- 
-- 
onWebViewShowOptionMenu :: (IsWebView a, MonadIO m) => a -> WebViewShowOptionMenuCallback -> m SignalHandlerId
onWebViewShowOptionMenu :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewShowOptionMenuCallback -> m SignalHandlerId
onWebViewShowOptionMenu a
obj WebViewShowOptionMenuCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewShowOptionMenuCallback
cb' = WebViewShowOptionMenuCallback -> C_WebViewShowOptionMenuCallback
wrap_WebViewShowOptionMenuCallback WebViewShowOptionMenuCallback
cb
    FunPtr C_WebViewShowOptionMenuCallback
cb'' <- C_WebViewShowOptionMenuCallback
-> IO (FunPtr C_WebViewShowOptionMenuCallback)
mk_WebViewShowOptionMenuCallback C_WebViewShowOptionMenuCallback
cb'
    a
-> Text
-> FunPtr C_WebViewShowOptionMenuCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"show-option-menu" FunPtr C_WebViewShowOptionMenuCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [showOptionMenu](#signal:showOptionMenu) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #showOptionMenu callback
-- @
-- 
-- 
afterWebViewShowOptionMenu :: (IsWebView a, MonadIO m) => a -> WebViewShowOptionMenuCallback -> m SignalHandlerId
afterWebViewShowOptionMenu :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewShowOptionMenuCallback -> m SignalHandlerId
afterWebViewShowOptionMenu a
obj WebViewShowOptionMenuCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewShowOptionMenuCallback
cb' = WebViewShowOptionMenuCallback -> C_WebViewShowOptionMenuCallback
wrap_WebViewShowOptionMenuCallback WebViewShowOptionMenuCallback
cb
    FunPtr C_WebViewShowOptionMenuCallback
cb'' <- C_WebViewShowOptionMenuCallback
-> IO (FunPtr C_WebViewShowOptionMenuCallback)
mk_WebViewShowOptionMenuCallback C_WebViewShowOptionMenuCallback
cb'
    a
-> Text
-> FunPtr C_WebViewShowOptionMenuCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"show-option-menu" FunPtr C_WebViewShowOptionMenuCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewShowOptionMenuSignalInfo
instance SignalInfo WebViewShowOptionMenuSignalInfo where
    type HaskellCallbackType WebViewShowOptionMenuSignalInfo = WebViewShowOptionMenuCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewShowOptionMenuCallback cb
        cb'' <- mk_WebViewShowOptionMenuCallback cb'
        connectSignalFunPtr obj "show-option-menu" cb'' connectMode detail

#endif

-- signal WebView::submit-form
-- | This signal is emitted when a form is about to be submitted. The /@request@/
-- argument passed contains information about the text fields of the form. This
-- is typically used to store login information that can be used later to
-- pre-fill the form.
-- The form will not be submitted until 'GI.WebKit2.Objects.FormSubmissionRequest.formSubmissionRequestSubmit' is called.
-- 
-- It is possible to handle the form submission request asynchronously, by
-- simply calling 'GI.GObject.Objects.Object.objectRef' on the /@request@/ argument and calling
-- 'GI.WebKit2.Objects.FormSubmissionRequest.formSubmissionRequestSubmit' when done to continue with the form submission.
-- If the last reference is removed on a t'GI.WebKit2.Objects.FormSubmissionRequest.FormSubmissionRequest' and the
-- form has not been submitted, 'GI.WebKit2.Objects.FormSubmissionRequest.formSubmissionRequestSubmit' will be called.
type WebViewSubmitFormCallback =
    WebKit2.FormSubmissionRequest.FormSubmissionRequest
    -- ^ /@request@/: a t'GI.WebKit2.Objects.FormSubmissionRequest.FormSubmissionRequest'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewSubmitFormCallback`@.
noWebViewSubmitFormCallback :: Maybe WebViewSubmitFormCallback
noWebViewSubmitFormCallback :: Maybe WebViewSubmitFormCallback
noWebViewSubmitFormCallback = Maybe WebViewSubmitFormCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewSubmitFormCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.FormSubmissionRequest.FormSubmissionRequest ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebViewSubmitFormCallback`.
foreign import ccall "wrapper"
    mk_WebViewSubmitFormCallback :: C_WebViewSubmitFormCallback -> IO (FunPtr C_WebViewSubmitFormCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewSubmitForm :: MonadIO m => WebViewSubmitFormCallback -> m (GClosure C_WebViewSubmitFormCallback)
genClosure_WebViewSubmitForm :: forall (m :: * -> *).
MonadIO m =>
WebViewSubmitFormCallback
-> m (GClosure C_WebViewSubmitFormCallback)
genClosure_WebViewSubmitForm WebViewSubmitFormCallback
cb = IO (GClosure C_WebViewSubmitFormCallback)
-> m (GClosure C_WebViewSubmitFormCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewSubmitFormCallback)
 -> m (GClosure C_WebViewSubmitFormCallback))
-> IO (GClosure C_WebViewSubmitFormCallback)
-> m (GClosure C_WebViewSubmitFormCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewSubmitFormCallback
cb' = WebViewSubmitFormCallback -> C_WebViewSubmitFormCallback
wrap_WebViewSubmitFormCallback WebViewSubmitFormCallback
cb
    C_WebViewSubmitFormCallback
-> IO (FunPtr C_WebViewSubmitFormCallback)
mk_WebViewSubmitFormCallback C_WebViewSubmitFormCallback
cb' IO (FunPtr C_WebViewSubmitFormCallback)
-> (FunPtr C_WebViewSubmitFormCallback
    -> IO (GClosure C_WebViewSubmitFormCallback))
-> IO (GClosure C_WebViewSubmitFormCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewSubmitFormCallback
-> IO (GClosure C_WebViewSubmitFormCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewSubmitFormCallback` into a `C_WebViewSubmitFormCallback`.
wrap_WebViewSubmitFormCallback ::
    WebViewSubmitFormCallback ->
    C_WebViewSubmitFormCallback
wrap_WebViewSubmitFormCallback :: WebViewSubmitFormCallback -> C_WebViewSubmitFormCallback
wrap_WebViewSubmitFormCallback WebViewSubmitFormCallback
_cb Ptr ()
_ Ptr FormSubmissionRequest
request Ptr ()
_ = do
    FormSubmissionRequest
request' <- ((ManagedPtr FormSubmissionRequest -> FormSubmissionRequest)
-> Ptr FormSubmissionRequest -> IO FormSubmissionRequest
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FormSubmissionRequest -> FormSubmissionRequest
WebKit2.FormSubmissionRequest.FormSubmissionRequest) Ptr FormSubmissionRequest
request
    WebViewSubmitFormCallback
_cb  FormSubmissionRequest
request'


-- | Connect a signal handler for the [submitForm](#signal:submitForm) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #submitForm callback
-- @
-- 
-- 
onWebViewSubmitForm :: (IsWebView a, MonadIO m) => a -> WebViewSubmitFormCallback -> m SignalHandlerId
onWebViewSubmitForm :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewSubmitFormCallback -> m SignalHandlerId
onWebViewSubmitForm a
obj WebViewSubmitFormCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewSubmitFormCallback
cb' = WebViewSubmitFormCallback -> C_WebViewSubmitFormCallback
wrap_WebViewSubmitFormCallback WebViewSubmitFormCallback
cb
    FunPtr C_WebViewSubmitFormCallback
cb'' <- C_WebViewSubmitFormCallback
-> IO (FunPtr C_WebViewSubmitFormCallback)
mk_WebViewSubmitFormCallback C_WebViewSubmitFormCallback
cb'
    a
-> Text
-> FunPtr C_WebViewSubmitFormCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"submit-form" FunPtr C_WebViewSubmitFormCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [submitForm](#signal:submitForm) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #submitForm callback
-- @
-- 
-- 
afterWebViewSubmitForm :: (IsWebView a, MonadIO m) => a -> WebViewSubmitFormCallback -> m SignalHandlerId
afterWebViewSubmitForm :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewSubmitFormCallback -> m SignalHandlerId
afterWebViewSubmitForm a
obj WebViewSubmitFormCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewSubmitFormCallback
cb' = WebViewSubmitFormCallback -> C_WebViewSubmitFormCallback
wrap_WebViewSubmitFormCallback WebViewSubmitFormCallback
cb
    FunPtr C_WebViewSubmitFormCallback
cb'' <- C_WebViewSubmitFormCallback
-> IO (FunPtr C_WebViewSubmitFormCallback)
mk_WebViewSubmitFormCallback C_WebViewSubmitFormCallback
cb'
    a
-> Text
-> FunPtr C_WebViewSubmitFormCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"submit-form" FunPtr C_WebViewSubmitFormCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewSubmitFormSignalInfo
instance SignalInfo WebViewSubmitFormSignalInfo where
    type HaskellCallbackType WebViewSubmitFormSignalInfo = WebViewSubmitFormCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewSubmitFormCallback cb
        cb'' <- mk_WebViewSubmitFormCallback cb'
        connectSignalFunPtr obj "submit-form" cb'' connectMode detail

#endif

-- signal WebView::user-message-received
-- | This signal is emitted when a t'GI.WebKit2.Objects.UserMessage.UserMessage' is received from the
-- @/WebKitWebPage/@ corresponding to /@webView@/. You can reply to the message
-- using 'GI.WebKit2.Objects.UserMessage.userMessageSendReply'.
-- 
-- You can handle the user message asynchronously by calling 'GI.GObject.Objects.Object.objectRef' on
-- /@message@/ and returning 'P.True'. If the last reference of /@message@/ is removed
-- and the message has not been replied to, the operation in the @/WebKitWebPage/@ will
-- finish with error 'GI.WebKit2.Enums.UserMessageErrorMessage'.
-- 
-- /Since: 2.28/
type WebViewUserMessageReceivedCallback =
    WebKit2.UserMessage.UserMessage
    -- ^ /@message@/: the t'GI.WebKit2.Objects.UserMessage.UserMessage' received
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the message was handled, or 'P.False' otherwise.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewUserMessageReceivedCallback`@.
noWebViewUserMessageReceivedCallback :: Maybe WebViewUserMessageReceivedCallback
noWebViewUserMessageReceivedCallback :: Maybe WebViewUserMessageReceivedCallback
noWebViewUserMessageReceivedCallback = Maybe WebViewUserMessageReceivedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewUserMessageReceivedCallback =
    Ptr () ->                               -- object
    Ptr WebKit2.UserMessage.UserMessage ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewUserMessageReceivedCallback`.
foreign import ccall "wrapper"
    mk_WebViewUserMessageReceivedCallback :: C_WebViewUserMessageReceivedCallback -> IO (FunPtr C_WebViewUserMessageReceivedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewUserMessageReceived :: MonadIO m => WebViewUserMessageReceivedCallback -> m (GClosure C_WebViewUserMessageReceivedCallback)
genClosure_WebViewUserMessageReceived :: forall (m :: * -> *).
MonadIO m =>
WebViewUserMessageReceivedCallback
-> m (GClosure C_WebViewUserMessageReceivedCallback)
genClosure_WebViewUserMessageReceived WebViewUserMessageReceivedCallback
cb = IO (GClosure C_WebViewUserMessageReceivedCallback)
-> m (GClosure C_WebViewUserMessageReceivedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewUserMessageReceivedCallback)
 -> m (GClosure C_WebViewUserMessageReceivedCallback))
-> IO (GClosure C_WebViewUserMessageReceivedCallback)
-> m (GClosure C_WebViewUserMessageReceivedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewUserMessageReceivedCallback
cb' = WebViewUserMessageReceivedCallback
-> C_WebViewUserMessageReceivedCallback
wrap_WebViewUserMessageReceivedCallback WebViewUserMessageReceivedCallback
cb
    C_WebViewUserMessageReceivedCallback
-> IO (FunPtr C_WebViewUserMessageReceivedCallback)
mk_WebViewUserMessageReceivedCallback C_WebViewUserMessageReceivedCallback
cb' IO (FunPtr C_WebViewUserMessageReceivedCallback)
-> (FunPtr C_WebViewUserMessageReceivedCallback
    -> IO (GClosure C_WebViewUserMessageReceivedCallback))
-> IO (GClosure C_WebViewUserMessageReceivedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewUserMessageReceivedCallback
-> IO (GClosure C_WebViewUserMessageReceivedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewUserMessageReceivedCallback` into a `C_WebViewUserMessageReceivedCallback`.
wrap_WebViewUserMessageReceivedCallback ::
    WebViewUserMessageReceivedCallback ->
    C_WebViewUserMessageReceivedCallback
wrap_WebViewUserMessageReceivedCallback :: WebViewUserMessageReceivedCallback
-> C_WebViewUserMessageReceivedCallback
wrap_WebViewUserMessageReceivedCallback WebViewUserMessageReceivedCallback
_cb Ptr ()
_ Ptr UserMessage
message Ptr ()
_ = do
    UserMessage
message' <- ((ManagedPtr UserMessage -> UserMessage)
-> Ptr UserMessage -> IO UserMessage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr UserMessage -> UserMessage
WebKit2.UserMessage.UserMessage) Ptr UserMessage
message
    Bool
result <- WebViewUserMessageReceivedCallback
_cb  UserMessage
message'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [userMessageReceived](#signal:userMessageReceived) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #userMessageReceived callback
-- @
-- 
-- 
onWebViewUserMessageReceived :: (IsWebView a, MonadIO m) => a -> WebViewUserMessageReceivedCallback -> m SignalHandlerId
onWebViewUserMessageReceived :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewUserMessageReceivedCallback -> m SignalHandlerId
onWebViewUserMessageReceived a
obj WebViewUserMessageReceivedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewUserMessageReceivedCallback
cb' = WebViewUserMessageReceivedCallback
-> C_WebViewUserMessageReceivedCallback
wrap_WebViewUserMessageReceivedCallback WebViewUserMessageReceivedCallback
cb
    FunPtr C_WebViewUserMessageReceivedCallback
cb'' <- C_WebViewUserMessageReceivedCallback
-> IO (FunPtr C_WebViewUserMessageReceivedCallback)
mk_WebViewUserMessageReceivedCallback C_WebViewUserMessageReceivedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewUserMessageReceivedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"user-message-received" FunPtr C_WebViewUserMessageReceivedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [userMessageReceived](#signal:userMessageReceived) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #userMessageReceived callback
-- @
-- 
-- 
afterWebViewUserMessageReceived :: (IsWebView a, MonadIO m) => a -> WebViewUserMessageReceivedCallback -> m SignalHandlerId
afterWebViewUserMessageReceived :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewUserMessageReceivedCallback -> m SignalHandlerId
afterWebViewUserMessageReceived a
obj WebViewUserMessageReceivedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewUserMessageReceivedCallback
cb' = WebViewUserMessageReceivedCallback
-> C_WebViewUserMessageReceivedCallback
wrap_WebViewUserMessageReceivedCallback WebViewUserMessageReceivedCallback
cb
    FunPtr C_WebViewUserMessageReceivedCallback
cb'' <- C_WebViewUserMessageReceivedCallback
-> IO (FunPtr C_WebViewUserMessageReceivedCallback)
mk_WebViewUserMessageReceivedCallback C_WebViewUserMessageReceivedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewUserMessageReceivedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"user-message-received" FunPtr C_WebViewUserMessageReceivedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewUserMessageReceivedSignalInfo
instance SignalInfo WebViewUserMessageReceivedSignalInfo where
    type HaskellCallbackType WebViewUserMessageReceivedSignalInfo = WebViewUserMessageReceivedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewUserMessageReceivedCallback cb
        cb'' <- mk_WebViewUserMessageReceivedCallback cb'
        connectSignalFunPtr obj "user-message-received" cb'' connectMode detail

#endif

-- signal WebView::web-process-crashed
{-# DEPRECATED WebViewWebProcessCrashedCallback ["(Since version 2.20)","Use WebKitWebView[webProcessTerminated](#g:signal:webProcessTerminated) instead."] #-}
-- | This signal is emitted when the web process crashes.
type WebViewWebProcessCrashedCallback =
    IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --    'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewWebProcessCrashedCallback`@.
noWebViewWebProcessCrashedCallback :: Maybe WebViewWebProcessCrashedCallback
noWebViewWebProcessCrashedCallback :: Maybe WebViewEnterFullscreenCallback
noWebViewWebProcessCrashedCallback = Maybe WebViewEnterFullscreenCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewWebProcessCrashedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebViewWebProcessCrashedCallback`.
foreign import ccall "wrapper"
    mk_WebViewWebProcessCrashedCallback :: C_WebViewWebProcessCrashedCallback -> IO (FunPtr C_WebViewWebProcessCrashedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewWebProcessCrashed :: MonadIO m => WebViewWebProcessCrashedCallback -> m (GClosure C_WebViewWebProcessCrashedCallback)
genClosure_WebViewWebProcessCrashed :: forall (m :: * -> *).
MonadIO m =>
WebViewEnterFullscreenCallback
-> m (GClosure C_WebViewEnterFullscreenCallback)
genClosure_WebViewWebProcessCrashed WebViewEnterFullscreenCallback
cb = IO (GClosure C_WebViewEnterFullscreenCallback)
-> m (GClosure C_WebViewEnterFullscreenCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewEnterFullscreenCallback)
 -> m (GClosure C_WebViewEnterFullscreenCallback))
-> IO (GClosure C_WebViewEnterFullscreenCallback)
-> m (GClosure C_WebViewEnterFullscreenCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewEnterFullscreenCallback
cb' = WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewWebProcessCrashedCallback WebViewEnterFullscreenCallback
cb
    C_WebViewEnterFullscreenCallback
-> IO (FunPtr C_WebViewEnterFullscreenCallback)
mk_WebViewWebProcessCrashedCallback C_WebViewEnterFullscreenCallback
cb' IO (FunPtr C_WebViewEnterFullscreenCallback)
-> (FunPtr C_WebViewEnterFullscreenCallback
    -> IO (GClosure C_WebViewEnterFullscreenCallback))
-> IO (GClosure C_WebViewEnterFullscreenCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewEnterFullscreenCallback
-> IO (GClosure C_WebViewEnterFullscreenCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewWebProcessCrashedCallback` into a `C_WebViewWebProcessCrashedCallback`.
wrap_WebViewWebProcessCrashedCallback ::
    WebViewWebProcessCrashedCallback ->
    C_WebViewWebProcessCrashedCallback
wrap_WebViewWebProcessCrashedCallback :: WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewWebProcessCrashedCallback WebViewEnterFullscreenCallback
_cb Ptr ()
_ Ptr ()
_ = do
    Bool
result <- WebViewEnterFullscreenCallback
_cb 
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [webProcessCrashed](#signal:webProcessCrashed) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #webProcessCrashed callback
-- @
-- 
-- 
onWebViewWebProcessCrashed :: (IsWebView a, MonadIO m) => a -> WebViewWebProcessCrashedCallback -> m SignalHandlerId
onWebViewWebProcessCrashed :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewEnterFullscreenCallback -> m SignalHandlerId
onWebViewWebProcessCrashed a
obj WebViewEnterFullscreenCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewEnterFullscreenCallback
cb' = WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewWebProcessCrashedCallback WebViewEnterFullscreenCallback
cb
    FunPtr C_WebViewEnterFullscreenCallback
cb'' <- C_WebViewEnterFullscreenCallback
-> IO (FunPtr C_WebViewEnterFullscreenCallback)
mk_WebViewWebProcessCrashedCallback C_WebViewEnterFullscreenCallback
cb'
    a
-> Text
-> FunPtr C_WebViewEnterFullscreenCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"web-process-crashed" FunPtr C_WebViewEnterFullscreenCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [webProcessCrashed](#signal:webProcessCrashed) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #webProcessCrashed callback
-- @
-- 
-- 
afterWebViewWebProcessCrashed :: (IsWebView a, MonadIO m) => a -> WebViewWebProcessCrashedCallback -> m SignalHandlerId
afterWebViewWebProcessCrashed :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewEnterFullscreenCallback -> m SignalHandlerId
afterWebViewWebProcessCrashed a
obj WebViewEnterFullscreenCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewEnterFullscreenCallback
cb' = WebViewEnterFullscreenCallback -> C_WebViewEnterFullscreenCallback
wrap_WebViewWebProcessCrashedCallback WebViewEnterFullscreenCallback
cb
    FunPtr C_WebViewEnterFullscreenCallback
cb'' <- C_WebViewEnterFullscreenCallback
-> IO (FunPtr C_WebViewEnterFullscreenCallback)
mk_WebViewWebProcessCrashedCallback C_WebViewEnterFullscreenCallback
cb'
    a
-> Text
-> FunPtr C_WebViewEnterFullscreenCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"web-process-crashed" FunPtr C_WebViewEnterFullscreenCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewWebProcessCrashedSignalInfo
instance SignalInfo WebViewWebProcessCrashedSignalInfo where
    type HaskellCallbackType WebViewWebProcessCrashedSignalInfo = WebViewWebProcessCrashedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewWebProcessCrashedCallback cb
        cb'' <- mk_WebViewWebProcessCrashedCallback cb'
        connectSignalFunPtr obj "web-process-crashed" cb'' connectMode detail

#endif

-- signal WebView::web-process-terminated
-- | This signal is emitted when the web process terminates abnormally due
-- to /@reason@/.
-- 
-- /Since: 2.20/
type WebViewWebProcessTerminatedCallback =
    WebKit2.Enums.WebProcessTerminationReason
    -- ^ /@reason@/: the a t'GI.WebKit2.Enums.WebProcessTerminationReason'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebViewWebProcessTerminatedCallback`@.
noWebViewWebProcessTerminatedCallback :: Maybe WebViewWebProcessTerminatedCallback
noWebViewWebProcessTerminatedCallback :: Maybe WebViewWebProcessTerminatedCallback
noWebViewWebProcessTerminatedCallback = Maybe WebViewWebProcessTerminatedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebViewWebProcessTerminatedCallback =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebViewWebProcessTerminatedCallback`.
foreign import ccall "wrapper"
    mk_WebViewWebProcessTerminatedCallback :: C_WebViewWebProcessTerminatedCallback -> IO (FunPtr C_WebViewWebProcessTerminatedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebViewWebProcessTerminated :: MonadIO m => WebViewWebProcessTerminatedCallback -> m (GClosure C_WebViewWebProcessTerminatedCallback)
genClosure_WebViewWebProcessTerminated :: forall (m :: * -> *).
MonadIO m =>
WebViewWebProcessTerminatedCallback
-> m (GClosure C_WebViewInsecureContentDetectedCallback)
genClosure_WebViewWebProcessTerminated WebViewWebProcessTerminatedCallback
cb = IO (GClosure C_WebViewInsecureContentDetectedCallback)
-> m (GClosure C_WebViewInsecureContentDetectedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebViewInsecureContentDetectedCallback)
 -> m (GClosure C_WebViewInsecureContentDetectedCallback))
-> IO (GClosure C_WebViewInsecureContentDetectedCallback)
-> m (GClosure C_WebViewInsecureContentDetectedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewInsecureContentDetectedCallback
cb' = WebViewWebProcessTerminatedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewWebProcessTerminatedCallback WebViewWebProcessTerminatedCallback
cb
    C_WebViewInsecureContentDetectedCallback
-> IO (FunPtr C_WebViewInsecureContentDetectedCallback)
mk_WebViewWebProcessTerminatedCallback C_WebViewInsecureContentDetectedCallback
cb' IO (FunPtr C_WebViewInsecureContentDetectedCallback)
-> (FunPtr C_WebViewInsecureContentDetectedCallback
    -> IO (GClosure C_WebViewInsecureContentDetectedCallback))
-> IO (GClosure C_WebViewInsecureContentDetectedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebViewInsecureContentDetectedCallback
-> IO (GClosure C_WebViewInsecureContentDetectedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WebViewWebProcessTerminatedCallback` into a `C_WebViewWebProcessTerminatedCallback`.
wrap_WebViewWebProcessTerminatedCallback ::
    WebViewWebProcessTerminatedCallback ->
    C_WebViewWebProcessTerminatedCallback
wrap_WebViewWebProcessTerminatedCallback :: WebViewWebProcessTerminatedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewWebProcessTerminatedCallback WebViewWebProcessTerminatedCallback
_cb Ptr ()
_ CUInt
reason Ptr ()
_ = do
    let reason' :: WebProcessTerminationReason
reason' = (Int -> WebProcessTerminationReason
forall a. Enum a => Int -> a
toEnum (Int -> WebProcessTerminationReason)
-> (CUInt -> Int) -> CUInt -> WebProcessTerminationReason
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
reason
    WebViewWebProcessTerminatedCallback
_cb  WebProcessTerminationReason
reason'


-- | Connect a signal handler for the [webProcessTerminated](#signal:webProcessTerminated) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' webView #webProcessTerminated callback
-- @
-- 
-- 
onWebViewWebProcessTerminated :: (IsWebView a, MonadIO m) => a -> WebViewWebProcessTerminatedCallback -> m SignalHandlerId
onWebViewWebProcessTerminated :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewWebProcessTerminatedCallback -> m SignalHandlerId
onWebViewWebProcessTerminated a
obj WebViewWebProcessTerminatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewInsecureContentDetectedCallback
cb' = WebViewWebProcessTerminatedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewWebProcessTerminatedCallback WebViewWebProcessTerminatedCallback
cb
    FunPtr C_WebViewInsecureContentDetectedCallback
cb'' <- C_WebViewInsecureContentDetectedCallback
-> IO (FunPtr C_WebViewInsecureContentDetectedCallback)
mk_WebViewWebProcessTerminatedCallback C_WebViewInsecureContentDetectedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewInsecureContentDetectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"web-process-terminated" FunPtr C_WebViewInsecureContentDetectedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [webProcessTerminated](#signal:webProcessTerminated) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' webView #webProcessTerminated callback
-- @
-- 
-- 
afterWebViewWebProcessTerminated :: (IsWebView a, MonadIO m) => a -> WebViewWebProcessTerminatedCallback -> m SignalHandlerId
afterWebViewWebProcessTerminated :: forall a (m :: * -> *).
(IsWebView a, MonadIO m) =>
a -> WebViewWebProcessTerminatedCallback -> m SignalHandlerId
afterWebViewWebProcessTerminated a
obj WebViewWebProcessTerminatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WebViewInsecureContentDetectedCallback
cb' = WebViewWebProcessTerminatedCallback
-> C_WebViewInsecureContentDetectedCallback
wrap_WebViewWebProcessTerminatedCallback WebViewWebProcessTerminatedCallback
cb
    FunPtr C_WebViewInsecureContentDetectedCallback
cb'' <- C_WebViewInsecureContentDetectedCallback
-> IO (FunPtr C_WebViewInsecureContentDetectedCallback)
mk_WebViewWebProcessTerminatedCallback C_WebViewInsecureContentDetectedCallback
cb'
    a
-> Text
-> FunPtr C_WebViewInsecureContentDetectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"web-process-terminated" FunPtr C_WebViewInsecureContentDetectedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebViewWebProcessTerminatedSignalInfo
instance SignalInfo WebViewWebProcessTerminatedSignalInfo where
    type HaskellCallbackType WebViewWebProcessTerminatedSignalInfo = WebViewWebProcessTerminatedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebViewWebProcessTerminatedCallback cb
        cb'' <- mk_WebViewWebProcessTerminatedCallback cb'
        connectSignalFunPtr obj "web-process-terminated" cb'' connectMode detail

#endif

-- VVV Prop "automation-presentation-type"
   -- Type: TInterface (Name {namespace = "WebKit2", name = "AutomationBrowsingContextPresentation"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@automation-presentation-type@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #automationPresentationType
-- @
getWebViewAutomationPresentationType :: (MonadIO m, IsWebView o) => o -> m WebKit2.Enums.AutomationBrowsingContextPresentation
getWebViewAutomationPresentationType :: forall (m :: * -> *) o.
(MonadIO m, IsWebView o) =>
o -> m AutomationBrowsingContextPresentation
getWebViewAutomationPresentationType o
obj = IO AutomationBrowsingContextPresentation
-> m AutomationBrowsingContextPresentation
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO AutomationBrowsingContextPresentation
 -> m AutomationBrowsingContextPresentation)
-> IO AutomationBrowsingContextPresentation
-> m AutomationBrowsingContextPresentation
forall a b. (a -> b) -> a -> b
$ o -> String -> IO AutomationBrowsingContextPresentation
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"automation-presentation-type"

-- | Construct a `GValueConstruct` with valid value for the “@automation-presentation-type@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewAutomationPresentationType :: (IsWebView o, MIO.MonadIO m) => WebKit2.Enums.AutomationBrowsingContextPresentation -> m (GValueConstruct o)
constructWebViewAutomationPresentationType :: forall o (m :: * -> *).
(IsWebView o, MonadIO m) =>
AutomationBrowsingContextPresentation -> m (GValueConstruct o)
constructWebViewAutomationPresentationType AutomationBrowsingContextPresentation
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String
-> AutomationBrowsingContextPresentation -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"automation-presentation-type" AutomationBrowsingContextPresentation
val

#if defined(ENABLE_OVERLOADING)
data WebViewAutomationPresentationTypePropertyInfo
instance AttrInfo WebViewAutomationPresentationTypePropertyInfo where
    type AttrAllowedOps WebViewAutomationPresentationTypePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WebViewAutomationPresentationTypePropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewAutomationPresentationTypePropertyInfo = (~) WebKit2.Enums.AutomationBrowsingContextPresentation
    type AttrTransferTypeConstraint WebViewAutomationPresentationTypePropertyInfo = (~) WebKit2.Enums.AutomationBrowsingContextPresentation
    type AttrTransferType WebViewAutomationPresentationTypePropertyInfo = WebKit2.Enums.AutomationBrowsingContextPresentation
    type AttrGetType WebViewAutomationPresentationTypePropertyInfo = WebKit2.Enums.AutomationBrowsingContextPresentation
    type AttrLabel WebViewAutomationPresentationTypePropertyInfo = "automation-presentation-type"
    type AttrOrigin WebViewAutomationPresentationTypePropertyInfo = WebView
    attrGet = getWebViewAutomationPresentationType
    attrSet = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructWebViewAutomationPresentationType
    attrClear = undefined
#endif

-- VVV Prop "editable"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Just False)

-- | Get the value of the “@editable@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #editable
-- @
getWebViewEditable :: (MonadIO m, IsWebView o) => o -> m Bool
getWebViewEditable :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m Bool
getWebViewEditable o
obj = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WebViewEnterFullscreenCallback
forall a.
GObject a =>
a -> String -> WebViewEnterFullscreenCallback
B.Properties.getObjectPropertyBool o
obj String
"editable"

-- | Set the value of the “@editable@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' webView [ #editable 'Data.GI.Base.Attributes.:=' value ]
-- @
setWebViewEditable :: (MonadIO m, IsWebView o) => o -> Bool -> m ()
setWebViewEditable :: forall (m :: * -> *) o.
(MonadIO m, IsWebView o) =>
o -> Bool -> m ()
setWebViewEditable o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"editable" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@editable@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewEditable :: (IsWebView o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWebViewEditable :: forall o (m :: * -> *).
(IsWebView o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWebViewEditable Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"editable" Bool
val

#if defined(ENABLE_OVERLOADING)
data WebViewEditablePropertyInfo
instance AttrInfo WebViewEditablePropertyInfo where
    type AttrAllowedOps WebViewEditablePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WebViewEditablePropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewEditablePropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WebViewEditablePropertyInfo = (~) Bool
    type AttrTransferType WebViewEditablePropertyInfo = Bool
    type AttrGetType WebViewEditablePropertyInfo = Bool
    type AttrLabel WebViewEditablePropertyInfo = "editable"
    type AttrOrigin WebViewEditablePropertyInfo = WebView
    attrGet = getWebViewEditable
    attrSet = setWebViewEditable
    attrTransfer _ v = do
        return v
    attrConstruct = constructWebViewEditable
    attrClear = undefined
#endif

-- VVV Prop "estimated-load-progress"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@estimated-load-progress@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #estimatedLoadProgress
-- @
getWebViewEstimatedLoadProgress :: (MonadIO m, IsWebView o) => o -> m Double
getWebViewEstimatedLoadProgress :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m Double
getWebViewEstimatedLoadProgress o
obj = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Double
forall a. GObject a => a -> String -> IO Double
B.Properties.getObjectPropertyDouble o
obj String
"estimated-load-progress"

#if defined(ENABLE_OVERLOADING)
data WebViewEstimatedLoadProgressPropertyInfo
instance AttrInfo WebViewEstimatedLoadProgressPropertyInfo where
    type AttrAllowedOps WebViewEstimatedLoadProgressPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WebViewEstimatedLoadProgressPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewEstimatedLoadProgressPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WebViewEstimatedLoadProgressPropertyInfo = (~) ()
    type AttrTransferType WebViewEstimatedLoadProgressPropertyInfo = ()
    type AttrGetType WebViewEstimatedLoadProgressPropertyInfo = Double
    type AttrLabel WebViewEstimatedLoadProgressPropertyInfo = "estimated-load-progress"
    type AttrOrigin WebViewEstimatedLoadProgressPropertyInfo = WebView
    attrGet = getWebViewEstimatedLoadProgress
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "favicon"
   -- Type: TBasicType TPtr
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@favicon@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #favicon
-- @
getWebViewFavicon :: (MonadIO m, IsWebView o) => o -> m (Ptr ())
getWebViewFavicon :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m (Ptr ())
getWebViewFavicon o
obj = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Ptr ())
forall a b. GObject a => a -> String -> IO (Ptr b)
B.Properties.getObjectPropertyPtr o
obj String
"favicon"

#if defined(ENABLE_OVERLOADING)
data WebViewFaviconPropertyInfo
instance AttrInfo WebViewFaviconPropertyInfo where
    type AttrAllowedOps WebViewFaviconPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WebViewFaviconPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewFaviconPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WebViewFaviconPropertyInfo = (~) ()
    type AttrTransferType WebViewFaviconPropertyInfo = ()
    type AttrGetType WebViewFaviconPropertyInfo = (Ptr ())
    type AttrLabel WebViewFaviconPropertyInfo = "favicon"
    type AttrOrigin WebViewFaviconPropertyInfo = WebView
    attrGet = getWebViewFavicon
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "is-controlled-by-automation"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@is-controlled-by-automation@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #isControlledByAutomation
-- @
getWebViewIsControlledByAutomation :: (MonadIO m, IsWebView o) => o -> m Bool
getWebViewIsControlledByAutomation :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m Bool
getWebViewIsControlledByAutomation o
obj = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WebViewEnterFullscreenCallback
forall a.
GObject a =>
a -> String -> WebViewEnterFullscreenCallback
B.Properties.getObjectPropertyBool o
obj String
"is-controlled-by-automation"

-- | Construct a `GValueConstruct` with valid value for the “@is-controlled-by-automation@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewIsControlledByAutomation :: (IsWebView o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWebViewIsControlledByAutomation :: forall o (m :: * -> *).
(IsWebView o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWebViewIsControlledByAutomation Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"is-controlled-by-automation" Bool
val

#if defined(ENABLE_OVERLOADING)
data WebViewIsControlledByAutomationPropertyInfo
instance AttrInfo WebViewIsControlledByAutomationPropertyInfo where
    type AttrAllowedOps WebViewIsControlledByAutomationPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WebViewIsControlledByAutomationPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewIsControlledByAutomationPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WebViewIsControlledByAutomationPropertyInfo = (~) Bool
    type AttrTransferType WebViewIsControlledByAutomationPropertyInfo = Bool
    type AttrGetType WebViewIsControlledByAutomationPropertyInfo = Bool
    type AttrLabel WebViewIsControlledByAutomationPropertyInfo = "is-controlled-by-automation"
    type AttrOrigin WebViewIsControlledByAutomationPropertyInfo = WebView
    attrGet = getWebViewIsControlledByAutomation
    attrSet = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructWebViewIsControlledByAutomation
    attrClear = undefined
#endif

-- VVV Prop "is-ephemeral"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@is-ephemeral@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #isEphemeral
-- @
getWebViewIsEphemeral :: (MonadIO m, IsWebView o) => o -> m Bool
getWebViewIsEphemeral :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m Bool
getWebViewIsEphemeral o
obj = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WebViewEnterFullscreenCallback
forall a.
GObject a =>
a -> String -> WebViewEnterFullscreenCallback
B.Properties.getObjectPropertyBool o
obj String
"is-ephemeral"

-- | Construct a `GValueConstruct` with valid value for the “@is-ephemeral@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewIsEphemeral :: (IsWebView o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWebViewIsEphemeral :: forall o (m :: * -> *).
(IsWebView o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWebViewIsEphemeral Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"is-ephemeral" Bool
val

#if defined(ENABLE_OVERLOADING)
data WebViewIsEphemeralPropertyInfo
instance AttrInfo WebViewIsEphemeralPropertyInfo where
    type AttrAllowedOps WebViewIsEphemeralPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WebViewIsEphemeralPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewIsEphemeralPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WebViewIsEphemeralPropertyInfo = (~) Bool
    type AttrTransferType WebViewIsEphemeralPropertyInfo = Bool
    type AttrGetType WebViewIsEphemeralPropertyInfo = Bool
    type AttrLabel WebViewIsEphemeralPropertyInfo = "is-ephemeral"
    type AttrOrigin WebViewIsEphemeralPropertyInfo = WebView
    attrGet = getWebViewIsEphemeral
    attrSet = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructWebViewIsEphemeral
    attrClear = undefined
#endif

-- VVV Prop "is-loading"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@is-loading@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #isLoading
-- @
getWebViewIsLoading :: (MonadIO m, IsWebView o) => o -> m Bool
getWebViewIsLoading :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m Bool
getWebViewIsLoading o
obj = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WebViewEnterFullscreenCallback
forall a.
GObject a =>
a -> String -> WebViewEnterFullscreenCallback
B.Properties.getObjectPropertyBool o
obj String
"is-loading"

#if defined(ENABLE_OVERLOADING)
data WebViewIsLoadingPropertyInfo
instance AttrInfo WebViewIsLoadingPropertyInfo where
    type AttrAllowedOps WebViewIsLoadingPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WebViewIsLoadingPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewIsLoadingPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WebViewIsLoadingPropertyInfo = (~) ()
    type AttrTransferType WebViewIsLoadingPropertyInfo = ()
    type AttrGetType WebViewIsLoadingPropertyInfo = Bool
    type AttrLabel WebViewIsLoadingPropertyInfo = "is-loading"
    type AttrOrigin WebViewIsLoadingPropertyInfo = WebView
    attrGet = getWebViewIsLoading
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "is-muted"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@is-muted@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #isMuted
-- @
getWebViewIsMuted :: (MonadIO m, IsWebView o) => o -> m Bool
getWebViewIsMuted :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m Bool
getWebViewIsMuted o
obj = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WebViewEnterFullscreenCallback
forall a.
GObject a =>
a -> String -> WebViewEnterFullscreenCallback
B.Properties.getObjectPropertyBool o
obj String
"is-muted"

-- | Set the value of the “@is-muted@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' webView [ #isMuted 'Data.GI.Base.Attributes.:=' value ]
-- @
setWebViewIsMuted :: (MonadIO m, IsWebView o) => o -> Bool -> m ()
setWebViewIsMuted :: forall (m :: * -> *) o.
(MonadIO m, IsWebView o) =>
o -> Bool -> m ()
setWebViewIsMuted o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"is-muted" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@is-muted@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewIsMuted :: (IsWebView o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWebViewIsMuted :: forall o (m :: * -> *).
(IsWebView o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWebViewIsMuted Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"is-muted" Bool
val

#if defined(ENABLE_OVERLOADING)
data WebViewIsMutedPropertyInfo
instance AttrInfo WebViewIsMutedPropertyInfo where
    type AttrAllowedOps WebViewIsMutedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WebViewIsMutedPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewIsMutedPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WebViewIsMutedPropertyInfo = (~) Bool
    type AttrTransferType WebViewIsMutedPropertyInfo = Bool
    type AttrGetType WebViewIsMutedPropertyInfo = Bool
    type AttrLabel WebViewIsMutedPropertyInfo = "is-muted"
    type AttrOrigin WebViewIsMutedPropertyInfo = WebView
    attrGet = getWebViewIsMuted
    attrSet = setWebViewIsMuted
    attrTransfer _ v = do
        return v
    attrConstruct = constructWebViewIsMuted
    attrClear = undefined
#endif

-- VVV Prop "is-playing-audio"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@is-playing-audio@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #isPlayingAudio
-- @
getWebViewIsPlayingAudio :: (MonadIO m, IsWebView o) => o -> m Bool
getWebViewIsPlayingAudio :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m Bool
getWebViewIsPlayingAudio o
obj = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WebViewEnterFullscreenCallback
forall a.
GObject a =>
a -> String -> WebViewEnterFullscreenCallback
B.Properties.getObjectPropertyBool o
obj String
"is-playing-audio"

#if defined(ENABLE_OVERLOADING)
data WebViewIsPlayingAudioPropertyInfo
instance AttrInfo WebViewIsPlayingAudioPropertyInfo where
    type AttrAllowedOps WebViewIsPlayingAudioPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WebViewIsPlayingAudioPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewIsPlayingAudioPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WebViewIsPlayingAudioPropertyInfo = (~) ()
    type AttrTransferType WebViewIsPlayingAudioPropertyInfo = ()
    type AttrGetType WebViewIsPlayingAudioPropertyInfo = Bool
    type AttrLabel WebViewIsPlayingAudioPropertyInfo = "is-playing-audio"
    type AttrOrigin WebViewIsPlayingAudioPropertyInfo = WebView
    attrGet = getWebViewIsPlayingAudio
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "page-id"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@page-id@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #pageId
-- @
getWebViewPageId :: (MonadIO m, IsWebView o) => o -> m Word64
getWebViewPageId :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m Word64
getWebViewPageId o
obj = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word64
forall a. GObject a => a -> String -> IO Word64
B.Properties.getObjectPropertyUInt64 o
obj String
"page-id"

#if defined(ENABLE_OVERLOADING)
data WebViewPageIdPropertyInfo
instance AttrInfo WebViewPageIdPropertyInfo where
    type AttrAllowedOps WebViewPageIdPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WebViewPageIdPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewPageIdPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WebViewPageIdPropertyInfo = (~) ()
    type AttrTransferType WebViewPageIdPropertyInfo = ()
    type AttrGetType WebViewPageIdPropertyInfo = Word64
    type AttrLabel WebViewPageIdPropertyInfo = "page-id"
    type AttrOrigin WebViewPageIdPropertyInfo = WebView
    attrGet = getWebViewPageId
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "related-view"
   -- Type: TInterface (Name {namespace = "WebKit2", name = "WebView"})
   -- Flags: [PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

-- | Construct a `GValueConstruct` with valid value for the “@related-view@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewRelatedView :: (IsWebView o, MIO.MonadIO m, IsWebView a) => a -> m (GValueConstruct o)
constructWebViewRelatedView :: forall o (m :: * -> *) a.
(IsWebView o, MonadIO m, IsWebView a) =>
a -> m (GValueConstruct o)
constructWebViewRelatedView a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"related-view" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

#if defined(ENABLE_OVERLOADING)
data WebViewRelatedViewPropertyInfo
instance AttrInfo WebViewRelatedViewPropertyInfo where
    type AttrAllowedOps WebViewRelatedViewPropertyInfo = '[ 'AttrConstruct, 'AttrClear]
    type AttrBaseTypeConstraint WebViewRelatedViewPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewRelatedViewPropertyInfo = IsWebView
    type AttrTransferTypeConstraint WebViewRelatedViewPropertyInfo = IsWebView
    type AttrTransferType WebViewRelatedViewPropertyInfo = WebView
    type AttrGetType WebViewRelatedViewPropertyInfo = ()
    type AttrLabel WebViewRelatedViewPropertyInfo = "related-view"
    type AttrOrigin WebViewRelatedViewPropertyInfo = WebView
    attrGet = undefined
    attrSet = undefined
    attrTransfer _ v = do
        unsafeCastTo WebView v
    attrConstruct = constructWebViewRelatedView
    attrClear = undefined
#endif

-- VVV Prop "settings"
   -- Type: TInterface (Name {namespace = "WebKit2", name = "Settings"})
   -- Flags: [PropertyWritable,PropertyConstruct]
   -- Nullable: (Just False,Just False)

-- | Set the value of the “@settings@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' webView [ #settings 'Data.GI.Base.Attributes.:=' value ]
-- @
setWebViewSettings :: (MonadIO m, IsWebView o, WebKit2.Settings.IsSettings a) => o -> a -> m ()
setWebViewSettings :: forall (m :: * -> *) o a.
(MonadIO m, IsWebView o, IsSettings a) =>
o -> a -> m ()
setWebViewSettings o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"settings" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@settings@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewSettings :: (IsWebView o, MIO.MonadIO m, WebKit2.Settings.IsSettings a) => a -> m (GValueConstruct o)
constructWebViewSettings :: forall o (m :: * -> *) a.
(IsWebView o, MonadIO m, IsSettings a) =>
a -> m (GValueConstruct o)
constructWebViewSettings a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"settings" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

#if defined(ENABLE_OVERLOADING)
data WebViewSettingsPropertyInfo
instance AttrInfo WebViewSettingsPropertyInfo where
    type AttrAllowedOps WebViewSettingsPropertyInfo = '[ 'AttrSet, 'AttrConstruct]
    type AttrBaseTypeConstraint WebViewSettingsPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewSettingsPropertyInfo = WebKit2.Settings.IsSettings
    type AttrTransferTypeConstraint WebViewSettingsPropertyInfo = WebKit2.Settings.IsSettings
    type AttrTransferType WebViewSettingsPropertyInfo = WebKit2.Settings.Settings
    type AttrGetType WebViewSettingsPropertyInfo = ()
    type AttrLabel WebViewSettingsPropertyInfo = "settings"
    type AttrOrigin WebViewSettingsPropertyInfo = WebView
    attrGet = undefined
    attrSet = setWebViewSettings
    attrTransfer _ v = do
        unsafeCastTo WebKit2.Settings.Settings v
    attrConstruct = constructWebViewSettings
    attrClear = undefined
#endif

-- VVV Prop "title"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just True,Nothing)

-- | Get the value of the “@title@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #title
-- @
getWebViewTitle :: (MonadIO m, IsWebView o) => o -> m (Maybe T.Text)
getWebViewTitle :: forall (m :: * -> *) o.
(MonadIO m, IsWebView o) =>
o -> m (Maybe Text)
getWebViewTitle o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"title"

#if defined(ENABLE_OVERLOADING)
data WebViewTitlePropertyInfo
instance AttrInfo WebViewTitlePropertyInfo where
    type AttrAllowedOps WebViewTitlePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WebViewTitlePropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewTitlePropertyInfo = (~) ()
    type AttrTransferTypeConstraint WebViewTitlePropertyInfo = (~) ()
    type AttrTransferType WebViewTitlePropertyInfo = ()
    type AttrGetType WebViewTitlePropertyInfo = (Maybe T.Text)
    type AttrLabel WebViewTitlePropertyInfo = "title"
    type AttrOrigin WebViewTitlePropertyInfo = WebView
    attrGet = getWebViewTitle
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "uri"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just True,Nothing)

-- | Get the value of the “@uri@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #uri
-- @
getWebViewUri :: (MonadIO m, IsWebView o) => o -> m (Maybe T.Text)
getWebViewUri :: forall (m :: * -> *) o.
(MonadIO m, IsWebView o) =>
o -> m (Maybe Text)
getWebViewUri o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"uri"

#if defined(ENABLE_OVERLOADING)
data WebViewUriPropertyInfo
instance AttrInfo WebViewUriPropertyInfo where
    type AttrAllowedOps WebViewUriPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WebViewUriPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewUriPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WebViewUriPropertyInfo = (~) ()
    type AttrTransferType WebViewUriPropertyInfo = ()
    type AttrGetType WebViewUriPropertyInfo = (Maybe T.Text)
    type AttrLabel WebViewUriPropertyInfo = "uri"
    type AttrOrigin WebViewUriPropertyInfo = WebView
    attrGet = getWebViewUri
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "user-content-manager"
   -- Type: TInterface (Name {namespace = "WebKit2", name = "UserContentManager"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@user-content-manager@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #userContentManager
-- @
getWebViewUserContentManager :: (MonadIO m, IsWebView o) => o -> m WebKit2.UserContentManager.UserContentManager
getWebViewUserContentManager :: forall (m :: * -> *) o.
(MonadIO m, IsWebView o) =>
o -> m UserContentManager
getWebViewUserContentManager o
obj = IO UserContentManager -> m UserContentManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO UserContentManager -> m UserContentManager)
-> IO UserContentManager -> m UserContentManager
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe UserContentManager) -> IO UserContentManager
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getWebViewUserContentManager" (IO (Maybe UserContentManager) -> IO UserContentManager)
-> IO (Maybe UserContentManager) -> IO UserContentManager
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr UserContentManager -> UserContentManager)
-> IO (Maybe UserContentManager)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"user-content-manager" ManagedPtr UserContentManager -> UserContentManager
WebKit2.UserContentManager.UserContentManager

-- | Construct a `GValueConstruct` with valid value for the “@user-content-manager@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewUserContentManager :: (IsWebView o, MIO.MonadIO m, WebKit2.UserContentManager.IsUserContentManager a) => a -> m (GValueConstruct o)
constructWebViewUserContentManager :: forall o (m :: * -> *) a.
(IsWebView o, MonadIO m, IsUserContentManager a) =>
a -> m (GValueConstruct o)
constructWebViewUserContentManager a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"user-content-manager" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

#if defined(ENABLE_OVERLOADING)
data WebViewUserContentManagerPropertyInfo
instance AttrInfo WebViewUserContentManagerPropertyInfo where
    type AttrAllowedOps WebViewUserContentManagerPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WebViewUserContentManagerPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewUserContentManagerPropertyInfo = WebKit2.UserContentManager.IsUserContentManager
    type AttrTransferTypeConstraint WebViewUserContentManagerPropertyInfo = WebKit2.UserContentManager.IsUserContentManager
    type AttrTransferType WebViewUserContentManagerPropertyInfo = WebKit2.UserContentManager.UserContentManager
    type AttrGetType WebViewUserContentManagerPropertyInfo = WebKit2.UserContentManager.UserContentManager
    type AttrLabel WebViewUserContentManagerPropertyInfo = "user-content-manager"
    type AttrOrigin WebViewUserContentManagerPropertyInfo = WebView
    attrGet = getWebViewUserContentManager
    attrSet = undefined
    attrTransfer _ v = do
        unsafeCastTo WebKit2.UserContentManager.UserContentManager v
    attrConstruct = constructWebViewUserContentManager
    attrClear = undefined
#endif

-- VVV Prop "web-context"
   -- Type: TInterface (Name {namespace = "WebKit2", name = "WebContext"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@web-context@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #webContext
-- @
getWebViewWebContext :: (MonadIO m, IsWebView o) => o -> m (Maybe WebKit2.WebContext.WebContext)
getWebViewWebContext :: forall (m :: * -> *) o.
(MonadIO m, IsWebView o) =>
o -> m (Maybe WebContext)
getWebViewWebContext o
obj = IO (Maybe WebContext) -> m (Maybe WebContext)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe WebContext) -> m (Maybe WebContext))
-> IO (Maybe WebContext) -> m (Maybe WebContext)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr WebContext -> WebContext)
-> IO (Maybe WebContext)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"web-context" ManagedPtr WebContext -> WebContext
WebKit2.WebContext.WebContext

-- | Construct a `GValueConstruct` with valid value for the “@web-context@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewWebContext :: (IsWebView o, MIO.MonadIO m, WebKit2.WebContext.IsWebContext a) => a -> m (GValueConstruct o)
constructWebViewWebContext :: forall o (m :: * -> *) a.
(IsWebView o, MonadIO m, IsWebContext a) =>
a -> m (GValueConstruct o)
constructWebViewWebContext a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"web-context" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

#if defined(ENABLE_OVERLOADING)
data WebViewWebContextPropertyInfo
instance AttrInfo WebViewWebContextPropertyInfo where
    type AttrAllowedOps WebViewWebContextPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WebViewWebContextPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewWebContextPropertyInfo = WebKit2.WebContext.IsWebContext
    type AttrTransferTypeConstraint WebViewWebContextPropertyInfo = WebKit2.WebContext.IsWebContext
    type AttrTransferType WebViewWebContextPropertyInfo = WebKit2.WebContext.WebContext
    type AttrGetType WebViewWebContextPropertyInfo = (Maybe WebKit2.WebContext.WebContext)
    type AttrLabel WebViewWebContextPropertyInfo = "web-context"
    type AttrOrigin WebViewWebContextPropertyInfo = WebView
    attrGet = getWebViewWebContext
    attrSet = undefined
    attrTransfer _ v = do
        unsafeCastTo WebKit2.WebContext.WebContext v
    attrConstruct = constructWebViewWebContext
    attrClear = undefined
#endif

-- VVV Prop "website-policies"
   -- Type: TInterface (Name {namespace = "WebKit2", name = "WebsitePolicies"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@website-policies@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #websitePolicies
-- @
getWebViewWebsitePolicies :: (MonadIO m, IsWebView o) => o -> m WebKit2.WebsitePolicies.WebsitePolicies
getWebViewWebsitePolicies :: forall (m :: * -> *) o.
(MonadIO m, IsWebView o) =>
o -> m WebsitePolicies
getWebViewWebsitePolicies o
obj = IO WebsitePolicies -> m WebsitePolicies
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO WebsitePolicies -> m WebsitePolicies)
-> IO WebsitePolicies -> m WebsitePolicies
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe WebsitePolicies) -> IO WebsitePolicies
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getWebViewWebsitePolicies" (IO (Maybe WebsitePolicies) -> IO WebsitePolicies)
-> IO (Maybe WebsitePolicies) -> IO WebsitePolicies
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr WebsitePolicies -> WebsitePolicies)
-> IO (Maybe WebsitePolicies)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"website-policies" ManagedPtr WebsitePolicies -> WebsitePolicies
WebKit2.WebsitePolicies.WebsitePolicies

-- | Construct a `GValueConstruct` with valid value for the “@website-policies@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewWebsitePolicies :: (IsWebView o, MIO.MonadIO m, WebKit2.WebsitePolicies.IsWebsitePolicies a) => a -> m (GValueConstruct o)
constructWebViewWebsitePolicies :: forall o (m :: * -> *) a.
(IsWebView o, MonadIO m, IsWebsitePolicies a) =>
a -> m (GValueConstruct o)
constructWebViewWebsitePolicies a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"website-policies" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

#if defined(ENABLE_OVERLOADING)
data WebViewWebsitePoliciesPropertyInfo
instance AttrInfo WebViewWebsitePoliciesPropertyInfo where
    type AttrAllowedOps WebViewWebsitePoliciesPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WebViewWebsitePoliciesPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewWebsitePoliciesPropertyInfo = WebKit2.WebsitePolicies.IsWebsitePolicies
    type AttrTransferTypeConstraint WebViewWebsitePoliciesPropertyInfo = WebKit2.WebsitePolicies.IsWebsitePolicies
    type AttrTransferType WebViewWebsitePoliciesPropertyInfo = WebKit2.WebsitePolicies.WebsitePolicies
    type AttrGetType WebViewWebsitePoliciesPropertyInfo = WebKit2.WebsitePolicies.WebsitePolicies
    type AttrLabel WebViewWebsitePoliciesPropertyInfo = "website-policies"
    type AttrOrigin WebViewWebsitePoliciesPropertyInfo = WebView
    attrGet = getWebViewWebsitePolicies
    attrSet = undefined
    attrTransfer _ v = do
        unsafeCastTo WebKit2.WebsitePolicies.WebsitePolicies v
    attrConstruct = constructWebViewWebsitePolicies
    attrClear = undefined
#endif

-- VVV Prop "zoom-level"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@zoom-level@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' webView #zoomLevel
-- @
getWebViewZoomLevel :: (MonadIO m, IsWebView o) => o -> m Double
getWebViewZoomLevel :: forall (m :: * -> *) o. (MonadIO m, IsWebView o) => o -> m Double
getWebViewZoomLevel o
obj = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Double
forall a. GObject a => a -> String -> IO Double
B.Properties.getObjectPropertyDouble o
obj String
"zoom-level"

-- | Set the value of the “@zoom-level@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' webView [ #zoomLevel 'Data.GI.Base.Attributes.:=' value ]
-- @
setWebViewZoomLevel :: (MonadIO m, IsWebView o) => o -> Double -> m ()
setWebViewZoomLevel :: forall (m :: * -> *) o.
(MonadIO m, IsWebView o) =>
o -> Double -> m ()
setWebViewZoomLevel o
obj Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Double -> IO ()
forall a. GObject a => a -> String -> Double -> IO ()
B.Properties.setObjectPropertyDouble o
obj String
"zoom-level" Double
val

-- | Construct a `GValueConstruct` with valid value for the “@zoom-level@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWebViewZoomLevel :: (IsWebView o, MIO.MonadIO m) => Double -> m (GValueConstruct o)
constructWebViewZoomLevel :: forall o (m :: * -> *).
(IsWebView o, MonadIO m) =>
Double -> m (GValueConstruct o)
constructWebViewZoomLevel Double
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Double -> IO (GValueConstruct o)
forall o. String -> Double -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyDouble String
"zoom-level" Double
val

#if defined(ENABLE_OVERLOADING)
data WebViewZoomLevelPropertyInfo
instance AttrInfo WebViewZoomLevelPropertyInfo where
    type AttrAllowedOps WebViewZoomLevelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WebViewZoomLevelPropertyInfo = IsWebView
    type AttrSetTypeConstraint WebViewZoomLevelPropertyInfo = (~) Double
    type AttrTransferTypeConstraint WebViewZoomLevelPropertyInfo = (~) Double
    type AttrTransferType WebViewZoomLevelPropertyInfo = Double
    type AttrGetType WebViewZoomLevelPropertyInfo = Double
    type AttrLabel WebViewZoomLevelPropertyInfo = "zoom-level"
    type AttrOrigin WebViewZoomLevelPropertyInfo = WebView
    attrGet = getWebViewZoomLevel
    attrSet = setWebViewZoomLevel
    attrTransfer _ v = do
        return v
    attrConstruct = constructWebViewZoomLevel
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList WebView
type instance O.AttributeList WebView = WebViewAttributeList
type WebViewAttributeList = ('[ '("appPaintable", Gtk.Widget.WidgetAppPaintablePropertyInfo), '("automationPresentationType", WebViewAutomationPresentationTypePropertyInfo), '("borderWidth", Gtk.Container.ContainerBorderWidthPropertyInfo), '("canDefault", Gtk.Widget.WidgetCanDefaultPropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("child", Gtk.Container.ContainerChildPropertyInfo), '("compositeChild", Gtk.Widget.WidgetCompositeChildPropertyInfo), '("doubleBuffered", Gtk.Widget.WidgetDoubleBufferedPropertyInfo), '("editable", WebViewEditablePropertyInfo), '("estimatedLoadProgress", WebViewEstimatedLoadProgressPropertyInfo), '("events", Gtk.Widget.WidgetEventsPropertyInfo), '("expand", Gtk.Widget.WidgetExpandPropertyInfo), '("favicon", WebViewFaviconPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("isControlledByAutomation", WebViewIsControlledByAutomationPropertyInfo), '("isEphemeral", WebViewIsEphemeralPropertyInfo), '("isFocus", Gtk.Widget.WidgetIsFocusPropertyInfo), '("isLoading", WebViewIsLoadingPropertyInfo), '("isMuted", WebViewIsMutedPropertyInfo), '("isPlayingAudio", WebViewIsPlayingAudioPropertyInfo), '("margin", Gtk.Widget.WidgetMarginPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginLeft", Gtk.Widget.WidgetMarginLeftPropertyInfo), '("marginRight", Gtk.Widget.WidgetMarginRightPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("noShowAll", Gtk.Widget.WidgetNoShowAllPropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("pageId", WebViewPageIdPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("relatedView", WebViewRelatedViewPropertyInfo), '("resizeMode", Gtk.Container.ContainerResizeModePropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("settings", WebViewSettingsPropertyInfo), '("style", Gtk.Widget.WidgetStylePropertyInfo), '("title", WebViewTitlePropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("uri", WebViewUriPropertyInfo), '("userContentManager", WebViewUserContentManagerPropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("webContext", WebViewWebContextPropertyInfo), '("websitePolicies", WebViewWebsitePoliciesPropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo), '("window", Gtk.Widget.WidgetWindowPropertyInfo), '("zoomLevel", WebViewZoomLevelPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
webViewAutomationPresentationType :: AttrLabelProxy "automationPresentationType"
webViewAutomationPresentationType = AttrLabelProxy

webViewEditable :: AttrLabelProxy "editable"
webViewEditable = AttrLabelProxy

webViewEstimatedLoadProgress :: AttrLabelProxy "estimatedLoadProgress"
webViewEstimatedLoadProgress = AttrLabelProxy

webViewFavicon :: AttrLabelProxy "favicon"
webViewFavicon = AttrLabelProxy

webViewIsMuted :: AttrLabelProxy "isMuted"
webViewIsMuted = AttrLabelProxy

webViewPageId :: AttrLabelProxy "pageId"
webViewPageId = AttrLabelProxy

webViewRelatedView :: AttrLabelProxy "relatedView"
webViewRelatedView = AttrLabelProxy

webViewSettings :: AttrLabelProxy "settings"
webViewSettings = AttrLabelProxy

webViewTitle :: AttrLabelProxy "title"
webViewTitle = AttrLabelProxy

webViewUri :: AttrLabelProxy "uri"
webViewUri = AttrLabelProxy

webViewUserContentManager :: AttrLabelProxy "userContentManager"
webViewUserContentManager = AttrLabelProxy

webViewWebContext :: AttrLabelProxy "webContext"
webViewWebContext = AttrLabelProxy

webViewWebsitePolicies :: AttrLabelProxy "websitePolicies"
webViewWebsitePolicies = AttrLabelProxy

webViewZoomLevel :: AttrLabelProxy "zoomLevel"
webViewZoomLevel = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList WebView = WebViewSignalList
type WebViewSignalList = ('[ '("accelClosuresChanged", Gtk.Widget.WidgetAccelClosuresChangedSignalInfo), '("add", Gtk.Container.ContainerAddSignalInfo), '("authenticate", WebViewAuthenticateSignalInfo), '("buttonPressEvent", Gtk.Widget.WidgetButtonPressEventSignalInfo), '("buttonReleaseEvent", Gtk.Widget.WidgetButtonReleaseEventSignalInfo), '("canActivateAccel", Gtk.Widget.WidgetCanActivateAccelSignalInfo), '("checkResize", Gtk.Container.ContainerCheckResizeSignalInfo), '("childNotify", Gtk.Widget.WidgetChildNotifySignalInfo), '("close", WebViewCloseSignalInfo), '("compositedChanged", Gtk.Widget.WidgetCompositedChangedSignalInfo), '("configureEvent", Gtk.Widget.WidgetConfigureEventSignalInfo), '("contextMenu", WebViewContextMenuSignalInfo), '("contextMenuDismissed", WebViewContextMenuDismissedSignalInfo), '("create", WebViewCreateSignalInfo), '("damageEvent", Gtk.Widget.WidgetDamageEventSignalInfo), '("decidePolicy", WebViewDecidePolicySignalInfo), '("deleteEvent", Gtk.Widget.WidgetDeleteEventSignalInfo), '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("destroyEvent", Gtk.Widget.WidgetDestroyEventSignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("dragBegin", Gtk.Widget.WidgetDragBeginSignalInfo), '("dragDataDelete", Gtk.Widget.WidgetDragDataDeleteSignalInfo), '("dragDataGet", Gtk.Widget.WidgetDragDataGetSignalInfo), '("dragDataReceived", Gtk.Widget.WidgetDragDataReceivedSignalInfo), '("dragDrop", Gtk.Widget.WidgetDragDropSignalInfo), '("dragEnd", Gtk.Widget.WidgetDragEndSignalInfo), '("dragFailed", Gtk.Widget.WidgetDragFailedSignalInfo), '("dragLeave", Gtk.Widget.WidgetDragLeaveSignalInfo), '("dragMotion", Gtk.Widget.WidgetDragMotionSignalInfo), '("draw", Gtk.Widget.WidgetDrawSignalInfo), '("enterFullscreen", WebViewEnterFullscreenSignalInfo), '("enterNotifyEvent", Gtk.Widget.WidgetEnterNotifyEventSignalInfo), '("event", Gtk.Widget.WidgetEventSignalInfo), '("eventAfter", Gtk.Widget.WidgetEventAfterSignalInfo), '("focus", Gtk.Widget.WidgetFocusSignalInfo), '("focusInEvent", Gtk.Widget.WidgetFocusInEventSignalInfo), '("focusOutEvent", Gtk.Widget.WidgetFocusOutEventSignalInfo), '("grabBrokenEvent", Gtk.Widget.WidgetGrabBrokenEventSignalInfo), '("grabFocus", Gtk.Widget.WidgetGrabFocusSignalInfo), '("grabNotify", Gtk.Widget.WidgetGrabNotifySignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("hierarchyChanged", Gtk.Widget.WidgetHierarchyChangedSignalInfo), '("insecureContentDetected", WebViewInsecureContentDetectedSignalInfo), '("keyPressEvent", Gtk.Widget.WidgetKeyPressEventSignalInfo), '("keyReleaseEvent", Gtk.Widget.WidgetKeyReleaseEventSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("leaveFullscreen", WebViewLeaveFullscreenSignalInfo), '("leaveNotifyEvent", Gtk.Widget.WidgetLeaveNotifyEventSignalInfo), '("loadChanged", WebViewLoadChangedSignalInfo), '("loadFailed", WebViewLoadFailedSignalInfo), '("loadFailedWithTlsErrors", WebViewLoadFailedWithTlsErrorsSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mapEvent", Gtk.Widget.WidgetMapEventSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("motionNotifyEvent", Gtk.Widget.WidgetMotionNotifyEventSignalInfo), '("mouseTargetChanged", WebViewMouseTargetChangedSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("parentSet", Gtk.Widget.WidgetParentSetSignalInfo), '("permissionRequest", WebViewPermissionRequestSignalInfo), '("popupMenu", Gtk.Widget.WidgetPopupMenuSignalInfo), '("print", WebViewPrintSignalInfo), '("propertyNotifyEvent", Gtk.Widget.WidgetPropertyNotifyEventSignalInfo), '("proximityInEvent", Gtk.Widget.WidgetProximityInEventSignalInfo), '("proximityOutEvent", Gtk.Widget.WidgetProximityOutEventSignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("readyToShow", WebViewReadyToShowSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("remove", Gtk.Container.ContainerRemoveSignalInfo), '("resourceLoadStarted", WebViewResourceLoadStartedSignalInfo), '("runAsModal", WebViewRunAsModalSignalInfo), '("runColorChooser", WebViewRunColorChooserSignalInfo), '("runFileChooser", WebViewRunFileChooserSignalInfo), '("screenChanged", Gtk.Widget.WidgetScreenChangedSignalInfo), '("scriptDialog", WebViewScriptDialogSignalInfo), '("scrollEvent", Gtk.Widget.WidgetScrollEventSignalInfo), '("selectionClearEvent", Gtk.Widget.WidgetSelectionClearEventSignalInfo), '("selectionGet", Gtk.Widget.WidgetSelectionGetSignalInfo), '("selectionNotifyEvent", Gtk.Widget.WidgetSelectionNotifyEventSignalInfo), '("selectionReceived", Gtk.Widget.WidgetSelectionReceivedSignalInfo), '("selectionRequestEvent", Gtk.Widget.WidgetSelectionRequestEventSignalInfo), '("setFocusChild", Gtk.Container.ContainerSetFocusChildSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("showHelp", Gtk.Widget.WidgetShowHelpSignalInfo), '("showNotification", WebViewShowNotificationSignalInfo), '("showOptionMenu", WebViewShowOptionMenuSignalInfo), '("sizeAllocate", Gtk.Widget.WidgetSizeAllocateSignalInfo), '("stateChanged", Gtk.Widget.WidgetStateChangedSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("styleSet", Gtk.Widget.WidgetStyleSetSignalInfo), '("styleUpdated", Gtk.Widget.WidgetStyleUpdatedSignalInfo), '("submitForm", WebViewSubmitFormSignalInfo), '("touchEvent", Gtk.Widget.WidgetTouchEventSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unmapEvent", Gtk.Widget.WidgetUnmapEventSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo), '("userMessageReceived", WebViewUserMessageReceivedSignalInfo), '("visibilityNotifyEvent", Gtk.Widget.WidgetVisibilityNotifyEventSignalInfo), '("webProcessCrashed", WebViewWebProcessCrashedSignalInfo), '("webProcessTerminated", WebViewWebProcessTerminatedSignalInfo), '("windowStateEvent", Gtk.Widget.WidgetWindowStateEventSignalInfo)] :: [(Symbol, *)])

#endif

-- method WebView::new
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "WebKit2" , name = "WebView" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_new" webkit_web_view_new :: 
    IO (Ptr WebView)

-- | Creates a new t'GI.WebKit2.Objects.WebView.WebView' with the default t'GI.WebKit2.Objects.WebContext.WebContext' and
-- no t'GI.WebKit2.Objects.UserContentManager.UserContentManager' associated with it.
-- See also 'GI.WebKit2.Objects.WebView.webViewNewWithContext',
-- 'GI.WebKit2.Objects.WebView.webViewNewWithUserContentManager', and
-- 'GI.WebKit2.Objects.WebView.webViewNewWithSettings'.
webViewNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m WebView
    -- ^ __Returns:__ The newly created t'GI.WebKit2.Objects.WebView.WebView' widget
webViewNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m WebView
webViewNew  = IO WebView -> m WebView
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebView -> m WebView) -> IO WebView -> m WebView
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
result <- IO (Ptr WebView)
webkit_web_view_new
    Text -> Ptr WebView -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewNew" Ptr WebView
result
    WebView
result' <- ((ManagedPtr WebView -> WebView) -> Ptr WebView -> IO WebView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebView -> WebView
WebView) Ptr WebView
result
    WebView -> IO WebView
forall (m :: * -> *) a. Monad m => a -> m a
return WebView
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method WebView::new_with_context
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "context"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the #WebKitWebContext to be used by the #WebKitWebView"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "WebKit2" , name = "WebView" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_new_with_context" webkit_web_view_new_with_context :: 
    Ptr WebKit2.WebContext.WebContext ->    -- context : TInterface (Name {namespace = "WebKit2", name = "WebContext"})
    IO (Ptr WebView)

-- | Creates a new t'GI.WebKit2.Objects.WebView.WebView' with the given t'GI.WebKit2.Objects.WebContext.WebContext' and
-- no t'GI.WebKit2.Objects.UserContentManager.UserContentManager' associated with it.
-- See also 'GI.WebKit2.Objects.WebView.webViewNewWithUserContentManager' and
-- 'GI.WebKit2.Objects.WebView.webViewNewWithSettings'.
webViewNewWithContext ::
    (B.CallStack.HasCallStack, MonadIO m, WebKit2.WebContext.IsWebContext a) =>
    a
    -- ^ /@context@/: the t'GI.WebKit2.Objects.WebContext.WebContext' to be used by the t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebView
    -- ^ __Returns:__ The newly created t'GI.WebKit2.Objects.WebView.WebView' widget
webViewNewWithContext :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebContext a) =>
a -> m WebView
webViewNewWithContext a
context = IO WebView -> m WebView
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebView -> m WebView) -> IO WebView -> m WebView
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
    Ptr WebView
result <- Ptr WebContext -> IO (Ptr WebView)
webkit_web_view_new_with_context Ptr WebContext
context'
    Text -> Ptr WebView -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewNewWithContext" Ptr WebView
result
    WebView
result' <- ((ManagedPtr WebView -> WebView) -> Ptr WebView -> IO WebView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebView -> WebView
WebView) Ptr WebView
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
    WebView -> IO WebView
forall (m :: * -> *) a. Monad m => a -> m a
return WebView
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method WebView::new_with_related_view
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the related #WebKitWebView"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "WebKit2" , name = "WebView" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_new_with_related_view" webkit_web_view_new_with_related_view :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebView)

-- | Creates a new t'GI.WebKit2.Objects.WebView.WebView' sharing the same web process with /@webView@/.
-- This method doesn\'t have any effect when 'GI.WebKit2.Enums.ProcessModelSharedSecondaryProcess'
-- process model is used, because a single web process is shared for all the web views in the
-- same t'GI.WebKit2.Objects.WebContext.WebContext'. When using 'GI.WebKit2.Enums.ProcessModelMultipleSecondaryProcesses' process model,
-- this method should always be used when creating the t'GI.WebKit2.Objects.WebView.WebView' in the [create]("GI.WebKit2.Objects.WebView#g:signal:create") signal.
-- You can also use this method to implement other process models based on 'GI.WebKit2.Enums.ProcessModelMultipleSecondaryProcesses',
-- like for example, sharing the same web process for all the views in the same security domain.
-- 
-- The newly created t'GI.WebKit2.Objects.WebView.WebView' will also have the same t'GI.WebKit2.Objects.UserContentManager.UserContentManager',
-- t'GI.WebKit2.Objects.Settings.Settings', and t'GI.WebKit2.Objects.WebsitePolicies.WebsitePolicies' as /@webView@/.
-- 
-- /Since: 2.4/
webViewNewWithRelatedView ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: the related t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebView
    -- ^ __Returns:__ The newly created t'GI.WebKit2.Objects.WebView.WebView' widget
webViewNewWithRelatedView :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m WebView
webViewNewWithRelatedView a
webView = IO WebView -> m WebView
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebView -> m WebView) -> IO WebView -> m WebView
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebView
result <- Ptr WebView -> IO (Ptr WebView)
webkit_web_view_new_with_related_view Ptr WebView
webView'
    Text -> Ptr WebView -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewNewWithRelatedView" Ptr WebView
result
    WebView
result' <- ((ManagedPtr WebView -> WebView) -> Ptr WebView -> IO WebView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr WebView -> WebView
WebView) Ptr WebView
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    WebView -> IO WebView
forall (m :: * -> *) a. Monad m => a -> m a
return WebView
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method WebView::new_with_settings
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "settings"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "Settings" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitSettings" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "WebKit2" , name = "WebView" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_new_with_settings" webkit_web_view_new_with_settings :: 
    Ptr WebKit2.Settings.Settings ->        -- settings : TInterface (Name {namespace = "WebKit2", name = "Settings"})
    IO (Ptr WebView)

-- | Creates a new t'GI.WebKit2.Objects.WebView.WebView' with the given t'GI.WebKit2.Objects.Settings.Settings'.
-- See also 'GI.WebKit2.Objects.WebView.webViewNewWithContext', and
-- 'GI.WebKit2.Objects.WebView.webViewNewWithUserContentManager'.
-- 
-- /Since: 2.6/
webViewNewWithSettings ::
    (B.CallStack.HasCallStack, MonadIO m, WebKit2.Settings.IsSettings a) =>
    a
    -- ^ /@settings@/: a t'GI.WebKit2.Objects.Settings.Settings'
    -> m WebView
    -- ^ __Returns:__ The newly created t'GI.WebKit2.Objects.WebView.WebView' widget
webViewNewWithSettings :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettings a) =>
a -> m WebView
webViewNewWithSettings a
settings = IO WebView -> m WebView
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebView -> m WebView) -> IO WebView -> m WebView
forall a b. (a -> b) -> a -> b
$ do
    Ptr Settings
settings' <- a -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
    Ptr WebView
result <- Ptr Settings -> IO (Ptr WebView)
webkit_web_view_new_with_settings Ptr Settings
settings'
    Text -> Ptr WebView -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewNewWithSettings" Ptr WebView
result
    WebView
result' <- ((ManagedPtr WebView -> WebView) -> Ptr WebView -> IO WebView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebView -> WebView
WebView) Ptr WebView
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
    WebView -> IO WebView
forall (m :: * -> *) a. Monad m => a -> m a
return WebView
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method WebView::new_with_user_content_manager
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "user_content_manager"
--           , argType =
--               TInterface
--                 Name { namespace = "WebKit2" , name = "UserContentManager" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitUserContentManager."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "WebKit2" , name = "WebView" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_new_with_user_content_manager" webkit_web_view_new_with_user_content_manager :: 
    Ptr WebKit2.UserContentManager.UserContentManager -> -- user_content_manager : TInterface (Name {namespace = "WebKit2", name = "UserContentManager"})
    IO (Ptr WebView)

-- | Creates a new t'GI.WebKit2.Objects.WebView.WebView' with the given t'GI.WebKit2.Objects.UserContentManager.UserContentManager'.
-- The content loaded in the view may be affected by the content injected
-- in the view by the user content manager.
-- 
-- /Since: 2.6/
webViewNewWithUserContentManager ::
    (B.CallStack.HasCallStack, MonadIO m, WebKit2.UserContentManager.IsUserContentManager a) =>
    a
    -- ^ /@userContentManager@/: a t'GI.WebKit2.Objects.UserContentManager.UserContentManager'.
    -> m WebView
    -- ^ __Returns:__ The newly created t'GI.WebKit2.Objects.WebView.WebView' widget
webViewNewWithUserContentManager :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUserContentManager a) =>
a -> m WebView
webViewNewWithUserContentManager a
userContentManager = IO WebView -> m WebView
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebView -> m WebView) -> IO WebView -> m WebView
forall a b. (a -> b) -> a -> b
$ do
    Ptr UserContentManager
userContentManager' <- a -> IO (Ptr UserContentManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
userContentManager
    Ptr WebView
result <- Ptr UserContentManager -> IO (Ptr WebView)
webkit_web_view_new_with_user_content_manager Ptr UserContentManager
userContentManager'
    Text -> Ptr WebView -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewNewWithUserContentManager" Ptr WebView
result
    WebView
result' <- ((ManagedPtr WebView -> WebView) -> Ptr WebView -> IO WebView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebView -> WebView
WebView) Ptr WebView
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
userContentManager
    WebView -> IO WebView
forall (m :: * -> *) a. Monad m => a -> m a
return WebView
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method WebView::can_execute_editing_command
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "command"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the command to check"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable or %NULL to ignore"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GAsyncReadyCallback to call when the request is satisfied"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the data to pass to callback function"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_can_execute_editing_command" webkit_web_view_can_execute_editing_command :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- command : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously check if it is possible to execute the given editing command.
-- 
-- When the operation is finished, /@callback@/ will be called. You can then call
-- 'GI.WebKit2.Objects.WebView.webViewCanExecuteEditingCommandFinish' to get the result of the operation.
webViewCanExecuteEditingCommand ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@command@/: the command to check
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing' to ignore
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a t'GI.Gio.Callbacks.AsyncReadyCallback' to call when the request is satisfied
    -> m ()
webViewCanExecuteEditingCommand :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsCancellable b) =>
a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
webViewCanExecuteEditingCommand a
webView Text
command Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
command' <- Text -> IO CString
textToCString Text
command
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr WebView
-> CString
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_web_view_can_execute_editing_command Ptr WebView
webView' CString
command' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
command'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewCanExecuteEditingCommandMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod WebViewCanExecuteEditingCommandMethodInfo a signature where
    overloadedMethod = webViewCanExecuteEditingCommand

instance O.OverloadedMethodInfo WebViewCanExecuteEditingCommandMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewCanExecuteEditingCommand",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewCanExecuteEditingCommand"
        }


#endif

-- method WebView::can_execute_editing_command_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GAsyncResult" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_can_execute_editing_command_finish" webkit_web_view_can_execute_editing_command_finish :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Finish an asynchronous operation started with 'GI.WebKit2.Objects.WebView.webViewCanExecuteEditingCommand'.
webViewCanExecuteEditingCommandFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@result@/: a t'GI.Gio.Interfaces.AsyncResult.AsyncResult'
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
webViewCanExecuteEditingCommandFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsAsyncResult b) =>
a -> b -> m ()
webViewCanExecuteEditingCommandFinish a
webView b
result_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr WebView -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
webkit_web_view_can_execute_editing_command_finish Ptr WebView
webView' Ptr AsyncResult
result_'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data WebViewCanExecuteEditingCommandFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod WebViewCanExecuteEditingCommandFinishMethodInfo a signature where
    overloadedMethod = webViewCanExecuteEditingCommandFinish

instance O.OverloadedMethodInfo WebViewCanExecuteEditingCommandFinishMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewCanExecuteEditingCommandFinish",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewCanExecuteEditingCommandFinish"
        }


#endif

-- method WebView::can_go_back
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_can_go_back" webkit_web_view_can_go_back :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CInt

-- | Determines whether /@webView@/ has a previous history item.
webViewCanGoBack ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if able to move back or 'P.False' otherwise.
webViewCanGoBack :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Bool
webViewCanGoBack a
webView = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CInt
result <- Ptr WebView -> IO CInt
webkit_web_view_can_go_back Ptr WebView
webView'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Bool -> WebViewEnterFullscreenCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WebViewCanGoBackMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewCanGoBackMethodInfo a signature where
    overloadedMethod = webViewCanGoBack

instance O.OverloadedMethodInfo WebViewCanGoBackMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewCanGoBack",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewCanGoBack"
        }


#endif

-- method WebView::can_go_forward
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_can_go_forward" webkit_web_view_can_go_forward :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CInt

-- | Determines whether /@webView@/ has a next history item.
webViewCanGoForward ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if able to move forward or 'P.False' otherwise.
webViewCanGoForward :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Bool
webViewCanGoForward a
webView = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CInt
result <- Ptr WebView -> IO CInt
webkit_web_view_can_go_forward Ptr WebView
webView'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Bool -> WebViewEnterFullscreenCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WebViewCanGoForwardMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewCanGoForwardMethodInfo a signature where
    overloadedMethod = webViewCanGoForward

instance O.OverloadedMethodInfo WebViewCanGoForwardMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewCanGoForward",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewCanGoForward"
        }


#endif

-- method WebView::can_show_mime_type
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mime_type"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a MIME type" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_can_show_mime_type" webkit_web_view_can_show_mime_type :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- mime_type : TBasicType TUTF8
    IO CInt

-- | Whether or not a MIME type can be displayed in /@webView@/.
webViewCanShowMimeType ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@mimeType@/: a MIME type
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the MIME type /@mimeType@/ can be displayed or 'P.False' otherwise
webViewCanShowMimeType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Text -> m Bool
webViewCanShowMimeType a
webView Text
mimeType = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
mimeType' <- Text -> IO CString
textToCString Text
mimeType
    CInt
result <- Ptr WebView -> CString -> IO CInt
webkit_web_view_can_show_mime_type Ptr WebView
webView' CString
mimeType'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
mimeType'
    Bool -> WebViewEnterFullscreenCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WebViewCanShowMimeTypeMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewCanShowMimeTypeMethodInfo a signature where
    overloadedMethod = webViewCanShowMimeType

instance O.OverloadedMethodInfo WebViewCanShowMimeTypeMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewCanShowMimeType",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewCanShowMimeType"
        }


#endif

-- method WebView::download_uri
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "uri"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the URI to download"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "WebKit2" , name = "Download" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_download_uri" webkit_web_view_download_uri :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- uri : TBasicType TUTF8
    IO (Ptr WebKit2.Download.Download)

-- | Requests downloading of the specified URI string for /@webView@/.
webViewDownloadUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@uri@/: the URI to download
    -> m WebKit2.Download.Download
    -- ^ __Returns:__ a new t'GI.WebKit2.Objects.Download.Download' representing
    --    the download operation.
webViewDownloadUri :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Text -> m Download
webViewDownloadUri a
webView Text
uri = IO Download -> m Download
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Download -> m Download) -> IO Download -> m Download
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
uri' <- Text -> IO CString
textToCString Text
uri
    Ptr Download
result <- Ptr WebView -> CString -> IO (Ptr Download)
webkit_web_view_download_uri Ptr WebView
webView' CString
uri'
    Text -> Ptr Download -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewDownloadUri" Ptr Download
result
    Download
result' <- ((ManagedPtr Download -> Download) -> Ptr Download -> IO Download
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Download -> Download
WebKit2.Download.Download) Ptr Download
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
    Download -> IO Download
forall (m :: * -> *) a. Monad m => a -> m a
return Download
result'

#if defined(ENABLE_OVERLOADING)
data WebViewDownloadUriMethodInfo
instance (signature ~ (T.Text -> m WebKit2.Download.Download), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewDownloadUriMethodInfo a signature where
    overloadedMethod = webViewDownloadUri

instance O.OverloadedMethodInfo WebViewDownloadUriMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewDownloadUri",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewDownloadUri"
        }


#endif

-- method WebView::execute_editing_command
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "command"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the command to execute"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_execute_editing_command" webkit_web_view_execute_editing_command :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- command : TBasicType TUTF8
    IO ()

-- | Request to execute the given /@command@/ for /@webView@/. You can use
-- 'GI.WebKit2.Objects.WebView.webViewCanExecuteEditingCommand' to check whether
-- it\'s possible to execute the command.
webViewExecuteEditingCommand ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@command@/: the command to execute
    -> m ()
webViewExecuteEditingCommand :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Text -> m ()
webViewExecuteEditingCommand a
webView Text
command = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
command' <- Text -> IO CString
textToCString Text
command
    Ptr WebView -> CString -> IO ()
webkit_web_view_execute_editing_command Ptr WebView
webView' CString
command'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
command'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewExecuteEditingCommandMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewExecuteEditingCommandMethodInfo a signature where
    overloadedMethod = webViewExecuteEditingCommand

instance O.OverloadedMethodInfo WebViewExecuteEditingCommandMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewExecuteEditingCommand",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewExecuteEditingCommand"
        }


#endif

-- method WebView::execute_editing_command_with_argument
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "command"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the command to execute"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "argument"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the command argument"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_execute_editing_command_with_argument" webkit_web_view_execute_editing_command_with_argument :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- command : TBasicType TUTF8
    CString ->                              -- argument : TBasicType TUTF8
    IO ()

-- | Request to execute the given /@command@/ with /@argument@/ for /@webView@/. You can use
-- 'GI.WebKit2.Objects.WebView.webViewCanExecuteEditingCommand' to check whether
-- it\'s possible to execute the command.
-- 
-- /Since: 2.10/
webViewExecuteEditingCommandWithArgument ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@command@/: the command to execute
    -> T.Text
    -- ^ /@argument@/: the command argument
    -> m ()
webViewExecuteEditingCommandWithArgument :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Text -> Text -> m ()
webViewExecuteEditingCommandWithArgument a
webView Text
command Text
argument = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
command' <- Text -> IO CString
textToCString Text
command
    CString
argument' <- Text -> IO CString
textToCString Text
argument
    Ptr WebView -> CString -> CString -> IO ()
webkit_web_view_execute_editing_command_with_argument Ptr WebView
webView' CString
command' CString
argument'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
command'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
argument'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewExecuteEditingCommandWithArgumentMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewExecuteEditingCommandWithArgumentMethodInfo a signature where
    overloadedMethod = webViewExecuteEditingCommandWithArgument

instance O.OverloadedMethodInfo WebViewExecuteEditingCommandWithArgumentMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewExecuteEditingCommandWithArgument",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewExecuteEditingCommandWithArgument"
        }


#endif

-- method WebView::get_automation_presentation_type
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name
--                    { namespace = "WebKit2"
--                    , name = "AutomationBrowsingContextPresentation"
--                    })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_automation_presentation_type" webkit_web_view_get_automation_presentation_type :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CUInt

-- | Get the presentation type of t'GI.WebKit2.Objects.WebView.WebView' when created for automation.
-- 
-- /Since: 2.28/
webViewGetAutomationPresentationType ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.Enums.AutomationBrowsingContextPresentation
    -- ^ __Returns:__ a t'GI.WebKit2.Enums.AutomationBrowsingContextPresentation'.
webViewGetAutomationPresentationType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m AutomationBrowsingContextPresentation
webViewGetAutomationPresentationType a
webView = IO AutomationBrowsingContextPresentation
-> m AutomationBrowsingContextPresentation
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AutomationBrowsingContextPresentation
 -> m AutomationBrowsingContextPresentation)
-> IO AutomationBrowsingContextPresentation
-> m AutomationBrowsingContextPresentation
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CUInt
result <- Ptr WebView -> IO CUInt
webkit_web_view_get_automation_presentation_type Ptr WebView
webView'
    let result' :: AutomationBrowsingContextPresentation
result' = (Int -> AutomationBrowsingContextPresentation
forall a. Enum a => Int -> a
toEnum (Int -> AutomationBrowsingContextPresentation)
-> (CUInt -> Int) -> CUInt -> AutomationBrowsingContextPresentation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    AutomationBrowsingContextPresentation
-> IO AutomationBrowsingContextPresentation
forall (m :: * -> *) a. Monad m => a -> m a
return AutomationBrowsingContextPresentation
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetAutomationPresentationTypeMethodInfo
instance (signature ~ (m WebKit2.Enums.AutomationBrowsingContextPresentation), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetAutomationPresentationTypeMethodInfo a signature where
    overloadedMethod = webViewGetAutomationPresentationType

instance O.OverloadedMethodInfo WebViewGetAutomationPresentationTypeMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetAutomationPresentationType",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetAutomationPresentationType"
        }


#endif

-- method WebView::get_back_forward_list
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "BackForwardList" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_back_forward_list" webkit_web_view_get_back_forward_list :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.BackForwardList.BackForwardList)

-- | Obtains the t'GI.WebKit2.Objects.BackForwardList.BackForwardList' associated with the given t'GI.WebKit2.Objects.WebView.WebView'. The
-- t'GI.WebKit2.Objects.BackForwardList.BackForwardList' is owned by the t'GI.WebKit2.Objects.WebView.WebView'.
webViewGetBackForwardList ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.BackForwardList.BackForwardList
    -- ^ __Returns:__ the t'GI.WebKit2.Objects.BackForwardList.BackForwardList'
webViewGetBackForwardList :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m BackForwardList
webViewGetBackForwardList a
webView = IO BackForwardList -> m BackForwardList
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BackForwardList -> m BackForwardList)
-> IO BackForwardList -> m BackForwardList
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr BackForwardList
result <- Ptr WebView -> IO (Ptr BackForwardList)
webkit_web_view_get_back_forward_list Ptr WebView
webView'
    Text -> Ptr BackForwardList -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetBackForwardList" Ptr BackForwardList
result
    BackForwardList
result' <- ((ManagedPtr BackForwardList -> BackForwardList)
-> Ptr BackForwardList -> IO BackForwardList
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr BackForwardList -> BackForwardList
WebKit2.BackForwardList.BackForwardList) Ptr BackForwardList
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    BackForwardList -> IO BackForwardList
forall (m :: * -> *) a. Monad m => a -> m a
return BackForwardList
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetBackForwardListMethodInfo
instance (signature ~ (m WebKit2.BackForwardList.BackForwardList), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetBackForwardListMethodInfo a signature where
    overloadedMethod = webViewGetBackForwardList

instance O.OverloadedMethodInfo WebViewGetBackForwardListMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetBackForwardList",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetBackForwardList"
        }


#endif

-- method WebView::get_background_color
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rgba"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GdkRGBA to fill in with the background color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_background_color" webkit_web_view_get_background_color :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gdk.RGBA.RGBA ->                    -- rgba : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

-- | Gets the color that is used to draw the /@webView@/ background before
-- the actual contents are rendered.
-- For more information see also 'GI.WebKit2.Objects.WebView.webViewSetBackgroundColor'
-- 
-- /Since: 2.8/
webViewGetBackgroundColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m (Gdk.RGBA.RGBA)
webViewGetBackgroundColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m RGBA
webViewGetBackgroundColor a
webView = IO RGBA -> m RGBA
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RGBA -> m RGBA) -> IO RGBA -> m RGBA
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr RGBA
rgba <- Int -> IO (Ptr RGBA)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
32 :: IO (Ptr Gdk.RGBA.RGBA)
    Ptr WebView -> Ptr RGBA -> IO ()
webkit_web_view_get_background_color Ptr WebView
webView' Ptr RGBA
rgba
    RGBA
rgba' <- ((ManagedPtr RGBA -> RGBA) -> Ptr RGBA -> IO RGBA
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RGBA -> RGBA
Gdk.RGBA.RGBA) Ptr RGBA
rgba
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    RGBA -> IO RGBA
forall (m :: * -> *) a. Monad m => a -> m a
return RGBA
rgba'

#if defined(ENABLE_OVERLOADING)
data WebViewGetBackgroundColorMethodInfo
instance (signature ~ (m (Gdk.RGBA.RGBA)), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetBackgroundColorMethodInfo a signature where
    overloadedMethod = webViewGetBackgroundColor

instance O.OverloadedMethodInfo WebViewGetBackgroundColorMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetBackgroundColor",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetBackgroundColor"
        }


#endif

-- method WebView::get_context
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "WebKit2" , name = "WebContext" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_context" webkit_web_view_get_context :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.WebContext.WebContext)

-- | Gets the web context of /@webView@/.
webViewGetContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.WebContext.WebContext
    -- ^ __Returns:__ the t'GI.WebKit2.Objects.WebContext.WebContext' of the view
webViewGetContext :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m WebContext
webViewGetContext a
webView = IO WebContext -> m WebContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebContext -> m WebContext) -> IO WebContext -> m WebContext
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebContext
result <- Ptr WebView -> IO (Ptr WebContext)
webkit_web_view_get_context Ptr WebView
webView'
    Text -> Ptr WebContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetContext" Ptr WebContext
result
    WebContext
result' <- ((ManagedPtr WebContext -> WebContext)
-> Ptr WebContext -> IO WebContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebContext -> WebContext
WebKit2.WebContext.WebContext) Ptr WebContext
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    WebContext -> IO WebContext
forall (m :: * -> *) a. Monad m => a -> m a
return WebContext
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetContextMethodInfo
instance (signature ~ (m WebKit2.WebContext.WebContext), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetContextMethodInfo a signature where
    overloadedMethod = webViewGetContext

instance O.OverloadedMethodInfo WebViewGetContextMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetContext",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetContext"
        }


#endif

-- method WebView::get_custom_charset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_custom_charset" webkit_web_view_get_custom_charset :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CString

-- | Returns the current custom character encoding name of /@webView@/.
webViewGetCustomCharset ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the current custom character encoding name or 'P.Nothing' if no
    --    custom character encoding has been set.
webViewGetCustomCharset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m (Maybe Text)
webViewGetCustomCharset a
webView = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
result <- Ptr WebView -> IO CString
webkit_web_view_get_custom_charset Ptr WebView
webView'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data WebViewGetCustomCharsetMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetCustomCharsetMethodInfo a signature where
    overloadedMethod = webViewGetCustomCharset

instance O.OverloadedMethodInfo WebViewGetCustomCharsetMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetCustomCharset",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetCustomCharset"
        }


#endif

-- method WebView::get_editor_state
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "WebKit2" , name = "EditorState" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_editor_state" webkit_web_view_get_editor_state :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.EditorState.EditorState)

-- | Gets the web editor state of /@webView@/.
-- 
-- /Since: 2.10/
webViewGetEditorState ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.EditorState.EditorState
    -- ^ __Returns:__ the t'GI.WebKit2.Objects.EditorState.EditorState' of the view
webViewGetEditorState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m EditorState
webViewGetEditorState a
webView = IO EditorState -> m EditorState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EditorState -> m EditorState)
-> IO EditorState -> m EditorState
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr EditorState
result <- Ptr WebView -> IO (Ptr EditorState)
webkit_web_view_get_editor_state Ptr WebView
webView'
    Text -> Ptr EditorState -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetEditorState" Ptr EditorState
result
    EditorState
result' <- ((ManagedPtr EditorState -> EditorState)
-> Ptr EditorState -> IO EditorState
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr EditorState -> EditorState
WebKit2.EditorState.EditorState) Ptr EditorState
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    EditorState -> IO EditorState
forall (m :: * -> *) a. Monad m => a -> m a
return EditorState
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetEditorStateMethodInfo
instance (signature ~ (m WebKit2.EditorState.EditorState), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetEditorStateMethodInfo a signature where
    overloadedMethod = webViewGetEditorState

instance O.OverloadedMethodInfo WebViewGetEditorStateMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetEditorState",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetEditorState"
        }


#endif

-- method WebView::get_estimated_load_progress
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_estimated_load_progress" webkit_web_view_get_estimated_load_progress :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CDouble

-- | Gets the value of the t'GI.WebKit2.Objects.WebView.WebView':@/estimated-load-progress/@ property.
-- You can monitor the estimated progress of a load operation by
-- connecting to the notify[estimatedLoadProgress](#g:signal:estimatedLoadProgress) signal of /@webView@/.
webViewGetEstimatedLoadProgress ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m Double
    -- ^ __Returns:__ an estimate of the of the percent complete for a document
    --     load as a range from 0.0 to 1.0.
webViewGetEstimatedLoadProgress :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Double
webViewGetEstimatedLoadProgress a
webView = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CDouble
result <- Ptr WebView -> IO CDouble
webkit_web_view_get_estimated_load_progress Ptr WebView
webView'
    let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetEstimatedLoadProgressMethodInfo
instance (signature ~ (m Double), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetEstimatedLoadProgressMethodInfo a signature where
    overloadedMethod = webViewGetEstimatedLoadProgress

instance O.OverloadedMethodInfo WebViewGetEstimatedLoadProgressMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetEstimatedLoadProgress",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetEstimatedLoadProgress"
        }


#endif

-- method WebView::get_favicon
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "cairo" , name = "Surface" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_favicon" webkit_web_view_get_favicon :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr Cairo.Surface.Surface)

-- | Returns favicon currently associated to /@webView@/, if any. You can
-- connect to notify[favicon](#g:signal:favicon) signal of /@webView@/ to be notified when
-- the favicon is available.
webViewGetFavicon ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m (Maybe Cairo.Surface.Surface)
    -- ^ __Returns:__ a pointer to a t'GI.Cairo.Structs.Surface.Surface' with the
    --    favicon or 'P.Nothing' if there\'s no icon associated with /@webView@/.
webViewGetFavicon :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m (Maybe Surface)
webViewGetFavicon a
webView = IO (Maybe Surface) -> m (Maybe Surface)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Surface) -> m (Maybe Surface))
-> IO (Maybe Surface) -> m (Maybe Surface)
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr Surface
result <- Ptr WebView -> IO (Ptr Surface)
webkit_web_view_get_favicon Ptr WebView
webView'
    Maybe Surface
maybeResult <- Ptr Surface -> (Ptr Surface -> IO Surface) -> IO (Maybe Surface)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Surface
result ((Ptr Surface -> IO Surface) -> IO (Maybe Surface))
-> (Ptr Surface -> IO Surface) -> IO (Maybe Surface)
forall a b. (a -> b) -> a -> b
$ \Ptr Surface
result' -> do
        Surface
result'' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Surface -> Surface
Cairo.Surface.Surface) Ptr Surface
result'
        Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe Surface -> IO (Maybe Surface)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Surface
maybeResult

#if defined(ENABLE_OVERLOADING)
data WebViewGetFaviconMethodInfo
instance (signature ~ (m (Maybe Cairo.Surface.Surface)), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetFaviconMethodInfo a signature where
    overloadedMethod = webViewGetFavicon

instance O.OverloadedMethodInfo WebViewGetFaviconMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetFavicon",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetFavicon"
        }


#endif

-- method WebView::get_find_controller
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "FindController" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_find_controller" webkit_web_view_get_find_controller :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.FindController.FindController)

-- | Gets the t'GI.WebKit2.Objects.FindController.FindController' that will allow the caller to query
-- the t'GI.WebKit2.Objects.WebView.WebView' for the text to look for.
webViewGetFindController ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: the t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.FindController.FindController
    -- ^ __Returns:__ the t'GI.WebKit2.Objects.FindController.FindController' associated to
    -- this particular t'GI.WebKit2.Objects.WebView.WebView'.
webViewGetFindController :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m FindController
webViewGetFindController a
webView = IO FindController -> m FindController
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FindController -> m FindController)
-> IO FindController -> m FindController
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr FindController
result <- Ptr WebView -> IO (Ptr FindController)
webkit_web_view_get_find_controller Ptr WebView
webView'
    Text -> Ptr FindController -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetFindController" Ptr FindController
result
    FindController
result' <- ((ManagedPtr FindController -> FindController)
-> Ptr FindController -> IO FindController
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FindController -> FindController
WebKit2.FindController.FindController) Ptr FindController
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    FindController -> IO FindController
forall (m :: * -> *) a. Monad m => a -> m a
return FindController
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetFindControllerMethodInfo
instance (signature ~ (m WebKit2.FindController.FindController), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetFindControllerMethodInfo a signature where
    overloadedMethod = webViewGetFindController

instance O.OverloadedMethodInfo WebViewGetFindControllerMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetFindController",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetFindController"
        }


#endif

-- method WebView::get_input_method_context
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "InputMethodContext" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_input_method_context" webkit_web_view_get_input_method_context :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.InputMethodContext.InputMethodContext)

-- | Get the t'GI.WebKit2.Objects.InputMethodContext.InputMethodContext' currently in use by /@webView@/, or 'P.Nothing' if no input method is being used.
-- 
-- /Since: 2.28/
webViewGetInputMethodContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m (Maybe WebKit2.InputMethodContext.InputMethodContext)
    -- ^ __Returns:__ a t'GI.WebKit2.Objects.InputMethodContext.InputMethodContext', or 'P.Nothing'
webViewGetInputMethodContext :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m (Maybe InputMethodContext)
webViewGetInputMethodContext a
webView = IO (Maybe InputMethodContext) -> m (Maybe InputMethodContext)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe InputMethodContext) -> m (Maybe InputMethodContext))
-> IO (Maybe InputMethodContext) -> m (Maybe InputMethodContext)
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr InputMethodContext
result <- Ptr WebView -> IO (Ptr InputMethodContext)
webkit_web_view_get_input_method_context Ptr WebView
webView'
    Maybe InputMethodContext
maybeResult <- Ptr InputMethodContext
-> (Ptr InputMethodContext -> IO InputMethodContext)
-> IO (Maybe InputMethodContext)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr InputMethodContext
result ((Ptr InputMethodContext -> IO InputMethodContext)
 -> IO (Maybe InputMethodContext))
-> (Ptr InputMethodContext -> IO InputMethodContext)
-> IO (Maybe InputMethodContext)
forall a b. (a -> b) -> a -> b
$ \Ptr InputMethodContext
result' -> do
        InputMethodContext
result'' <- ((ManagedPtr InputMethodContext -> InputMethodContext)
-> Ptr InputMethodContext -> IO InputMethodContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr InputMethodContext -> InputMethodContext
WebKit2.InputMethodContext.InputMethodContext) Ptr InputMethodContext
result'
        InputMethodContext -> IO InputMethodContext
forall (m :: * -> *) a. Monad m => a -> m a
return InputMethodContext
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe InputMethodContext -> IO (Maybe InputMethodContext)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe InputMethodContext
maybeResult

#if defined(ENABLE_OVERLOADING)
data WebViewGetInputMethodContextMethodInfo
instance (signature ~ (m (Maybe WebKit2.InputMethodContext.InputMethodContext)), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetInputMethodContextMethodInfo a signature where
    overloadedMethod = webViewGetInputMethodContext

instance O.OverloadedMethodInfo WebViewGetInputMethodContextMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetInputMethodContext",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetInputMethodContext"
        }


#endif

-- method WebView::get_inspector
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "WebKit2" , name = "WebInspector" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_inspector" webkit_web_view_get_inspector :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.WebInspector.WebInspector)

-- | Get the t'GI.WebKit2.Objects.WebInspector.WebInspector' associated to /@webView@/
webViewGetInspector ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.WebInspector.WebInspector
    -- ^ __Returns:__ the t'GI.WebKit2.Objects.WebInspector.WebInspector' of /@webView@/
webViewGetInspector :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m WebInspector
webViewGetInspector a
webView = IO WebInspector -> m WebInspector
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebInspector -> m WebInspector)
-> IO WebInspector -> m WebInspector
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebInspector
result <- Ptr WebView -> IO (Ptr WebInspector)
webkit_web_view_get_inspector Ptr WebView
webView'
    Text -> Ptr WebInspector -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetInspector" Ptr WebInspector
result
    WebInspector
result' <- ((ManagedPtr WebInspector -> WebInspector)
-> Ptr WebInspector -> IO WebInspector
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebInspector -> WebInspector
WebKit2.WebInspector.WebInspector) Ptr WebInspector
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    WebInspector -> IO WebInspector
forall (m :: * -> *) a. Monad m => a -> m a
return WebInspector
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetInspectorMethodInfo
instance (signature ~ (m WebKit2.WebInspector.WebInspector), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetInspectorMethodInfo a signature where
    overloadedMethod = webViewGetInspector

instance O.OverloadedMethodInfo WebViewGetInspectorMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetInspector",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetInspector"
        }


#endif

-- method WebView::get_is_muted
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_is_muted" webkit_web_view_get_is_muted :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CInt

-- | Gets the mute state of /@webView@/.
-- 
-- /Since: 2.30/
webViewGetIsMuted ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@webView@/ audio is muted or 'P.False' is audio is not muted.
webViewGetIsMuted :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Bool
webViewGetIsMuted a
webView = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CInt
result <- Ptr WebView -> IO CInt
webkit_web_view_get_is_muted Ptr WebView
webView'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Bool -> WebViewEnterFullscreenCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetIsMutedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetIsMutedMethodInfo a signature where
    overloadedMethod = webViewGetIsMuted

instance O.OverloadedMethodInfo WebViewGetIsMutedMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetIsMuted",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetIsMuted"
        }


#endif

-- method WebView::get_main_resource
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "WebKit2" , name = "WebResource" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_main_resource" webkit_web_view_get_main_resource :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.WebResource.WebResource)

-- | Return the main resource of /@webView@/.
webViewGetMainResource ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m (Maybe WebKit2.WebResource.WebResource)
    -- ^ __Returns:__ the main t'GI.WebKit2.Objects.WebResource.WebResource' of the view
    --    or 'P.Nothing' if nothing has been loaded.
webViewGetMainResource :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m (Maybe WebResource)
webViewGetMainResource a
webView = IO (Maybe WebResource) -> m (Maybe WebResource)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe WebResource) -> m (Maybe WebResource))
-> IO (Maybe WebResource) -> m (Maybe WebResource)
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebResource
result <- Ptr WebView -> IO (Ptr WebResource)
webkit_web_view_get_main_resource Ptr WebView
webView'
    Maybe WebResource
maybeResult <- Ptr WebResource
-> (Ptr WebResource -> IO WebResource) -> IO (Maybe WebResource)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr WebResource
result ((Ptr WebResource -> IO WebResource) -> IO (Maybe WebResource))
-> (Ptr WebResource -> IO WebResource) -> IO (Maybe WebResource)
forall a b. (a -> b) -> a -> b
$ \Ptr WebResource
result' -> do
        WebResource
result'' <- ((ManagedPtr WebResource -> WebResource)
-> Ptr WebResource -> IO WebResource
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebResource -> WebResource
WebKit2.WebResource.WebResource) Ptr WebResource
result'
        WebResource -> IO WebResource
forall (m :: * -> *) a. Monad m => a -> m a
return WebResource
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe WebResource -> IO (Maybe WebResource)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe WebResource
maybeResult

#if defined(ENABLE_OVERLOADING)
data WebViewGetMainResourceMethodInfo
instance (signature ~ (m (Maybe WebKit2.WebResource.WebResource)), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetMainResourceMethodInfo a signature where
    overloadedMethod = webViewGetMainResource

instance O.OverloadedMethodInfo WebViewGetMainResourceMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetMainResource",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetMainResource"
        }


#endif

-- method WebView::get_page_id
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_page_id" webkit_web_view_get_page_id :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO Word64

-- | Get the identifier of the @/WebKitWebPage/@ corresponding to
-- the t'GI.WebKit2.Objects.WebView.WebView'
webViewGetPageId ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m Word64
    -- ^ __Returns:__ the page ID of /@webView@/.
webViewGetPageId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Word64
webViewGetPageId a
webView = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Word64
result <- Ptr WebView -> IO Word64
webkit_web_view_get_page_id Ptr WebView
webView'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data WebViewGetPageIdMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetPageIdMethodInfo a signature where
    overloadedMethod = webViewGetPageId

instance O.OverloadedMethodInfo WebViewGetPageIdMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetPageId",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetPageId"
        }


#endif

-- method WebView::get_session_state
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "WebViewSessionState" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_session_state" webkit_web_view_get_session_state :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.WebViewSessionState.WebViewSessionState)

-- | Gets the current session state of /@webView@/
-- 
-- /Since: 2.12/
webViewGetSessionState ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.WebViewSessionState.WebViewSessionState
    -- ^ __Returns:__ a t'GI.WebKit2.Structs.WebViewSessionState.WebViewSessionState'
webViewGetSessionState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m WebViewSessionState
webViewGetSessionState a
webView = IO WebViewSessionState -> m WebViewSessionState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebViewSessionState -> m WebViewSessionState)
-> IO WebViewSessionState -> m WebViewSessionState
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebViewSessionState
result <- Ptr WebView -> IO (Ptr WebViewSessionState)
webkit_web_view_get_session_state Ptr WebView
webView'
    Text -> Ptr WebViewSessionState -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetSessionState" Ptr WebViewSessionState
result
    WebViewSessionState
result' <- ((ManagedPtr WebViewSessionState -> WebViewSessionState)
-> Ptr WebViewSessionState -> IO WebViewSessionState
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr WebViewSessionState -> WebViewSessionState
WebKit2.WebViewSessionState.WebViewSessionState) Ptr WebViewSessionState
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    WebViewSessionState -> IO WebViewSessionState
forall (m :: * -> *) a. Monad m => a -> m a
return WebViewSessionState
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetSessionStateMethodInfo
instance (signature ~ (m WebKit2.WebViewSessionState.WebViewSessionState), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetSessionStateMethodInfo a signature where
    overloadedMethod = webViewGetSessionState

instance O.OverloadedMethodInfo WebViewGetSessionStateMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetSessionState",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetSessionState"
        }


#endif

-- method WebView::get_settings
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "WebKit2" , name = "Settings" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_settings" webkit_web_view_get_settings :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.Settings.Settings)

-- | Gets the t'GI.WebKit2.Objects.Settings.Settings' currently applied to /@webView@/.
-- If no other t'GI.WebKit2.Objects.Settings.Settings' have been explicitly applied to
-- /@webView@/ with 'GI.WebKit2.Objects.WebView.webViewSetSettings', the default
-- t'GI.WebKit2.Objects.Settings.Settings' will be returned. This method always returns
-- a valid t'GI.WebKit2.Objects.Settings.Settings' object.
-- To modify any of the /@webView@/ settings, you can either create
-- a new t'GI.WebKit2.Objects.Settings.Settings' object with 'GI.WebKit2.Objects.Settings.settingsNew', setting
-- the desired preferences, and then replace the existing /@webView@/
-- settings with 'GI.WebKit2.Objects.WebView.webViewSetSettings' or get the existing
-- /@webView@/ settings and update it directly. t'GI.WebKit2.Objects.Settings.Settings' objects
-- can be shared by multiple t'GI.WebKit2.Objects.WebView.WebView's, so modifying
-- the settings of a t'GI.WebKit2.Objects.WebView.WebView' would affect other
-- t'GI.WebKit2.Objects.WebView.WebView's using the same t'GI.WebKit2.Objects.Settings.Settings'.
webViewGetSettings ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.Settings.Settings
    -- ^ __Returns:__ the t'GI.WebKit2.Objects.Settings.Settings' attached to /@webView@/
webViewGetSettings :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Settings
webViewGetSettings a
webView = IO Settings -> m Settings
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Settings -> m Settings) -> IO Settings -> m Settings
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr Settings
result <- Ptr WebView -> IO (Ptr Settings)
webkit_web_view_get_settings Ptr WebView
webView'
    Text -> Ptr Settings -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetSettings" Ptr Settings
result
    Settings
result' <- ((ManagedPtr Settings -> Settings) -> Ptr Settings -> IO Settings
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Settings -> Settings
WebKit2.Settings.Settings) Ptr Settings
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Settings -> IO Settings
forall (m :: * -> *) a. Monad m => a -> m a
return Settings
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetSettingsMethodInfo
instance (signature ~ (m WebKit2.Settings.Settings), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetSettingsMethodInfo a signature where
    overloadedMethod = webViewGetSettings

instance O.OverloadedMethodInfo WebViewGetSettingsMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetSettings",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetSettings"
        }


#endif

-- method WebView::get_snapshot
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "region"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "SnapshotRegion" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #WebKitSnapshotRegion for this snapshot"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "options"
--           , argType =
--               TInterface
--                 Name { namespace = "WebKit2" , name = "SnapshotOptions" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#WebKitSnapshotOptions for the snapshot"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GAsyncReadyCallback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 5
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_snapshot" webkit_web_view_get_snapshot :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CUInt ->                                -- region : TInterface (Name {namespace = "WebKit2", name = "SnapshotRegion"})
    CUInt ->                                -- options : TInterface (Name {namespace = "WebKit2", name = "SnapshotOptions"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously retrieves a snapshot of /@webView@/ for /@region@/.
-- /@options@/ specifies how the snapshot should be rendered.
-- 
-- When the operation is finished, /@callback@/ will be called. You must
-- call 'GI.WebKit2.Objects.WebView.webViewGetSnapshotFinish' to get the result of the
-- operation.
webViewGetSnapshot ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> WebKit2.Enums.SnapshotRegion
    -- ^ /@region@/: the t'GI.WebKit2.Enums.SnapshotRegion' for this snapshot
    -> [WebKit2.Flags.SnapshotOptions]
    -- ^ /@options@/: t'GI.WebKit2.Flags.SnapshotOptions' for the snapshot
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable'
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a t'GI.Gio.Callbacks.AsyncReadyCallback'
    -> m ()
webViewGetSnapshot :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsCancellable b) =>
a
-> SnapshotRegion
-> [SnapshotOptions]
-> Maybe b
-> Maybe AsyncReadyCallback
-> m ()
webViewGetSnapshot a
webView SnapshotRegion
region [SnapshotOptions]
options Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    let region' :: CUInt
region' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (SnapshotRegion -> Int) -> SnapshotRegion -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SnapshotRegion -> Int
forall a. Enum a => a -> Int
fromEnum) SnapshotRegion
region
    let options' :: CUInt
options' = [SnapshotOptions] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SnapshotOptions]
options
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr WebView
-> CUInt
-> CUInt
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_web_view_get_snapshot Ptr WebView
webView' CUInt
region' CUInt
options' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewGetSnapshotMethodInfo
instance (signature ~ (WebKit2.Enums.SnapshotRegion -> [WebKit2.Flags.SnapshotOptions] -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod WebViewGetSnapshotMethodInfo a signature where
    overloadedMethod = webViewGetSnapshot

instance O.OverloadedMethodInfo WebViewGetSnapshotMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetSnapshot",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetSnapshot"
        }


#endif

-- method WebView::get_snapshot_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GAsyncResult" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "cairo" , name = "Surface" })
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_get_snapshot_finish" webkit_web_view_get_snapshot_finish :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Cairo.Surface.Surface)

-- | Finishes an asynchronous operation started with 'GI.WebKit2.Objects.WebView.webViewGetSnapshot'.
webViewGetSnapshotFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@result@/: a t'GI.Gio.Interfaces.AsyncResult.AsyncResult'
    -> m Cairo.Surface.Surface
    -- ^ __Returns:__ a t'GI.Cairo.Structs.Surface.Surface' with the retrieved snapshot or 'P.Nothing' in error. /(Can throw 'Data.GI.Base.GError.GError')/
webViewGetSnapshotFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsAsyncResult b) =>
a -> b -> m Surface
webViewGetSnapshotFinish a
webView b
result_ = IO Surface -> m Surface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Surface -> m Surface) -> IO Surface -> m Surface
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO Surface -> IO () -> IO Surface
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Surface
result <- (Ptr (Ptr GError) -> IO (Ptr Surface)) -> IO (Ptr Surface)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Surface)) -> IO (Ptr Surface))
-> (Ptr (Ptr GError) -> IO (Ptr Surface)) -> IO (Ptr Surface)
forall a b. (a -> b) -> a -> b
$ Ptr WebView
-> Ptr AsyncResult -> Ptr (Ptr GError) -> IO (Ptr Surface)
webkit_web_view_get_snapshot_finish Ptr WebView
webView' Ptr AsyncResult
result_'
        Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetSnapshotFinish" Ptr Surface
result
        Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Surface -> Surface
Cairo.Surface.Surface) Ptr Surface
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data WebViewGetSnapshotFinishMethodInfo
instance (signature ~ (b -> m Cairo.Surface.Surface), MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod WebViewGetSnapshotFinishMethodInfo a signature where
    overloadedMethod = webViewGetSnapshotFinish

instance O.OverloadedMethodInfo WebViewGetSnapshotFinishMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetSnapshotFinish",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetSnapshotFinish"
        }


#endif

-- method WebView::get_title
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_title" webkit_web_view_get_title :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CString

-- | Gets the value of the t'GI.WebKit2.Objects.WebView.WebView':@/title/@ property.
-- You can connect to notify[title](#g:signal:title) signal of /@webView@/ to
-- be notified when the title has been received.
webViewGetTitle ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ The main frame document title of /@webView@/.
webViewGetTitle :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m (Maybe Text)
webViewGetTitle a
webView = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
result <- Ptr WebView -> IO CString
webkit_web_view_get_title Ptr WebView
webView'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data WebViewGetTitleMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetTitleMethodInfo a signature where
    overloadedMethod = webViewGetTitle

instance O.OverloadedMethodInfo WebViewGetTitleMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetTitle",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetTitle"
        }


#endif

-- method WebView::get_tls_info
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "certificate"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "TlsCertificate" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for a #GTlsCertificate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "errors"
--           , argType =
--               TInterface
--                 Name { namespace = "Gio" , name = "TlsCertificateFlags" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "return location for a #GTlsCertificateFlags the verification status of @certificate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_tls_info" webkit_web_view_get_tls_info :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr (Ptr Gio.TlsCertificate.TlsCertificate) -> -- certificate : TInterface (Name {namespace = "Gio", name = "TlsCertificate"})
    Ptr CUInt ->                            -- errors : TInterface (Name {namespace = "Gio", name = "TlsCertificateFlags"})
    IO CInt

-- | Retrieves the t'GI.Gio.Objects.TlsCertificate.TlsCertificate' associated with the main resource of /@webView@/,
-- and the t'GI.Gio.Flags.TlsCertificateFlags' showing what problems, if any, have been found
-- with that certificate.
-- If the connection is not HTTPS, this function returns 'P.False'.
-- This function should be called after a response has been received from the
-- server, so you can connect to [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") and call this function
-- when it\'s emitted with 'GI.WebKit2.Enums.LoadEventCommitted' event.
-- 
-- Note that this function provides no information about the security of the web
-- page if the current t'GI.WebKit2.Enums.TLSErrorsPolicy' is /@wEBKITTLSERRORSPOLICYIGNORE@/,
-- as subresources of the page may be controlled by an attacker. This function
-- may safely be used to determine the security status of the current page only
-- if the current t'GI.WebKit2.Enums.TLSErrorsPolicy' is /@wEBKITTLSERRORSPOLICYFAIL@/, in
-- which case subresources that fail certificate verification will be blocked.
webViewGetTlsInfo ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m ((Bool, Gio.TlsCertificate.TlsCertificate, [Gio.Flags.TlsCertificateFlags]))
    -- ^ __Returns:__ 'P.True' if the /@webView@/ connection uses HTTPS and a response has been received
    --    from the server, or 'P.False' otherwise.
webViewGetTlsInfo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m (Bool, TlsCertificate, [TlsCertificateFlags])
webViewGetTlsInfo a
webView = IO (Bool, TlsCertificate, [TlsCertificateFlags])
-> m (Bool, TlsCertificate, [TlsCertificateFlags])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TlsCertificate, [TlsCertificateFlags])
 -> m (Bool, TlsCertificate, [TlsCertificateFlags]))
-> IO (Bool, TlsCertificate, [TlsCertificateFlags])
-> m (Bool, TlsCertificate, [TlsCertificateFlags])
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr (Ptr TlsCertificate)
certificate <- IO (Ptr (Ptr TlsCertificate))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gio.TlsCertificate.TlsCertificate))
    Ptr CUInt
errors <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
    CInt
result <- Ptr WebView -> Ptr (Ptr TlsCertificate) -> Ptr CUInt -> IO CInt
webkit_web_view_get_tls_info Ptr WebView
webView' Ptr (Ptr TlsCertificate)
certificate Ptr CUInt
errors
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    Ptr TlsCertificate
certificate' <- Ptr (Ptr TlsCertificate) -> IO (Ptr TlsCertificate)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr TlsCertificate)
certificate
    TlsCertificate
certificate'' <- ((ManagedPtr TlsCertificate -> TlsCertificate)
-> Ptr TlsCertificate -> IO TlsCertificate
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate) Ptr TlsCertificate
certificate'
    CUInt
errors' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
errors
    let errors'' :: [TlsCertificateFlags]
errors'' = CUInt -> [TlsCertificateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
errors'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Ptr (Ptr TlsCertificate) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr TlsCertificate)
certificate
    Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
errors
    (Bool, TlsCertificate, [TlsCertificateFlags])
-> IO (Bool, TlsCertificate, [TlsCertificateFlags])
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TlsCertificate
certificate'', [TlsCertificateFlags]
errors'')

#if defined(ENABLE_OVERLOADING)
data WebViewGetTlsInfoMethodInfo
instance (signature ~ (m ((Bool, Gio.TlsCertificate.TlsCertificate, [Gio.Flags.TlsCertificateFlags]))), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetTlsInfoMethodInfo a signature where
    overloadedMethod = webViewGetTlsInfo

instance O.OverloadedMethodInfo WebViewGetTlsInfoMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetTlsInfo",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetTlsInfo"
        }


#endif

-- method WebView::get_uri
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_uri" webkit_web_view_get_uri :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CString

-- | Returns the current active URI of /@webView@/. The active URI might change during
-- a load operation:
-- 
-- \<orderedlist>
-- \<listitem>\<para>
--   When nothing has been loaded yet on /@webView@/ the active URI is 'P.Nothing'.
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
--   When a new load operation starts the active URI is the requested URI:
--   \<itemizedlist>
--   \<listitem>\<para>
--     If the load operation was started by 'GI.WebKit2.Objects.WebView.webViewLoadUri',
--     the requested URI is the given one.
--   \<\/para>\<\/listitem>
--   \<listitem>\<para>
--     If the load operation was started by 'GI.WebKit2.Objects.WebView.webViewLoadHtml',
--     the requested URI is \"about:blank\".
--   \<\/para>\<\/listitem>
--   \<listitem>\<para>
--     If the load operation was started by 'GI.WebKit2.Objects.WebView.webViewLoadAlternateHtml',
--     the requested URI is content URI provided.
--   \<\/para>\<\/listitem>
--   \<listitem>\<para>
--     If the load operation was started by 'GI.WebKit2.Objects.WebView.webViewGoBack' or
--     'GI.WebKit2.Objects.WebView.webViewGoForward', the requested URI is the original URI
--     of the previous\/next item in the t'GI.WebKit2.Objects.BackForwardList.BackForwardList' of /@webView@/.
--   \<\/para>\<\/listitem>
--   \<listitem>\<para>
--     If the load operation was started by
--     'GI.WebKit2.Objects.WebView.webViewGoToBackForwardListItem', the requested URI
--     is the opriginal URI of the given t'GI.WebKit2.Objects.BackForwardListItem.BackForwardListItem'.
--   \<\/para>\<\/listitem>
--   \<\/itemizedlist>
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
--   If there is a server redirection during the load operation,
--   the active URI is the redirected URI. When the signal
--   [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") is emitted with 'GI.WebKit2.Enums.LoadEventRedirected'
--   event, the active URI is already updated to the redirected URI.
-- \<\/para>\<\/listitem>
-- \<listitem>\<para>
--   When the signal [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") is emitted
--   with 'GI.WebKit2.Enums.LoadEventCommitted' event, the active URI is the final
--   one and it will not change unless a new load operation is started
--   or a navigation action within the same page is performed.
-- \<\/para>\<\/listitem>
-- \<\/orderedlist>
-- 
-- You can monitor the active URI by connecting to the notify[uri](#g:signal:uri)
-- signal of /@webView@/.
webViewGetUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the current active URI of /@webView@/ or 'P.Nothing'
    --    if nothing has been loaded yet.
webViewGetUri :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m (Maybe Text)
webViewGetUri a
webView = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
result <- Ptr WebView -> IO CString
webkit_web_view_get_uri Ptr WebView
webView'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data WebViewGetUriMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetUriMethodInfo a signature where
    overloadedMethod = webViewGetUri

instance O.OverloadedMethodInfo WebViewGetUriMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetUri",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetUri"
        }


#endif

-- method WebView::get_user_content_manager
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "UserContentManager" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_user_content_manager" webkit_web_view_get_user_content_manager :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.UserContentManager.UserContentManager)

-- | Gets the user content manager associated to /@webView@/.
-- 
-- /Since: 2.6/
webViewGetUserContentManager ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.UserContentManager.UserContentManager
    -- ^ __Returns:__ the t'GI.WebKit2.Objects.UserContentManager.UserContentManager' associated with the view
webViewGetUserContentManager :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m UserContentManager
webViewGetUserContentManager a
webView = IO UserContentManager -> m UserContentManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UserContentManager -> m UserContentManager)
-> IO UserContentManager -> m UserContentManager
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr UserContentManager
result <- Ptr WebView -> IO (Ptr UserContentManager)
webkit_web_view_get_user_content_manager Ptr WebView
webView'
    Text -> Ptr UserContentManager -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetUserContentManager" Ptr UserContentManager
result
    UserContentManager
result' <- ((ManagedPtr UserContentManager -> UserContentManager)
-> Ptr UserContentManager -> IO UserContentManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr UserContentManager -> UserContentManager
WebKit2.UserContentManager.UserContentManager) Ptr UserContentManager
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    UserContentManager -> IO UserContentManager
forall (m :: * -> *) a. Monad m => a -> m a
return UserContentManager
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetUserContentManagerMethodInfo
instance (signature ~ (m WebKit2.UserContentManager.UserContentManager), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetUserContentManagerMethodInfo a signature where
    overloadedMethod = webViewGetUserContentManager

instance O.OverloadedMethodInfo WebViewGetUserContentManagerMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetUserContentManager",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetUserContentManager"
        }


#endif

-- method WebView::get_website_data_manager
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "WebsiteDataManager" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_website_data_manager" webkit_web_view_get_website_data_manager :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.WebsiteDataManager.WebsiteDataManager)

-- | Get the t'GI.WebKit2.Objects.WebsiteDataManager.WebsiteDataManager' associated to /@webView@/. If /@webView@/ is not ephemeral,
-- the returned t'GI.WebKit2.Objects.WebsiteDataManager.WebsiteDataManager' will be the same as the t'GI.WebKit2.Objects.WebsiteDataManager.WebsiteDataManager'
-- of /@webView@/\'s t'GI.WebKit2.Objects.WebContext.WebContext'.
-- 
-- /Since: 2.16/
webViewGetWebsiteDataManager ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.WebsiteDataManager.WebsiteDataManager
    -- ^ __Returns:__ a t'GI.WebKit2.Objects.WebsiteDataManager.WebsiteDataManager'
webViewGetWebsiteDataManager :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m WebsiteDataManager
webViewGetWebsiteDataManager a
webView = IO WebsiteDataManager -> m WebsiteDataManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebsiteDataManager -> m WebsiteDataManager)
-> IO WebsiteDataManager -> m WebsiteDataManager
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebsiteDataManager
result <- Ptr WebView -> IO (Ptr WebsiteDataManager)
webkit_web_view_get_website_data_manager Ptr WebView
webView'
    Text -> Ptr WebsiteDataManager -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetWebsiteDataManager" Ptr WebsiteDataManager
result
    WebsiteDataManager
result' <- ((ManagedPtr WebsiteDataManager -> WebsiteDataManager)
-> Ptr WebsiteDataManager -> IO WebsiteDataManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebsiteDataManager -> WebsiteDataManager
WebKit2.WebsiteDataManager.WebsiteDataManager) Ptr WebsiteDataManager
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    WebsiteDataManager -> IO WebsiteDataManager
forall (m :: * -> *) a. Monad m => a -> m a
return WebsiteDataManager
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetWebsiteDataManagerMethodInfo
instance (signature ~ (m WebKit2.WebsiteDataManager.WebsiteDataManager), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetWebsiteDataManagerMethodInfo a signature where
    overloadedMethod = webViewGetWebsiteDataManager

instance O.OverloadedMethodInfo WebViewGetWebsiteDataManagerMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetWebsiteDataManager",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetWebsiteDataManager"
        }


#endif

-- method WebView::get_website_policies
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "WebsitePolicies" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_website_policies" webkit_web_view_get_website_policies :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.WebsitePolicies.WebsitePolicies)

-- | Gets the default website policies set on construction in the
-- /@webView@/. These can be overridden on a per-origin basis via the
-- [decidePolicy]("GI.WebKit2.Objects.WebView#g:signal:decidePolicy") signal handler.
-- 
-- See also 'GI.WebKit2.Objects.PolicyDecision.policyDecisionUseWithPolicies'.
-- 
-- /Since: 2.30/
webViewGetWebsitePolicies ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.WebsitePolicies.WebsitePolicies
    -- ^ __Returns:__ the default t'GI.WebKit2.Objects.WebsitePolicies.WebsitePolicies'
    --     associated with the view.
webViewGetWebsitePolicies :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m WebsitePolicies
webViewGetWebsitePolicies a
webView = IO WebsitePolicies -> m WebsitePolicies
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebsitePolicies -> m WebsitePolicies)
-> IO WebsitePolicies -> m WebsitePolicies
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebsitePolicies
result <- Ptr WebView -> IO (Ptr WebsitePolicies)
webkit_web_view_get_website_policies Ptr WebView
webView'
    Text -> Ptr WebsitePolicies -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetWebsitePolicies" Ptr WebsitePolicies
result
    WebsitePolicies
result' <- ((ManagedPtr WebsitePolicies -> WebsitePolicies)
-> Ptr WebsitePolicies -> IO WebsitePolicies
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebsitePolicies -> WebsitePolicies
WebKit2.WebsitePolicies.WebsitePolicies) Ptr WebsitePolicies
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    WebsitePolicies -> IO WebsitePolicies
forall (m :: * -> *) a. Monad m => a -> m a
return WebsitePolicies
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetWebsitePoliciesMethodInfo
instance (signature ~ (m WebKit2.WebsitePolicies.WebsitePolicies), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetWebsitePoliciesMethodInfo a signature where
    overloadedMethod = webViewGetWebsitePolicies

instance O.OverloadedMethodInfo WebViewGetWebsitePoliciesMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetWebsitePolicies",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetWebsitePolicies"
        }


#endif

-- method WebView::get_window_properties
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "WindowProperties" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_window_properties" webkit_web_view_get_window_properties :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO (Ptr WebKit2.WindowProperties.WindowProperties)

-- | Get the t'GI.WebKit2.Objects.WindowProperties.WindowProperties' object containing the properties
-- that the window containing /@webView@/ should have.
webViewGetWindowProperties ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m WebKit2.WindowProperties.WindowProperties
    -- ^ __Returns:__ the t'GI.WebKit2.Objects.WindowProperties.WindowProperties' of /@webView@/
webViewGetWindowProperties :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m WindowProperties
webViewGetWindowProperties a
webView = IO WindowProperties -> m WindowProperties
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WindowProperties -> m WindowProperties)
-> IO WindowProperties -> m WindowProperties
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WindowProperties
result <- Ptr WebView -> IO (Ptr WindowProperties)
webkit_web_view_get_window_properties Ptr WebView
webView'
    Text -> Ptr WindowProperties -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewGetWindowProperties" Ptr WindowProperties
result
    WindowProperties
result' <- ((ManagedPtr WindowProperties -> WindowProperties)
-> Ptr WindowProperties -> IO WindowProperties
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WindowProperties -> WindowProperties
WebKit2.WindowProperties.WindowProperties) Ptr WindowProperties
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    WindowProperties -> IO WindowProperties
forall (m :: * -> *) a. Monad m => a -> m a
return WindowProperties
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetWindowPropertiesMethodInfo
instance (signature ~ (m WebKit2.WindowProperties.WindowProperties), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetWindowPropertiesMethodInfo a signature where
    overloadedMethod = webViewGetWindowProperties

instance O.OverloadedMethodInfo WebViewGetWindowPropertiesMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetWindowProperties",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetWindowProperties"
        }


#endif

-- method WebView::get_zoom_level
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_zoom_level" webkit_web_view_get_zoom_level :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CDouble

-- | Get the zoom level of /@webView@/, i.e. the factor by which the
-- view contents are scaled with respect to their original size.
webViewGetZoomLevel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m Double
    -- ^ __Returns:__ the current zoom level of /@webView@/
webViewGetZoomLevel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Double
webViewGetZoomLevel a
webView = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CDouble
result <- Ptr WebView -> IO CDouble
webkit_web_view_get_zoom_level Ptr WebView
webView'
    let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'

#if defined(ENABLE_OVERLOADING)
data WebViewGetZoomLevelMethodInfo
instance (signature ~ (m Double), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGetZoomLevelMethodInfo a signature where
    overloadedMethod = webViewGetZoomLevel

instance O.OverloadedMethodInfo WebViewGetZoomLevelMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGetZoomLevel",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGetZoomLevel"
        }


#endif

-- method WebView::go_back
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_go_back" webkit_web_view_go_back :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO ()

-- | Loads the previous history item.
-- You can monitor the load operation by connecting to
-- [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") signal.
webViewGoBack ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m ()
webViewGoBack :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m ()
webViewGoBack a
webView = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebView -> IO ()
webkit_web_view_go_back Ptr WebView
webView'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewGoBackMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGoBackMethodInfo a signature where
    overloadedMethod = webViewGoBack

instance O.OverloadedMethodInfo WebViewGoBackMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGoBack",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGoBack"
        }


#endif

-- method WebView::go_forward
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_go_forward" webkit_web_view_go_forward :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO ()

-- | Loads the next history item.
-- You can monitor the load operation by connecting to
-- [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") signal.
webViewGoForward ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m ()
webViewGoForward :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m ()
webViewGoForward a
webView = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebView -> IO ()
webkit_web_view_go_forward Ptr WebView
webView'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewGoForwardMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewGoForwardMethodInfo a signature where
    overloadedMethod = webViewGoForward

instance O.OverloadedMethodInfo WebViewGoForwardMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGoForward",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGoForward"
        }


#endif

-- method WebView::go_to_back_forward_list_item
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "list_item"
--           , argType =
--               TInterface
--                 Name { namespace = "WebKit2" , name = "BackForwardListItem" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitBackForwardListItem"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_go_to_back_forward_list_item" webkit_web_view_go_to_back_forward_list_item :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr WebKit2.BackForwardListItem.BackForwardListItem -> -- list_item : TInterface (Name {namespace = "WebKit2", name = "BackForwardListItem"})
    IO ()

-- | Loads the specific history item /@listItem@/.
-- You can monitor the load operation by connecting to
-- [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") signal.
webViewGoToBackForwardListItem ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, WebKit2.BackForwardListItem.IsBackForwardListItem b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@listItem@/: a t'GI.WebKit2.Objects.BackForwardListItem.BackForwardListItem'
    -> m ()
webViewGoToBackForwardListItem :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsBackForwardListItem b) =>
a -> b -> m ()
webViewGoToBackForwardListItem a
webView b
listItem = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr BackForwardListItem
listItem' <- b -> IO (Ptr BackForwardListItem)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
listItem
    Ptr WebView -> Ptr BackForwardListItem -> IO ()
webkit_web_view_go_to_back_forward_list_item Ptr WebView
webView' Ptr BackForwardListItem
listItem'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
listItem
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewGoToBackForwardListItemMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWebView a, WebKit2.BackForwardListItem.IsBackForwardListItem b) => O.OverloadedMethod WebViewGoToBackForwardListItemMethodInfo a signature where
    overloadedMethod = webViewGoToBackForwardListItem

instance O.OverloadedMethodInfo WebViewGoToBackForwardListItemMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewGoToBackForwardListItem",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewGoToBackForwardListItem"
        }


#endif

-- method WebView::is_controlled_by_automation
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_is_controlled_by_automation" webkit_web_view_is_controlled_by_automation :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CInt

-- | Get whether a t'GI.WebKit2.Objects.WebView.WebView' was created with t'GI.WebKit2.Objects.WebView.WebView':@/is-controlled-by-automation/@
-- property enabled. Only t'GI.WebKit2.Objects.WebView.WebView's controlled by automation can be used in an
-- automation session.
-- 
-- /Since: 2.18/
webViewIsControlledByAutomation ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@webView@/ is controlled by automation, or 'P.False' otherwise.
webViewIsControlledByAutomation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Bool
webViewIsControlledByAutomation a
webView = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CInt
result <- Ptr WebView -> IO CInt
webkit_web_view_is_controlled_by_automation Ptr WebView
webView'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Bool -> WebViewEnterFullscreenCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WebViewIsControlledByAutomationMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewIsControlledByAutomationMethodInfo a signature where
    overloadedMethod = webViewIsControlledByAutomation

instance O.OverloadedMethodInfo WebViewIsControlledByAutomationMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewIsControlledByAutomation",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewIsControlledByAutomation"
        }


#endif

-- method WebView::is_editable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_is_editable" webkit_web_view_is_editable :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CInt

-- | /No description available in the introspection data./
webViewIsEditable ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -> m Bool
webViewIsEditable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Bool
webViewIsEditable a
webView = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CInt
result <- Ptr WebView -> IO CInt
webkit_web_view_is_editable Ptr WebView
webView'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Bool -> WebViewEnterFullscreenCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WebViewIsEditableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewIsEditableMethodInfo a signature where
    overloadedMethod = webViewIsEditable

instance O.OverloadedMethodInfo WebViewIsEditableMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewIsEditable",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewIsEditable"
        }


#endif

-- method WebView::is_ephemeral
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_is_ephemeral" webkit_web_view_is_ephemeral :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CInt

-- | Get whether a t'GI.WebKit2.Objects.WebView.WebView' is ephemeral. To create an ephemeral t'GI.WebKit2.Objects.WebView.WebView' you need to
-- use @/g_object_new()/@ and pass is-ephemeral property with 'P.True' value. See
-- t'GI.WebKit2.Objects.WebView.WebView':@/is-ephemeral/@ for more details.
-- If /@webView@/ was created with a ephemeral t'GI.WebKit2.Objects.WebView.WebView':@/related-view/@ or an
-- ephemeral t'GI.WebKit2.Objects.WebView.WebView':@/web-context/@ it will also be ephemeral.
-- 
-- /Since: 2.16/
webViewIsEphemeral ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@webView@/ is ephemeral or 'P.False' otherwise.
webViewIsEphemeral :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Bool
webViewIsEphemeral a
webView = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CInt
result <- Ptr WebView -> IO CInt
webkit_web_view_is_ephemeral Ptr WebView
webView'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Bool -> WebViewEnterFullscreenCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WebViewIsEphemeralMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewIsEphemeralMethodInfo a signature where
    overloadedMethod = webViewIsEphemeral

instance O.OverloadedMethodInfo WebViewIsEphemeralMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewIsEphemeral",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewIsEphemeral"
        }


#endif

-- method WebView::is_loading
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_is_loading" webkit_web_view_is_loading :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CInt

-- | Gets the value of the t'GI.WebKit2.Objects.WebView.WebView':@/is-loading/@ property.
-- You can monitor when a t'GI.WebKit2.Objects.WebView.WebView' is loading a page by connecting to
-- notify[isLoading](#g:signal:isLoading) signal of /@webView@/. This is useful when you are
-- interesting in knowing when the view is loading something but not in the
-- details about the status of the load operation, for example to start a spinner
-- when the view is loading a page and stop it when it finishes.
webViewIsLoading ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@webView@/ is loading a page or 'P.False' otherwise.
webViewIsLoading :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Bool
webViewIsLoading a
webView = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CInt
result <- Ptr WebView -> IO CInt
webkit_web_view_is_loading Ptr WebView
webView'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Bool -> WebViewEnterFullscreenCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WebViewIsLoadingMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewIsLoadingMethodInfo a signature where
    overloadedMethod = webViewIsLoading

instance O.OverloadedMethodInfo WebViewIsLoadingMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewIsLoading",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewIsLoading"
        }


#endif

-- method WebView::is_playing_audio
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_is_playing_audio" webkit_web_view_is_playing_audio :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO CInt

-- | Gets the value of the t'GI.WebKit2.Objects.WebView.WebView':@/is-playing-audio/@ property.
-- You can monitor when a page in a t'GI.WebKit2.Objects.WebView.WebView' is playing audio by
-- connecting to the notify[isPlayingAudio](#g:signal:isPlayingAudio) signal of /@webView@/. This
-- is useful when the application wants to provide visual feedback when a
-- page is producing sound.
-- 
-- /Since: 2.8/
webViewIsPlayingAudio ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if a page in /@webView@/ is playing audio or 'P.False' otherwise.
webViewIsPlayingAudio :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m Bool
webViewIsPlayingAudio a
webView = WebViewEnterFullscreenCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WebViewEnterFullscreenCallback -> m Bool)
-> WebViewEnterFullscreenCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CInt
result <- Ptr WebView -> IO CInt
webkit_web_view_is_playing_audio Ptr WebView
webView'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Bool -> WebViewEnterFullscreenCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WebViewIsPlayingAudioMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewIsPlayingAudioMethodInfo a signature where
    overloadedMethod = webViewIsPlayingAudio

instance O.OverloadedMethodInfo WebViewIsPlayingAudioMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewIsPlayingAudio",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewIsPlayingAudio"
        }


#endif

-- method WebView::load_alternate_html
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "content"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the new content to display as the main page of the @web_view"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "content_uri"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the URI for the alternate page content"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "base_uri"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the base URI for relative locations or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_load_alternate_html" webkit_web_view_load_alternate_html :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- content : TBasicType TUTF8
    CString ->                              -- content_uri : TBasicType TUTF8
    CString ->                              -- base_uri : TBasicType TUTF8
    IO ()

-- | Load the given /@content@/ string for the URI /@contentUri@/.
-- This allows clients to display page-loading errors in the t'GI.WebKit2.Objects.WebView.WebView' itself.
-- When this method is called from [loadFailed]("GI.WebKit2.Objects.WebView#g:signal:loadFailed") signal to show an
-- error page, then the back-forward list is maintained appropriately.
-- For everything else this method works the same way as 'GI.WebKit2.Objects.WebView.webViewLoadHtml'.
webViewLoadAlternateHtml ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@content@/: the new content to display as the main page of the /@webView@/
    -> T.Text
    -- ^ /@contentUri@/: the URI for the alternate page content
    -> Maybe (T.Text)
    -- ^ /@baseUri@/: the base URI for relative locations or 'P.Nothing'
    -> m ()
webViewLoadAlternateHtml :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Text -> Text -> Maybe Text -> m ()
webViewLoadAlternateHtml a
webView Text
content Text
contentUri Maybe Text
baseUri = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
content' <- Text -> IO CString
textToCString Text
content
    CString
contentUri' <- Text -> IO CString
textToCString Text
contentUri
    CString
maybeBaseUri <- case Maybe Text
baseUri of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jBaseUri -> do
            CString
jBaseUri' <- Text -> IO CString
textToCString Text
jBaseUri
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jBaseUri'
    Ptr WebView -> CString -> CString -> CString -> IO ()
webkit_web_view_load_alternate_html Ptr WebView
webView' CString
content' CString
contentUri' CString
maybeBaseUri
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
content'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
contentUri'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeBaseUri
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewLoadAlternateHtmlMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe (T.Text) -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewLoadAlternateHtmlMethodInfo a signature where
    overloadedMethod = webViewLoadAlternateHtml

instance O.OverloadedMethodInfo WebViewLoadAlternateHtmlMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewLoadAlternateHtml",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewLoadAlternateHtml"
        }


#endif

-- method WebView::load_bytes
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "bytes"
--           , argType = TInterface Name { namespace = "GLib" , name = "Bytes" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "input data to load" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mime_type"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the MIME type of @bytes, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "encoding"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the character encoding of @bytes, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "base_uri"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the base URI for relative locations or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_load_bytes" webkit_web_view_load_bytes :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr GLib.Bytes.Bytes ->                 -- bytes : TInterface (Name {namespace = "GLib", name = "Bytes"})
    CString ->                              -- mime_type : TBasicType TUTF8
    CString ->                              -- encoding : TBasicType TUTF8
    CString ->                              -- base_uri : TBasicType TUTF8
    IO ()

-- | Load the specified /@bytes@/ into /@webView@/ using the given /@mimeType@/ and /@encoding@/.
-- When /@mimeType@/ is 'P.Nothing', it defaults to \"text\/html\".
-- When /@encoding@/ is 'P.Nothing', it defaults to \"UTF-8\".
-- When /@baseUri@/ is 'P.Nothing', it defaults to \"about:blank\".
-- You can monitor the load operation by connecting to [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") signal.
-- 
-- /Since: 2.6/
webViewLoadBytes ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> GLib.Bytes.Bytes
    -- ^ /@bytes@/: input data to load
    -> Maybe (T.Text)
    -- ^ /@mimeType@/: the MIME type of /@bytes@/, or 'P.Nothing'
    -> Maybe (T.Text)
    -- ^ /@encoding@/: the character encoding of /@bytes@/, or 'P.Nothing'
    -> Maybe (T.Text)
    -- ^ /@baseUri@/: the base URI for relative locations or 'P.Nothing'
    -> m ()
webViewLoadBytes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Bytes -> Maybe Text -> Maybe Text -> Maybe Text -> m ()
webViewLoadBytes a
webView Bytes
bytes Maybe Text
mimeType Maybe Text
encoding Maybe Text
baseUri = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr Bytes
bytes' <- Bytes -> IO (Ptr Bytes)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
bytes
    CString
maybeMimeType <- case Maybe Text
mimeType of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jMimeType -> do
            CString
jMimeType' <- Text -> IO CString
textToCString Text
jMimeType
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jMimeType'
    CString
maybeEncoding <- case Maybe Text
encoding of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jEncoding -> do
            CString
jEncoding' <- Text -> IO CString
textToCString Text
jEncoding
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jEncoding'
    CString
maybeBaseUri <- case Maybe Text
baseUri of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jBaseUri -> do
            CString
jBaseUri' <- Text -> IO CString
textToCString Text
jBaseUri
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jBaseUri'
    Ptr WebView -> Ptr Bytes -> CString -> CString -> CString -> IO ()
webkit_web_view_load_bytes Ptr WebView
webView' Ptr Bytes
bytes' CString
maybeMimeType CString
maybeEncoding CString
maybeBaseUri
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Bytes -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
bytes
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMimeType
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeEncoding
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeBaseUri
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewLoadBytesMethodInfo
instance (signature ~ (GLib.Bytes.Bytes -> Maybe (T.Text) -> Maybe (T.Text) -> Maybe (T.Text) -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewLoadBytesMethodInfo a signature where
    overloadedMethod = webViewLoadBytes

instance O.OverloadedMethodInfo WebViewLoadBytesMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewLoadBytes",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewLoadBytes"
        }


#endif

-- method WebView::load_html
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "content"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The HTML string to load"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "base_uri"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The base URI for relative locations or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_load_html" webkit_web_view_load_html :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- content : TBasicType TUTF8
    CString ->                              -- base_uri : TBasicType TUTF8
    IO ()

-- | Load the given /@content@/ string with the specified /@baseUri@/.
-- If /@baseUri@/ is not 'P.Nothing', relative URLs in the /@content@/ will be
-- resolved against /@baseUri@/ and absolute local paths must be children of the /@baseUri@/.
-- For security reasons absolute local paths that are not children of /@baseUri@/
-- will cause the web process to terminate.
-- If you need to include URLs in /@content@/ that are local paths in a different
-- directory than /@baseUri@/ you can build a data URI for them. When /@baseUri@/ is 'P.Nothing',
-- it defaults to \"about:blank\". The mime type of the document will be \"text\/html\".
-- You can monitor the load operation by connecting to [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") signal.
webViewLoadHtml ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@content@/: The HTML string to load
    -> Maybe (T.Text)
    -- ^ /@baseUri@/: The base URI for relative locations or 'P.Nothing'
    -> m ()
webViewLoadHtml :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Text -> Maybe Text -> m ()
webViewLoadHtml a
webView Text
content Maybe Text
baseUri = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
content' <- Text -> IO CString
textToCString Text
content
    CString
maybeBaseUri <- case Maybe Text
baseUri of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jBaseUri -> do
            CString
jBaseUri' <- Text -> IO CString
textToCString Text
jBaseUri
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jBaseUri'
    Ptr WebView -> CString -> CString -> IO ()
webkit_web_view_load_html Ptr WebView
webView' CString
content' CString
maybeBaseUri
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
content'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeBaseUri
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewLoadHtmlMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewLoadHtmlMethodInfo a signature where
    overloadedMethod = webViewLoadHtml

instance O.OverloadedMethodInfo WebViewLoadHtmlMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewLoadHtml",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewLoadHtml"
        }


#endif

-- method WebView::load_plain_text
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "plain_text"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The plain text to load"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_load_plain_text" webkit_web_view_load_plain_text :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- plain_text : TBasicType TUTF8
    IO ()

-- | Load the specified /@plainText@/ string into /@webView@/. The mime type of
-- document will be \"text\/plain\". You can monitor the load
-- operation by connecting to [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") signal.
webViewLoadPlainText ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@plainText@/: The plain text to load
    -> m ()
webViewLoadPlainText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Text -> m ()
webViewLoadPlainText a
webView Text
plainText = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
plainText' <- Text -> IO CString
textToCString Text
plainText
    Ptr WebView -> CString -> IO ()
webkit_web_view_load_plain_text Ptr WebView
webView' CString
plainText'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
plainText'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewLoadPlainTextMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewLoadPlainTextMethodInfo a signature where
    overloadedMethod = webViewLoadPlainText

instance O.OverloadedMethodInfo WebViewLoadPlainTextMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewLoadPlainText",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewLoadPlainText"
        }


#endif

-- method WebView::load_request
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "request"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "URIRequest" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitURIRequest to load"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_load_request" webkit_web_view_load_request :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr WebKit2.URIRequest.URIRequest ->    -- request : TInterface (Name {namespace = "WebKit2", name = "URIRequest"})
    IO ()

-- | Requests loading of the specified t'GI.WebKit2.Objects.URIRequest.URIRequest'.
-- You can monitor the load operation by connecting to
-- [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") signal.
webViewLoadRequest ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, WebKit2.URIRequest.IsURIRequest b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@request@/: a t'GI.WebKit2.Objects.URIRequest.URIRequest' to load
    -> m ()
webViewLoadRequest :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsURIRequest b) =>
a -> b -> m ()
webViewLoadRequest a
webView b
request = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr URIRequest
request' <- b -> IO (Ptr URIRequest)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
request
    Ptr WebView -> Ptr URIRequest -> IO ()
webkit_web_view_load_request Ptr WebView
webView' Ptr URIRequest
request'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
request
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewLoadRequestMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWebView a, WebKit2.URIRequest.IsURIRequest b) => O.OverloadedMethod WebViewLoadRequestMethodInfo a signature where
    overloadedMethod = webViewLoadRequest

instance O.OverloadedMethodInfo WebViewLoadRequestMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewLoadRequest",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewLoadRequest"
        }


#endif

-- method WebView::load_uri
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "uri"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an URI string" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_load_uri" webkit_web_view_load_uri :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- uri : TBasicType TUTF8
    IO ()

-- | Requests loading of the specified URI string.
-- You can monitor the load operation by connecting to
-- [loadChanged]("GI.WebKit2.Objects.WebView#g:signal:loadChanged") signal.
webViewLoadUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@uri@/: an URI string
    -> m ()
webViewLoadUri :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Text -> m ()
webViewLoadUri a
webView Text
uri = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
uri' <- Text -> IO CString
textToCString Text
uri
    Ptr WebView -> CString -> IO ()
webkit_web_view_load_uri Ptr WebView
webView' CString
uri'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewLoadUriMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewLoadUriMethodInfo a signature where
    overloadedMethod = webViewLoadUri

instance O.OverloadedMethodInfo WebViewLoadUriMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewLoadUri",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewLoadUri"
        }


#endif

-- method WebView::reload
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_reload" webkit_web_view_reload :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO ()

-- | Reloads the current contents of /@webView@/.
-- See also 'GI.WebKit2.Objects.WebView.webViewReloadBypassCache'.
webViewReload ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m ()
webViewReload :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m ()
webViewReload a
webView = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebView -> IO ()
webkit_web_view_reload Ptr WebView
webView'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewReloadMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewReloadMethodInfo a signature where
    overloadedMethod = webViewReload

instance O.OverloadedMethodInfo WebViewReloadMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewReload",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewReload"
        }


#endif

-- method WebView::reload_bypass_cache
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_reload_bypass_cache" webkit_web_view_reload_bypass_cache :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO ()

-- | Reloads the current contents of /@webView@/ without
-- using any cached data.
webViewReloadBypassCache ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m ()
webViewReloadBypassCache :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m ()
webViewReloadBypassCache a
webView = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebView -> IO ()
webkit_web_view_reload_bypass_cache Ptr WebView
webView'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewReloadBypassCacheMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewReloadBypassCacheMethodInfo a signature where
    overloadedMethod = webViewReloadBypassCache

instance O.OverloadedMethodInfo WebViewReloadBypassCacheMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewReloadBypassCache",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewReloadBypassCache"
        }


#endif

-- method WebView::restore_session_state
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType =
--               TInterface
--                 Name { namespace = "WebKit2" , name = "WebViewSessionState" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebViewSessionState"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_restore_session_state" webkit_web_view_restore_session_state :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr WebKit2.WebViewSessionState.WebViewSessionState -> -- state : TInterface (Name {namespace = "WebKit2", name = "WebViewSessionState"})
    IO ()

-- | Restore the /@webView@/ session state from /@state@/
-- 
-- /Since: 2.12/
webViewRestoreSessionState ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> WebKit2.WebViewSessionState.WebViewSessionState
    -- ^ /@state@/: a t'GI.WebKit2.Structs.WebViewSessionState.WebViewSessionState'
    -> m ()
webViewRestoreSessionState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> WebViewSessionState -> m ()
webViewRestoreSessionState a
webView WebViewSessionState
state = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebViewSessionState
state' <- WebViewSessionState -> IO (Ptr WebViewSessionState)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr WebViewSessionState
state
    Ptr WebView -> Ptr WebViewSessionState -> IO ()
webkit_web_view_restore_session_state Ptr WebView
webView' Ptr WebViewSessionState
state'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    WebViewSessionState -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr WebViewSessionState
state
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewRestoreSessionStateMethodInfo
instance (signature ~ (WebKit2.WebViewSessionState.WebViewSessionState -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewRestoreSessionStateMethodInfo a signature where
    overloadedMethod = webViewRestoreSessionState

instance O.OverloadedMethodInfo WebViewRestoreSessionStateMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewRestoreSessionState",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewRestoreSessionState"
        }


#endif

-- method WebView::run_javascript
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the script to run" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable or %NULL to ignore"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GAsyncReadyCallback to call when the script finished"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the data to pass to callback function"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_run_javascript" webkit_web_view_run_javascript :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- script : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously run /@script@/ in the context of the current page in /@webView@/. If
-- WebKitSettings:enable-javascript is FALSE, this method will do nothing.
-- 
-- When the operation is finished, /@callback@/ will be called. You can then call
-- 'GI.WebKit2.Objects.WebView.webViewRunJavascriptFinish' to get the result of the operation.
webViewRunJavascript ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@script@/: the script to run
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing' to ignore
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a t'GI.Gio.Callbacks.AsyncReadyCallback' to call when the script finished
    -> m ()
webViewRunJavascript :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsCancellable b) =>
a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
webViewRunJavascript a
webView Text
script Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
script' <- Text -> IO CString
textToCString Text
script
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr WebView
-> CString
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_web_view_run_javascript Ptr WebView
webView' CString
script' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
script'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewRunJavascriptMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod WebViewRunJavascriptMethodInfo a signature where
    overloadedMethod = webViewRunJavascript

instance O.OverloadedMethodInfo WebViewRunJavascriptMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewRunJavascript",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewRunJavascript"
        }


#endif

-- method WebView::run_javascript_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GAsyncResult" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "JavascriptResult" })
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_run_javascript_finish" webkit_web_view_run_javascript_finish :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr WebKit2.JavascriptResult.JavascriptResult)

-- | Finish an asynchronous operation started with 'GI.WebKit2.Objects.WebView.webViewRunJavascript'.
-- 
-- This is an example of using 'GI.WebKit2.Objects.WebView.webViewRunJavascript' with a script returning
-- a string:
-- 
-- \<informalexample>\<programlisting>
-- static void
-- web_view_javascript_finished (GObject      *object,
--                               GAsyncResult *result,
--                               gpointer      user_data)
-- {
--     WebKitJavascriptResult *js_result;
--     JSCValue               *value;
--     GError                 *error = NULL;
-- 
--     js_result = webkit_web_view_run_javascript_finish (WEBKIT_WEB_VIEW (object), result, &error);
--     if (!js_result) {
--         g_warning (\"Error running javascript: @/s/@\", error->message);
--         g_error_free (error);
--         return;
--     }
-- 
--     value = webkit_javascript_result_get_js_value (js_result);
--     if (jsc_value_is_string (value)) {
--         JSCException *exception;
--         gchar        *str_value;
-- 
--         str_value = jsc_value_to_string (value);
--         exception = jsc_context_get_exception (jsc_value_get_context (value));
--         if (exception)
--             g_warning (\"Error running javascript: @/s/@\", jsc_exception_get_message (exception));
--         else
--             g_print (\"Script result: @/s/@\\n\", str_value);
--         g_free (str_value);
--     } else {
--         g_warning (\"Error running javascript: unexpected return value\");
--     }
--     webkit_javascript_result_unref (js_result);
-- }
-- 
-- static void
-- web_view_get_link_url (WebKitWebView *web_view,
--                        const gchar   *link_id)
-- {
--     gchar *script;
-- 
--     script = g_strdup_printf (\"window.document.getElementById(\'@/s/@\').href;\", link_id);
--     webkit_web_view_run_javascript (web_view, script, NULL, web_view_javascript_finished, NULL);
--     g_free (script);
-- }
-- \<\/programlisting>\<\/informalexample>
webViewRunJavascriptFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@result@/: a t'GI.Gio.Interfaces.AsyncResult.AsyncResult'
    -> m WebKit2.JavascriptResult.JavascriptResult
    -- ^ __Returns:__ a t'GI.WebKit2.Structs.JavascriptResult.JavascriptResult' with the result of the last executed statement in /@script@/
    --    or 'P.Nothing' in case of error /(Can throw 'Data.GI.Base.GError.GError')/
webViewRunJavascriptFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsAsyncResult b) =>
a -> b -> m JavascriptResult
webViewRunJavascriptFinish a
webView b
result_ = IO JavascriptResult -> m JavascriptResult
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO JavascriptResult -> m JavascriptResult)
-> IO JavascriptResult -> m JavascriptResult
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO JavascriptResult -> IO () -> IO JavascriptResult
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr JavascriptResult
result <- (Ptr (Ptr GError) -> IO (Ptr JavascriptResult))
-> IO (Ptr JavascriptResult)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr JavascriptResult))
 -> IO (Ptr JavascriptResult))
-> (Ptr (Ptr GError) -> IO (Ptr JavascriptResult))
-> IO (Ptr JavascriptResult)
forall a b. (a -> b) -> a -> b
$ Ptr WebView
-> Ptr AsyncResult -> Ptr (Ptr GError) -> IO (Ptr JavascriptResult)
webkit_web_view_run_javascript_finish Ptr WebView
webView' Ptr AsyncResult
result_'
        Text -> Ptr JavascriptResult -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewRunJavascriptFinish" Ptr JavascriptResult
result
        JavascriptResult
result' <- ((ManagedPtr JavascriptResult -> JavascriptResult)
-> Ptr JavascriptResult -> IO JavascriptResult
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr JavascriptResult -> JavascriptResult
WebKit2.JavascriptResult.JavascriptResult) Ptr JavascriptResult
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        JavascriptResult -> IO JavascriptResult
forall (m :: * -> *) a. Monad m => a -> m a
return JavascriptResult
result'
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data WebViewRunJavascriptFinishMethodInfo
instance (signature ~ (b -> m WebKit2.JavascriptResult.JavascriptResult), MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod WebViewRunJavascriptFinishMethodInfo a signature where
    overloadedMethod = webViewRunJavascriptFinish

instance O.OverloadedMethodInfo WebViewRunJavascriptFinishMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewRunJavascriptFinish",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewRunJavascriptFinish"
        }


#endif

-- method WebView::run_javascript_from_gresource
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "resource"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the location of the resource to load"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable or %NULL to ignore"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GAsyncReadyCallback to call when the script finished"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the data to pass to callback function"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_run_javascript_from_gresource" webkit_web_view_run_javascript_from_gresource :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- resource : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously run the script from /@resource@/ in the context of the
-- current page in /@webView@/.
-- 
-- When the operation is finished, /@callback@/ will be called. You can
-- then call 'GI.WebKit2.Objects.WebView.webViewRunJavascriptFromGresourceFinish' to get the result
-- of the operation.
webViewRunJavascriptFromGresource ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@resource@/: the location of the resource to load
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing' to ignore
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a t'GI.Gio.Callbacks.AsyncReadyCallback' to call when the script finished
    -> m ()
webViewRunJavascriptFromGresource :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsCancellable b) =>
a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
webViewRunJavascriptFromGresource a
webView Text
resource Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
resource' <- Text -> IO CString
textToCString Text
resource
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr WebView
-> CString
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_web_view_run_javascript_from_gresource Ptr WebView
webView' CString
resource' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
resource'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewRunJavascriptFromGresourceMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod WebViewRunJavascriptFromGresourceMethodInfo a signature where
    overloadedMethod = webViewRunJavascriptFromGresource

instance O.OverloadedMethodInfo WebViewRunJavascriptFromGresourceMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewRunJavascriptFromGresource",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewRunJavascriptFromGresource"
        }


#endif

-- method WebView::run_javascript_from_gresource_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GAsyncResult" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "JavascriptResult" })
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_run_javascript_from_gresource_finish" webkit_web_view_run_javascript_from_gresource_finish :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr WebKit2.JavascriptResult.JavascriptResult)

-- | Finish an asynchronous operation started with 'GI.WebKit2.Objects.WebView.webViewRunJavascriptFromGresource'.
-- 
-- Check 'GI.WebKit2.Objects.WebView.webViewRunJavascriptFinish' for a usage example.
webViewRunJavascriptFromGresourceFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@result@/: a t'GI.Gio.Interfaces.AsyncResult.AsyncResult'
    -> m WebKit2.JavascriptResult.JavascriptResult
    -- ^ __Returns:__ a t'GI.WebKit2.Structs.JavascriptResult.JavascriptResult' with the result of the last executed statement in /@script@/
    --    or 'P.Nothing' in case of error /(Can throw 'Data.GI.Base.GError.GError')/
webViewRunJavascriptFromGresourceFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsAsyncResult b) =>
a -> b -> m JavascriptResult
webViewRunJavascriptFromGresourceFinish a
webView b
result_ = IO JavascriptResult -> m JavascriptResult
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO JavascriptResult -> m JavascriptResult)
-> IO JavascriptResult -> m JavascriptResult
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO JavascriptResult -> IO () -> IO JavascriptResult
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr JavascriptResult
result <- (Ptr (Ptr GError) -> IO (Ptr JavascriptResult))
-> IO (Ptr JavascriptResult)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr JavascriptResult))
 -> IO (Ptr JavascriptResult))
-> (Ptr (Ptr GError) -> IO (Ptr JavascriptResult))
-> IO (Ptr JavascriptResult)
forall a b. (a -> b) -> a -> b
$ Ptr WebView
-> Ptr AsyncResult -> Ptr (Ptr GError) -> IO (Ptr JavascriptResult)
webkit_web_view_run_javascript_from_gresource_finish Ptr WebView
webView' Ptr AsyncResult
result_'
        Text -> Ptr JavascriptResult -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewRunJavascriptFromGresourceFinish" Ptr JavascriptResult
result
        JavascriptResult
result' <- ((ManagedPtr JavascriptResult -> JavascriptResult)
-> Ptr JavascriptResult -> IO JavascriptResult
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr JavascriptResult -> JavascriptResult
WebKit2.JavascriptResult.JavascriptResult) Ptr JavascriptResult
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        JavascriptResult -> IO JavascriptResult
forall (m :: * -> *) a. Monad m => a -> m a
return JavascriptResult
result'
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data WebViewRunJavascriptFromGresourceFinishMethodInfo
instance (signature ~ (b -> m WebKit2.JavascriptResult.JavascriptResult), MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod WebViewRunJavascriptFromGresourceFinishMethodInfo a signature where
    overloadedMethod = webViewRunJavascriptFromGresourceFinish

instance O.OverloadedMethodInfo WebViewRunJavascriptFromGresourceFinishMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewRunJavascriptFromGresourceFinish",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewRunJavascriptFromGresourceFinish"
        }


#endif

-- method WebView::run_javascript_in_world
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "script"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the script to run" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "world_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of a #WebKitScriptWorld"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable or %NULL to ignore"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GAsyncReadyCallback to call when the script finished"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 5
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the data to pass to callback function"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_run_javascript_in_world" webkit_web_view_run_javascript_in_world :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- script : TBasicType TUTF8
    CString ->                              -- world_name : TBasicType TUTF8
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously run /@script@/ in the script world with name /@worldName@/ of the current page context in /@webView@/.
-- If WebKitSettings:enable-javascript is FALSE, this method will do nothing.
-- 
-- When the operation is finished, /@callback@/ will be called. You can then call
-- 'GI.WebKit2.Objects.WebView.webViewRunJavascriptInWorldFinish' to get the result of the operation.
-- 
-- /Since: 2.22/
webViewRunJavascriptInWorld ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> T.Text
    -- ^ /@script@/: the script to run
    -> T.Text
    -- ^ /@worldName@/: the name of a @/WebKitScriptWorld/@
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing' to ignore
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a t'GI.Gio.Callbacks.AsyncReadyCallback' to call when the script finished
    -> m ()
webViewRunJavascriptInWorld :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsCancellable b) =>
a -> Text -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
webViewRunJavascriptInWorld a
webView Text
script Text
worldName Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
script' <- Text -> IO CString
textToCString Text
script
    CString
worldName' <- Text -> IO CString
textToCString Text
worldName
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr WebView
-> CString
-> CString
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_web_view_run_javascript_in_world Ptr WebView
webView' CString
script' CString
worldName' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
script'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
worldName'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewRunJavascriptInWorldMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod WebViewRunJavascriptInWorldMethodInfo a signature where
    overloadedMethod = webViewRunJavascriptInWorld

instance O.OverloadedMethodInfo WebViewRunJavascriptInWorldMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewRunJavascriptInWorld",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewRunJavascriptInWorld"
        }


#endif

-- method WebView::run_javascript_in_world_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GAsyncResult" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "JavascriptResult" })
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_run_javascript_in_world_finish" webkit_web_view_run_javascript_in_world_finish :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr WebKit2.JavascriptResult.JavascriptResult)

-- | Finish an asynchronous operation started with 'GI.WebKit2.Objects.WebView.webViewRunJavascriptInWorld'.
-- 
-- /Since: 2.22/
webViewRunJavascriptInWorldFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@result@/: a t'GI.Gio.Interfaces.AsyncResult.AsyncResult'
    -> m WebKit2.JavascriptResult.JavascriptResult
    -- ^ __Returns:__ a t'GI.WebKit2.Structs.JavascriptResult.JavascriptResult' with the result of the last executed statement in /@script@/
    --    or 'P.Nothing' in case of error /(Can throw 'Data.GI.Base.GError.GError')/
webViewRunJavascriptInWorldFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsAsyncResult b) =>
a -> b -> m JavascriptResult
webViewRunJavascriptInWorldFinish a
webView b
result_ = IO JavascriptResult -> m JavascriptResult
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO JavascriptResult -> m JavascriptResult)
-> IO JavascriptResult -> m JavascriptResult
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO JavascriptResult -> IO () -> IO JavascriptResult
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr JavascriptResult
result <- (Ptr (Ptr GError) -> IO (Ptr JavascriptResult))
-> IO (Ptr JavascriptResult)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr JavascriptResult))
 -> IO (Ptr JavascriptResult))
-> (Ptr (Ptr GError) -> IO (Ptr JavascriptResult))
-> IO (Ptr JavascriptResult)
forall a b. (a -> b) -> a -> b
$ Ptr WebView
-> Ptr AsyncResult -> Ptr (Ptr GError) -> IO (Ptr JavascriptResult)
webkit_web_view_run_javascript_in_world_finish Ptr WebView
webView' Ptr AsyncResult
result_'
        Text -> Ptr JavascriptResult -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewRunJavascriptInWorldFinish" Ptr JavascriptResult
result
        JavascriptResult
result' <- ((ManagedPtr JavascriptResult -> JavascriptResult)
-> Ptr JavascriptResult -> IO JavascriptResult
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr JavascriptResult -> JavascriptResult
WebKit2.JavascriptResult.JavascriptResult) Ptr JavascriptResult
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        JavascriptResult -> IO JavascriptResult
forall (m :: * -> *) a. Monad m => a -> m a
return JavascriptResult
result'
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data WebViewRunJavascriptInWorldFinishMethodInfo
instance (signature ~ (b -> m WebKit2.JavascriptResult.JavascriptResult), MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod WebViewRunJavascriptInWorldFinishMethodInfo a signature where
    overloadedMethod = webViewRunJavascriptInWorldFinish

instance O.OverloadedMethodInfo WebViewRunJavascriptInWorldFinishMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewRunJavascriptInWorldFinish",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewRunJavascriptInWorldFinish"
        }


#endif

-- method WebView::save
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "save_mode"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "SaveMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the #WebKitSaveMode specifying how the web page should be saved."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable or %NULL to ignore"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GAsyncReadyCallback to call when the request is satisfied"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the data to pass to callback function"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_save" webkit_web_view_save :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CUInt ->                                -- save_mode : TInterface (Name {namespace = "WebKit2", name = "SaveMode"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously save the current web page associated to the
-- t'GI.WebKit2.Objects.WebView.WebView' into a self-contained format using the mode
-- specified in /@saveMode@/.
-- 
-- When the operation is finished, /@callback@/ will be called. You can
-- then call 'GI.WebKit2.Objects.WebView.webViewSaveFinish' to get the result of the
-- operation.
webViewSave ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> WebKit2.Enums.SaveMode
    -- ^ /@saveMode@/: the t'GI.WebKit2.Enums.SaveMode' specifying how the web page should be saved.
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing' to ignore
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a t'GI.Gio.Callbacks.AsyncReadyCallback' to call when the request is satisfied
    -> m ()
webViewSave :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsCancellable b) =>
a -> SaveMode -> Maybe b -> Maybe AsyncReadyCallback -> m ()
webViewSave a
webView SaveMode
saveMode Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    let saveMode' :: CUInt
saveMode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (SaveMode -> Int) -> SaveMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SaveMode -> Int
forall a. Enum a => a -> Int
fromEnum) SaveMode
saveMode
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr WebView
-> CUInt
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_web_view_save Ptr WebView
webView' CUInt
saveMode' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewSaveMethodInfo
instance (signature ~ (WebKit2.Enums.SaveMode -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsWebView a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod WebViewSaveMethodInfo a signature where
    overloadedMethod = webViewSave

instance O.OverloadedMethodInfo WebViewSaveMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSave",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSave"
        }


#endif

-- method WebView::save_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GAsyncResult" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gio" , name = "InputStream" })
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_save_finish" webkit_web_view_save_finish :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Gio.InputStream.InputStream)

-- | Finish an asynchronous operation started with 'GI.WebKit2.Objects.WebView.webViewSave'.
webViewSaveFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@result@/: a t'GI.Gio.Interfaces.AsyncResult.AsyncResult'
    -> m Gio.InputStream.InputStream
    -- ^ __Returns:__ a t'GI.Gio.Objects.InputStream.InputStream' with the result of saving
    --    the current web page or 'P.Nothing' in case of error. /(Can throw 'Data.GI.Base.GError.GError')/
webViewSaveFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsAsyncResult b) =>
a -> b -> m InputStream
webViewSaveFinish a
webView b
result_ = IO InputStream -> m InputStream
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO InputStream -> m InputStream)
-> IO InputStream -> m InputStream
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO InputStream -> IO () -> IO InputStream
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr InputStream
result <- (Ptr (Ptr GError) -> IO (Ptr InputStream)) -> IO (Ptr InputStream)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr InputStream))
 -> IO (Ptr InputStream))
-> (Ptr (Ptr GError) -> IO (Ptr InputStream))
-> IO (Ptr InputStream)
forall a b. (a -> b) -> a -> b
$ Ptr WebView
-> Ptr AsyncResult -> Ptr (Ptr GError) -> IO (Ptr InputStream)
webkit_web_view_save_finish Ptr WebView
webView' Ptr AsyncResult
result_'
        Text -> Ptr InputStream -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewSaveFinish" Ptr InputStream
result
        InputStream
result' <- ((ManagedPtr InputStream -> InputStream)
-> Ptr InputStream -> IO InputStream
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr InputStream -> InputStream
Gio.InputStream.InputStream) Ptr InputStream
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        InputStream -> IO InputStream
forall (m :: * -> *) a. Monad m => a -> m a
return InputStream
result'
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data WebViewSaveFinishMethodInfo
instance (signature ~ (b -> m Gio.InputStream.InputStream), MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod WebViewSaveFinishMethodInfo a signature where
    overloadedMethod = webViewSaveFinish

instance O.OverloadedMethodInfo WebViewSaveFinishMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSaveFinish",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSaveFinish"
        }


#endif

-- method WebView::save_to_file
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "file"
--           , argType = TInterface Name { namespace = "Gio" , name = "File" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the #GFile where the current web page should be saved to."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "save_mode"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "SaveMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the #WebKitSaveMode specifying how the web page should be saved."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable or %NULL to ignore"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GAsyncReadyCallback to call when the request is satisfied"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 5
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the data to pass to callback function"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_save_to_file" webkit_web_view_save_to_file :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gio.File.File ->                    -- file : TInterface (Name {namespace = "Gio", name = "File"})
    CUInt ->                                -- save_mode : TInterface (Name {namespace = "WebKit2", name = "SaveMode"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously save the current web page associated to the
-- t'GI.WebKit2.Objects.WebView.WebView' into a self-contained format using the mode
-- specified in /@saveMode@/ and writing it to /@file@/.
-- 
-- When the operation is finished, /@callback@/ will be called. You can
-- then call 'GI.WebKit2.Objects.WebView.webViewSaveToFileFinish' to get the result of the
-- operation.
webViewSaveToFile ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@file@/: the t'GI.Gio.Interfaces.File.File' where the current web page should be saved to.
    -> WebKit2.Enums.SaveMode
    -- ^ /@saveMode@/: the t'GI.WebKit2.Enums.SaveMode' specifying how the web page should be saved.
    -> Maybe (c)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing' to ignore
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a t'GI.Gio.Callbacks.AsyncReadyCallback' to call when the request is satisfied
    -> m ()
webViewSaveToFile :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsWebView a, IsFile b,
 IsCancellable c) =>
a -> b -> SaveMode -> Maybe c -> Maybe AsyncReadyCallback -> m ()
webViewSaveToFile a
webView b
file SaveMode
saveMode Maybe c
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr File
file' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
file
    let saveMode' :: CUInt
saveMode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (SaveMode -> Int) -> SaveMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SaveMode -> Int
forall a. Enum a => a -> Int
fromEnum) SaveMode
saveMode
    Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
        Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just c
jCancellable -> do
            Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr WebView
-> Ptr File
-> CUInt
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_web_view_save_to_file Ptr WebView
webView' Ptr File
file' CUInt
saveMode' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
file
    Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewSaveToFileMethodInfo
instance (signature ~ (b -> WebKit2.Enums.SaveMode -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsWebView a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod WebViewSaveToFileMethodInfo a signature where
    overloadedMethod = webViewSaveToFile

instance O.OverloadedMethodInfo WebViewSaveToFileMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSaveToFile",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSaveToFile"
        }


#endif

-- method WebView::save_to_file_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GAsyncResult" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_save_to_file_finish" webkit_web_view_save_to_file_finish :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Finish an asynchronous operation started with 'GI.WebKit2.Objects.WebView.webViewSaveToFile'.
webViewSaveToFileFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@result@/: a t'GI.Gio.Interfaces.AsyncResult.AsyncResult'
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
webViewSaveToFileFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsAsyncResult b) =>
a -> b -> m ()
webViewSaveToFileFinish a
webView b
result_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr WebView -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
webkit_web_view_save_to_file_finish Ptr WebView
webView' Ptr AsyncResult
result_'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data WebViewSaveToFileFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod WebViewSaveToFileFinishMethodInfo a signature where
    overloadedMethod = webViewSaveToFileFinish

instance O.OverloadedMethodInfo WebViewSaveToFileFinishMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSaveToFileFinish",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSaveToFileFinish"
        }


#endif

-- method WebView::send_message_to_page
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "message"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "UserMessage" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitUserMessage"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable or %NULL to ignore"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "(nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the data to pass to callback function"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_send_message_to_page" webkit_web_view_send_message_to_page :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr WebKit2.UserMessage.UserMessage ->  -- message : TInterface (Name {namespace = "WebKit2", name = "UserMessage"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Send /@message@/ to the @/WebKitWebPage/@ corresponding to /@webView@/. If /@message@/ is floating, it\'s consumed.
-- 
-- If you don\'t expect any reply, or you simply want to ignore it, you can pass 'P.Nothing' as /@callback@/.
-- When the operation is finished, /@callback@/ will be called. You can then call
-- 'GI.WebKit2.Objects.WebView.webViewSendMessageToPageFinish' to get the message reply.
-- 
-- /Since: 2.28/
webViewSendMessageToPage ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, WebKit2.UserMessage.IsUserMessage b, Gio.Cancellable.IsCancellable c) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@message@/: a t'GI.WebKit2.Objects.UserMessage.UserMessage'
    -> Maybe (c)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing' to ignore
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: (nullable): A t'GI.Gio.Callbacks.AsyncReadyCallback' to call when the request is satisfied or 'P.Nothing'
    -> m ()
webViewSendMessageToPage :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsWebView a, IsUserMessage b,
 IsCancellable c) =>
a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
webViewSendMessageToPage a
webView b
message Maybe c
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr UserMessage
message' <- b -> IO (Ptr UserMessage)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
message
    Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
        Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just c
jCancellable -> do
            Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr WebView
-> Ptr UserMessage
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_web_view_send_message_to_page Ptr WebView
webView' Ptr UserMessage
message' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
message
    Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewSendMessageToPageMethodInfo
instance (signature ~ (b -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsWebView a, WebKit2.UserMessage.IsUserMessage b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod WebViewSendMessageToPageMethodInfo a signature where
    overloadedMethod = webViewSendMessageToPage

instance O.OverloadedMethodInfo WebViewSendMessageToPageMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSendMessageToPage",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSendMessageToPage"
        }


#endif

-- method WebView::send_message_to_page_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GAsyncResult" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "WebKit2" , name = "UserMessage" })
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_send_message_to_page_finish" webkit_web_view_send_message_to_page_finish :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr WebKit2.UserMessage.UserMessage)

-- | Finish an asynchronous operation started with 'GI.WebKit2.Objects.WebView.webViewSendMessageToPage'.
-- 
-- /Since: 2.28/
webViewSendMessageToPageFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@result@/: a t'GI.Gio.Interfaces.AsyncResult.AsyncResult'
    -> m WebKit2.UserMessage.UserMessage
    -- ^ __Returns:__ a t'GI.WebKit2.Objects.UserMessage.UserMessage' with the reply or 'P.Nothing' in case of error. /(Can throw 'Data.GI.Base.GError.GError')/
webViewSendMessageToPageFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsAsyncResult b) =>
a -> b -> m UserMessage
webViewSendMessageToPageFinish a
webView b
result_ = IO UserMessage -> m UserMessage
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UserMessage -> m UserMessage)
-> IO UserMessage -> m UserMessage
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO UserMessage -> IO () -> IO UserMessage
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr UserMessage
result <- (Ptr (Ptr GError) -> IO (Ptr UserMessage)) -> IO (Ptr UserMessage)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr UserMessage))
 -> IO (Ptr UserMessage))
-> (Ptr (Ptr GError) -> IO (Ptr UserMessage))
-> IO (Ptr UserMessage)
forall a b. (a -> b) -> a -> b
$ Ptr WebView
-> Ptr AsyncResult -> Ptr (Ptr GError) -> IO (Ptr UserMessage)
webkit_web_view_send_message_to_page_finish Ptr WebView
webView' Ptr AsyncResult
result_'
        Text -> Ptr UserMessage -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webViewSendMessageToPageFinish" Ptr UserMessage
result
        UserMessage
result' <- ((ManagedPtr UserMessage -> UserMessage)
-> Ptr UserMessage -> IO UserMessage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr UserMessage -> UserMessage
WebKit2.UserMessage.UserMessage) Ptr UserMessage
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        UserMessage -> IO UserMessage
forall (m :: * -> *) a. Monad m => a -> m a
return UserMessage
result'
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data WebViewSendMessageToPageFinishMethodInfo
instance (signature ~ (b -> m WebKit2.UserMessage.UserMessage), MonadIO m, IsWebView a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod WebViewSendMessageToPageFinishMethodInfo a signature where
    overloadedMethod = webViewSendMessageToPageFinish

instance O.OverloadedMethodInfo WebViewSendMessageToPageFinishMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSendMessageToPageFinish",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSendMessageToPageFinish"
        }


#endif

-- method WebView::set_background_color
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rgba"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkRGBA" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_set_background_color" webkit_web_view_set_background_color :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr Gdk.RGBA.RGBA ->                    -- rgba : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

-- | Sets the color that will be used to draw the /@webView@/ background before
-- the actual contents are rendered. Note that if the web page loaded in /@webView@/
-- specifies a background color, it will take precedence over the /@rgba@/ color.
-- By default the /@webView@/ background color is opaque white.
-- Note that the parent window must have a RGBA visual and
-- t'GI.Gtk.Objects.Widget.Widget':@/app-paintable/@ property set to 'P.True' for backgrounds colors to work.
-- 
-- \<informalexample>\<programlisting>
-- static void browser_window_set_background_color (BrowserWindow *window,
--                                                  const GdkRGBA *rgba)
-- {
--     WebKitWebView *web_view;
--     GdkScreen *screen = gtk_window_get_screen (GTK_WINDOW (window));
--     GdkVisual *rgba_visual = gdk_screen_get_rgba_visual (screen);
-- 
--     if (!rgba_visual)
--          return;
-- 
--     gtk_widget_set_visual (GTK_WIDGET (window), rgba_visual);
--     gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
-- 
--     web_view = browser_window_get_web_view (window);
--     webkit_web_view_set_background_color (web_view, rgba);
-- }
-- \<\/programlisting>\<\/informalexample>
-- 
-- /Since: 2.8/
webViewSetBackgroundColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> Gdk.RGBA.RGBA
    -- ^ /@rgba@/: a t'GI.Gdk.Structs.RGBA.RGBA'
    -> m ()
webViewSetBackgroundColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> RGBA -> m ()
webViewSetBackgroundColor a
webView RGBA
rgba = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr RGBA
rgba' <- RGBA -> IO (Ptr RGBA)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RGBA
rgba
    Ptr WebView -> Ptr RGBA -> IO ()
webkit_web_view_set_background_color Ptr WebView
webView' Ptr RGBA
rgba'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    RGBA -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RGBA
rgba
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewSetBackgroundColorMethodInfo
instance (signature ~ (Gdk.RGBA.RGBA -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewSetBackgroundColorMethodInfo a signature where
    overloadedMethod = webViewSetBackgroundColor

instance O.OverloadedMethodInfo WebViewSetBackgroundColorMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSetBackgroundColor",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSetBackgroundColor"
        }


#endif

-- method WebView::set_custom_charset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "charset"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a character encoding name or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_set_custom_charset" webkit_web_view_set_custom_charset :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CString ->                              -- charset : TBasicType TUTF8
    IO ()

-- | Sets the current custom character encoding override of /@webView@/. The custom
-- character encoding will override any text encoding detected via HTTP headers or
-- META tags. Calling this method will stop any current load operation and reload the
-- current page. Setting the custom character encoding to 'P.Nothing' removes the character
-- encoding override.
webViewSetCustomCharset ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> Maybe (T.Text)
    -- ^ /@charset@/: a character encoding name or 'P.Nothing'
    -> m ()
webViewSetCustomCharset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Maybe Text -> m ()
webViewSetCustomCharset a
webView Maybe Text
charset = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    CString
maybeCharset <- case Maybe Text
charset of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jCharset -> do
            CString
jCharset' <- Text -> IO CString
textToCString Text
jCharset
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jCharset'
    Ptr WebView -> CString -> IO ()
webkit_web_view_set_custom_charset Ptr WebView
webView' CString
maybeCharset
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeCharset
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewSetCustomCharsetMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewSetCustomCharsetMethodInfo a signature where
    overloadedMethod = webViewSetCustomCharset

instance O.OverloadedMethodInfo WebViewSetCustomCharsetMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSetCustomCharset",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSetCustomCharset"
        }


#endif

-- method WebView::set_editable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "editable"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #gboolean indicating the editable state"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_set_editable" webkit_web_view_set_editable :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CInt ->                                 -- editable : TBasicType TBoolean
    IO ()

-- | Sets whether the user is allowed to edit the HTML document.
-- 
-- If /@editable@/ is 'P.True', /@webView@/ allows the user to edit the HTML document. If
-- /@editable@/ is 'P.False', an element in /@webView@/\'s document can only be edited if the
-- CONTENTEDITABLE attribute has been set on the element or one of its parent
-- elements. By default a t'GI.WebKit2.Objects.WebView.WebView' is not editable.
-- 
-- Normally, a HTML document is not editable unless the elements within the
-- document are editable. This function provides a way to make the contents
-- of a t'GI.WebKit2.Objects.WebView.WebView' editable without altering the document or DOM structure.
-- 
-- /Since: 2.8/
webViewSetEditable ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> Bool
    -- ^ /@editable@/: a t'P.Bool' indicating the editable state
    -> m ()
webViewSetEditable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Bool -> m ()
webViewSetEditable a
webView Bool
editable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    let editable' :: CInt
editable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
editable
    Ptr WebView -> CInt -> IO ()
webkit_web_view_set_editable Ptr WebView
webView' CInt
editable'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewSetEditableMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewSetEditableMethodInfo a signature where
    overloadedMethod = webViewSetEditable

instance O.OverloadedMethodInfo WebViewSetEditableMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSetEditable",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSetEditable"
        }


#endif

-- method WebView::set_input_method_context
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "context"
--           , argType =
--               TInterface
--                 Name { namespace = "WebKit2" , name = "InputMethodContext" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the #WebKitInputMethodContext to set, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_set_input_method_context" webkit_web_view_set_input_method_context :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr WebKit2.InputMethodContext.InputMethodContext -> -- context : TInterface (Name {namespace = "WebKit2", name = "InputMethodContext"})
    IO ()

-- | Set the t'GI.WebKit2.Objects.InputMethodContext.InputMethodContext' to be used by /@webView@/, or 'P.Nothing' to not use any input method.
-- Note that the same t'GI.WebKit2.Objects.InputMethodContext.InputMethodContext' can\'t be set on more than one t'GI.WebKit2.Objects.WebView.WebView' at the same time.
-- 
-- /Since: 2.28/
webViewSetInputMethodContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, WebKit2.InputMethodContext.IsInputMethodContext b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> Maybe (b)
    -- ^ /@context@/: the t'GI.WebKit2.Objects.InputMethodContext.InputMethodContext' to set, or 'P.Nothing'
    -> m ()
webViewSetInputMethodContext :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsInputMethodContext b) =>
a -> Maybe b -> m ()
webViewSetInputMethodContext a
webView Maybe b
context = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr InputMethodContext
maybeContext <- case Maybe b
context of
        Maybe b
Nothing -> Ptr InputMethodContext -> IO (Ptr InputMethodContext)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr InputMethodContext
forall a. Ptr a
nullPtr
        Just b
jContext -> do
            Ptr InputMethodContext
jContext' <- b -> IO (Ptr InputMethodContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jContext
            Ptr InputMethodContext -> IO (Ptr InputMethodContext)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr InputMethodContext
jContext'
    Ptr WebView -> Ptr InputMethodContext -> IO ()
webkit_web_view_set_input_method_context Ptr WebView
webView' Ptr InputMethodContext
maybeContext
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
context b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewSetInputMethodContextMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWebView a, WebKit2.InputMethodContext.IsInputMethodContext b) => O.OverloadedMethod WebViewSetInputMethodContextMethodInfo a signature where
    overloadedMethod = webViewSetInputMethodContext

instance O.OverloadedMethodInfo WebViewSetInputMethodContextMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSetInputMethodContext",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSetInputMethodContext"
        }


#endif

-- method WebView::set_is_muted
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "muted"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "mute flag" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_set_is_muted" webkit_web_view_set_is_muted :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CInt ->                                 -- muted : TBasicType TBoolean
    IO ()

-- | Sets the mute state of /@webView@/.
-- 
-- /Since: 2.30/
webViewSetIsMuted ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> Bool
    -- ^ /@muted@/: mute flag
    -> m ()
webViewSetIsMuted :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Bool -> m ()
webViewSetIsMuted a
webView Bool
muted = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    let muted' :: CInt
muted' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
muted
    Ptr WebView -> CInt -> IO ()
webkit_web_view_set_is_muted Ptr WebView
webView' CInt
muted'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewSetIsMutedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewSetIsMutedMethodInfo a signature where
    overloadedMethod = webViewSetIsMuted

instance O.OverloadedMethodInfo WebViewSetIsMutedMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSetIsMuted",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSetIsMuted"
        }


#endif

-- method WebView::set_settings
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "settings"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "Settings" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitSettings" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_set_settings" webkit_web_view_set_settings :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    Ptr WebKit2.Settings.Settings ->        -- settings : TInterface (Name {namespace = "WebKit2", name = "Settings"})
    IO ()

-- | Sets the t'GI.WebKit2.Objects.Settings.Settings' to be applied to /@webView@/. The
-- existing t'GI.WebKit2.Objects.Settings.Settings' of /@webView@/ will be replaced by
-- /@settings@/. New settings are applied immediately on /@webView@/.
-- The same t'GI.WebKit2.Objects.Settings.Settings' object can be shared
-- by multiple t'GI.WebKit2.Objects.WebView.WebView's.
webViewSetSettings ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a, WebKit2.Settings.IsSettings b) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> b
    -- ^ /@settings@/: a t'GI.WebKit2.Objects.Settings.Settings'
    -> m ()
webViewSetSettings :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebView a, IsSettings b) =>
a -> b -> m ()
webViewSetSettings a
webView b
settings = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr Settings
settings' <- b -> IO (Ptr Settings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
settings
    Ptr WebView -> Ptr Settings -> IO ()
webkit_web_view_set_settings Ptr WebView
webView' Ptr Settings
settings'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
settings
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewSetSettingsMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWebView a, WebKit2.Settings.IsSettings b) => O.OverloadedMethod WebViewSetSettingsMethodInfo a signature where
    overloadedMethod = webViewSetSettings

instance O.OverloadedMethodInfo WebViewSetSettingsMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSetSettings",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSetSettings"
        }


#endif

-- method WebView::set_zoom_level
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "zoom_level"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the zoom level" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_set_zoom_level" webkit_web_view_set_zoom_level :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    CDouble ->                              -- zoom_level : TBasicType TDouble
    IO ()

-- | Set the zoom level of /@webView@/, i.e. the factor by which the
-- view contents are scaled with respect to their original size.
webViewSetZoomLevel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> Double
    -- ^ /@zoomLevel@/: the zoom level
    -> m ()
webViewSetZoomLevel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> Double -> m ()
webViewSetZoomLevel a
webView Double
zoomLevel = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    let zoomLevel' :: CDouble
zoomLevel' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
zoomLevel
    Ptr WebView -> CDouble -> IO ()
webkit_web_view_set_zoom_level Ptr WebView
webView' CDouble
zoomLevel'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewSetZoomLevelMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewSetZoomLevelMethodInfo a signature where
    overloadedMethod = webViewSetZoomLevel

instance O.OverloadedMethodInfo WebViewSetZoomLevelMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewSetZoomLevel",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewSetZoomLevel"
        }


#endif

-- method WebView::stop_loading
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_stop_loading" webkit_web_view_stop_loading :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO ()

-- | Stops any ongoing loading operation in /@webView@/.
-- This method does nothing if no content is being loaded.
-- If there is a loading operation in progress, it will be cancelled and
-- [loadFailed]("GI.WebKit2.Objects.WebView#g:signal:loadFailed") signal will be emitted with
-- 'GI.WebKit2.Enums.NetworkErrorCancelled' error.
webViewStopLoading ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m ()
webViewStopLoading :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m ()
webViewStopLoading a
webView = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebView -> IO ()
webkit_web_view_stop_loading Ptr WebView
webView'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewStopLoadingMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewStopLoadingMethodInfo a signature where
    overloadedMethod = webViewStopLoading

instance O.OverloadedMethodInfo WebViewStopLoadingMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewStopLoading",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewStopLoading"
        }


#endif

-- method WebView::try_close
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "web_view"
--           , argType =
--               TInterface Name { namespace = "WebKit2" , name = "WebView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitWebView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_try_close" webkit_web_view_try_close :: 
    Ptr WebView ->                          -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"})
    IO ()

-- | Tries to close the /@webView@/. This will fire the onbeforeunload event
-- to ask the user for confirmation to close the page. If there isn\'t an
-- onbeforeunload event handler or the user confirms to close the page,
-- the [close]("GI.WebKit2.Objects.WebView#g:signal:close") signal is emitted, otherwise nothing happens.
-- 
-- /Since: 2.12/
webViewTryClose ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebView a) =>
    a
    -- ^ /@webView@/: a t'GI.WebKit2.Objects.WebView.WebView'
    -> m ()
webViewTryClose :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebView a) =>
a -> m ()
webViewTryClose a
webView = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr WebView
webView' <- a -> IO (Ptr WebView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webView
    Ptr WebView -> IO ()
webkit_web_view_try_close Ptr WebView
webView'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webView
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WebViewTryCloseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebView a) => O.OverloadedMethod WebViewTryCloseMethodInfo a signature where
    overloadedMethod = webViewTryClose

instance O.OverloadedMethodInfo WebViewTryCloseMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.WebKit2.Objects.WebView.webViewTryClose",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-WebView.html#v:webViewTryClose"
        }


#endif