-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

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

module GI.IBus.Enums
    ( 

 -- * Enumerations


-- ** AttrType #enum:AttrType#

    AttrType(..)                            ,


-- ** AttrUnderline #enum:AttrUnderline#

    AttrUnderline(..)                       ,


-- ** BusRequestNameReply #enum:BusRequestNameReply#

    BusRequestNameReply(..)                 ,


-- ** BusStartServiceByNameReply #enum:BusStartServiceByNameReply#

    BusStartServiceByNameReply(..)          ,


-- ** Error #enum:Error#

    Error(..)                               ,
    catchError                              ,
    handleError                             ,


-- ** InputPurpose #enum:InputPurpose#

    InputPurpose(..)                        ,


-- ** Orientation #enum:Orientation#

    Orientation(..)                         ,


-- ** PreeditFocusMode #enum:PreeditFocusMode#

    PreeditFocusMode(..)                    ,


-- ** PropState #enum:PropState#

    PropState(..)                           ,


-- ** PropType #enum:PropType#

    PropType(..)                            ,


-- ** XEventType #enum:XEventType#

    XEventType(..)                          ,




    ) 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


-- Enum XEventType
-- | /No description available in the introspection data./
data XEventType = 
      XEventTypeNothing
    -- ^ /No description available in the introspection data./
    | XEventTypeKeyPress
    -- ^ /No description available in the introspection data./
    | XEventTypeKeyRelease
    -- ^ /No description available in the introspection data./
    | XEventTypeOther
    -- ^ /No description available in the introspection data./
    | XEventTypeEventLast
    -- ^ /No description available in the introspection data./
    | AnotherXEventType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> XEventType -> ShowS
[XEventType] -> ShowS
XEventType -> String
(Int -> XEventType -> ShowS)
-> (XEventType -> String)
-> ([XEventType] -> ShowS)
-> Show XEventType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XEventType] -> ShowS
$cshowList :: [XEventType] -> ShowS
show :: XEventType -> String
$cshow :: XEventType -> String
showsPrec :: Int -> XEventType -> ShowS
$cshowsPrec :: Int -> XEventType -> ShowS
Show, XEventType -> XEventType -> Bool
(XEventType -> XEventType -> Bool)
-> (XEventType -> XEventType -> Bool) -> Eq XEventType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XEventType -> XEventType -> Bool
$c/= :: XEventType -> XEventType -> Bool
== :: XEventType -> XEventType -> Bool
$c== :: XEventType -> XEventType -> Bool
Eq)

instance P.Enum XEventType where
    fromEnum :: XEventType -> Int
fromEnum XEventType
XEventTypeNothing = Int
-1
    fromEnum XEventType
XEventTypeKeyPress = Int
0
    fromEnum XEventType
XEventTypeKeyRelease = Int
1
    fromEnum XEventType
XEventTypeOther = Int
2
    fromEnum XEventType
XEventTypeEventLast = Int
3
    fromEnum (AnotherXEventType Int
k) = Int
k

    toEnum :: Int -> XEventType
toEnum Int
-1 = XEventType
XEventTypeNothing
    toEnum Int
0 = XEventType
XEventTypeKeyPress
    toEnum Int
1 = XEventType
XEventTypeKeyRelease
    toEnum Int
2 = XEventType
XEventTypeOther
    toEnum Int
3 = XEventType
XEventTypeEventLast
    toEnum Int
k = Int -> XEventType
AnotherXEventType Int
k

instance P.Ord XEventType where
    compare :: XEventType -> XEventType -> Ordering
compare XEventType
a XEventType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (XEventType -> Int
forall a. Enum a => a -> Int
P.fromEnum XEventType
a) (XEventType -> Int
forall a. Enum a => a -> Int
P.fromEnum XEventType
b)

type instance O.ParentTypes XEventType = '[]
instance O.HasParentTypes XEventType

foreign import ccall "ibus_xevent_type_get_type" c_ibus_xevent_type_get_type :: 
    IO GType

instance B.Types.TypedObject XEventType where
    glibType :: IO GType
glibType = IO GType
c_ibus_xevent_type_get_type

instance B.Types.BoxedEnum XEventType

-- Enum PropType
-- | Type enumeration of IBusProperty.
data PropType = 
      PropTypeNormal
    -- ^ Property is shown as normal text.
    | PropTypeToggle
    -- ^ Property is shown as a toggle button.
    | PropTypeRadio
    -- ^ Property is shown as a radio selection option.
    | PropTypeMenu
    -- ^ Property is shown as a menu, usually imply it has sub menu
    -- items.
    | PropTypeSeparator
    -- ^ A separator for menu.
    | AnotherPropType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> PropType -> ShowS
