#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GdkPixbuf.Enums
(
Colorspace(..) ,
InterpType(..) ,
PixbufAlphaMode(..) ,
PixbufError(..) ,
catchPixbufError ,
handlePixbufError ,
PixbufRotation(..) ,
) 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
data PixbufRotation =
PixbufRotationNone
| PixbufRotationCounterclockwise
| PixbufRotationUpsidedown
| PixbufRotationClockwise
| AnotherPixbufRotation Int
deriving (Int -> PixbufRotation -> ShowS
[PixbufRotation] -> ShowS
PixbufRotation -> String
(Int -> PixbufRotation -> ShowS)
-> (PixbufRotation -> String)
-> ([PixbufRotation] -> ShowS)
-> Show PixbufRotation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PixbufRotation] -> ShowS
$cshowList :: [PixbufRotation] -> ShowS
show :: PixbufRotation -> String
$cshow :: PixbufRotation -> String
showsPrec :: Int -> PixbufRotation -> ShowS
$cshowsPrec :: Int -> PixbufRotation -> ShowS
Show, PixbufRotation -> PixbufRotation -> Bool
(PixbufRotation -> PixbufRotation -> Bool)
-> (PixbufRotation -> PixbufRotation -> Bool) -> Eq PixbufRotation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PixbufRotation -> PixbufRotation -> Bool
$c/= :: PixbufRotation -> PixbufRotation -> Bool
== :: PixbufRotation -> PixbufRotation -> Bool
$c== :: PixbufRotation -> PixbufRotation -> Bool
Eq)
instance P.Enum PixbufRotation where
fromEnum :: PixbufRotation -> Int
fromEnum PixbufRotationNone = 0
fromEnum PixbufRotationCounterclockwise = 90
fromEnum PixbufRotationUpsidedown = 180
fromEnum PixbufRotationClockwise = 270
fromEnum (AnotherPixbufRotation k :: Int
k) = Int
k
toEnum :: Int -> PixbufRotation
toEnum 0 = PixbufRotation
PixbufRotationNone
toEnum 90 = PixbufRotation
PixbufRotationCounterclockwise
toEnum 180 = PixbufRotation
PixbufRotationUpsidedown
toEnum 270 = PixbufRotation
PixbufRotationClockwise
toEnum k :: Int
k = Int -> PixbufRotation
AnotherPixbufRotation Int
k
instance P.Ord PixbufRotation where
compare :: PixbufRotation -> PixbufRotation -> Ordering
compare a :: PixbufRotation
a b :: PixbufRotation
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (PixbufRotation -> Int
forall a. Enum a => a -> Int
P.fromEnum PixbufRotation
a) (PixbufRotation -> Int
forall a. Enum a => a -> Int
P.fromEnum PixbufRotation
b)
foreign import ccall "gdk_pixbuf_rotation_get_type" c_gdk_pixbuf_rotation_get_type ::
IO GType
instance BoxedEnum PixbufRotation where
boxedEnumType :: PixbufRotation -> IO GType
boxedEnumType _ = IO GType
c_gdk_pixbuf_rotation_get_type
data PixbufError =
PixbufErrorCorruptImage
| PixbufErrorInsufficientMemory
| PixbufErrorBadOption
| PixbufErrorUnknownType
| PixbufErrorUnsupportedOperation
| PixbufErrorFailed
| PixbufErrorIncompleteAnimation
| AnotherPixbufError Int
deriving (Int -> PixbufError -> ShowS
[PixbufError] -> ShowS
PixbufError -> String
(Int -> PixbufError -> ShowS)
-> (PixbufError -> String)
-> ([PixbufError] -> ShowS)
-> Show PixbufError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PixbufError] -> ShowS
$cshowList :: [PixbufError] -> ShowS
show :: PixbufError -> String
$cshow :: PixbufError -> String
showsPrec :: Int -> PixbufError -> ShowS
$cshowsPrec :: Int -> PixbufError -> ShowS
Show, PixbufError -> PixbufError -> Bool
(PixbufError -> PixbufError -> Bool)
-> (PixbufError -> PixbufError -> Bool) -> Eq PixbufError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PixbufError -> PixbufError -> Bool
$c/= :: PixbufError -> PixbufError -> Bool
== :: PixbufError -> PixbufError -> Bool
$c== :: PixbufError -> PixbufError -> Bool
Eq)
instance P.Enum PixbufError where
fromEnum :: PixbufError -> Int
fromEnum PixbufErrorCorruptImage = 0
fromEnum PixbufErrorInsufficientMemory = 1
fromEnum PixbufErrorBadOption = 2
fromEnum PixbufErrorUnknownType = 3
fromEnum PixbufErrorUnsupportedOperation = 4
fromEnum PixbufErrorFailed = 5
fromEnum PixbufErrorIncompleteAnimation = 6
fromEnum (AnotherPixbufError k :: Int
k) = Int
k
toEnum :: Int -> PixbufError
toEnum 0 = PixbufError
PixbufErrorCorruptImage
toEnum 1 = PixbufError
PixbufErrorInsufficientMemory
toEnum 2 = PixbufError
PixbufErrorBadOption
toEnum 3 = PixbufError
PixbufErrorUnknownType
toEnum 4 = PixbufError
PixbufErrorUnsupportedOperation
toEnum 5 = PixbufError
PixbufErrorFailed
toEnum 6 = PixbufError
PixbufErrorIncompleteAnimation
toEnum k :: Int
k = Int -> PixbufError
AnotherPixbufError Int
k
instance P.Ord PixbufError where
compare :: PixbufError -> PixbufError -> Ordering
compare a :: PixbufError
a b :: PixbufError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (PixbufError -> Int
forall a. Enum a => a -> Int
P.fromEnum PixbufError
a) (PixbufError -> Int
forall a. Enum a => a -> Int
P.fromEnum PixbufError
b)
instance GErrorClass PixbufError where
gerrorClassDomain :: PixbufError -> Text
gerrorClassDomain _ = "gdk-pixbuf-error-quark"
catchPixbufError ::
IO a ->
(PixbufError -> GErrorMessage -> IO a) ->
IO a
catchPixbufError :: IO a -> (PixbufError -> Text -> IO a) -> IO a
catchPixbufError = IO a -> (PixbufError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain
handlePixbufError ::
(PixbufError -> GErrorMessage -> IO a) ->
IO a ->
IO a
handlePixbufError :: (PixbufError -> Text -> IO a) -> IO a -> IO a
handlePixbufError = (PixbufError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain
foreign import ccall "gdk_pixbuf_error_get_type" c_gdk_pixbuf_error_get_type ::
IO GType
instance BoxedEnum PixbufError where
boxedEnumType :: PixbufError -> IO GType
boxedEnumType _ = IO GType
c_gdk_pixbuf_error_get_type
data PixbufAlphaMode =
PixbufAlphaModeBilevel
| PixbufAlphaModeFull
| AnotherPixbufAlphaMode Int
deriving (Int -> PixbufAlphaMode -> ShowS
[PixbufAlphaMode] -> ShowS
PixbufAlphaMode -> String
(Int -> PixbufAlphaMode -> ShowS)
-> (PixbufAlphaMode -> String)
-> ([PixbufAlphaMode] -> ShowS)
-> Show PixbufAlphaMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PixbufAlphaMode] -> ShowS
$cshowList :: [PixbufAlphaMode] -> ShowS
show :: PixbufAlphaMode -> String
$cshow :: PixbufAlphaMode -> String
showsPrec :: Int -> PixbufAlphaMode -> ShowS
$cshowsPrec :: Int -> PixbufAlphaMode -> ShowS
Show, PixbufAlphaMode -> PixbufAlphaMode -> Bool
(PixbufAlphaMode -> PixbufAlphaMode -> Bool)
-> (PixbufAlphaMode -> PixbufAlphaMode -> Bool)
-> Eq PixbufAlphaMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PixbufAlphaMode -> PixbufAlphaMode -> Bool
$c/= :: PixbufAlphaMode -> PixbufAlphaMode -> Bool
== :: PixbufAlphaMode -> PixbufAlphaMode -> Bool
$c== :: PixbufAlphaMode -> PixbufAlphaMode -> Bool
Eq)
instance P.Enum PixbufAlphaMode where
fromEnum :: PixbufAlphaMode -> Int
fromEnum PixbufAlphaModeBilevel = 0
fromEnum PixbufAlphaModeFull = 1
fromEnum (AnotherPixbufAlphaMode k :: Int
k) = Int
k
toEnum :: Int -> PixbufAlphaMode
toEnum 0 = PixbufAlphaMode
PixbufAlphaModeBilevel
toEnum 1 = PixbufAlphaMode
PixbufAlphaModeFull
toEnum k :: Int
k = Int -> PixbufAlphaMode
AnotherPixbufAlphaMode Int
k
instance P.Ord PixbufAlphaMode where
compare :: PixbufAlphaMode -> PixbufAlphaMode -> Ordering
compare a :: PixbufAlphaMode
a b :: PixbufAlphaMode
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (PixbufAlphaMode -> Int
forall a. Enum a => a -> Int
P.fromEnum PixbufAlphaMode
a) (PixbufAlphaMode -> Int
forall a. Enum a => a -> Int
P.fromEnum PixbufAlphaMode
b)
foreign import ccall "gdk_pixbuf_alpha_mode_get_type" c_gdk_pixbuf_alpha_mode_get_type ::
IO GType
instance BoxedEnum PixbufAlphaMode where
boxedEnumType :: PixbufAlphaMode -> IO GType
boxedEnumType _ = IO GType
c_gdk_pixbuf_alpha_mode_get_type
data InterpType =
InterpTypeNearest
| InterpTypeTiles
| InterpTypeBilinear
| InterpTypeHyper
| AnotherInterpType Int
deriving (Int -> InterpType -> ShowS
[InterpType] -> ShowS
InterpType -> String
(Int -> InterpType -> ShowS)
-> (InterpType -> String)
-> ([InterpType] -> ShowS)
-> Show InterpType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InterpType] -> ShowS
$cshowList :: [InterpType] -> ShowS
show :: InterpType -> String
$cshow :: InterpType -> String
showsPrec :: Int -> InterpType -> ShowS
$cshowsPrec :: Int -> InterpType -> ShowS
Show, InterpType -> InterpType -> Bool
(InterpType -> InterpType -> Bool)
-> (InterpType -> InterpType -> Bool) -> Eq InterpType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InterpType -> InterpType -> Bool
$c/= :: InterpType -> InterpType -> Bool
== :: InterpType -> InterpType -> Bool
$c== :: InterpType -> InterpType -> Bool
Eq)
instance P.Enum InterpType where
fromEnum :: InterpType -> Int
fromEnum InterpTypeNearest = 0
fromEnum InterpTypeTiles = 1
fromEnum InterpTypeBilinear = 2
fromEnum InterpTypeHyper = 3
fromEnum (AnotherInterpType k :: Int
k) = Int
k
toEnum :: Int -> InterpType
toEnum 0 = InterpType
InterpTypeNearest
toEnum 1 = InterpType
InterpTypeTiles
toEnum 2 = InterpType
InterpTypeBilinear
toEnum 3 = InterpType
InterpTypeHyper
toEnum k :: Int
k = Int -> InterpType
AnotherInterpType Int
k
instance P.Ord InterpType where
compare :: InterpType -> InterpType -> Ordering
compare a :: InterpType
a b :: InterpType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (InterpType -> Int
forall a. Enum a => a -> Int
P.fromEnum InterpType
a) (InterpType -> Int
forall a. Enum a => a -> Int
P.fromEnum InterpType
b)
foreign import ccall "gdk_interp_type_get_type" c_gdk_interp_type_get_type ::
IO GType
instance BoxedEnum InterpType where
boxedEnumType :: InterpType -> IO GType
boxedEnumType _ = IO GType
c_gdk_interp_type_get_type
data Colorspace =
ColorspaceRgb
| AnotherColorspace Int
deriving (Int -> Colorspace -> ShowS
[Colorspace] -> ShowS
Colorspace -> String
(Int -> Colorspace -> ShowS)
-> (Colorspace -> String)
-> ([Colorspace] -> ShowS)
-> Show Colorspace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Colorspace] -> ShowS
$cshowList :: [Colorspace] -> ShowS
show :: Colorspace -> String
$cshow :: Colorspace -> String
showsPrec :: Int -> Colorspace -> ShowS
$cshowsPrec :: Int -> Colorspace -> ShowS
Show, Colorspace -> Colorspace -> Bool
(Colorspace -> Colorspace -> Bool)
-> (Colorspace -> Colorspace -> Bool) -> Eq Colorspace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Colorspace -> Colorspace -> Bool
$c/= :: Colorspace -> Colorspace -> Bool
== :: Colorspace -> Colorspace -> Bool
$c== :: Colorspace -> Colorspace -> Bool
Eq)
instance P.Enum Colorspace where
fromEnum :: Colorspace -> Int
fromEnum ColorspaceRgb = 0
fromEnum (AnotherColorspace k :: Int
k) = Int
k
toEnum :: Int -> Colorspace
toEnum 0 = Colorspace
ColorspaceRgb
toEnum k :: Int
k = Int -> Colorspace
AnotherColorspace Int
k
instance P.Ord Colorspace where
compare :: Colorspace -> Colorspace -> Ordering
compare a :: Colorspace
a b :: Colorspace
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Colorspace -> Int
forall a. Enum a => a -> Int
P.fromEnum Colorspace
a) (Colorspace -> Int
forall a. Enum a => a -> Int
P.fromEnum Colorspace
b)
foreign import ccall "gdk_colorspace_get_type" c_gdk_colorspace_get_type ::
IO GType
instance BoxedEnum Colorspace where
boxedEnumType :: Colorspace -> IO GType
boxedEnumType _ = IO GType
c_gdk_colorspace_get_type