{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
-}

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

module GI.WebKit2WebExtension.Enums
    (

 -- * Enumerations
-- ** ConsoleMessageLevel #enum:ConsoleMessageLevel#

    ConsoleMessageLevel(..)                 ,


-- ** ConsoleMessageSource #enum:ConsoleMessageSource#

    ConsoleMessageSource(..)                ,


-- ** ContextMenuAction #enum:ContextMenuAction#

    ContextMenuAction(..)                   ,


-- ** FormSubmissionStep #enum:FormSubmissionStep#

    FormSubmissionStep(..)                  ,




    ) 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


-- Enum FormSubmissionStep
{- |
Used to indicate a particular stage in form submission. See
'GI.WebKit2WebExtension.Objects.WebPage.WebPage'::@/will-submit-form/@.

/Since: 2.20/
-}
data FormSubmissionStep =
      FormSubmissionStepSendDomEvent
    {- ^
    indicates the form\'s
    DOM submit event is about to be emitted.
    -}
    | FormSubmissionStepComplete
    {- ^
    indicates the form is about
    to be submitted.
    -}
    | AnotherFormSubmissionStep Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum FormSubmissionStep where
    fromEnum FormSubmissionStepSendDomEvent = 0
    fromEnum FormSubmissionStepComplete = 1
    fromEnum (AnotherFormSubmissionStep k) = k

    toEnum 0 = FormSubmissionStepSendDomEvent
    toEnum 1 = FormSubmissionStepComplete
    toEnum k = AnotherFormSubmissionStep k

instance P.Ord FormSubmissionStep where
    compare a b = P.compare (P.fromEnum a) (P.fromEnum b)

foreign import ccall "webkit_form_submission_step_get_type" c_webkit_form_submission_step_get_type ::
    IO GType

instance BoxedEnum FormSubmissionStep where
    boxedEnumType _ = c_webkit_form_submission_step_get_type

-- Enum ContextMenuAction
{- |
Enum values used to denote the stock actions for
@/WebKitContextMenuItem/@\<!-- -->s
-}
data ContextMenuAction =
      ContextMenuActionNoAction
    {- ^
    No action, used by separator menu items.
    -}
    | ContextMenuActionOpenLink
    {- ^
    Open current link.
    -}
    | ContextMenuActionOpenLinkInNewWindow
    {- ^
    Open current link in a new window.
    -}
    | ContextMenuActionDownloadLinkToDisk
    {- ^
    Download link destination.
    -}
    | ContextMenuActionCopyLinkToClipboard
    {- ^
    Copy link location to the clipboard.
    -}
    | ContextMenuActionOpenImageInNewWindow
    {- ^
    Open current image in a new window.
    -}
    | ContextMenuActionDownloadImageToDisk
    {- ^
    Download current image.
    -}
    | ContextMenuActionCopyImageToClipboard
    {- ^
    Copy current image to the clipboard.
    -}
    | ContextMenuActionCopyImageUrlToClipboard
    {- ^
    Copy current image location to the clipboard.
    -}
    | ContextMenuActionOpenFrameInNewWindow
    {- ^
    Open current frame in a new window.
    -}
    | ContextMenuActionGoBack
    {- ^
    Load the previous history item.
    -}
    | ContextMenuActionGoForward
    {- ^
    Load the next history item.
    -}
    | ContextMenuActionStop
    {- ^
    Stop any ongoing loading operation.
    -}
    | ContextMenuActionReload
    {- ^
    Reload the contents of current view.
    -}
    | ContextMenuActionCopy
    {- ^
    Copy current selection the clipboard.
    -}
    | ContextMenuActionCut
    {- ^
    Cut current selection to the clipboard.
    -}
    | ContextMenuActionPaste
    {- ^
    Paste clipboard contents.
    -}
    | ContextMenuActionDelete
    {- ^
    Delete current selection.
    -}
    | ContextMenuActionSelectAll
    {- ^
    Select all text.
    -}
    | ContextMenuActionInputMethods
    {- ^
    Input methods menu.
    -}
    | ContextMenuActionUnicode
    {- ^
    Unicode menu.
    -}
    | ContextMenuActionSpellingGuess
    {- ^
    A proposed replacement for a misspelled word.
    -}
    | ContextMenuActionNoGuessesFound
    {- ^
    An indicator that spellchecking found no proposed replacements.
    -}
    | ContextMenuActionIgnoreSpelling
    {- ^
    Causes the spellchecker to ignore the word for this session.
    -}
    | ContextMenuActionLearnSpelling
    {- ^
    Causes the spellchecker to add the word to the dictionary.
    -}
    | ContextMenuActionIgnoreGrammar
    {- ^
    Ignore grammar.
    -}
    | ContextMenuActionFontMenu
    {- ^
    Font options menu.
    -}
    | ContextMenuActionBold
    {- ^
    Bold.
    -}
    | ContextMenuActionItalic
    {- ^
    Italic.
    -}
    | ContextMenuActionUnderline
    {- ^
    Underline.
    -}
    | ContextMenuActionOutline
    {- ^
    Outline.
    -}
    | ContextMenuActionInspectElement
    {- ^
    Open current element in the inspector.
    -}
    | ContextMenuActionOpenVideoInNewWindow
    {- ^
    Open current video element in a new window.
    -}
    | ContextMenuActionOpenAudioInNewWindow
    {- ^
    Open current audio element in a new window.
    -}
    | ContextMenuActionCopyVideoLinkToClipboard
    {- ^
    Copy video link location in to the clipboard.
    -}
    | ContextMenuActionCopyAudioLinkToClipboard
    {- ^
    Copy audio link location in to the clipboard.
    -}
    | ContextMenuActionToggleMediaControls
    {- ^
    Enable or disable media controls.
    -}
    | ContextMenuActionToggleMediaLoop
    {- ^
    Enable or disable media loop.
    -}
    | ContextMenuActionEnterVideoFullscreen
    {- ^
    Show current video element in fullscreen mode.
    -}
    | ContextMenuActionMediaPlay
    {- ^
    Play current media element.
    -}
    | ContextMenuActionMediaPause
    {- ^
    Pause current media element.
    -}
    | ContextMenuActionMediaMute
    {- ^
    Mute current media element.
    -}
    | ContextMenuActionDownloadVideoToDisk
    {- ^
    Download video to disk. Since 2.2
    -}
    | ContextMenuActionDownloadAudioToDisk
    {- ^
    Download audio to disk. Since 2.2
    -}
    | ContextMenuActionCustom
    {- ^
    Custom action defined by applications.
    -}
    | AnotherContextMenuAction Int
    -- ^ Catch-all for unknown values
    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)