[PropType] -> ShowS
PropType -> String
(Int -> PropType -> ShowS)
-> (PropType -> String) -> ([PropType] -> ShowS) -> Show PropType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PropType] -> ShowS
$cshowList :: [PropType] -> ShowS
show :: PropType -> String
$cshow :: PropType -> String
showsPrec :: Int -> PropType -> ShowS
$cshowsPrec :: Int -> PropType -> ShowS
Show, PropType -> PropType -> Bool
(PropType -> PropType -> Bool)
-> (PropType -> PropType -> Bool) -> Eq PropType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PropType -> PropType -> Bool
$c/= :: PropType -> PropType -> Bool
== :: PropType -> PropType -> Bool
$c== :: PropType -> PropType -> Bool
Eq)

instance P.Enum PropType where
    fromEnum :: PropType -> Int
fromEnum PropType
PropTypeNormal = Int
0
    fromEnum PropType
PropTypeToggle = Int
1
    fromEnum PropType
PropTypeRadio = Int
2
    fromEnum PropType
PropTypeMenu = Int
3
    fromEnum PropType
PropTypeSeparator = Int
4
    fromEnum (AnotherPropType Int
k) = Int
k

    toEnum :: Int -> PropType
toEnum Int
0 = PropType
PropTypeNormal
    toEnum Int
1 = PropType
PropTypeToggle
    toEnum Int
2 = PropType
PropTypeRadio
    toEnum Int
3 = PropType
PropTypeMenu
    toEnum Int
4 = PropType
PropTypeSeparator
    toEnum Int
k = Int -> PropType
AnotherPropType Int
k

instance P.Ord PropType where
    compare :: PropType -> PropType -> Ordering
compare PropType
a PropType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (PropType -> Int
forall a. Enum a => a -> Int
P.fromEnum PropType
a) (PropType -> Int
forall a. Enum a => a -> Int
P.fromEnum PropType
b)

type instance O.ParentTypes PropType = '[]
instance O.HasParentTypes PropType

foreign import ccall "ibus_prop_type_get_type" c_ibus_prop_type_get_type :: 
    IO GType

instance B.Types.TypedObject PropType where
    glibType :: IO GType
glibType = IO GType
c_ibus_prop_type_get_type

instance B.Types.BoxedEnum PropType

-- Enum PropState
-- | State of t'GI.IBus.Objects.Property.Property'. The actual effect depends on t'GI.IBus.Enums.PropType' of the
-- IBusProperty.
-- 
-- \<variablelist>
--     \<varlistentry>
--         \<term>PROP_TYPE_TOGGLE\<\/term>
--         \<listitem>\<para>Emphasized if PROP_STATE_CHECKED, normal otherwise.\<\/para>\<\/listitem>
--     \<\/varlistentry>
--     \<varlistentry>
--         \<term>PROP_TYPE_RADIO\<\/term>
--         \<listitem>\<para>Option checked if PROP_STATE_CHECKED, unchecked otherwise.\<\/para>\<\/listitem>
--     \<\/varlistentry>
-- \<\/variablelist>
-- No effect on other types.
data PropState = 
      PropStateUnchecked
    -- ^ Property option is unchecked.
    | PropStateChecked
    -- ^ Property option is checked.
    | PropStateInconsistent
    -- ^ The state is inconsistent with the associated IME
    -- property.
    | AnotherPropState Int
    -- ^ Catch-all for unknown values
    deriving (Int -> PropState -> ShowS
[PropState] -> ShowS
PropState -> String
(Int -> PropState -> ShowS)
-> (PropState -> String)
-> ([PropState] -> ShowS)
-> Show PropState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PropState] -> ShowS
$cshowList :: [PropState] -> ShowS
show :: PropState -> String
$cshow :: PropState -> String
showsPrec :: Int -> PropState -> ShowS
$cshowsPrec :: Int -> PropState -> ShowS
Show, PropState -> PropState -> Bool
(PropState -> PropState -> Bool)
-> (PropState -> PropState -> Bool) -> Eq PropState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PropState -> PropState -> Bool
$c/= :: PropState -> PropState -> Bool
== :: PropState -> PropState -> Bool
$c== :: PropState -> PropState -> Bool
Eq)

instance P.Enum PropState where
    fromEnum :: PropState -> Int
fromEnum PropState
PropStateUnchecked = Int
0
    fromEnum PropState
PropStateChecked = Int
1
    fromEnum PropState
PropStateInconsistent = Int
2
    fromEnum (AnotherPropState Int
k) = Int
k

    toEnum :: Int -> PropState
toEnum Int
0 = PropState
PropStateUnchecked
    toEnum Int
1 = PropState
PropStateChecked
    toEnum Int
2 = PropState
PropStateInconsistent
    toEnum Int
k = Int -> PropState
AnotherPropState Int
k

