-- | 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.Notify.Enums
    ( 

 -- * Enumerations
-- ** Urgency #enum:Urgency#

    Urgency(..)                             ,




    ) 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.GI.Base.Signals as B.Signals
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 Urgency
-- | The urgency level of the notification.
data Urgency = 
      UrgencyLow
    -- ^ Low urgency. Used for unimportant notifications.
    | UrgencyNormal
    -- ^ Normal urgency. Used for most standard notifications.
    | UrgencyCritical
    -- ^ Critical urgency. Used for very important notifications.
    | AnotherUrgency Int
    -- ^ Catch-all for unknown values
    deriving (Int -> Urgency -> ShowS
[Urgency] -> ShowS
Urgency -> String
(Int -> Urgency -> ShowS)
-> (Urgency -> String) -> ([Urgency] -> ShowS) -> Show Urgency
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Urgency] -> ShowS
$cshowList :: [Urgency] -> ShowS
show :: Urgency -> String
$cshow :: Urgency -> String
showsPrec :: Int -> Urgency -> ShowS
$cshowsPrec :: Int -> Urgency -> ShowS
Show, Urgency -> Urgency -> Bool
(Urgency -> Urgency -> Bool)
-> (Urgency -> Urgency -> Bool) -> Eq Urgency
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Urgency -> Urgency -> Bool
$c/= :: Urgency -> Urgency -> Bool
== :: Urgency -> Urgency -> Bool
$c== :: Urgency -> Urgency -> Bool
Eq)

instance P.Enum Urgency where
    fromEnum :: Urgency -> Int
fromEnum UrgencyLow = 0
    fromEnum UrgencyNormal = 1
    fromEnum UrgencyCritical = 2
    fromEnum (AnotherUrgency k :: Int
k) = Int
k

    toEnum :: Int -> Urgency
toEnum 0 = Urgency
UrgencyLow
    toEnum 1 = Urgency
UrgencyNormal
    toEnum 2 = Urgency
UrgencyCritical
    toEnum k :: Int
k = Int -> Urgency
AnotherUrgency Int
k

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

foreign import ccall "notify_urgency_get_type" c_notify_urgency_get_type :: 
    IO GType

instance BoxedEnum Urgency where
    boxedEnumType :: Urgency -> IO GType
boxedEnumType _ = IO GType
c_notify_urgency_get_type