-- Enum ConsoleMessageSource
{- |
Enum values used to denote the various sources of console messages.

/Since: 2.12/
-}
data ConsoleMessageSource =
      ConsoleMessageSourceJavascript
    {- ^
    Message produced by JavaScript.
    -}
    | ConsoleMessageSourceNetwork
    {- ^
    Network messages.
    -}
    | ConsoleMessageSourceConsoleApi
    {- ^
    Messages produced by console API.
    -}
    | ConsoleMessageSourceSecurity
    {- ^
    Security messages.
    -}
    | ConsoleMessageSourceOther
    {- ^
    Other messages.
    -}
    | AnotherConsoleMessageSource Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum ConsoleMessageSource where
    fromEnum ConsoleMessageSourceJavascript = 0
    fromEnum ConsoleMessageSourceNetwork = 1
    fromEnum ConsoleMessageSourceConsoleApi = 2
    fromEnum ConsoleMessageSourceSecurity = 3
    fromEnum ConsoleMessageSourceOther = 4
    fromEnum (AnotherConsoleMessageSource k) = k

    toEnum 0 = ConsoleMessageSourceJavascript
    toEnum 1 = ConsoleMessageSourceNetwork
    toEnum 2 = ConsoleMessageSourceConsoleApi
    toEnum 3 = ConsoleMessageSourceSecurity
    toEnum 4 = ConsoleMessageSourceOther
    toEnum k = AnotherConsoleMessageSource k

instance P.Ord ConsoleMessageSource where
    compare a b = P.compare (P.fromEnum a) (P.fromEnum b)

foreign import ccall "webkit_console_message_source_get_type" c_webkit_console_message_source_get_type ::
    IO GType

instance BoxedEnum ConsoleMessageSource where
    boxedEnumType _ = c_webkit_console_message_source_get_type

-- Enum ConsoleMessageLevel
{- |
Enum values used to denote the various levels of console messages.

/Since: 2.12/
-}
data ConsoleMessageLevel =
      ConsoleMessageLevelInfo
    {- ^
    Information message.
    -}
    | ConsoleMessageLevelLog
    {- ^
    Log message.
    -}
    | ConsoleMessageLevelWarning
    {- ^
    Warning message.
    -}
    | ConsoleMessageLevelError
    {- ^
    Error message.
    -}
    | ConsoleMessageLevelDebug
    {- ^
    Debug message.
    -}
    | AnotherConsoleMessageLevel Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum ConsoleMessageLevel where
    fromEnum ConsoleMessageLevelInfo = 0
    fromEnum ConsoleMessageLevelLog = 1
    fromEnum ConsoleMessageLevelWarning = 2
    fromEnum ConsoleMessageLevelError = 3
    fromEnum ConsoleMessageLevelDebug = 4
    fromEnum (AnotherConsoleMessageLevel k) = k

    toEnum 0 = ConsoleMessageLevelInfo
    toEnum 1 = ConsoleMessageLevelLog
    toEnum 2 = ConsoleMessageLevelWarning
    toEnum 3 = ConsoleMessageLevelError
    toEnum 4 = ConsoleMessageLevelDebug
    toEnum k = AnotherConsoleMessageLevel k

instance P.Ord ConsoleMessageLevel where
    compare a b = P.compare (P.fromEnum a) (P.fromEnum b)

foreign import ccall "webkit_console_message_level_get_type" c_webkit_console_message_level_get_type ::
    IO GType

instance BoxedEnum ConsoleMessageLevel where
    boxedEnumType _ = c_webkit_console_message_level_get_type