instance P.Ord PropState where
    compare :: PropState -> PropState -> Ordering
compare PropState
a PropState
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (PropState -> Int
forall a. Enum a => a -> Int
P.fromEnum PropState
a) (PropState -> Int
forall a. Enum a => a -> Int
P.fromEnum PropState
b)

type instance O.ParentTypes PropState = '[]
instance O.HasParentTypes PropState

foreign import ccall "ibus_prop_state_get_type" c_ibus_prop_state_get_type :: 
    IO GType

instance B.Types.TypedObject PropState where
    glibType :: IO GType
glibType = IO GType
c_ibus_prop_state_get_type

instance B.Types.BoxedEnum PropState

-- Enum PreeditFocusMode
-- | Pre-edit commit mode when the focus is lost.
data PreeditFocusMode = 
      PreeditFocusModeClear
    -- ^ pre-edit text is cleared.
    | PreeditFocusModeCommit
    -- ^ pre-edit text is committed.
    | AnotherPreeditFocusMode Int
    -- ^ Catch-all for unknown values
    deriving (Int -> PreeditFocusMode -> ShowS
[PreeditFocusMode] -> ShowS
PreeditFocusMode -> String
(Int -> PreeditFocusMode -> ShowS)
-> (PreeditFocusMode -> String)
-> ([PreeditFocusMode] -> ShowS)
-> Show PreeditFocusMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PreeditFocusMode] -> ShowS
$cshowList :: [PreeditFocusMode] -> ShowS
show :: PreeditFocusMode -> String
$cshow :: PreeditFocusMode -> String
showsPrec :: Int -> PreeditFocusMode -> ShowS
$cshowsPrec :: Int -> PreeditFocusMode -> ShowS
Show, PreeditFocusMode -> PreeditFocusMode -> Bool
(PreeditFocusMode -> PreeditFocusMode -> Bool)
-> (PreeditFocusMode -> PreeditFocusMode -> Bool)
-> Eq PreeditFocusMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PreeditFocusMode -> PreeditFocusMode -> Bool
$c/= :: PreeditFocusMode -> PreeditFocusMode -> Bool
== :: PreeditFocusMode -> PreeditFocusMode -> Bool
$c== :: PreeditFocusMode -> PreeditFocusMode -> Bool
Eq)

instance P.Enum PreeditFocusMode where
    fromEnum :: PreeditFocusMode -> Int
fromEnum PreeditFocusMode
PreeditFocusModeClear = Int
0
    fromEnum PreeditFocusMode
PreeditFocusModeCommit = Int
1
    fromEnum (AnotherPreeditFocusMode Int
k) = Int
k

    toEnum :: Int -> PreeditFocusMode
toEnum Int
0 = PreeditFocusMode
PreeditFocusModeClear
    toEnum Int
1 = PreeditFocusMode
PreeditFocusModeCommit
    toEnum Int
k = Int -> PreeditFocusMode
AnotherPreeditFocusMode Int
k

instance P.Ord PreeditFocusMode where
    compare :: PreeditFocusMode -> PreeditFocusMode -> Ordering
compare PreeditFocusMode
a PreeditFocusMode
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (PreeditFocusMode -> Int
forall a. Enum a => a -> Int
P.fromEnum PreeditFocusMode
a) (PreeditFocusMode -> Int
forall a. Enum a => a -> Int
P.fromEnum PreeditFocusMode
b)

type instance O.ParentTypes PreeditFocusMode = '[]
instance O.HasParentTypes PreeditFocusMode

foreign import ccall "ibus_preedit_focus_mode_get_type" c_ibus_preedit_focus_mode_get_type :: 
    IO GType

instance B.Types.TypedObject PreeditFocusMode where
    glibType :: IO GType
glibType = IO GType
c_ibus_preedit_focus_mode_get_type

instance B.Types.BoxedEnum PreeditFocusMode

-- Enum Orientation
-- | Orientation of UI.
data Orientation = 
      OrientationHorizontal
    -- ^ Horizontal orientation.
    | OrientationVertical
    -- ^ Vertival orientation.
    | OrientationSystem
    -- ^ Use ibus global orientation setup.
    | AnotherOrientation Int
    -- ^ Catch-all for unknown values
    deriving (Int -> Orientation -> ShowS
[Orientation] -> ShowS
Orientation -> String
(Int -> Orientation -> ShowS)
-> (Orientation -> String)
-> ([Orientation] -> ShowS)
-> Show Orientation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Orientation] -> ShowS
$cshowList :: [Orientation] -> ShowS
show :: Orientation -> String
$cshow :: Orientation -> String
showsPrec :: Int -> Orientation -> ShowS
$cshowsPrec :: Int -> Orientation -> ShowS
Show, Orientation -> Orientation -> Bool
(Orientation -> Orientation -> Bool)
-> (Orientation -> Orientation -> Bool) -> Eq Orientation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Orientation -> Orientation -> Bool
$c/= :: Orientation -> Orientation -> Bool
== :: Orientation -> Orientation -> Bool
$c== :: Orientation -> Orientation -> Bool
Eq)

