#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.WebKit2.Enums
(
AuthenticationScheme(..) ,
CacheModel(..) ,
ContextMenuAction(..) ,
CookieAcceptPolicy(..) ,
CookiePersistentStorage(..) ,
CredentialPersistence(..) ,
DownloadError(..) ,
catchDownloadError ,
handleDownloadError ,
FaviconDatabaseError(..) ,
catchFaviconDatabaseError ,
handleFaviconDatabaseError ,
HardwareAccelerationPolicy(..) ,
InsecureContentEvent(..) ,
JavascriptError(..) ,
catchJavascriptError ,
handleJavascriptError ,
LoadEvent(..) ,
NavigationType(..) ,
NetworkError(..) ,
catchNetworkError ,
handleNetworkError ,
NetworkProxyMode(..) ,
PluginError(..) ,
catchPluginError ,
handlePluginError ,
PolicyDecisionType(..) ,
PolicyError(..) ,
catchPolicyError ,
handlePolicyError ,
PrintError(..) ,
catchPrintError ,
handlePrintError ,
PrintOperationResponse(..) ,
ProcessModel(..) ,
SaveMode(..) ,
ScriptDialogType(..) ,
SnapshotError(..) ,
catchSnapshotError ,
handleSnapshotError ,
SnapshotRegion(..) ,
TLSErrorsPolicy(..) ,
UserContentFilterError(..) ,
catchUserContentFilterError ,
handleUserContentFilterError ,
UserContentInjectedFrames(..) ,
UserScriptInjectionTime(..) ,
UserStyleLevel(..) ,
WebProcessTerminationReason(..) ,
) 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.ManagedPtr as B.ManagedPtr
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.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
data WebProcessTerminationReason =
WebProcessTerminationReasonCrashed
| WebProcessTerminationReasonExceededMemoryLimit
| AnotherWebProcessTerminationReason Int
deriving (Show, Eq)
instance P.Enum WebProcessTerminationReason where
fromEnum WebProcessTerminationReasonCrashed = 0
fromEnum WebProcessTerminationReasonExceededMemoryLimit = 1
fromEnum (AnotherWebProcessTerminationReason k) = k
toEnum 0 = WebProcessTerminationReasonCrashed
toEnum 1 = WebProcessTerminationReasonExceededMemoryLimit
toEnum k = AnotherWebProcessTerminationReason k
instance P.Ord WebProcessTerminationReason where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_web_process_termination_reason_get_type" c_webkit_web_process_termination_reason_get_type ::
IO GType
instance BoxedEnum WebProcessTerminationReason where
boxedEnumType _ = c_webkit_web_process_termination_reason_get_type
data UserStyleLevel =
UserStyleLevelUser
| UserStyleLevelAuthor
| AnotherUserStyleLevel Int
deriving (Show, Eq)
instance P.Enum UserStyleLevel where
fromEnum UserStyleLevelUser = 0
fromEnum UserStyleLevelAuthor = 1
fromEnum (AnotherUserStyleLevel k) = k
toEnum 0 = UserStyleLevelUser
toEnum 1 = UserStyleLevelAuthor
toEnum k = AnotherUserStyleLevel k
instance P.Ord UserStyleLevel where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_user_style_level_get_type" c_webkit_user_style_level_get_type ::
IO GType
instance BoxedEnum UserStyleLevel where
boxedEnumType _ = c_webkit_user_style_level_get_type
data UserScriptInjectionTime =
UserScriptInjectionTimeStart
| UserScriptInjectionTimeEnd
| AnotherUserScriptInjectionTime Int
deriving (Show, Eq)
instance P.Enum UserScriptInjectionTime where
fromEnum UserScriptInjectionTimeStart = 0
fromEnum UserScriptInjectionTimeEnd = 1
fromEnum (AnotherUserScriptInjectionTime k) = k
toEnum 0 = UserScriptInjectionTimeStart
toEnum 1 = UserScriptInjectionTimeEnd
toEnum k = AnotherUserScriptInjectionTime k
instance P.Ord UserScriptInjectionTime where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_user_script_injection_time_get_type" c_webkit_user_script_injection_time_get_type ::
IO GType
instance BoxedEnum UserScriptInjectionTime where
boxedEnumType _ = c_webkit_user_script_injection_time_get_type
data UserContentInjectedFrames =
UserContentInjectedFramesAllFrames
| UserContentInjectedFramesTopFrame
| AnotherUserContentInjectedFrames Int
deriving (Show, Eq)
instance P.Enum UserContentInjectedFrames where
fromEnum UserContentInjectedFramesAllFrames = 0
fromEnum UserContentInjectedFramesTopFrame = 1
fromEnum (AnotherUserContentInjectedFrames k) = k
toEnum 0 = UserContentInjectedFramesAllFrames
toEnum 1 = UserContentInjectedFramesTopFrame
toEnum k = AnotherUserContentInjectedFrames k
instance P.Ord UserContentInjectedFrames where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_user_content_injected_frames_get_type" c_webkit_user_content_injected_frames_get_type ::
IO GType
instance BoxedEnum UserContentInjectedFrames where
boxedEnumType _ = c_webkit_user_content_injected_frames_get_type
data UserContentFilterError =
UserContentFilterErrorInvalidSource
| UserContentFilterErrorNotFound
| AnotherUserContentFilterError Int
deriving (Show, Eq)
instance P.Enum UserContentFilterError where
fromEnum UserContentFilterErrorInvalidSource = 0
fromEnum UserContentFilterErrorNotFound = 1
fromEnum (AnotherUserContentFilterError k) = k
toEnum 0 = UserContentFilterErrorInvalidSource
toEnum 1 = UserContentFilterErrorNotFound
toEnum k = AnotherUserContentFilterError k
instance P.Ord UserContentFilterError where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance GErrorClass UserContentFilterError where
gerrorClassDomain _ = "WebKitUserContentFilterError"
catchUserContentFilterError ::
IO a ->
(UserContentFilterError -> GErrorMessage -> IO a) ->
IO a
catchUserContentFilterError = catchGErrorJustDomain
handleUserContentFilterError ::
(UserContentFilterError -> GErrorMessage -> IO a) ->
IO a ->
IO a
handleUserContentFilterError = handleGErrorJustDomain
foreign import ccall "webkit_user_content_filter_error_get_type" c_webkit_user_content_filter_error_get_type ::
IO GType
instance BoxedEnum UserContentFilterError where
boxedEnumType _ = c_webkit_user_content_filter_error_get_type
data TLSErrorsPolicy =
TLSErrorsPolicyIgnore
| TLSErrorsPolicyFail
| AnotherTLSErrorsPolicy Int
deriving (Show, Eq)
instance P.Enum TLSErrorsPolicy where
fromEnum TLSErrorsPolicyIgnore = 0
fromEnum TLSErrorsPolicyFail = 1
fromEnum (AnotherTLSErrorsPolicy k) = k
toEnum 0 = TLSErrorsPolicyIgnore
toEnum 1 = TLSErrorsPolicyFail
toEnum k = AnotherTLSErrorsPolicy k
instance P.Ord TLSErrorsPolicy where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_tls_errors_policy_get_type" c_webkit_tls_errors_policy_get_type ::
IO GType
instance BoxedEnum TLSErrorsPolicy where
boxedEnumType _ = c_webkit_tls_errors_policy_get_type
data SnapshotRegion =
SnapshotRegionVisible
| SnapshotRegionFullDocument
| AnotherSnapshotRegion Int
deriving (Show, Eq)
instance P.Enum SnapshotRegion where
fromEnum SnapshotRegionVisible = 0
fromEnum SnapshotRegionFullDocument = 1
fromEnum (AnotherSnapshotRegion k) = k
toEnum 0 = SnapshotRegionVisible
toEnum 1 = SnapshotRegionFullDocument
toEnum k = AnotherSnapshotRegion k
instance P.Ord SnapshotRegion where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_snapshot_region_get_type" c_webkit_snapshot_region_get_type ::
IO GType
instance BoxedEnum SnapshotRegion where
boxedEnumType _ = c_webkit_snapshot_region_get_type
data SnapshotError =
SnapshotErrorCreate
| AnotherSnapshotError Int
deriving (Show, Eq)
instance P.Enum SnapshotError where
fromEnum SnapshotErrorCreate = 799
fromEnum (AnotherSnapshotError k) = k
toEnum 799 = SnapshotErrorCreate
toEnum k = AnotherSnapshotError k
instance P.Ord SnapshotError where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance GErrorClass SnapshotError where
gerrorClassDomain _ = "WebKitSnapshotError"
catchSnapshotError ::
IO a ->
(SnapshotError -> GErrorMessage -> IO a) ->
IO a
catchSnapshotError = catchGErrorJustDomain
handleSnapshotError ::
(SnapshotError -> GErrorMessage -> IO a) ->
IO a ->
IO a
handleSnapshotError = handleGErrorJustDomain
foreign import ccall "webkit_snapshot_error_get_type" c_webkit_snapshot_error_get_type ::
IO GType
instance BoxedEnum SnapshotError where
boxedEnumType _ = c_webkit_snapshot_error_get_type
data ScriptDialogType =
ScriptDialogTypeAlert
| ScriptDialogTypeConfirm
| ScriptDialogTypePrompt
| ScriptDialogTypeBeforeUnloadConfirm
| AnotherScriptDialogType Int
deriving (Show, Eq)
instance P.Enum ScriptDialogType where
fromEnum ScriptDialogTypeAlert = 0
fromEnum ScriptDialogTypeConfirm = 1
fromEnum ScriptDialogTypePrompt = 2
fromEnum ScriptDialogTypeBeforeUnloadConfirm = 3
fromEnum (AnotherScriptDialogType k) = k
toEnum 0 = ScriptDialogTypeAlert
toEnum 1 = ScriptDialogTypeConfirm
toEnum 2 = ScriptDialogTypePrompt
toEnum 3 = ScriptDialogTypeBeforeUnloadConfirm
toEnum k = AnotherScriptDialogType k
instance P.Ord ScriptDialogType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_script_dialog_type_get_type" c_webkit_script_dialog_type_get_type ::
IO GType
instance BoxedEnum ScriptDialogType where
boxedEnumType _ = c_webkit_script_dialog_type_get_type
data SaveMode =
SaveModeMhtml
| AnotherSaveMode Int
deriving (Show, Eq)
instance P.Enum SaveMode where
fromEnum SaveModeMhtml = 0
fromEnum (AnotherSaveMode k) = k
toEnum 0 = SaveModeMhtml
toEnum k = AnotherSaveMode k
instance P.Ord SaveMode where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_save_mode_get_type" c_webkit_save_mode_get_type ::
IO GType
instance BoxedEnum SaveMode where
boxedEnumType _ = c_webkit_save_mode_get_type
data ProcessModel =
ProcessModelSharedSecondaryProcess
| ProcessModelMultipleSecondaryProcesses
| AnotherProcessModel Int
deriving (Show, Eq)
instance P.Enum ProcessModel where
fromEnum ProcessModelSharedSecondaryProcess = 0
fromEnum ProcessModelMultipleSecondaryProcesses = 1
fromEnum (AnotherProcessModel k) = k
toEnum 0 = ProcessModelSharedSecondaryProcess
toEnum 1 = ProcessModelMultipleSecondaryProcesses
toEnum k = AnotherProcessModel k
instance P.Ord ProcessModel where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_process_model_get_type" c_webkit_process_model_get_type ::
IO GType
instance BoxedEnum ProcessModel where
boxedEnumType _ = c_webkit_process_model_get_type
data PrintOperationResponse =
PrintOperationResponsePrint
| PrintOperationResponseCancel
| AnotherPrintOperationResponse Int
deriving (Show, Eq)
instance P.Enum PrintOperationResponse where
fromEnum PrintOperationResponsePrint = 0
fromEnum PrintOperationResponseCancel = 1
fromEnum (AnotherPrintOperationResponse k) = k
toEnum 0 = PrintOperationResponsePrint
toEnum 1 = PrintOperationResponseCancel
toEnum k = AnotherPrintOperationResponse k
instance P.Ord PrintOperationResponse where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_print_operation_response_get_type" c_webkit_print_operation_response_get_type ::
IO GType
instance BoxedEnum PrintOperationResponse where
boxedEnumType _ = c_webkit_print_operation_response_get_type
data PrintError =
PrintErrorGeneral
| PrintErrorPrinterNotFound
| PrintErrorInvalidPageRange
| AnotherPrintError Int
deriving (Show, Eq)
instance P.Enum PrintError where
fromEnum PrintErrorGeneral = 599
fromEnum PrintErrorPrinterNotFound = 500
fromEnum PrintErrorInvalidPageRange = 501
fromEnum (AnotherPrintError k) = k
toEnum 599 = PrintErrorGeneral
toEnum 500 = PrintErrorPrinterNotFound
toEnum 501 = PrintErrorInvalidPageRange
toEnum k = AnotherPrintError k
instance P.Ord PrintError where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance GErrorClass PrintError where
gerrorClassDomain _ = "WebKitPrintError"
catchPrintError ::
IO a ->
(PrintError -> GErrorMessage -> IO a) ->
IO a
catchPrintError = catchGErrorJustDomain
handlePrintError ::
(PrintError -> GErrorMessage -> IO a) ->
IO a ->
IO a
handlePrintError = handleGErrorJustDomain
foreign import ccall "webkit_print_error_get_type" c_webkit_print_error_get_type ::
IO GType
instance BoxedEnum PrintError where
boxedEnumType _ = c_webkit_print_error_get_type
data PolicyError =
PolicyErrorFailed
| PolicyErrorCannotShowMimeType
| PolicyErrorCannotShowUri
| PolicyErrorFrameLoadInterruptedByPolicyChange
| PolicyErrorCannotUseRestrictedPort
| AnotherPolicyError Int
deriving (Show, Eq)
instance P.Enum PolicyError where
fromEnum PolicyErrorFailed = 199
fromEnum PolicyErrorCannotShowMimeType = 100
fromEnum PolicyErrorCannotShowUri = 101
fromEnum PolicyErrorFrameLoadInterruptedByPolicyChange = 102
fromEnum PolicyErrorCannotUseRestrictedPort = 103
fromEnum (AnotherPolicyError k) = k
toEnum 199 = PolicyErrorFailed
toEnum 100 = PolicyErrorCannotShowMimeType
toEnum 101 = PolicyErrorCannotShowUri
toEnum 102 = PolicyErrorFrameLoadInterruptedByPolicyChange
toEnum 103 = PolicyErrorCannotUseRestrictedPort
toEnum k = AnotherPolicyError k
instance P.Ord PolicyError where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance GErrorClass PolicyError where
gerrorClassDomain _ = "WebKitPolicyError"
catchPolicyError ::
IO a ->
(PolicyError -> GErrorMessage -> IO a) ->
IO a
catchPolicyError = catchGErrorJustDomain
handlePolicyError ::
(PolicyError -> GErrorMessage -> IO a) ->
IO a ->
IO a
handlePolicyError = handleGErrorJustDomain
foreign import ccall "webkit_policy_error_get_type" c_webkit_policy_error_get_type ::
IO GType
instance BoxedEnum PolicyError where
boxedEnumType _ = c_webkit_policy_error_get_type
data PolicyDecisionType =
PolicyDecisionTypeNavigationAction
| PolicyDecisionTypeNewWindowAction
| PolicyDecisionTypeResponse
| AnotherPolicyDecisionType Int
deriving (Show, Eq)
instance P.Enum PolicyDecisionType where
fromEnum PolicyDecisionTypeNavigationAction = 0
fromEnum PolicyDecisionTypeNewWindowAction = 1
fromEnum PolicyDecisionTypeResponse = 2
fromEnum (AnotherPolicyDecisionType k) = k
toEnum 0 = PolicyDecisionTypeNavigationAction
toEnum 1 = PolicyDecisionTypeNewWindowAction
toEnum 2 = PolicyDecisionTypeResponse
toEnum k = AnotherPolicyDecisionType k
instance P.Ord PolicyDecisionType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_policy_decision_type_get_type" c_webkit_policy_decision_type_get_type ::
IO GType
instance BoxedEnum PolicyDecisionType where
boxedEnumType _ = c_webkit_policy_decision_type_get_type
data PluginError =
PluginErrorFailed
| PluginErrorCannotFindPlugin
| PluginErrorCannotLoadPlugin
| PluginErrorJavaUnavailable
| PluginErrorConnectionCancelled
| PluginErrorWillHandleLoad
| AnotherPluginError Int
deriving (Show, Eq)
instance P.Enum PluginError where
fromEnum PluginErrorFailed = 299
fromEnum PluginErrorCannotFindPlugin = 200
fromEnum PluginErrorCannotLoadPlugin = 201
fromEnum PluginErrorJavaUnavailable = 202
fromEnum PluginErrorConnectionCancelled = 203
fromEnum PluginErrorWillHandleLoad = 204
fromEnum (AnotherPluginError k) = k
toEnum 299 = PluginErrorFailed
toEnum 200 = PluginErrorCannotFindPlugin
toEnum 201 = PluginErrorCannotLoadPlugin
toEnum 202 = PluginErrorJavaUnavailable
toEnum 203 = PluginErrorConnectionCancelled
toEnum 204 = PluginErrorWillHandleLoad
toEnum k = AnotherPluginError k
instance P.Ord PluginError where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance GErrorClass PluginError where
gerrorClassDomain _ = "WebKitPluginError"
catchPluginError ::
IO a ->
(PluginError -> GErrorMessage -> IO a) ->
IO a
catchPluginError = catchGErrorJustDomain
handlePluginError ::
(PluginError -> GErrorMessage -> IO a) ->
IO a ->
IO a
handlePluginError = handleGErrorJustDomain
foreign import ccall "webkit_plugin_error_get_type" c_webkit_plugin_error_get_type ::
IO GType
instance BoxedEnum PluginError where
boxedEnumType _ = c_webkit_plugin_error_get_type
data NetworkProxyMode =
NetworkProxyModeDefault
| NetworkProxyModeNoProxy
| NetworkProxyModeCustom
| AnotherNetworkProxyMode Int
deriving (Show, Eq)
instance P.Enum NetworkProxyMode where
fromEnum NetworkProxyModeDefault = 0
fromEnum NetworkProxyModeNoProxy = 1
fromEnum NetworkProxyModeCustom = 2
fromEnum (AnotherNetworkProxyMode k) = k
toEnum 0 = NetworkProxyModeDefault
toEnum 1 = NetworkProxyModeNoProxy
toEnum 2 = NetworkProxyModeCustom
toEnum k = AnotherNetworkProxyMode k
instance P.Ord NetworkProxyMode where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_network_proxy_mode_get_type" c_webkit_network_proxy_mode_get_type ::
IO GType
instance BoxedEnum NetworkProxyMode where
boxedEnumType _ = c_webkit_network_proxy_mode_get_type
data NetworkError =
NetworkErrorFailed
| NetworkErrorTransport
| NetworkErrorUnknownProtocol
| NetworkErrorCancelled
| NetworkErrorFileDoesNotExist
| AnotherNetworkError Int
deriving (Show, Eq)
instance P.Enum NetworkError where
fromEnum NetworkErrorFailed = 399
fromEnum NetworkErrorTransport = 300
fromEnum NetworkErrorUnknownProtocol = 301
fromEnum NetworkErrorCancelled = 302
fromEnum NetworkErrorFileDoesNotExist = 303
fromEnum (AnotherNetworkError k) = k
toEnum 399 = NetworkErrorFailed
toEnum 300 = NetworkErrorTransport
toEnum 301 = NetworkErrorUnknownProtocol
toEnum 302 = NetworkErrorCancelled
toEnum 303 = NetworkErrorFileDoesNotExist
toEnum k = AnotherNetworkError k
instance P.Ord NetworkError where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance GErrorClass NetworkError where
gerrorClassDomain _ = "WebKitNetworkError"
catchNetworkError ::
IO a ->
(NetworkError -> GErrorMessage -> IO a) ->
IO a
catchNetworkError = catchGErrorJustDomain
handleNetworkError ::
(NetworkError -> GErrorMessage -> IO a) ->
IO a ->
IO a
handleNetworkError = handleGErrorJustDomain
foreign import ccall "webkit_network_error_get_type" c_webkit_network_error_get_type ::
IO GType
instance BoxedEnum NetworkError where
boxedEnumType _ = c_webkit_network_error_get_type
data NavigationType =
NavigationTypeLinkClicked
| NavigationTypeFormSubmitted
| NavigationTypeBackForward
| NavigationTypeReload
| NavigationTypeFormResubmitted
| NavigationTypeOther
| AnotherNavigationType Int
deriving (Show, Eq)
instance P.Enum NavigationType where
fromEnum NavigationTypeLinkClicked = 0
fromEnum NavigationTypeFormSubmitted = 1
fromEnum NavigationTypeBackForward = 2
fromEnum NavigationTypeReload = 3
fromEnum NavigationTypeFormResubmitted = 4
fromEnum NavigationTypeOther = 5
fromEnum (AnotherNavigationType k) = k
toEnum 0 = NavigationTypeLinkClicked
toEnum 1 = NavigationTypeFormSubmitted
toEnum 2 = NavigationTypeBackForward
toEnum 3 = NavigationTypeReload
toEnum 4 = NavigationTypeFormResubmitted
toEnum 5 = NavigationTypeOther
toEnum k = AnotherNavigationType k
instance P.Ord NavigationType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_navigation_type_get_type" c_webkit_navigation_type_get_type ::
IO GType
instance BoxedEnum NavigationType where
boxedEnumType _ = c_webkit_navigation_type_get_type
data LoadEvent =
LoadEventStarted
| LoadEventRedirected
| LoadEventCommitted
| LoadEventFinished
| AnotherLoadEvent Int
deriving (Show, Eq)
instance P.Enum LoadEvent where
fromEnum LoadEventStarted = 0
fromEnum LoadEventRedirected = 1
fromEnum LoadEventCommitted = 2
fromEnum LoadEventFinished = 3
fromEnum (AnotherLoadEvent k) = k
toEnum 0 = LoadEventStarted
toEnum 1 = LoadEventRedirected
toEnum 2 = LoadEventCommitted
toEnum 3 = LoadEventFinished
toEnum k = AnotherLoadEvent k
instance P.Ord LoadEvent where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_load_event_get_type" c_webkit_load_event_get_type ::
IO GType
instance BoxedEnum LoadEvent where
boxedEnumType _ = c_webkit_load_event_get_type
data JavascriptError =
JavascriptErrorFailed
| AnotherJavascriptError Int
deriving (Show, Eq)
instance P.Enum JavascriptError where
fromEnum JavascriptErrorFailed = 699
fromEnum (AnotherJavascriptError k) = k
toEnum 699 = JavascriptErrorFailed
toEnum k = AnotherJavascriptError k
instance P.Ord JavascriptError where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance GErrorClass JavascriptError where
gerrorClassDomain _ = "WebKitJavascriptError"
catchJavascriptError ::
IO a ->
(JavascriptError -> GErrorMessage -> IO a) ->
IO a
catchJavascriptError = catchGErrorJustDomain
handleJavascriptError ::
(JavascriptError -> GErrorMessage -> IO a) ->
IO a ->
IO a
handleJavascriptError = handleGErrorJustDomain
foreign import ccall "webkit_javascript_error_get_type" c_webkit_javascript_error_get_type ::
IO GType
instance BoxedEnum JavascriptError where
boxedEnumType _ = c_webkit_javascript_error_get_type
data InsecureContentEvent =
InsecureContentEventRun
| InsecureContentEventDisplayed
| AnotherInsecureContentEvent Int
deriving (Show, Eq)
instance P.Enum InsecureContentEvent where
fromEnum InsecureContentEventRun = 0
fromEnum InsecureContentEventDisplayed = 1
fromEnum (AnotherInsecureContentEvent k) = k
toEnum 0 = InsecureContentEventRun
toEnum 1 = InsecureContentEventDisplayed
toEnum k = AnotherInsecureContentEvent k
instance P.Ord InsecureContentEvent where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_insecure_content_event_get_type" c_webkit_insecure_content_event_get_type ::
IO GType
instance BoxedEnum InsecureContentEvent where
boxedEnumType _ = c_webkit_insecure_content_event_get_type
data HardwareAccelerationPolicy =
HardwareAccelerationPolicyOnDemand
| HardwareAccelerationPolicyAlways
| HardwareAccelerationPolicyNever
| AnotherHardwareAccelerationPolicy Int
deriving (Show, Eq)
instance P.Enum HardwareAccelerationPolicy where
fromEnum HardwareAccelerationPolicyOnDemand = 0
fromEnum HardwareAccelerationPolicyAlways = 1
fromEnum HardwareAccelerationPolicyNever = 2
fromEnum (AnotherHardwareAccelerationPolicy k) = k
toEnum 0 = HardwareAccelerationPolicyOnDemand
toEnum 1 = HardwareAccelerationPolicyAlways
toEnum 2 = HardwareAccelerationPolicyNever
toEnum k = AnotherHardwareAccelerationPolicy k
instance P.Ord HardwareAccelerationPolicy where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_hardware_acceleration_policy_get_type" c_webkit_hardware_acceleration_policy_get_type ::
IO GType
instance BoxedEnum HardwareAccelerationPolicy where
boxedEnumType _ = c_webkit_hardware_acceleration_policy_get_type
data FaviconDatabaseError =
FaviconDatabaseErrorNotInitialized
| FaviconDatabaseErrorFaviconNotFound
| FaviconDatabaseErrorFaviconUnknown
| AnotherFaviconDatabaseError Int
deriving (Show, Eq)
instance P.Enum FaviconDatabaseError where
fromEnum FaviconDatabaseErrorNotInitialized = 0
fromEnum FaviconDatabaseErrorFaviconNotFound = 1
fromEnum FaviconDatabaseErrorFaviconUnknown = 2
fromEnum (AnotherFaviconDatabaseError k) = k
toEnum 0 = FaviconDatabaseErrorNotInitialized
toEnum 1 = FaviconDatabaseErrorFaviconNotFound
toEnum 2 = FaviconDatabaseErrorFaviconUnknown
toEnum k = AnotherFaviconDatabaseError k
instance P.Ord FaviconDatabaseError where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance GErrorClass FaviconDatabaseError where
gerrorClassDomain _ = "WebKitFaviconDatabaseError"
catchFaviconDatabaseError ::
IO a ->
(FaviconDatabaseError -> GErrorMessage -> IO a) ->
IO a
catchFaviconDatabaseError = catchGErrorJustDomain
handleFaviconDatabaseError ::
(FaviconDatabaseError -> GErrorMessage -> IO a) ->
IO a ->
IO a
handleFaviconDatabaseError = handleGErrorJustDomain
foreign import ccall "webkit_favicon_database_error_get_type" c_webkit_favicon_database_error_get_type ::
IO GType
instance BoxedEnum FaviconDatabaseError where
boxedEnumType _ = c_webkit_favicon_database_error_get_type
data DownloadError =
DownloadErrorNetwork
| DownloadErrorCancelledByUser
| DownloadErrorDestination
| AnotherDownloadError Int
deriving (Show, Eq)
instance P.Enum DownloadError where
fromEnum DownloadErrorNetwork = 499
fromEnum DownloadErrorCancelledByUser = 400
fromEnum DownloadErrorDestination = 401
fromEnum (AnotherDownloadError k) = k
toEnum 499 = DownloadErrorNetwork
toEnum 400 = DownloadErrorCancelledByUser
toEnum 401 = DownloadErrorDestination
toEnum k = AnotherDownloadError k
instance P.Ord DownloadError where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance GErrorClass DownloadError where
gerrorClassDomain _ = "WebKitDownloadError"
catchDownloadError ::
IO a ->
(DownloadError -> GErrorMessage -> IO a) ->
IO a
catchDownloadError = catchGErrorJustDomain
handleDownloadError ::
(DownloadError -> GErrorMessage -> IO a) ->
IO a ->
IO a
handleDownloadError = handleGErrorJustDomain
foreign import ccall "webkit_download_error_get_type" c_webkit_download_error_get_type ::
IO GType
instance BoxedEnum DownloadError where
boxedEnumType _ = c_webkit_download_error_get_type
data CredentialPersistence =
CredentialPersistenceNone
| CredentialPersistenceForSession
| CredentialPersistencePermanent
| AnotherCredentialPersistence Int
deriving (Show, Eq)
instance P.Enum CredentialPersistence where
fromEnum CredentialPersistenceNone = 0
fromEnum CredentialPersistenceForSession = 1
fromEnum CredentialPersistencePermanent = 2
fromEnum (AnotherCredentialPersistence k) = k
toEnum 0 = CredentialPersistenceNone
toEnum 1 = CredentialPersistenceForSession
toEnum 2 = CredentialPersistencePermanent
toEnum k = AnotherCredentialPersistence k
instance P.Ord CredentialPersistence where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_credential_persistence_get_type" c_webkit_credential_persistence_get_type ::
IO GType
instance BoxedEnum CredentialPersistence where
boxedEnumType _ = c_webkit_credential_persistence_get_type
data CookiePersistentStorage =
CookiePersistentStorageText
| CookiePersistentStorageSqlite
| AnotherCookiePersistentStorage Int
deriving (Show, Eq)
instance P.Enum CookiePersistentStorage where
fromEnum CookiePersistentStorageText = 0
fromEnum CookiePersistentStorageSqlite = 1
fromEnum (AnotherCookiePersistentStorage k) = k
toEnum 0 = CookiePersistentStorageText
toEnum 1 = CookiePersistentStorageSqlite
toEnum k = AnotherCookiePersistentStorage k
instance P.Ord CookiePersistentStorage where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_cookie_persistent_storage_get_type" c_webkit_cookie_persistent_storage_get_type ::
IO GType
instance BoxedEnum CookiePersistentStorage where
boxedEnumType _ = c_webkit_cookie_persistent_storage_get_type
data CookieAcceptPolicy =
CookieAcceptPolicyAlways
| CookieAcceptPolicyNever
| CookieAcceptPolicyNoThirdParty
| AnotherCookieAcceptPolicy Int
deriving (Show, Eq)
instance P.Enum CookieAcceptPolicy where
fromEnum CookieAcceptPolicyAlways = 0
fromEnum CookieAcceptPolicyNever = 1
fromEnum CookieAcceptPolicyNoThirdParty = 2
fromEnum (AnotherCookieAcceptPolicy k) = k
toEnum 0 = CookieAcceptPolicyAlways
toEnum 1 = CookieAcceptPolicyNever
toEnum 2 = CookieAcceptPolicyNoThirdParty
toEnum k = AnotherCookieAcceptPolicy k
instance P.Ord CookieAcceptPolicy where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_cookie_accept_policy_get_type" c_webkit_cookie_accept_policy_get_type ::
IO GType
instance BoxedEnum CookieAcceptPolicy where
boxedEnumType _ = c_webkit_cookie_accept_policy_get_type
data ContextMenuAction =
ContextMenuActionNoAction
| ContextMenuActionOpenLink
| ContextMenuActionOpenLinkInNewWindow
| ContextMenuActionDownloadLinkToDisk
| ContextMenuActionCopyLinkToClipboard
| ContextMenuActionOpenImageInNewWindow
| ContextMenuActionDownloadImageToDisk
| ContextMenuActionCopyImageToClipboard
| ContextMenuActionCopyImageUrlToClipboard
| ContextMenuActionOpenFrameInNewWindow
| ContextMenuActionGoBack
| ContextMenuActionGoForward
| ContextMenuActionStop
| ContextMenuActionReload
| ContextMenuActionCopy
| ContextMenuActionCut
| ContextMenuActionPaste
| ContextMenuActionDelete
| ContextMenuActionSelectAll
| ContextMenuActionInputMethods
| ContextMenuActionUnicode
| ContextMenuActionSpellingGuess
| ContextMenuActionNoGuessesFound
| ContextMenuActionIgnoreSpelling
| ContextMenuActionLearnSpelling
| ContextMenuActionIgnoreGrammar
| ContextMenuActionFontMenu
| ContextMenuActionBold
| ContextMenuActionItalic
| ContextMenuActionUnderline
| ContextMenuActionOutline
| ContextMenuActionInspectElement
| ContextMenuActionOpenVideoInNewWindow
| ContextMenuActionOpenAudioInNewWindow
| ContextMenuActionCopyVideoLinkToClipboard
| ContextMenuActionCopyAudioLinkToClipboard
| ContextMenuActionToggleMediaControls
| ContextMenuActionToggleMediaLoop
| ContextMenuActionEnterVideoFullscreen
| ContextMenuActionMediaPlay
| ContextMenuActionMediaPause
| ContextMenuActionMediaMute
| ContextMenuActionDownloadVideoToDisk
| ContextMenuActionDownloadAudioToDisk
| ContextMenuActionCustom
| AnotherContextMenuAction Int
deriving (Show, Eq)
instance P.Enum ContextMenuAction where
fromEnum ContextMenuActionNoAction = 0
fromEnum ContextMenuActionOpenLink = 1
fromEnum ContextMenuActionOpenLinkInNewWindow = 2
fromEnum ContextMenuActionDownloadLinkToDisk = 3
fromEnum ContextMenuActionCopyLinkToClipboard = 4
fromEnum ContextMenuActionOpenImageInNewWindow = 5
fromEnum ContextMenuActionDownloadImageToDisk = 6
fromEnum ContextMenuActionCopyImageToClipboard = 7
fromEnum ContextMenuActionCopyImageUrlToClipboard = 8
fromEnum ContextMenuActionOpenFrameInNewWindow = 9
fromEnum ContextMenuActionGoBack = 10
fromEnum ContextMenuActionGoForward = 11
fromEnum ContextMenuActionStop = 12
fromEnum ContextMenuActionReload = 13
fromEnum ContextMenuActionCopy = 14
fromEnum ContextMenuActionCut = 15
fromEnum ContextMenuActionPaste = 16
fromEnum ContextMenuActionDelete = 17
fromEnum ContextMenuActionSelectAll = 18
fromEnum ContextMenuActionInputMethods = 19
fromEnum ContextMenuActionUnicode = 20
fromEnum ContextMenuActionSpellingGuess = 21
fromEnum ContextMenuActionNoGuessesFound = 22
fromEnum ContextMenuActionIgnoreSpelling = 23
fromEnum ContextMenuActionLearnSpelling = 24
fromEnum ContextMenuActionIgnoreGrammar = 25
fromEnum ContextMenuActionFontMenu = 26
fromEnum ContextMenuActionBold = 27
fromEnum ContextMenuActionItalic = 28
fromEnum ContextMenuActionUnderline = 29
fromEnum ContextMenuActionOutline = 30
fromEnum ContextMenuActionInspectElement = 31
fromEnum ContextMenuActionOpenVideoInNewWindow = 32
fromEnum ContextMenuActionOpenAudioInNewWindow = 33
fromEnum ContextMenuActionCopyVideoLinkToClipboard = 34
fromEnum ContextMenuActionCopyAudioLinkToClipboard = 35
fromEnum ContextMenuActionToggleMediaControls = 36
fromEnum ContextMenuActionToggleMediaLoop = 37
fromEnum ContextMenuActionEnterVideoFullscreen = 38
fromEnum ContextMenuActionMediaPlay = 39
fromEnum ContextMenuActionMediaPause = 40
fromEnum ContextMenuActionMediaMute = 41
fromEnum ContextMenuActionDownloadVideoToDisk = 42
fromEnum ContextMenuActionDownloadAudioToDisk = 43
fromEnum ContextMenuActionCustom = 10000
fromEnum (AnotherContextMenuAction k) = k
toEnum 0 = ContextMenuActionNoAction
toEnum 1 = ContextMenuActionOpenLink
toEnum 2 = ContextMenuActionOpenLinkInNewWindow
toEnum 3 = ContextMenuActionDownloadLinkToDisk
toEnum 4 = ContextMenuActionCopyLinkToClipboard
toEnum 5 = ContextMenuActionOpenImageInNewWindow
toEnum 6 = ContextMenuActionDownloadImageToDisk
toEnum 7 = ContextMenuActionCopyImageToClipboard
toEnum 8 = ContextMenuActionCopyImageUrlToClipboard
toEnum 9 = ContextMenuActionOpenFrameInNewWindow
toEnum 10 = ContextMenuActionGoBack
toEnum 11 = ContextMenuActionGoForward
toEnum 12 = ContextMenuActionStop
toEnum 13 = ContextMenuActionReload
toEnum 14 = ContextMenuActionCopy
toEnum 15 = ContextMenuActionCut
toEnum 16 = ContextMenuActionPaste
toEnum 17 = ContextMenuActionDelete
toEnum 18 = ContextMenuActionSelectAll
toEnum 19 = ContextMenuActionInputMethods
toEnum 20 = ContextMenuActionUnicode
toEnum 21 = ContextMenuActionSpellingGuess
toEnum 22 = ContextMenuActionNoGuessesFound
toEnum 23 = ContextMenuActionIgnoreSpelling
toEnum 24 = ContextMenuActionLearnSpelling
toEnum 25 = ContextMenuActionIgnoreGrammar
toEnum 26 = ContextMenuActionFontMenu
toEnum 27 = ContextMenuActionBold
toEnum 28 = ContextMenuActionItalic
toEnum 29 = ContextMenuActionUnderline
toEnum 30 = ContextMenuActionOutline
toEnum 31 = ContextMenuActionInspectElement
toEnum 32 = ContextMenuActionOpenVideoInNewWindow
toEnum 33 = ContextMenuActionOpenAudioInNewWindow
toEnum 34 = ContextMenuActionCopyVideoLinkToClipboard
toEnum 35 = ContextMenuActionCopyAudioLinkToClipboard
toEnum 36 = ContextMenuActionToggleMediaControls
toEnum 37 = ContextMenuActionToggleMediaLoop
toEnum 38 = ContextMenuActionEnterVideoFullscreen
toEnum 39 = ContextMenuActionMediaPlay
toEnum 40 = ContextMenuActionMediaPause
toEnum 41 = ContextMenuActionMediaMute
toEnum 42 = ContextMenuActionDownloadVideoToDisk
toEnum 43 = ContextMenuActionDownloadAudioToDisk
toEnum 10000 = ContextMenuActionCustom
toEnum k = AnotherContextMenuAction k
instance P.Ord ContextMenuAction where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_context_menu_action_get_type" c_webkit_context_menu_action_get_type ::
IO GType
instance BoxedEnum ContextMenuAction where
boxedEnumType _ = c_webkit_context_menu_action_get_type
data CacheModel =
CacheModelDocumentViewer
| CacheModelWebBrowser
| CacheModelDocumentBrowser
| AnotherCacheModel Int
deriving (Show, Eq)
instance P.Enum CacheModel where
fromEnum CacheModelDocumentViewer = 0
fromEnum CacheModelWebBrowser = 1
fromEnum CacheModelDocumentBrowser = 2
fromEnum (AnotherCacheModel k) = k
toEnum 0 = CacheModelDocumentViewer
toEnum 1 = CacheModelWebBrowser
toEnum 2 = CacheModelDocumentBrowser
toEnum k = AnotherCacheModel k
instance P.Ord CacheModel where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_cache_model_get_type" c_webkit_cache_model_get_type ::
IO GType
instance BoxedEnum CacheModel where
boxedEnumType _ = c_webkit_cache_model_get_type
data AuthenticationScheme =
AuthenticationSchemeDefault
| AuthenticationSchemeHttpBasic
| AuthenticationSchemeHttpDigest
| AuthenticationSchemeHtmlForm
| AuthenticationSchemeNtlm
| AuthenticationSchemeNegotiate
| AuthenticationSchemeClientCertificateRequested
| AuthenticationSchemeServerTrustEvaluationRequested
| AuthenticationSchemeUnknown
| AnotherAuthenticationScheme Int
deriving (Show, Eq)
instance P.Enum AuthenticationScheme where
fromEnum AuthenticationSchemeDefault = 1
fromEnum AuthenticationSchemeHttpBasic = 2
fromEnum AuthenticationSchemeHttpDigest = 3
fromEnum AuthenticationSchemeHtmlForm = 4
fromEnum AuthenticationSchemeNtlm = 5
fromEnum AuthenticationSchemeNegotiate = 6
fromEnum AuthenticationSchemeClientCertificateRequested = 7
fromEnum AuthenticationSchemeServerTrustEvaluationRequested = 8
fromEnum AuthenticationSchemeUnknown = 100
fromEnum (AnotherAuthenticationScheme k) = k
toEnum 1 = AuthenticationSchemeDefault
toEnum 2 = AuthenticationSchemeHttpBasic
toEnum 3 = AuthenticationSchemeHttpDigest
toEnum 4 = AuthenticationSchemeHtmlForm
toEnum 5 = AuthenticationSchemeNtlm
toEnum 6 = AuthenticationSchemeNegotiate
toEnum 7 = AuthenticationSchemeClientCertificateRequested
toEnum 8 = AuthenticationSchemeServerTrustEvaluationRequested
toEnum 100 = AuthenticationSchemeUnknown
toEnum k = AnotherAuthenticationScheme k
instance P.Ord AuthenticationScheme where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "webkit_authentication_scheme_get_type" c_webkit_authentication_scheme_get_type ::
IO GType
instance BoxedEnum AuthenticationScheme where
boxedEnumType _ = c_webkit_authentication_scheme_get_type