instance P.Enum Orientation where
    fromEnum :: Orientation -> Int
fromEnum Orientation
OrientationHorizontal = Int
0
    fromEnum Orientation
OrientationVertical = Int
1
    fromEnum Orientation
OrientationSystem = Int
2
    fromEnum (AnotherOrientation Int
k) = Int
k

    toEnum :: Int -> Orientation
toEnum Int
0 = Orientation
OrientationHorizontal
    toEnum Int
1 = Orientation
OrientationVertical
    toEnum Int
2 = Orientation
OrientationSystem
    toEnum Int
k = Int -> Orientation
AnotherOrientation Int
k

instance P.Ord Orientation where
    compare :: Orientation -> Orientation -> Ordering
compare Orientation
a Orientation
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Orientation -> Int
forall a. Enum a => a -> Int
P.fromEnum Orientation
a) (Orientation -> Int
forall a. Enum a => a -> Int
P.fromEnum Orientation
b)

type instance O.ParentTypes Orientation = '[]
instance O.HasParentTypes Orientation

foreign import ccall "ibus_orientation_get_type" c_ibus_orientation_get_type :: 
    IO GType

instance B.Types.TypedObject Orientation where
    glibType :: IO GType
glibType = IO GType
c_ibus_orientation_get_type

instance B.Types.BoxedEnum Orientation

-- Enum InputPurpose
-- | Describes primary purpose of the input context.  This information
-- is particularly useful to implement intelligent behavior in
-- engines, such as automatic input-mode switch and text prediction.
-- 
-- Note that the purpose is not meant to impose a totally strict rule
-- about allowed characters, and does not replace input validation.
-- It is fine for an on-screen keyboard to let the user override the
-- character set restriction that is expressed by the purpose. The
-- application is expected to validate the entry contents, even if
-- it specified a purpose.
-- 
-- The difference between /@iBUSINPUTPURPOSEDIGITS@/ and
-- /@iBUSINPUTPURPOSENUMBER@/ is that the former accepts only digits
-- while the latter also some punctuation (like commas or points, plus,
-- minus) and “e” or “E” as in 3.14E+000.
-- 
-- This enumeration may be extended in the future; engines should
-- interpret unknown values as \'free form\'.
-- 
-- /Since: 1.5.4/
data InputPurpose = 
      InputPurposeFreeForm
    -- ^ Allow any character
    | InputPurposeAlpha
    -- ^ Allow only alphabetic characters
    | InputPurposeDigits
    -- ^ Allow only digits
    | InputPurposeNumber
    -- ^ Edited field expects numbers
    | InputPurposePhone
    -- ^ Edited field expects phone number
    | InputPurposeUrl
    -- ^ Edited field expects URL
    | InputPurposeEmail
    -- ^ Edited field expects email address
    | InputPurposeName
    -- ^ Edited field expects the name of a person
    | InputPurposePassword
    -- ^ Like /@iBUSINPUTPURPOSEFREEFORM@/,
    --     but characters are hidden
    | InputPurposePin
    -- ^ Like /@iBUSINPUTPURPOSEDIGITS@/, but
    --     characters are hidden
    | InputPurposeTerminal
    -- ^ Allow any character, in addition to control
    --     codes. Since 1.5.24
    | AnotherInputPurpose Int
    -- ^ Catch-all for unknown values
    deriving (Int -> InputPurpose -> ShowS
[InputPurpose] -> ShowS
InputPurpose -> String
(Int -> InputPurpose -> ShowS)
-> (InputPurpose -> String)
-> ([InputPurpose] -> ShowS)
-> Show InputPurpose
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputPurpose] -> ShowS
$cshowList :: [InputPurpose] -> ShowS
show :: InputPurpose -> String
$cshow :: InputPurpose -> String
showsPrec :: Int -> InputPurpose -> ShowS
$cshowsPrec :: Int -> InputPurpose -> ShowS
Show, InputPurpose -> InputPurpose -> Bool
(InputPurpose -> InputPurpose -> Bool)
-> (InputPurpose -> InputPurpose -> Bool) -> Eq InputPurpose
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputPurpose -> InputPurpose -> Bool
$c/= :: InputPurpose -> InputPurpose -> Bool
== :: InputPurpose -> InputPurpose -> Bool
$c== :: InputPurpose -> InputPurpose -> Bool
Eq)

instance P.Enum InputPurpose where
    fromEnum :: InputPurpose -> Int
fromEnum InputPurpose
InputPurposeFreeForm = Int
0
    fromEnum InputPurpose
InputPurposeAlpha = Int
1
    fromEnum InputPurpose
InputPurposeDigits = Int
2
    fromEnum InputPurpose
InputPurposeNumber = Int
3
    fromEnum InputPurpose
InputPurposePhone = Int
4
    fromEnum InputPurpose
InputPurposeUrl = Int
5
    fromEnum InputPurpose
InputPurposeEmail = Int
6
    fromEnum InputPurpose
InputPurposeName = Int
7
    fromEnum InputPurpose
InputPurposePassword = Int
8
    fromEnum InputPurpose
InputPurposePin = Int
9
    fromEnum InputPurpose
InputPurposeTerminal = Int
10
    fromEnum (AnotherInputPurpose Int
k) = Int
k

    toEnum :: Int -> InputPurpose
toEnum Int
0 = InputPurpose
InputPurposeFreeForm
    toEnum Int
1 = InputPurpose
InputPurposeAlpha
    toEnum Int
2 = InputPurpose
InputPurposeDigits
    toEnum Int
3 = InputPurpose
InputPurposeNumber
    toEnum Int
4 = InputPurpose
InputPurposePhone
    toEnum Int
5 = InputPurpose
InputPurposeUrl
    toEnum Int
6 = InputPurpose
InputPurposeEmail
    toEnum Int
7 = InputPurpose
InputPurposeName
    toEnum Int
8 = InputPurpose
InputPurposePassword
    toEnum Int
9 = InputPurpose
InputPurposePin
    toEnum Int
10 = InputPurpose
InputPurposeTerminal
    toEnum Int
k = Int -> InputPurpose
AnotherInputPurpose Int
k

instance P.Ord InputPurpose where
    compare :: InputPurpose -> InputPurpose -> Ordering
compare InputPurpose
a InputPurpose
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (InputPurpose -> Int
forall a. Enum a => a -> Int
P.fromEnum InputPurpose
a) (InputPurpose -> Int
forall a. Enum a => a -> Int
P.fromEnum InputPurpose
b)

type instance O.ParentTypes InputPurpose = '[]
instance O.HasParentTypes InputPurpose

foreign import ccall "ibus_input_purpose_get_type" c_ibus_input_purpose_get_type :: 
    IO GType

instance B.Types.TypedObject InputPurpose where
    glibType :: IO GType
glibType = IO GType
c_ibus_input_purpose_get_type

instance B.Types.BoxedEnum InputPurpose

-- Enum Error
-- | /No description available in the introspection data./
data Error = 
      ErrorNoEngine
    -- ^ There is no engine associated with input context.
    | ErrorNoConfig
    -- ^ There is no config module running.
    | ErrorFailed
    -- ^ General failure.
    | AnotherError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> Error -> ShowS
[Error] -> ShowS
Error -> String
(Int -> Error -> ShowS)
-> (Error -> String) -> ([Error] -> ShowS) -> Show Error
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Error] -> ShowS
$cshowList :: [Error] -> ShowS
show :: Error -> String
$cshow :: Error -> String
showsPrec :: Int -> Error -> ShowS
$cshowsPrec :: Int -> Error -> ShowS
Show, Error -> Error -> Bool
(Error -> Error -> Bool) -> (Error -> Error -> Bool) -> Eq Error
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Error -> Error -> Bool
$c/= :: Error -> Error -> Bool
== :: Error -> Error -> Bool
$c== :: Error -> Error -> Bool
Eq)

instance P.Enum Error where
    fromEnum :: Error -> Int
fromEnum Error
ErrorNoEngine = Int
0
    fromEnum Error
ErrorNoConfig = Int
1
    fromEnum Error
ErrorFailed = Int
2
    fromEnum (AnotherError Int
k) = Int
k

    toEnum :: Int -> Error
toEnum Int
0 = Error
ErrorNoEngine
    toEnum Int
1 = Error
ErrorNoConfig
    toEnum Int
2 = Error
ErrorFailed
    toEnum Int
k = Int -> Error
AnotherError Int
k

instance P.Ord Error where
    compare :: Error -> Error -> Ordering
compare Error
a Error
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Error -> Int
forall a. Enum a => a -> Int
P.fromEnum Error
a) (Error -> Int
forall a. Enum a => a -> Int
P.fromEnum Error
b)

instance GErrorClass Error where
    gerrorClassDomain :: Error -> Text
gerrorClassDomain Error
_ = Text
"ibus-error-quark"

-- | Catch exceptions of type `Error`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchError ::
    IO a ->
    (Error -> GErrorMessage -> IO a) ->
    IO a
catchError :: forall a. IO a -> (Error -> Text -> IO a) -> IO a
catchError = IO a -> (Error -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `Error`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleError ::
    (Error -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleError :: forall a. (Error -> Text -> IO a) -> IO a -> IO a
handleError = (Error -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

type instance O.ParentTypes Error = '[]
instance O.HasParentTypes Error

foreign import ccall "ibus_error_get_type" c_ibus_error_get_type :: 
    IO GType

instance B.Types.TypedObject Error where
    glibType :: IO GType
glibType = IO GType
c_ibus_error_get_type

instance B.Types.BoxedEnum Error

-- Enum BusStartServiceByNameReply
-- | /No description available in the introspection data./
data BusStartServiceByNameReply = 
      BusStartServiceByNameReplySuccess
    -- ^ same as DBUS_START_REPLY_SUCCESS
    | BusStartServiceByNameReplyAlreadyRunning
    -- ^ same as DBUS_START_REPLY_ALREADY_RUNNING
    | AnotherBusStartServiceByNameReply Int
    -- ^ Catch-all for unknown values
    deriving (Int -> BusStartServiceByNameReply -> ShowS
[BusStartServiceByNameReply] -> ShowS
BusStartServiceByNameReply -> String
(Int -> BusStartServiceByNameReply -> ShowS)
-> (BusStartServiceByNameReply -> String)
-> ([BusStartServiceByNameReply] -> ShowS)
-> Show BusStartServiceByNameReply
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BusStartServiceByNameReply] -> ShowS
$cshowList :: [BusStartServiceByNameReply] -> ShowS
show :: BusStartServiceByNameReply -> String
$cshow :: BusStartServiceByNameReply -> String
showsPrec :: Int -> BusStartServiceByNameReply -> ShowS
$cshowsPrec :: Int -> BusStartServiceByNameReply -> ShowS
Show, BusStartServiceByNameReply -> BusStartServiceByNameReply -> Bool
(BusStartServiceByNameReply -> BusStartServiceByNameReply -> Bool)
-> (BusStartServiceByNameReply
    -> BusStartServiceByNameReply -> Bool)
-> Eq BusStartServiceByNameReply
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BusStartServiceByNameReply -> BusStartServiceByNameReply -> Bool
$c/= :: BusStartServiceByNameReply -> BusStartServiceByNameReply -> Bool
== :: BusStartServiceByNameReply -> BusStartServiceByNameReply -> Bool
$c== :: BusStartServiceByNameReply -> BusStartServiceByNameReply -> Bool
Eq)

instance P.Enum BusStartServiceByNameReply where
    fromEnum :: BusStartServiceByNameReply -> Int
fromEnum BusStartServiceByNameReply
BusStartServiceByNameReplySuccess = Int
1
    fromEnum BusStartServiceByNameReply
BusStartServiceByNameReplyAlreadyRunning = Int
2
    fromEnum (AnotherBusStartServiceByNameReply Int
k) = Int
k

    toEnum :: Int -> BusStartServiceByNameReply
toEnum Int
1 = BusStartServiceByNameReply
BusStartServiceByNameReplySuccess
    toEnum Int
2 = BusStartServiceByNameReply
BusStartServiceByNameReplyAlreadyRunning
    toEnum Int
k = Int -> BusStartServiceByNameReply
AnotherBusStartServiceByNameReply Int
k

instance P.Ord BusStartServiceByNameReply where
    compare :: BusStartServiceByNameReply
-> BusStartServiceByNameReply -> Ordering
compare BusStartServiceByNameReply
a BusStartServiceByNameReply
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (BusStartServiceByNameReply -> Int
forall a. Enum a => a -> Int
P.fromEnum BusStartServiceByNameReply
a) (BusStartServiceByNameReply -> Int
forall a. Enum a => a -> Int
P.fromEnum BusStartServiceByNameReply
b)

type instance O.ParentTypes BusStartServiceByNameReply = '[]
instance O.HasParentTypes BusStartServiceByNameReply

foreign import ccall "ibus_bus_start_service_by_name_reply_get_type" c_ibus_bus_start_service_by_name_reply_get_type :: 
    IO GType

instance B.Types.TypedObject BusStartServiceByNameReply where
    glibType :: IO GType
glibType = IO GType
c_ibus_bus_start_service_by_name_reply_get_type

instance B.Types.BoxedEnum BusStartServiceByNameReply

-- Enum BusRequestNameReply
-- | /No description available in the introspection data./
data BusRequestNameReply = 
      BusRequestNameReplyPrimaryOwner
    -- ^ same as DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER
    | BusRequestNameReplyInQueue
    -- ^ same as DBUS_REQUEST_NAME_REPLY_IN_QUEUE
    | BusRequestNameReplyExists
    -- ^ same as DBUS_REQUEST_NAME_REPLY_EXISTS
    | BusRequestNameReplyAlreadyOwner
    -- ^ same as DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER
    | AnotherBusRequestNameReply Int
    -- ^ Catch-all for unknown values
    deriving (Int -> BusRequestNameReply -> ShowS
[BusRequestNameReply] -> ShowS
BusRequestNameReply -> String
(Int -> BusRequestNameReply -> ShowS)
-> (BusRequestNameReply -> String)
-> ([BusRequestNameReply] -> ShowS)
-> Show BusRequestNameReply
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BusRequestNameReply] -> ShowS
$cshowList :: [BusRequestNameReply] -> ShowS
show :: BusRequestNameReply -> String
$cshow :: BusRequestNameReply -> String
showsPrec :: Int -> BusRequestNameReply -> ShowS
$cshowsPrec :: Int -> BusRequestNameReply -> ShowS
Show, BusRequestNameReply -> BusRequestNameReply -> Bool
(BusRequestNameReply -> BusRequestNameReply -> Bool)
-> (BusRequestNameReply -> BusRequestNameReply -> Bool)
-> Eq BusRequestNameReply
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BusRequestNameReply -> BusRequestNameReply -> Bool
$c/= :: BusRequestNameReply -> BusRequestNameReply -> Bool
== :: BusRequestNameReply -> BusRequestNameReply -> Bool
$c== :: BusRequestNameReply -> BusRequestNameReply -> Bool
Eq)

instance P.Enum BusRequestNameReply where
    fromEnum :: BusRequestNameReply -> Int
fromEnum BusRequestNameReply
BusRequestNameReplyPrimaryOwner = Int
1
    fromEnum BusRequestNameReply
BusRequestNameReplyInQueue = Int
2
    fromEnum BusRequestNameReply
BusRequestNameReplyExists = Int
3
    fromEnum BusRequestNameReply
BusRequestNameReplyAlreadyOwner = Int
4
    fromEnum (AnotherBusRequestNameReply Int
k) = Int
k

    toEnum :: Int -> BusRequestNameReply
toEnum Int
1 = BusRequestNameReply
BusRequestNameReplyPrimaryOwner
    toEnum Int
2 = BusRequestNameReply
BusRequestNameReplyInQueue
    toEnum Int
3 = BusRequestNameReply
BusRequestNameReplyExists
    toEnum Int
4 = BusRequestNameReply
BusRequestNameReplyAlreadyOwner
    toEnum Int
k = Int -> BusRequestNameReply
AnotherBusRequestNameReply Int
k

instance P.Ord BusRequestNameReply where
    compare :: BusRequestNameReply -> BusRequestNameReply -> Ordering
compare BusRequestNameReply
a BusRequestNameReply
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (BusRequestNameReply -> Int
forall a. Enum a => a -> Int
P.fromEnum BusRequestNameReply
a) (BusRequestNameReply -> Int
forall a. Enum a => a -> Int
P.fromEnum BusRequestNameReply
b)

type instance O.ParentTypes BusRequestNameReply = '[]
instance O.HasParentTypes BusRequestNameReply

foreign import ccall "ibus_bus_request_name_reply_get_type" c_ibus_bus_request_name_reply_get_type :: 
    IO GType

instance B.Types.TypedObject BusRequestNameReply where
    glibType :: IO GType
glibType = IO GType
c_ibus_bus_request_name_reply_get_type

instance B.Types.BoxedEnum BusRequestNameReply

-- Enum AttrUnderline
-- | Type of IBusText attribute.
data AttrUnderline = 
      AttrUnderlineNone
    -- ^ No underline.
    | AttrUnderlineSingle
    -- ^ Single underline.
    | AttrUnderlineDouble
    -- ^ Double underline.
    | AttrUnderlineLow
    -- ^ Low underline ? FIXME
    | AttrUnderlineError
    -- ^ Error underline
    | AnotherAttrUnderline Int
    -- ^ Catch-all for unknown values
    deriving (Int -> AttrUnderline -> ShowS
[AttrUnderline] -> ShowS
AttrUnderline -> String
(Int -> AttrUnderline -> ShowS)
-> (AttrUnderline -> String)
-> ([AttrUnderline] -> ShowS)
-> Show AttrUnderline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttrUnderline] -> ShowS
$cshowList :: [AttrUnderline] -> ShowS
show :: AttrUnderline -> String
$cshow :: AttrUnderline -> String
showsPrec :: Int -> AttrUnderline -> ShowS
$cshowsPrec :: Int -> AttrUnderline -> ShowS
Show, AttrUnderline -> AttrUnderline -> Bool
(AttrUnderline -> AttrUnderline -> Bool)
-> (AttrUnderline -> AttrUnderline -> Bool) -> Eq AttrUnderline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttrUnderline -> AttrUnderline -> Bool
$c/= :: AttrUnderline -> AttrUnderline -> Bool
== :: AttrUnderline -> AttrUnderline -> Bool
$c== :: AttrUnderline -> AttrUnderline -> Bool
Eq)

instance P.Enum AttrUnderline where
    fromEnum :: AttrUnderline -> Int
fromEnum AttrUnderline
AttrUnderlineNone = Int
0
    fromEnum AttrUnderline
AttrUnderlineSingle = Int
1
    fromEnum AttrUnderline
AttrUnderlineDouble = Int
2
    fromEnum AttrUnderline
AttrUnderlineLow = Int
3
    fromEnum AttrUnderline
AttrUnderlineError = Int
4
    fromEnum (AnotherAttrUnderline Int
k) = Int
k

    toEnum :: Int -> AttrUnderline
toEnum Int
0 = AttrUnderline
AttrUnderlineNone
    toEnum Int
1 = AttrUnderline
AttrUnderlineSingle
    toEnum Int
2 = AttrUnderline
AttrUnderlineDouble
    toEnum Int
3 = AttrUnderline
AttrUnderlineLow
    toEnum Int
4 = AttrUnderline
AttrUnderlineError
    toEnum Int
k = Int -> AttrUnderline
AnotherAttrUnderline Int
k

instance P.Ord AttrUnderline where
    compare :: AttrUnderline -> AttrUnderline -> Ordering
compare AttrUnderline
a AttrUnderline
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (AttrUnderline -> Int
forall a. Enum a => a -> Int
P.fromEnum AttrUnderline
a) (AttrUnderline -> Int
forall a. Enum a => a -> Int
P.fromEnum AttrUnderline
b)

type instance O.ParentTypes AttrUnderline = '[]
instance O.HasParentTypes AttrUnderline

foreign import ccall "ibus_attr_underline_get_type" c_ibus_attr_underline_get_type :: 
    IO GType

instance B.Types.TypedObject AttrUnderline where
    glibType :: IO GType
glibType = IO GType
c_ibus_attr_underline_get_type

instance B.Types.BoxedEnum AttrUnderline

-- Enum AttrType
-- | Type enumeration of IBusText attribute.
data AttrType = 
      AttrTypeUnderline
    -- ^ Decorate with underline.
    | AttrTypeForeground
    -- ^ Foreground color.
    | AttrTypeBackground
    -- ^ Background color.
    | AnotherAttrType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> AttrType -> ShowS
[AttrType] -> ShowS
AttrType -> String
(Int -> AttrType -> ShowS)
-> (AttrType -> String) -> ([AttrType] -> ShowS) -> Show AttrType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttrType] -> ShowS
$cshowList :: [AttrType] -> ShowS
show :: AttrType -> String
$cshow :: AttrType -> String
showsPrec :: Int -> AttrType -> ShowS
$cshowsPrec :: Int -> AttrType -> ShowS
Show, AttrType -> AttrType -> Bool
(AttrType -> AttrType -> Bool)
-> (AttrType -> AttrType -> Bool) -> Eq AttrType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttrType -> AttrType -> Bool
$c/= :: AttrType -> AttrType -> Bool
== :: AttrType -> AttrType -> Bool
$c== :: AttrType -> AttrType -> Bool
Eq)

instance P.Enum AttrType where
    fromEnum :: AttrType -> Int
fromEnum AttrType
AttrTypeUnderline = Int
1
    fromEnum AttrType
AttrTypeForeground = Int
2
    fromEnum AttrType
AttrTypeBackground = Int
3
    fromEnum (AnotherAttrType Int
k) = Int
k

    toEnum :: Int -> AttrType
toEnum Int
1 = AttrType
AttrTypeUnderline
    toEnum Int
2 = AttrType
AttrTypeForeground
    toEnum Int
3 = AttrType
AttrTypeBackground
    toEnum Int
k = Int -> AttrType
AnotherAttrType Int
k

instance P.Ord AttrType where
    compare :: AttrType -> AttrType -> Ordering
compare AttrType
a AttrType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (AttrType -> Int
forall a. Enum a => a -> Int
P.fromEnum AttrType
a) (AttrType -> Int
forall a. Enum a => a -> Int
P.fromEnum AttrType
b)

type instance O.ParentTypes AttrType = '[]
instance O.HasParentTypes AttrType

foreign import ccall "ibus_attr_type_get_type" c_ibus_attr_type_get_type :: 
    IO GType

instance B.Types.TypedObject AttrType where
    glibType :: IO GType
glibType = IO GType
c_ibus_attr_type_get_type

instance B.Types.BoxedEnum AttrType